<table width="760" border="0"> <tr> <td colspan="6"><p class="title_shop">รายชื่อผู้สมัคร</p></td> </tr> <tr class="gray"> <td width="98" align="center">ลำดับ</td> <td align="center">ชื่อผู้สมัคร</td> <td align="center">ชื่อผลิตภัณฑ์</td> <td width="157" align="center">ชื่อผลิตภัณฑ์</td> <td width="109" align="center">เมื่อ</td> <td align="center">ลบ</td> </tr> <? $sql="select * from customer order BY customer_id asc"; $dbquery = mysql_db_query($dbname, $sql); While ($rs = mysql_fetch_array($dbquery)){ $customer_id=$rs["customer_id"]; $txtName=$rs["txtName"]; $product=$rs["product"]; $date=$rs["date"]; ?> <tr> <td align="center"><?=$customer_id?></td> <td align="center"><?=$txtName?></td> <td align="center"><?=$product?></td> <td align="center"><a href="javascript:popup('read_customer.php?id=<?=$customer_id?>','test','scrollbars=yes,width=750,height=800,left=20,top=20')" >รายละเอียด</a></td> <td align="center"><?=$date?></td> <td align="center"><a href="javascript:confirmDelete('del_customer.php?customer_id=<?=$customer_id?>')"><img src="images/false.gif" alt="ลบหมวดหมู่นี้" width="25" height="25" border="0" /></a></td> </tr> <? }?> <td colspan="6"> </td> </tr> <tr> <td></td> </tr> </table>
<?php include "chk_login.php"; $customer_id=$_GET[customer_id]; include "connect.php"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <? $sql2="select * from customer where customer_id='$customer_id'"; $result2=mysql_db_query($dbname,$sql2); $Num_Rows = mysql_num_rows($result2); if ($Num_Rows<>0){ ?> <script> alert("มีข้อมูลอยู่ไม่สามารถลบได้");history.back(); </script> <? }else{ $sql="delete from customer where customer_id='$customer_id';"; $result=mysql_db_query($dbname,$sql); if ($result) { ?> <meta http-equiv='refresh' content='0;URL=index.php?mode=customer'> <? } else { ?> <script> alert("ไม่สามารถข้อมูลได้");history.back(); </script> <? } } ?> </body> </html>
<?php include "chk_login.php"; $customer_id=$_GET[customer_id]; include "connect.php"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <? $sql="delete from customer where customer_id='$customer_id';"; $result=mysql_db_query($dbname,$sql); if ($result) { ?> <meta http-equiv='refresh' content='0;URL=index.php?mode=customer'> <? } else { ?> <script> alert("ไม่สามารถข้อมูลได้");history.back(); </script> <? } ?> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง