--- index.php 2001/06/06 07:25:51 1.3 +++ index.php 2001/06/06 08:37:01 1.4 @@ -20,18 +20,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,21 +139,18 @@ } $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 ?> @@ -163,15 +171,24 @@ -
- + - + - - + + + + +
FINE CHEMICALS
FINE CHEMICALS
PRODUCT MATRIX
PRODUCT MATRIX
Date of last change:


product to
Date of last change:

@@ -201,7 +218,7 @@
- + = 0): ?>
Quality and Regulations
@@ -244,7 +261,7 @@
- + = 0): ?>
Dosage Form Market
@@ -280,7 +297,7 @@
- + = 0): ?>
Product Evaluation
@@ -321,7 +338,7 @@
- + +?>


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




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