0byt3m1n1-V2
Path:
/
home
/
bangtoey
/
domains
/
bangtoey.go.th
/
public_html
/
calendar
/
[
Home
]
File: delete.php
<? /* session_start(); if($user==""){ $message = "กรุณา Login ก่อน."; $url = "../admin/index.php"; include("../admin/alert.php"); exit; }*/ ?> <?php require_once('../admin/Connections/conndb.php'); ?> <?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['id'])) && ($_GET['id'] != "")) { $deleteSQL = sprintf("DELETE FROM calendar WHERE id=%s", GetSQLValueString($_GET['id'], "int")); mysql_select_db($database_conndb, $conndb); $Result1 = mysql_query($deleteSQL, $conndb) or die(mysql_error()); $deleteGoTo = "admin.php?date=<?=date('j-n-Y') ?>"; if (isset($_SERVER['QUERY_STRING'])) { $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?"; $deleteGoTo .= $_SERVER['QUERY_STRING']; } // header(sprintf("Location: %s", $deleteGoTo)); ?> <meta http-equiv='refresh' content='0;URL=admin.php?date=<?=date('j-n-Y') ?>'> <? } if($conndb) { mysql_close($conndb); unset($conndb); } ?>
©
2018.