--- index.php 2001/06/06 03:18:29 1.1.1.1 +++ index.php 2001/06/06 08:46:45 1.5 @@ -14,23 +14,35 @@ 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,13 +139,19 @@ } $row = DBQuery("SELECT naziv FROM products WHERE (product_id=$id)"); list($product_name) = $row[0]; - DBClose(); ?> - +\n"; + else echo "\n"; +?> <?= $product_name ?> @@ -153,15 +171,24 @@ -
- + - + - - + + + + +
FINE CHEMICALS
FINE CHEMICALS
PRODUCT MATRIX
PRODUCT MATRIX
Date of last change:


product to
Date of last change:

@@ -191,7 +218,7 @@
- + = 0): ?>
Quality and Regulations
@@ -234,7 +261,7 @@
- + = 0): ?>
Dosage Form Market
@@ -270,7 +297,7 @@
- + = 0): ?>
Product Evaluation
@@ -311,7 +338,7 @@
- + +?>


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




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