📄 vote.php
字号:
<?
include_once("inc/auth.php");
?>
<html>
<head>
<title>投票</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<body class="bodycolor" topmargin="5">
<?
$query = "select * from VOTE_TITLE where VOTE_ID=$VOTE_ID";
$cursor=exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
$READERS=$ROW["READERS"];
if(!find_id($READERS,$LOGIN_USER_ID))
{
$READERS.=$LOGIN_USER_ID.",";
$query = "update VOTE_TITLE set READERS='$READERS' where VOTE_ID=$VOTE_ID";
exequery($connection,$query);
}
else
{
Message("错误","您已经进行过投票");
Button_Back();
exit;
}
$TOK=strtok($ITEM_ID,",");
while($TOK!="")
{
$query = "select * from VOTE_ITEM where ITEM_ID=$TOK";
$cursor=exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
$VOTE_USER=$ROW["VOTE_USER"];
if($ANONYMITY=="1"||find_id($VOTE_USER,$LOGIN_USER_ID))
$query = "update VOTE_ITEM set VOTE_COUNT=VOTE_COUNT+1 where ITEM_ID=$TOK";
else
$query = "update VOTE_ITEM set VOTE_COUNT=VOTE_COUNT+1,VOTE_USER='$VOTE_USER".$LOGIN_USER_ID.",' where ITEM_ID=$TOK";
exequery($connection,$query);
$TOK=strtok(",");
}
Message("","投票完成");
?>
<center><input type="button" class="BigButton" value="返回" onclick="location='read_vote.php?VOTE_ID=<?=$VOTE_ID?>';"></center>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -