Location: PHPKode > projects > Einkaufszettelgenerator > EZettel0.1/prod_list.php
<?
session_start();
$us= $HTTP_SESSION_VARS['uid'];
//echo "user=$us<br>"; 
?>
<HTML>

<LINK REL="stylesheet" TYPE="text/css" HREF="menu.css">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Menu - prodlist</title>

</head>
<body class="body1">
<?
include("menu.ini");
$summa=0;

echo "<TABLE BORDER=0 ALIGN=center CELLSPACING=0 CELLPADDING=5 class=prod><TR>";

$strsql_m = "select distinct markt_name, markt_id from markt where user_id='$us';";
   $result_m = mysql_query($strsql_m, $connection);
   $m=0;
    while ( $row_m = mysql_fetch_row($result_m) )
       {
        $m+=1;
       $strsql_meng = "select prod_name from product where ((sel='Yes') and (markt='$row_m[1]') and user_id='$us') ORDER BY sector;";
   $result_meng = mysql_query($strsql_meng, $connection);
   $num_rows = mysql_num_rows($result_meng); 
   if ($num_rows!=0)
        {
     $summa_l=0;   
   echo "<TD VALIGN=top align=left>";  
     echo "<TABLE border=0  CELLSPACING=0 CELLPADDING=2><tr><td colspan=2>$row_m[0]</td></tr><TR><TD><font color=800080><B>Продукт</font></B></TD><TD><B><font color=800080>Количество</font></B></TD><TR>";
   $strsql1 = "select prod_name,prod_type,prod_price, menge,markt, prod_id from product where ((sel='Yes') and (markt='$row_m[1]') and user_id='$us') ORDER BY sector;";
   $result1 = mysql_query($strsql1, $connection);
   $i=0;
    while ( $row = mysql_fetch_row($result1) )
       {
        $i+=1;
echo "<TR><TD><font size=-1>$row[0]</TD><TD align=right><font size=-1>$row[3]</TD><TR>";
 
$summa_l=$summa_l+$row[2]*$row[3];
      }

echo "</TABLE><P>Summa=$summa_l<P></TD><TD VALIGN=top align=right> ";
$summa=$summa+$summa_l; 

echo "</td>";
}
 }
echo "</tr></table>";

echo "<center><B>SUMMA $summa</B></center>";   

?>   
<p><center><A HREF=start.php>На первую страницу</a></center>
Return current item: Einkaufszettelgenerator