- $action = $_GET['action'];
- switch ($action){
- default:
- echo "<div class='redirect' style='margin:0; padding-top: 7px;'>В корзине ".sizeof($arrgoods)." товаров</div>";
- echo "<div class='text' style='margin-top:0; border-top:0;'>";
- echo "<form action='shop_order.php?action=send' method='post' name='order' onsubmit='return Check()'>";
- echo "<table width='100%' cellspacing='0'>";
- $all = 0;
- foreach($arrgoods as $gid => $q){
- $getgood = mysql_query("select * from `goods` where `id`=$gid");
- $arrg = mysql_fetch_array($getgood);
- $all = $all + ($arrg['price']*$arrgoods[$gid]);
- echo "<tr><td class='order_item'>$lid<a href='shop.php?action=view&id=$gid'><b>".$arrg['name']."</b></a></td>";
- echo "<td class='order_item'><input type='text' size='1' name='q_$gid' value='$q' /> шт.</td>";
- echo "<td class='order_item' style='font-size:12px;'><input type='button' value='Удалить' onclick='top.location.href=\"shop_order.php?action=delete&id=$id\"'/></td>";
- echo "<td class='order_item' style='text-align:right;'><b><label name='sum'>".$arrg['price']."</label></b> у.е.</td></tr>";
- }
- echo "</table>";
- echo "<p style='border-top:2px solid #276100; text-align:right;'><b>Итого: <label id='sum'>$all</label> у.е.</b></p>";
- echo "</div>";
- break;
- }