?
Path : /home/admin/domains/happytokorea.com/public_html_bk/promice/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/promice/CheckRefID.php |
<? include("header.php");?> <div align="center"> <table width="1000px" border="0" cellspacing="0" cellpadding="0"> <tr valign="top"> <td width="190"><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><div align="center"> <? echo "$showmember"; ?></div></td> </tr> <tr> <td><img src="images/web_07.jpg" width="242" height="42" alt=""></td> </tr> <tr> <td> <? $page = $_GET['page']; $select_type="select * from productstype order by id asc"; $query_select=mysql_query($select_type); $num_rows=mysql_num_rows($query_select); if($num_rows<1){ echo "<br><br><center><b>ยังไม่มีการเพิ่มข้อมูลค่ะ</b></center>"; }else{ $select="select * from productstype order by id asc"; $q_ry = mysql_query($select); $num_rows=mysql_num_rows($q_ry); $pagesize=20; $rt=$num_rows%$pagesize; if($rt!=0) { $totalpage=floor($num_rows/$pagesize)+1; } else { $totalpage=floor($num_rows/$pagesize); $toppic_id=1; } if(empty($page)) { $page=1; } mysql_free_result($q_ry); $goto=($page-1)*$pagesize; $sql_select_mem="Select * From productstype order by id asc limit $goto,$pagesize"; $fect=mysql_query($sql_select_mem); if(!$fect) { ("ติดต่อฐานข้อมูลไม่ได้".mysql_error()); exit; } $bgcount=0; while($rows=mysql_fetch_array($fect)) { $idx =$rows['id']; $productstypecode =$rows['productstypecode']; $productstypename = $rows['productstypename']; $bgcount=$bgcount+1; $bgmod=$bgcount%2; if($bgmod==0){ $bgcolor="#E9E9E8"; }else{ $bgcolor="#FFFFFF"; } $s_num="select * from products where productstypecode = '$productstypecode'"; $query_select_num=mysql_query($s_num); $snum=mysql_num_rows($query_select_num); ?> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td height="23"> <div align="left"></div> <div align="left"></div> <div align="center"> </div> <div align="left"><img src="images/opened.gif" width="17" height="17"> <? echo "<a href=ProductList.php?PRD=$productstypecode>$productstypename</a> ($snum)"; ?></div></td> </tr> <tr> <td height="5"><img src="images/inline.jpg" width="184" height="3"></td> </tr> </table> <? } } ?> </td> </tr> <tr> <td> </td> </tr> </table></td> <td><table width="56%" border="0" cellspacing="1" cellpadding="1"> <tr> <td bgcolor="#FFCCFF">ตรวจสอบสถานะการสั่งซื้อ </td> </tr> <tr> <td> </td> </tr> <tr> <td> <div align="center"> <script language="JavaScript"> function checkRef1() { var ref1 = document.webFormRef1.refid.value; if( ref1.length ==0) { alert("กรุณาใส่เลขที่ใบสั่งซื้อด้วยค่ะ"); document.webFormRef1.refid.focus(); return false; } else return true; } </script> <table width="342" border="0" align="center" cellpadding="1" cellspacing="1"> <form method="post" action="CheckRefNow.php" name="webFormRef1" onSubmit="return checkRef1()"> <tr> <td width="121"><div align="right"> ใบสั่งซื้อเลขที่ :</div></td> <td width="214"> <input name="refid" type="text" class="inputxx" id="refid2" size="20"> </td> </tr> <tr> <td> </td> <td><input name="submit" type="submit" class="submitxx" value="ตรวจสอบ"></td> </tr> </form> </table> </div></td> </tr> <tr> <td bgcolor="#CCCCCC"><strong>รายการตรวจสอบ</strong> </td> </tr> <tr> <td> <? $sqla="select * from tb_order where refid='$_POST[orderid]'"; $db_query=mysql_db_query($db,$sqla); $resulta=mysql_fetch_array($db_query); $pPrice=$resulta[pPrice]; $pNum=$resulta[pNum]; $id_cus=$resulta[id_cus]; $date=$resulta[date]; $pId=$resulta[pId]; $paystatus=$resulta[paystatus]; $sqlm="select * from member where usermem='$id_cus'"; $db_query=mysql_db_query($db,$sqlm); $resultm=mysql_fetch_array($db_query); $name=$resultm[name]; $address=$resultm[address]; $province=$resultm[province]; $zipcode=$resultm[zipcode]; $phone=$resultm[phone]; $email=$resultm[email]; ?> <table width="639" border="0" cellspacing="1" cellpadding="1"> <tr> <td width="126" valign="top"> <div align="right"> ใบสั่งซื้อเลขที่:</div></td> <td width="506"><b><? echo "$_POST[orderid]"; ?></b></td> </tr> <tr> <td valign="top"> <div align="right">ลูกค้า :</div></td> <td><? echo "$name<br>ท??????? : $address $province $zipcode<br>????????: $phone Email : $email"; ?></td> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="jobscss"> <td bgcolor="#FFFFFF">วันที่สั่งซื้อ : <? echo "$date"; ?></td> </tr> <tr class="jobscss"> <td bgcolor="#FFFFFF"> <table width="640" border="0" cellspacing="1" cellpadding="1"> <tr bgcolor="#993300"> <td width="285" bgcolor="#FFCCFF"><div align="center" class="style1"> ชื่อสินค้า </div></td> <td width="97" bgcolor="#FFCCFF"><div align="center" class="style1">ราคา</div></td> <td width="120" bgcolor="#FFCCFF"><div align="center" class="style1">จำนวน</div></td> <td width="125" bgcolor="#FFCCFF"><div align="center" class="style1">รวม</div></td> </tr> </table> <? $page = $_GET['page']; $select_type="select * from tb_order where refid = '$_POST[orderid]' order by id asc"; $query_select=mysql_query($select_type); $num_rows=mysql_num_rows($query_select); if($num_rows<1){ echo "<br><br><center><b>ยังไม่มีการเพิ่มข้อมูลค่ะ</b></center>"; }else{ $select="select * from tb_order where refid = '$_POST[orderid]' order by id asc"; $q_ry = mysql_query($select); $num_rows=mysql_num_rows($q_ry); $pagesize=20; $rt=$num_rows%$pagesize; if($rt!=0) { $totalpage=floor($num_rows/$pagesize)+1; } else { $totalpage=floor($num_rows/$pagesize); $toppic_id=1; } if(empty($page)) { $page=1; } mysql_free_result($q_ry); $goto=($page-1)*$pagesize; $sql_select_mem="Select * From tb_order where refid = '$_POST[orderid]' order by id asc limit $goto,$pagesize"; $fect=mysql_query($sql_select_mem); if(!$fect) { ("ติดต่อฐานข้อมูลไม่ได้".mysql_error()); exit; } $bgcount=0; while($rows=mysql_fetch_array($fect)) { $idxx =$rows['id']; $pPrice=$rows[pPrice]; $pNum=$rows[pNum]; $id_cus=$rows[id_cus]; $date=$rows[date]; $pId=$rows[pId]; $paystatus=$rows[paystatus]; $sqlp="select * from products where productscode='$pId'"; $db_query=mysql_db_query($db,$sqlp); $resultp=mysql_fetch_array($db_query); $productsname=$resultp[productsname]; $productsprice=$resultp[productsprice]; $bgcount=$bgcount+1; $bgmod=$bgcount%2; if($bgmod==0){ $bgcolor="#E9E9E8"; }else{ $bgcolor="#FFFFFF"; } ?> <table width="640" border="0" cellspacing="1" cellpadding="1"> <tr> <td width="285"><? echo "$productsname"; ?></td> <td width="97"><div align="center"><? echo "$productsprice"; ?></div></td> <td width="120"><div align="center"><? echo "$pNum"; ?></div></td> <td width="125"><div align="center"> <? $sum1 = $productsprice*$pNum; echo "$sum1"; ?> </div></td> </tr> </table> <? $sum2 = $sum2+$sum1; } } ?> </td> </tr> <tr class="jobscss"> <td height="19"><table width="640" border="0" cellspacing="1" cellpadding="1"> <tr> <td width="508"><div align="right"><strong>รวมราคาที่ชำระ:</strong> </div></td> <td width="125"><div align="center"><? echo "<b>$sum2</b>"; ?></div></td> </tr> </table></td> </tr> <tr class="jobscss"> <td><strong><span class="maekhawtom">หน้าที่:</span></strong> <span class="maekhawtom"> <? for($i=1;$i<$page;$i++) { echo"[<a href='$PHP_SELF?page=$i'>$i</a>]"; } echo"[<b>$page</b>]"; for($i=$page+1;$i<=$totalpage;$i++) { echo"[<a href='$PHP_SELF?page=$i'>$i</a>]"; } ?> </span><span class="maekhawtom"> </span></td> </tr> <tr> <td><div align="center"><br> <? if ($paystatus == "11111") { echo "คุณได้ทำการยืนยันการชำระเงินเป็นที่เรียบร้อย สถานะ : <u>กำลังตรวจสอบยอดการโอน</u>"; }else if ($paystatus == "22222") { echo "คุณได้ทำการยืนยันการชำระเงินเป็นที่เรียบร้อย สถานะ : <u>กำลังอยู่ระหว่างการจัดเตรียมบรรจุกล่อง</u>"; }else if ($paystatus == "99999") { echo "คุณได้ทำการยืนยันการชำระเงินเป็นที่เรียบร้อย สถานะ : <u>จัดส่งเรียบร้อยแล้ว</u>"; }else if ($paystatus == "") { echo "???????????????????????????? ?????<a href=ConfirmPayment.php>?????????????????</a>???????"; } ?> </div></td> </tr> </table></td> </tr> </table></td> </tr> </table> </div></td> </tr></div> <? include("footer.php");?> </body> </html>