vote.php

来自「极限网络智能办公系统 - Office Automation 2.8 100% 」· PHP 代码 · 共 48 行

PHP
48
字号
<?php

include_once( "inc/auth.php" );
echo "\r\n<html>\r\n<head>\r\n<title>投票</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n";
$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( "", "投票完成" );
echo "\r\n<center><input type=\"button\" class=\"BigButton\" value=\"返回\" onclick=\"location='read_vote.php?VOTE_ID=";
echo $VOTE_ID;
echo "';\"></center>";
?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?