📄 delete.php
字号:
<?
include_once("inc/auth.php");
?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body class="bodycolor" topmargin="5">
<?
if($DELETE_STR=="")
$DELETE_STR="无";
else if(substr($DELETE_STR,-1)==",")
$DELETE_STR=substr($DELETE_STR,0,-1);
$query="select VOTE_ID from VOTE_TITLE where VOTE_ID in ($DELETE_STR)";
if($LOGIN_USER_PRIV!="1")
$query.=" and FROM_ID='$LOGIN_USER_ID'";
$DELETE_STR="";
$cursor=exequery($connection,$query);
while($ROW=mysql_fetch_array($cursor))
$DELETE_STR.=$ROW["VOTE_ID"].",";
if($DELETE_STR=="")
$DELETE_STR="无";
else if(substr($DELETE_STR,-1)==",")
$DELETE_STR=substr($DELETE_STR,0,-1);
$query="select VOTE_ID from VOTE_TITLE where PARENT_ID in ($DELETE_STR)";
$cursor=exequery($connection,$query);
while($ROW=mysql_fetch_array($cursor))
{
$VOTE_ID1=$ROW["VOTE_ID"];
$query="select ITEM_ID from VOTE_ITEM where VOTE_ID='$VOTE_ID1'";
$cursor1=exequery($connection,$query);
while($ROW1=mysql_fetch_array($cursor1))
{
$ITEM_ID=$ROW1["ITEM_ID"];
$query="delete from VOTE_DATA where ITEM_ID='$ITEM_ID' and FIELD_NAME!='0'";
exequery($connection,$query);
}
$query="delete from VOTE_DATA where ITEM_ID='$VOTE_ID1' and FIELD_NAME='0'";
exequery($connection,$query);
$query="delete from VOTE_ITEM where VOTE_ID='$VOTE_ID1'";
exequery($connection,$query);
}
$query="delete from VOTE_TITLE where PARENT_ID in ($DELETE_STR)";
exequery($connection,$query);
$query="delete from VOTE_DATA where ITEM_ID in ($DELETE_STR) and FIELD_NAME='0'";
exequery($connection,$query);
$query="delete from VOTE_ITEM where VOTE_ID in ($DELETE_STR)";
exequery($connection,$query);
$query="delete from VOTE_TITLE where VOTE_ID in ($DELETE_STR)";
exequery($connection,$query);
header("location: index1.php?start=$start");
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -