vote.php

来自「极限网络智能办公系统 Office Automation V3.0官方100%源」· PHP 代码 · 共 45 行

PHP
45
字号
<?
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 + =
减小字号Ctrl + -
显示快捷键?