--- index.php 2001/06/06 08:37:01 1.4 +++ index.php 2001/06/21 10:02:07 1.10 @@ -3,6 +3,7 @@ $auth = true; if ($auth && (!isset($PHP_AUTH_USER) || !isset($PHP_AUTH_PW))) $auth = false; + if ($change) { $id = $new_id; $edit = false; } if ($auth) { include("conn.php"); DBOpen(); @@ -11,7 +12,23 @@ if (count($row) <= 0) $auth = false; if ($auth) { $row = $row[0]; - if ($PHP_AUTH_PW != $row[0]) $auth = false; + if (substr($row[0], 0, 5) == "auth_") { + switch (strtoupper(substr($row[0], 5))) { + case "POP3": + include("auth_POP3.php"); + $pop = new POP3(); + $pop->connect("intranet.pliva.hr"); + $ret = $pop->checklogin($PHP_AUTH_USER, $PHP_AUTH_PW); + $pop->quit(); + if (!$ret) $auth = false; + break; + default: $auth = false; break; + } + } else { + $pw = md5($PHP_AUTH_USER.$PHP_AUTH_PW); + if ($pw != $row[0]) $auth = false; + } + # if ($PHP_AUTH_PW != $row[0]) $auth = false; } } if (!$auth || $relogin == $PHP_AUTH_USER) { @@ -45,7 +62,7 @@ } if ($save) { $error = ""; - $q = array(); + $q = array("cas_no='$cas_no'"); if ($error == "" && $ok_market > 0) { if (!CheckURL($info_market)) { $error = "Invalid URL."; $err = 1; } if ($error == "") array_push($q, "link_market='$info_market',cust_existing='$cust_existing',cust_potential='$cust_potential',fc_price='$fc_price'"); @@ -123,7 +140,7 @@ } if ($error == "") $msg = true; else $edit = 1; } else { - $row = DBQuery("SELECT link_market,link_production,link_purchasing,link_economics,link_risks,link_competition,link_potential,link_quality,link_dosage,link_sales,comment,cust_potential,cust_existing,fc_price,competitors,holders,market_size,quality,registrations,last_fda,cap_nominal,cap_util,ther_class,indication,sales_1999,launch_year,mat_raw,suppliers,mat_cost,fc_rank,fc_share,maturity,comp_intensity,comp_position,cogs,op_income,break_even,m3,sales_img,risks FROM products WHERE (product_id=$id)"); + $row = DBQuery("SELECT link_market,link_production,link_purchasing,link_economics,link_risks,link_competition,link_potential,link_quality,link_dosage,link_sales,comment,cust_potential,cust_existing,fc_price,competitors,holders,market_size,quality,registrations,last_fda,cap_nominal,cap_util,ther_class,indication,sales_1999,launch_year,mat_raw,suppliers,mat_cost,fc_rank,fc_share,maturity,comp_intensity,comp_position,cogs,op_income,break_even,m3,sales_img,risks,cas_no FROM products WHERE (product_id=$id)"); if (count($row) <= 0) { echo "No such product ID."; exit; } list($info_market, $info_production, $info_purchasing, $info_economics, $info_risks, $info_competition, @@ -135,7 +152,7 @@ $launch_year, $mat_raw, $suppliers, $mat_cost, $fc_rank, $fc_share, $maturity, $comp_intensity, $comp_position, $cogs, $op_income, $break_even, - $m3, $sales_img, $risks) = $row[0]; + $m3, $sales_img, $risks, $cas_no) = $row[0]; } $row = DBQuery("SELECT naziv FROM products WHERE (product_id=$id)"); list($product_name) = $row[0]; @@ -152,7 +169,7 @@ if ($old_netscape) echo "\n"; else echo "\n"; ?> -<?= $product_name ?> +<?= $product_name ?><?php if ($cas_no): ?> (CAS No: <?= $cas_no ?>)<?php endif; ?> @@ -171,24 +188,23 @@ +
- + - - - +?> - @@ -316,7 +332,7 @@ @@ -369,13 +385,14 @@ - +
FINE CHEMICALS

CAS No:
CAS No:
PRODUCT MATRIX

product to
 
product to
Date of last change:
Date of last change:

@@ -211,7 +227,7 @@
  • relevant competitors: 0): ?>
  • holders of the US DMF: 0): ?>
  • -
  • API market size 1999: 0): ?> t/US$
  • +
  • API market size 1999: 0): ?>
CLASS="error" > 0): ?>"more data" URL: more data 

- +
Sales: realisation&plan / Price trend
= 0): ?> 0): ?>Please choose an image to display here.


NOTE: The previously specified image will be used if no image is specified. 
= 0): ?> 0): ?>Please choose an image to display here.


NOTE: The previously specified image will be used if no image is specified. 
   Logged in as .  [Logout]   Logged in as .  [Logout]  
- + +