📄 vote.php
字号:
<?
include_once 'inc/auth.php';
include_once 'inc/utility_all.php';
echo '
<html>
<head>
<title>投票</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
echo '<s';
echo 'cript>
function show_reader(VOTE_ID)
{
URL="show_reader.php?VOTE_ID="+VOTE_ID;
myleft=(screen.availWidth-500)/2;
window.open(URL,"read_vote","height=500,width=700,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");
}
function delete_vote(VOTE_ID,start)
{
msg=\'确认要删除该投票么?\';
if(window.confirm(msg))
{
URL="delete.php?VOTE_I';
echo 'D=" + VOTE_ID + "&start=" + start;
window.location=URL;
}
}
function delete_all()
{
msg=\'确认要删除所有投票么?\';
if(window.confirm(msg))
{
URL="delete_all.php";
window.location=URL;
}
}
</script>
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/men';
echo 'u/vote.gif" align="absmiddle">';
echo '<s';
echo 'pan class="big3"> 新建子投票</span><br></td>
</tr>
</table>
<div align="center">
<input type="button" class="BigButton" value="新建子投票" onclick="location=\'new.php?PARENT_ID=';
echo $PARENT_ID;
echo '&start=';
echo $start;
echo '\'">
</div>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/vote.gif" align="absmiddle">';
echo '<s';
echo 'pan class="big3"> 管理子投票</span><br></td>
</tr>
</table>
';
$query = (((''.'SELECT * from VOTE_TITLE where PARENT_ID=').$PARENT_ID).' order by VOTE_NO,SEND_TIME');
$cursor = exequery ($connection, $query);
$VOTE_COUNT = mysql_num_rows ($cursor);
if (($VOTE_COUNT == 0))
{
echo '<br>
';
message ('', '无已发布的投票');
echo '<br>
<div align="center">
<input type="button" class="BigButton" value="返回" onclick="location=\'index1.php?start=';
echo $start;
echo '\'">
</div>
';
exit ();
}
echo '
<table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3">
<tr class="TableHeader">
<td nowrap align="center">标题</td>
<td nowrap align="center" width="80">类型</td>
<td nowrap align="center" width="120">操作</td>
</tr>
';
$CUR_DATE = date ('Y-m-d', time ());
while ($ROW = mysql_fetch_array ($cursor))
{
$VOTE_ID = $ROW['VOTE_ID'];
$SUBJECT = $ROW['SUBJECT'];
$TYPE = $ROW['TYPE'];
$SUBJECT = htmlspecialchars ($SUBJECT);
if (($TYPE == '0'))
{
$TYPE_DESC = '单选';
}
else
{
if (($TYPE == '1'))
{
$TYPE_DESC = '多选';
}
else
{
$TYPE_DESC = '文本输入';
}
}
echo ' <tr class="TableData">
<td>
<a href="javascript:show_reader(\'';
echo $VOTE_ID;
echo '\');" title="点击查看投票情况">';
echo $SUBJECT;
echo '</a>
</td>
<td nowrap align="center">';
echo $TYPE_DESC;
echo '</td>
<td nowrap align="center">
<a href="item?VOTE_ID=';
echo $VOTE_ID;
echo '&start=';
echo $start;
echo '"> 投票项目</a>
<a href="new.php?VOTE_ID=';
echo $VOTE_ID;
echo '&start=';
echo $start;
echo '"> 修改</a>
<a href="javascript:delete_vote(\'';
echo $VOTE_ID;
echo '\',\'';
echo $start;
echo '\');"> 删除</a>
';
if (($VOTE_STATUS == 1))
{
echo ' <a href="manage.php?VOTE_ID=';
echo $VOTE_ID;
echo '&OPERATION=1&start=';
echo $start;
echo '"> 立即生效</a>
';
}
else
{
if (($VOTE_STATUS == 2))
{
echo ' <a href="manage.php?VOTE_ID=';
echo $VOTE_ID;
echo '&OPERATION=2&start=';
echo $start;
echo '"> 立即终止</a>
';
}
else
{
if (($VOTE_STATUS == 3))
{
echo ' <a href="manage.php?VOTE_ID=';
echo $VOTE_ID;
echo '&OPERATION=3&start=';
echo $start;
echo '"> 恢复生效</a>
';
}
}
}
echo ' </td>
</tr>
';
}
echo '
<tr class="TableControl">
<td colspan="9" align="center">
<input type="button" class="SmallButton" value="返回" onclick="location=\'index1.php?start=';
echo $start;
echo '\'">
</td>
</tr>
</table>
</body>
</html>
';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -