--- index.php 2001/06/06 03:18:29 1.1.1.1 +++ index.php 2001/06/07 06:06:05 1.8 @@ -11,26 +11,54 @@ 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) { + if (!$auth || $relogin == $PHP_AUTH_USER) { Header("WWW-Authenticate: Basic realm=\"fcproducts\""); Header("HTTP/1.0 401 Unauthorized"); echo "No access.\n"; exit; } - if (!$id) { echo "No product ID!\n"; exit; } + # 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(); @@ -127,14 +155,20 @@ } $row = DBQuery("SELECT naziv FROM products WHERE (product_id=$id)"); list($product_name) = $row[0]; - DBClose(); ?> - -<?= $product_name ?> +\n"; + else echo "\n"; +?> +<?= ereg_replace("\r?\n(.*)$", " (\\1)", $product_name); ?> @@ -153,15 +187,25 @@ -
- - - + + + - - + + + + +
FINE CHEMICALS
PRODUCT MATRIX
FINE CHEMICALS
\\1", $product_name); ?>
PRODUCT MATRIX
Date of last change:


product to
Date of last change:

@@ -184,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
@@ -234,7 +278,7 @@
- + = 0): ?>
Dosage Form Market
@@ -270,7 +314,7 @@
- + = 0): ?> @@ -311,7 +355,7 @@
Product Evaluation
@@ -289,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
@@ -341,13 +385,15 @@
     Logged in as .  [Logout] 
- + +