<?php
/**
 * 此文件用来删除{{$Page.TableName}}表的记录。
 *
 * copyright
 * @author          {{$Page.Author}}
 * @package         {{$Page.PackageName}}
 * @version         {{$IdTag}}
 */
/* 初始化系统. */
require_once("{{$Page.IncludePath}}Include/InitAdmin.php");
langLoadTable("{{$Page.TableName}}");

if({{$Page.JudgeEmpty}})
{
    $MyJS->alert($_LANG["MustSet"] . {{$Page.AlertInfo}});
    $MyJS->goto("Back");
    exit;
}
else
{
    if($_GET["DropIt"] == "Yes")
    {
        $SQL = "DELETE FROM {{$Page.TableName}} WHERE {{$Page.WhereString}} LIMIT 1";
        if($MyDB->query($SQL))
        {
            $MyJS->alert($_LANG["SuccessDrop"]);
            $MyJS->goto("List.php");
            exit;
        }
        else
        {
            die($MyDB->errorMsg());
        }
    }
    else
    {
        $MyJS->confirm($_LANG["ConfirmDrop"], $_SERVER["REQUEST_URI"] . "&DropIt=Yes", "Back");
    }
}
?>