📄 delete.php
字号:
<?php
include_once( "inc/auth.php" );
if ( $ITEM_ID == "" )
{
exit( );
}
$query = "select VOTE_ID from VOTE_TITLE where VOTE_ID='".$VOTE_ID."'";
if ( $LOGIN_USER_PRIV != "1" )
{
$query .= " and FROM_ID='".$LOGIN_USER_ID."'";
}
$cursor = exequery( $connection, $query );
if ( !( $ROW = mysql_fetch_array( $cursor ) ) )
{
message( "禁止", "您无权访问" );
exit( );
}
$query = "delete from VOTE_ITEM where ITEM_ID='".$ITEM_ID."' and VOTE_ID='{$VOTE_ID}'";
$cursor = exequery( $connection, $query );
if ( 0 < mysql_affected_rows( $cursor ) )
{
$query = "delete from VOTE_DATA where ITEM_ID='".$ITEM_ID."'";
exequery( $connection, $query );
}
header( "location: index.php?VOTE_ID=".$VOTE_ID );
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -