?? 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 + -