<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>รายละเอียดการขายสินค้า</title> <style type="text/css"> body { margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; font-size: 12px; } a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } .sizes2 { color: #CC0000; } .ass { font-size: 14px; color: #00F; font-style: normal; } </style> </head> <body> <? include"config.php";?> <table width="629" border="0"> <tr> <td><img src="image/logo.png" width="130" height="131" /></td> <td width="619" valign="middle"><b><font color="#0000FF" size="3"> <?=$nameshopt?> </font></b></td> </tr> </table> <br /> <? include"connect.php"; $sql0 ="SELECT DISTINCT `order_cart` FROM `cart_rmutl` WHERE `order_cart` != '0' ORDER BY order_cart DESC"; $result0=mysql_db_query($dbname,$sql0); while($record0=mysql_fetch_array($result0)){ ?> <? $listproduct=$record0[order_cart];?> <? //############################################# $ss="SELECT * FROM `cart_rmutl` WHERE `order_cart`='$listproduct'"; $ss1=mysql_db_query($dbname,$ss); $rs1=mysql_fetch_array($ss1); $usercart=$rs1[user_cart]; ?> <table width="630" border="0" align="left" cellpadding="1" cellspacing="3"> <tr> <td colspan="4"> รายการสั่งซื้อสินค้า <?=$rs1[date_cart ]?></td> </tr> <tr> <td width="415" bgcolor="#F5F5F5"> สินค้า</td> <td width="51" align="center" bgcolor="#F5F5F5">จำนวน</td> <td width="72" align="center" bgcolor="#F5F5F5">ราคา</td> <td width="94" align="center" bgcolor="#F5F5F5">รวม</td> </tr> <? $strSql = "SELECT * FROM cart_rmutl where order_cart='$listproduct'"; $strResult=@mysql_query($strSql) or die(mysql_error()); //$row = mysql_fetch_array($strResult); $row = mysql_num_rows($strResult); //echo "จำนวนแถว ",$row,"<br>"; $i=0; $SumTotal2=0;$total=0; while($row = mysql_fetch_array($strResult)){ $total = $row['price_cart']*$row['qty_cart']; $SumTotal2 = $SumTotal2 + $total; $SumTotal2=$SumTotal2; $pro_cart=$row[pro_cart]; ?> <tr> <td> <?php echo ++$i; ?>. <? $product=$row['pro_cart']; //############################# $sql3="SELECT * FROM `product_rmutl` WHERE `no_pro`='$product'"; $result3=mysql_db_query($dbname,$sql3); $rs3=mysql_fetch_array($result3); $namepro=$rs3[name_pro]; echo $namepro; ?> </td> <td align="center"><?=$row['qty_cart'];?></td> <td align="center"><?=$row['price_cart'];?><? $statuss = $row['status_cart'];?></td> <td align="right"><font color="#0000FF"> <?=number_format($total,2);?> </font></td> </tr> <? } ?> <tr> <td colspan="3" bgcolor="#99CCFF"> รวมทั้งหมด</td> <td align="right" bgcolor="#99CCFF"><font color="#FF0000"><strong> <?=number_format($SumTotal2,2);?> </strong></font></td> </tr> </table> <? $SumSum=$SumSum+$SumTotal2; } echo '<font size="+2"><font color="#0000FF"> รวมยอดขายทั้งสิ้น <font color="#FF0000">'.number_format($SumSum,2).'</font> บาท</font></font>'; ?> </body>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง