--- index.php 2001/06/06 07:25:51 1.3 +++ index.php 2001/06/07 06:06:05 1.8 @@ -11,7 +11,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) { @@ -20,18 +36,29 @@ echo "No access.\n"; exit; } -// if (!$id) { echo "No product ID!\n"; exit; } - if (!$id) { $id=1; } + # if (!$id) { echo "No product ID!\n"; exit; } + DBOpen(); + if (!$id) { + $id = 1; + $row = DBQuery("SELECT MIN(product_id) FROM products"); + if ($row[0]) $id = $row[0][0]; + } $error = ""; $msg = false; $err = 0; - DBOpen(); $row = DBQuery("SELECT market,production,purchasing,economics,risks,competition,potential,portfolio,sales,quality,dosage,evaluation,comment FROM user_product WHERE (product_id=$id) AND (login='$PHP_AUTH_USER')"); - if (is_array($row[0]) && count($row[0]) > 0) bool_fix($row[0]); list($ok_market, $ok_production, $ok_purchasing, $ok_economics, $ok_risks, $ok_competition, $ok_potential, $ok_portfolio, $ok_sales, $ok_quality, $ok_dosage, $ok_evaluation, - $ok_comment) = $row[0]; + $ok_comment) = array(-1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1); + if (is_array($row[0])) { + bool_fix($row[0]); + list($ok_market, $ok_production, $ok_purchasing, + $ok_economics, $ok_risks, $ok_competition, + $ok_potential, $ok_portfolio, $ok_sales, $ok_quality, + $ok_dosage, $ok_evaluation, $ok_comment) = $row[0]; + } if ($save) { $error = ""; $q = array(); @@ -128,23 +155,20 @@ } $row = DBQuery("SELECT naziv FROM products WHERE (product_id=$id)"); list($product_name) = $row[0]; - DBClose(); ?> '; - } else { - print ''; - } + $ns_ua = "Mozilla/4."; + $old_netscape = (substr($HTTP_USER_AGENT, 0, strlen($ns_ua)) == $ns_ua) ? + true : false; + if ($old_netscape) $old_netscape = strstr($HTTP_USER_AGENT, "MSIE") ? false : true; + if ($old_netscape) echo "\n"; + else echo "\n"; ?> -<?= $product_name ?> +<?= ereg_replace("\r?\n(.*)$", " (\\1)", $product_name); ?> @@ -163,15 +187,25 @@ -
- - - + + + - - + + + + +
FINE CHEMICALS
PRODUCT MATRIX
FINE CHEMICALS
\\1", $product_name); ?>
PRODUCT MATRIX
Date of last change:


product to
Date of last change:

@@ -194,14 +228,14 @@
  • 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 

- + = 0): ?>
Quality and Regulations
@@ -244,7 +278,7 @@
- + = 0): ?>
Dosage Form Market
@@ -280,7 +314,7 @@
- + = 0): ?> @@ -321,7 +355,7 @@
Product Evaluation
@@ -299,7 +333,7 @@ - +
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. 
- + +?>


Comments
= 0): ?> 0): ?>
", ">", $out); $out = ereg_replace("\r?\n", "
", $out); echo $out; -?>




- + = 0): ?> - - + + +
Risks
@@ -351,13 +385,15 @@
     Logged in as .  [Logout] 
- + +