0byt3m1n1-V2
Path:
/
home
/
bangtoey
/
domains
/
bangtoey.go.th
/
public_html
/
contacts
/
[
Home
]
File: del_data.php
<? session_start(); Header("Content-Type: text/html; charset=UTF-8"); if($_SESSION[user]=="") { session_destroy(); $message = "กรุณา Login ก่อน."; $url = "../admin/index.php"; include("../admin/alert.php"); exit; } if($_GET['chk_p']){ $chk_p = $_GET['chk_p']; }else{ $chk_p = $_POST['chk_p']; } if(empty($chk_p) || ($chk_p==0)){ echo "..Error..";die; } if($_GET['chk_del']){ $chk_del = $_GET['chk_del']; }else{ $chk_del = $_POST['chk_del']; } if($_GET['code_id']){ $code_id = $_GET['code_id']; }else{ $code_id = $_POST['code_id']; } if($_GET['code_1']){ $code_1 = $_GET['code_1']; }else{ $code_1 = $_POST['code_1']; } $code_1 = htmlspecialchars($code_1); if($_GET['c_id']){ $c_id = $_GET['c_id']; }else{ $c_id = $_POST['c_id']; } if($_GET['c_thumb']){ $c_thumb = $_GET['c_thumb']; }else{ $c_thumb = $_POST['c_thumb']; } if($chk_del==1){ include("../include/config_db.php"); $f_name = ""; switch ($chk_p) { case 1: $sql = "delete from `contact_admin_detail` where (`id`='$c_id') LIMIT 1"; $f_name = "contact_admin_detail"; break; } $dbquery = mysql_query($sql) or die("Can't send query !"); include("../include/close_db.php"); echo "<br>"; echo "<h3><p align=\"center\"><font color='#0000BB'>ลบข้อมูลเรียบร้อยแล้ว</font></p></h3><br>"; switch ($chk_p) { case 1: $url = "admin.php?#top_page"; header ("Location: ".$url); break; } }else { $s_name_1 = ''; $s_caption_1 = ''; switch ($chk_p) { case 1: $s_caption_1 = 'ติดต่อสอบถาม'; $s_name_1 = 'ลบข้อมูล'; break; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <link href="svstyles.css?v=<?php echo filemtime('svstyles.css');?>" rel="stylesheet" type="text/css" /> <link href="Hoverable.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="../css-top/topmenu.css"> <script src="../css-top/src_rmenu.js"></script> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #DFF2C6; } --> </style> <style type="text/css"> <!-- a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } .style5 {color: #000000; font-weight: bold; } .style6 {color: #000000} --> </style></head> <body background="../images/0bg1.png" style="background-repeat:no-repeat; background-position:top"> <!-- content --> <div align="center"> <table width="980" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="604" align="center" valign="top"><table width="1100" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><div align="center"> <table width="980" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="515" align="center" valign="top"> </td> </tr> <tr> <td height="364" align="center" valign="top"><iframe src="/title_head.html" width="980" height="335" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe></td> </tr> <tr> <td align="center" valign="top"><iframe src="/menu-top.html" width="980" height="53" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe></td> </tr> <tr> <td height="150" align="center" valign="top"> </td> </tr> </table> </div></td> </tr> <tr> <td valign="top"><div align="center"></div></td> </tr> </table></td> </tr> <tr> <td align="center" valign="top"><table width="980" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <th align="center" valign="top" scope="col"><table width="980" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <th align="center" valign="top" scope="col"> <table width="960" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <th height="5" align="center" valign="top" scope="col"> </th> </tr> <tr> <td align="center" valign="top"> <table width="960" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <th valign="top" scope="col"></th> </tr> <tr> <td valign="top"> <div align="center"> <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr><td height="5" valign="top"> <a name="toppage"></a></td> </tr> <tr> <td class="title2"><div align="center"><img src="../images/bgcontent/ban-t2_11.png" width="640" height="78"></div></td> </tr> <tr><td height="10" valign="top"> </td></tr> <tr> <td> <table width="80%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#669999"> <tr> <td> <? switch ($chk_p) { case 1:echo " <a href=\"admin.php?#top_page\" class='hmenu'><< กลับไปหน้า $s_caption_1</a>"; break; } ?> </td> </tr> </table> <table width="80%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#669999"> <form name="form1" enctype="multipart/form-data" method="post" action="del_data.php"> <tr bgcolor="#FF0000"> <td align="center"><font color="#FFFFFF"><b>ลบข้อมูล <?=$s_caption_1; ?></b></font></td> </tr> <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td width="50%" align="right"><?=$s_name_1; ?> :: </td> <td> <? switch ($chk_p) { case 1: if(!empty($c_id) and ($c_id>0)) { echo "ID ".$c_id." ".$code_1 ; }else { echo "ID ".$code_id." ".$code_1 ; } break; } ?> </td> </tr> <tr> <td> </td> </tr> <tr> <td colspan="2" align="center"> <input type="hidden" name="code_id" value="<?echo $code_id;?>"> <input type="hidden" name="code_1" value="<?echo $code_1;?>"> <input type="hidden" name="c_id" value="<?echo $c_id;?>"> <input type="hidden" name="c_thumb" value="<?echo $c_thumb;?>"> <input type="hidden" name="s_caption_1" value="<?echo $s_caption_1;?>"> <input type="hidden" name="chk_del" value="1"> <input type="hidden" name="chk_p" value="<?echo $chk_p;?>"> <input type="submit" name="Submit" value=" Yes "> </td> </tr> <tr> <td> </td> </tr> </table> </td> </tr> </form> </table> </td> </tr> <tr><td> </td></tr> </table> </div> </td> </tr> <tr> <td valign="top"> </td> </tr> </table> </td> </tr> </table> </th> </tr> </table></th> </tr> </table></td> </tr> <tr> <td align="center" valign="top"><table width="980" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="top"><div align="right"><span style="background-repeat:no-repeat"><img src="../images/foot.png"></span></div> <div align="left"></div></td> <td width="19" align="center" valign="top"> </td> </tr> </table></td> </tr> </table> </th> </tr> </table> </div> <!-- end_content --> <tr><td><a style="display:scroll;position:fixed;bottom:5px;right:5px;" class="backtotop" href="#top" rel="nofollow" title="Back to Top"><img src="../images/up.png" border="0" /></a></td> </tr> </body> </html> <? } include("../include/close_db.php"); ?>
©
2018.