You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
831 B
25 lines
831 B
<?php
|
|
require_once "database.php";
|
|
$id = isset($_GET['id']) ? $_GET['id'] : die('ERROR: Record ID not found.');
|
|
$db_query = "select checker_1_result from pricereview_main where id = '$id'";
|
|
$res = mysqli_query($link, $db_query);
|
|
$row = mysqli_fetch_array($res, MYSQLI_ASSOC);
|
|
if (!$row || $row["checker_1_result"]) {
|
|
mysqli_free_result($res);
|
|
mysqli_close($link);
|
|
echo "<script>";
|
|
//echo "alert('審核中,已無法刪除');";
|
|
echo "alert('資料無法刪除');";
|
|
echo "location.href='pricereview-index.php'";
|
|
echo "</script>";
|
|
exit;
|
|
}
|
|
|
|
$db_query = "delete from pricereview_item where mid = '$id'";
|
|
if ($rs = mysqli_query($link, $db_query)) {
|
|
$db_query = "delete from pricereview_main where id = '$id'";
|
|
$rs = mysqli_query($link, $db_query);
|
|
}
|
|
|
|
header("Location:pricereview-index.php");
|
|
?>
|