⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vote.php

📁 通达网络办公 - Office Anywhere 2008 增强版100%源码(3.4.081216) 内含 通达OA2008增強版接近完美破解补丁20081216集 及 最新通达OA2008ADV(
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "inc/utility_all.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\r\n<script>\r\nfunction show_reader(VOTE_ID)\r\n{\r\n URL=\"show_reader.php?VOTE_ID=\"+VOTE_ID;\r\n myleft=(screen.availWidth-500)/2;\r\n 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\");\r\n}\r\n\r\nfunction delete_vote(VOTE_ID,start)\r\n{\r\n msg='确认要删除该投票么?';\r\n if(window.confirm(msg))\r\n {\r\n  URL=\"delete.php?DELETE_STR=\" + VOTE_ID + \"&start=\" + start;\r\n  window.location=URL;\r\n }\r\n}\r\n\r\n\r\nfunction delete_all()\r\n{\r\n msg='确认要删除所有投票么?';\r\n if(window.confirm(msg))\r\n {\r\n  URL=\"delete_all.php\";\r\n  window.location=URL;\r\n }\r\n}\r\n\r\n</script>\r\n\r\n</head>\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n  <tr>\r\n    <td class=\"Big\"><img src=\"/images/menu/vote.gif\" align=\"absmiddle\"><span class=\"big3\"> 新建子投票</span><br></td>\r\n  </tr>\r\n</table>\r\n\r\n<div align=\"center\">\r\n   <input type=\"button\" class=\"BigButton\" value=\"新建子投票\" onclick=\"location='new.php?PARENT_ID=";
echo $PARENT_ID;
echo "&start=";
echo $start;
echo "'\">\r\n</div>\r\n<br>\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n  <tr>\r\n    <td class=\"Big\"><img src=\"/images/menu/vote.gif\" align=\"absmiddle\"><span class=\"big3\"> 管理子投票</span><br></td>\r\n  </tr>\r\n</table>\r\n";
$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>\r\n\r\n";
	message( "", "无已发布的投票" );
	echo "<br>\r\n<div align=\"center\">\r\n   <input type=\"button\" class=\"BigButton\" value=\"返回\" onclick=\"location='index1.php?start=";
	echo $start;
	echo "'\">\r\n</div>\r\n";
	exit( );
}
echo "\r\n<table class=\"TableList\" width=\"100%\" align=\"center\">\r\n  <tr class=\"TableHeader\">\r\n      <td nowrap align=\"center\">标题</td>\r\n      <td nowrap align=\"center\" width=\"80\">类型</td>\r\n      <td nowrap align=\"center\" width=\"120\">操作</td>\r\n    </tr>\r\n\r\n";
$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\">\r\n      <td>\r\n      <a href=\"javascript:show_reader('";
	echo $VOTE_ID;
	echo "');\" title=\"点击查看投票情况\">";
	echo $SUBJECT;
	echo "</a>\r\n      </td>\r\n      <td nowrap align=\"center\">";
	echo $TYPE_DESC;
	echo "</td>\r\n      <td nowrap align=\"center\">\r\n      <a href=\"item?VOTE_ID=";
	echo $VOTE_ID;
	echo "&start=";
	echo $start;
	echo "\"> 投票项目</a>\r\n      <a href=\"new.php?VOTE_ID=";
	echo $VOTE_ID;
	echo "&start=";
	echo $start;
	echo "\"> 修改</a>\r\n      <a href=\"javascript:delete_vote('";
	echo $VOTE_ID;
	echo "','";
	echo $start;
	echo "');\"> 删除</a>\r\n      ";
	if ( $VOTE_STATUS == 1 )
	{
		echo "      <a href=\"manage.php?VOTE_ID=";
		echo $VOTE_ID;
		echo "&OPERATION=1&start=";
		echo $start;
		echo "\"> 立即生效</a>\r\n      ";
	}
	else if ( $VOTE_STATUS == 2 )
	{
		echo "      <a href=\"manage.php?VOTE_ID=";
		echo $VOTE_ID;
		echo "&OPERATION=2&start=";
		echo $start;
		echo "\"> 立即终止</a>\r\n      ";
	}
	else if ( $VOTE_STATUS == 3 )
	{
		echo "      <a href=\"manage.php?VOTE_ID=";
		echo $VOTE_ID;
		echo "&OPERATION=3&start=";
		echo $start;
		echo "\"> 恢复生效</a>\r\n      ";
	}
	echo "      </td>\r\n    </tr>\r\n";
}
echo "\r\n<tr class=\"TableControl\">\r\n<td colspan=\"9\" align=\"center\">\r\n    <input type=\"button\" class=\"SmallButton\" value=\"返回\" onclick=\"location='index1.php?start=";
echo $start;
echo "'\">\r\n</td>\r\n</tr>\r\n\r\n</table>\r\n</body>\r\n\r\n</html>\r\n";
?>

⌨️ 快捷键说明

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