📄 show_reader.php
字号:
<?
include_once("inc/auth.php");
include_once("inc/utility_all.php");
?>
<html>
<head>
<title>投票结果</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body class="bodycolor" topmargin="5">
<?
$connection=OpenConnection();
$query = "SELECT * from VOTE_TITLE where VOTE_ID=$VOTE_ID";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
{
$SUBJECT=$ROW["SUBJECT"];
$TO_ID=$ROW["TO_ID"];
$ANONYMITY=$ROW["ANONYMITY"];
$READERS=$ROW["READERS"];
}
?>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/notify.gif" align="absmiddle"><span class="big3"> 投票结果 - <?=$SUBJECT?></span><br>
</td>
</tr>
</table>
<table border="0" width="95%" cellpadding="3" cellspacing="1" align="center" bgcolor="#000000" class="small">
<tr class="TableHeader" align="center">
<td>选项</td>
<td width="240">图标</td>
<td width="50">票数</td>
<td>投票人员</td>
</tr>
<?
$query = "SELECT sum(VOTE_COUNT),max(VOTE_COUNT) from VOTE_ITEM where VOTE_ID=$VOTE_ID";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
{
$SUM_COUNT=$ROW[0];
$MAX_COUNT=$ROW[1];
}
if($SUM_COUNT==0)
$SUM_COUNT=1;
$query = "SELECT * from VOTE_ITEM where VOTE_ID=$VOTE_ID";
$cursor= exequery($connection,$query);
while($ROW=mysql_fetch_array($cursor))
{
$ITEM_ID=$ROW["ITEM_ID"];
$ITEM_NAME=$ROW["ITEM_NAME"];
$VOTE_COUNT=$ROW["VOTE_COUNT"];
$VOTE_USER=$ROW["VOTE_USER"];
if($ANONYMITY=="0")
{
$VOTE_USER_NAME="";
$query = "SELECT * from USER where find_in_set(USER_ID,'$VOTE_USER')";
$cursor1= exequery($connection,$query);
while($ROW1=mysql_fetch_array($cursor1))
$VOTE_USER_NAME.=$ROW1["USER_NAME"].",";
$VOTE_USER_NAME=substr($VOTE_USER_NAME,0,-2);
}
?>
<tr class="TableData">
<td> <?=$ITEM_NAME?></td>
<td width="240">
<table height="10" border="0" cellspacing="0" cellpadding="0" class="small">
<tr height="10">
<td width="10" background="/images/vote_bg.gif"></td>
<td width="<?=$VOTE_COUNT*200/$MAX_COUNT?>" background="/images/vote_bg.gif"></td>
<td width="30"><?=round($VOTE_COUNT*100/$SUM_COUNT)?>%</td>
</tr>
</table>
</td>
<td align="right"><?=$VOTE_COUNT?>票</td>
<td style="cursor:hand" title="<?=$VOTE_USER_NAME?>"><?=csubstr($VOTE_USER_NAME,0,30).(strlen($VOTE_USER_NAME)>30?"...":"")?></td>
</tr>
<?
}
?>
</table>
<div align="center">
<br>
<input type="button" class="BigButton" value="关闭" onclick="window.close();">
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -