<?php require_once('Connections/AddDataCustomers.php'); include("header.php"); mysql_query("SET NAMES UTF8"); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_AddDataCustomers, $AddDataCustomers); $query_ShowData = "SELECT * FROM data_customers"; $ShowData = mysql_query($query_ShowData, $AddDataCustomers) or die(mysql_error()); $row_ShowData = mysql_fetch_assoc($ShowData); $i=1; $totalRows_ShowData = mysql_num_rows($ShowData); ?> <!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> <p> </p> <p> </p> <center> <p><b>ข้อมูลลูกค้าที่นำเครื่องมาซ่อม</b> </p> <p> </p> </center> <table width="1039" border="0" align="center"> <tr> <td align="center" bgcolor="#00CC66"><strong>ลำดับ</strong></td> <td align="center" bgcolor="#00CC66"><strong>ชื่อ</strong></td> <td align="center" bgcolor="#00CC66"><strong>นามสกุล</strong></td> <td align="center" bgcolor="#00CC66"><strong>ยี่ห้อมือถือ</strong></td> <td align="center" bgcolor="#00CC66"><strong>เบอร์ติดต่อ</strong></td> <td align="center" bgcolor="#00CC66"><strong>วันที่มาซ่อม</strong></td> <td align="center" bgcolor="#00CC66"><strong>บริการที่เข้ารับ</strong></td> <td colspan="2" align="center" bgcolor="#00CC66"><strong>ตัวเลือก</strong></td> </tr> <?php do { ; ?> <tr> <td><?php echo $i++; ?></td> <td><?php echo $row_ShowData['ctm_name']; ?></td> <td><?php echo $row_ShowData['ctm_surname']; ?></td> <td><?php echo $row_ShowData['ctm_product']; ?></td> <td><?php echo $row_ShowData['ctm_tel']; ?></td> <td><?php echo $row_ShowData['ctm_date']; ?></td> <td><?php echo $row_ShowData['ctm_fix']; ?></td> <td align="center"><a href="delete.php?ctm_id=<?php echo $row_ShowData['ctm_id']; ?>">ลบ</a></td> <td align="center"><a href="update.php?ctm_id=<?php echo $row_ShowData['ctm_id']; ?>">แก้ไข</a></td> </tr> <?php } while ($row_ShowData = mysql_fetch_assoc($ShowData)); ?> </table> <p> </p> <center><form id="form1" name="form1" method="post" action="search.php"> <label for="word"> ค้นหา :</label> <input type="text" name="word" id="word" /> <input type="submit" name="btnsearch" id="btnsearch" value="Submit" /> </form></center> </body> </html> <?php mysql_free_result($ShowData); ?>
<a href="delete.php?ctm_id=<?php echo $row_ShowData['ctm_id']; ?>" onclick="return confirm('คุณแน่ใจที่จะลบ <?php echo $row_ShowData['ctm_name']; ?>');">ลบ</a>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง