📄 vote.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">
<script>
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?DELETE_STR=" + 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/menu/vote.gif" align="absmiddle"><span class="big3"> 新建子投票</span><br></td>
</tr>
</table>
<div align="center">
<input type="button" class="BigButton" value="新建子投票" onclick="location='new.php?PARENT_ID=<?=$PARENT_ID?>&start=<?=$start?>'">
</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"><span 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)
{
?>
<br>
<?
Message("","无已发布的投票");
?>
<br>
<div align="center">
<input type="button" class="BigButton" value="返回" onclick="location='index1.php?start=<?=$start?>'">
</div>
<?
exit;
}
?>
<table class="TableList" width="100%" align="center">
<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="文本输入";
?>
<tr class="TableData">
<td>
<a href="javascript:show_reader('<?=$VOTE_ID?>');" title="点击查看投票情况"><?=$SUBJECT?></a>
</td>
<td nowrap align="center"><?=$TYPE_DESC?></td>
<td nowrap align="center">
<a href="item?VOTE_ID=<?=$VOTE_ID?>&start=<?=$start?>"> 投票项目</a>
<a href="new.php?VOTE_ID=<?=$VOTE_ID?>&start=<?=$start?>"> 修改</a>
<a href="javascript:delete_vote('<?=$VOTE_ID?>','<?=$start?>');"> 删除</a>
<?
if($VOTE_STATUS==1)
{
?>
<a href="manage.php?VOTE_ID=<?=$VOTE_ID?>&OPERATION=1&start=<?=$start?>"> 立即生效</a>
<?
}
else if($VOTE_STATUS==2)
{
?>
<a href="manage.php?VOTE_ID=<?=$VOTE_ID?>&OPERATION=2&start=<?=$start?>"> 立即终止</a>
<?
}
else if($VOTE_STATUS==3)
{
?>
<a href="manage.php?VOTE_ID=<?=$VOTE_ID?>&OPERATION=3&start=<?=$start?>"> 恢复生效</a>
<?
}
?>
</td>
</tr>
<?
}
?>
<tr class="TableControl">
<td colspan="9" align="center">
<input type="button" class="SmallButton" value="返回" onclick="location='index1.php?start=<?=$start?>'">
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -