0byt3m1n1-V2
Path:
/
home
/
bangtoey
/
domains
/
bangtoey.go.th
/
public_html
/
webboard
/
admin
/
[
Home
]
File: delcat.php
<? session_start(); if($user==""){ $message = "กรุณา Login ก่อน."; $url = "../../admin/index.php"; include("../../admin/alert.php"); exit; } ?> <title>-=- ลบข้อมูลเรียบร้อยแล้ว -=-</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <link rel="stylesheet" href="../style.css" type="text/css"> </head> <body bgcolor="#FFFFFF"> <? require("../config.inc.php"); if($auid!=$admin || $apwd!=$admin_pwd) { echo "<br><br><center>Error : Admin ID and Password"," กรุณาตรวจสอบอีกครั้ง","<br><br>[ <a href='javascript:history.back(1)'>กลับไปแก้ไข</a> ]</center>"; exit; } else { #ใช่แล้วลบได้เลยลบ Comment ก่อนเลยและลบรูปออกจากระบบด้วย หัวข้อคำถาม mysql_connect($host,$user_db,$passwd_db); mysql_query ("SET NAMES 'tis620'"); $sql_c = "select * from webboard_category where id='$No'"; $c_query = mysql_db_query($dbname,$sql_c) or die ("ไม่สามารถสั่งให้ database ทำงานได้ในขณะนี้"); while( $c_arr = mysql_fetch_row( $c_query ) ) { #ทำการเช็คก่อนว่ามีไฟล์รูปหรือไม่ if($c_arr[4]==""){ }else{ $file_com = "../$path_logo/$c_arr[4]"; #ไฟล์รูป if (file_exists( $file_com )) { unlink("$file_com"); } else { }; #ทำการลบรูปออกไป }; #ทำการลบข้อมูล $sql = "DELETE FROM webboard_category WHERE id='$No' "; $result = mysql_db_query($dbname,$sql); } } mysql_close(); #โชว์รายละเอียด print "<meta http-equiv=refresh content=0;URL=category.php?Category=$Category>"; ?> </body> </html>
©
2018.