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

📄 poll_set.php

📁 学校网站源码http://您的网址/admin/admin_login.asp 默认登录用户:admin 默认登录密码:admin
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php


include( "../config.inc.php" );
include( "../includes/SysGlobal.php" );
include( "language/".$aLan."_".$charset.".php" );
include( "../includes/version.php" );
include( "../includes/pro.php" );
include( "func/adm.inc.php" );
include( "func/common.inc.php" );
include( "func/vote.inc.php" );
include( "func/db.inc.php" );
include( "func/nocatch.php" );
needauth( 71 );
$action = $_REQUEST['action'];
echo "<html>\r\n<head >\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
echo $charset;
echo "\">\r\n<link id=\"style_sheet\" href=\"css/commonstyle.css\" type=\"text/css\" rel=\"stylesheet\">\r\n<title>";
echo $strAdminTitle;
echo "</title>\r\n\r\n";
echo "<s";
echo "cript>  \r\nblank = new Image(); blank.src = \"images/blank.gif\";\r\naqua = new Image(); aqua.src = \"images/aqua.gif\";\r\nblue = new Image(); blue.src = \"images/blue.gif\";\r\nbrown = new Image(); brown.src = \"images/brown.gif\";\r\ndarkgreen = new Image(); darkgreen.src = \"images/darkgreen.gif\";\r\ngold = new Image(); gold.src = \"images/gold.gif\";\r\ngreen = new Image(); green.src = \"images/green.gif\";\r\ngrey = ne";
echo "w Image(); grey.src = \"images/grey.gif\";\r\norange = new Image(); orange.src = \"images/orange.gif\";\r\npink = new Image(); pink.src = \"images/pink.gif\";\r\npurple = new Image(); purple.src = \"images/purple.gif\";\r\nred = new Image(); red.src = \"images/red.gif\";\r\nyellow = new Image(); yellow.src = \"images/yellow.gif\";\r\n\r\nfunction ChangeBar(sel,img) {\r\n  eval(\"document.bar\"+img+\".src=\"+sel+\".src\");\r\n}\r\n\r\n\r\n";
echo "function del_entry(entry) {\r\n if (window.confirm(\"";
echo $strDeleteConfirm;
echo "\")) {\r\n    window.location.href = \"http://\"+window.location.host+window.location.pathname+\"?action=delete&id=\"+entry\r\n }\r\n\r\n\r\nfunction ResetPoll() {\r\n  for (i=4; i<document.forms[0].elements.length-6; i+=3) {\r\n   document.forms[0].elements[i].value = '0';\r\n  }\r\n}\r\n\r\nfunction CheckDays() {\r\n  if(!(document.poll.exp_time.value >= 0)) {\r\n    alert(\"Invalid value\");\r\n    document.poll.exp_time.focus();";
echo "\r\n    return false;\r\n  }\r\n}\r\n \r\n}\r\n</script>\r\n</head>\r\n<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" background=\"images/mu8.gif\" height=\"30\" >\r\n  <tr> \r\n    <td width=\"150\" >&nbsp;&nbsp;<img src=\"images/bar.gif\" >&nbsp;&nbsp;";
echo $strVoteSys;
echo "</td>\r\n    <td >&nbsp;</td>\r\n    <td width=\"100\" >&nbsp;</td>\r\n  </tr>\r\n</table>\r\n<br>\r\n";
$cc = $_REQUEST['cc'];
$id = $_REQUEST['id'];
$vote = new vote( );
if ( $cc == $strVoteNewGroup )
{
	$vote->create_poll( );
	sayok( $strVoteCreatOk, $PHP_SELF."?{$action}=new", "" );
}
if ( !isset( $action ) )
{
	$action = "";
}
if ( $action == "delete" )
{
	echo $vote->delete_poll( $id );
}
if ( $action == "new" || $action == "" )
{
	echo " \r\n<table width=\"625\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" height=\"22\">\r\n  <tr> \r\n          <td class=title align=\"left\" height=\"22\" valign=\"top\" width=\"3\"><img src=\"images/menubg16.gif\" width=\"3\" height=\"30\"></td>\r\n          \r\n    <td class=title align=\"center\" height=\"22\" colspan=\"2\">";
	echo $strVoteNewGroup;
	echo "</td>\r\n          <td class=title align=\"right\" height=\"22\" width=\"3\" valign=\"top\"><img src=\"images/menubg17.gif\" width=\"3\" height=\"30\"></td>\r\n        </tr>\r\n      </table>\r\n      \r\n<table width=\"625\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"1\">\r\n  <form action=\"\" method=\"post\" name=\"poll\">\r\n          <tr> \r\n            <td width=\"24%\" class=\"title\">\r\n              <div align=\"right\">";
	echo $strVoteTitle;
	echo "</div>\r\n            </td>\r\n            <td width=\"76%\" class=\"con\">\r\n              <input name=\"question\" type=\"text\" id=\"question\" size=\"30\">\r\n            </td>\r\n          </tr>\r\n          ";
	function select_value( )
	{
		global $msql;
		global $def_options;
		global $tbl_poll_index;
		global $tbl_poll_data;
		global $tbl_poll_config;
		global $strVoteSel;
		global $strVoteColor1;
		global $strVoteColor2;
		global $strVoteColor3;
		global $strVoteColor4;
		global $strVoteColor5;
		global $strVoteColor6;
		global $strVoteColor7;
		global $strVoteColor8;
		global $strVoteColor9;
		global $strVoteColor10;
		global $strVoteColor11;
		global $strVoteColor12;
		$msql->query( " select def_options from {$tbl_poll_config} " );
		if ( $msql->next_record( ) )
		{
			$def_options = $msql->f( "def_options" );
		}
		$i = 1;
		for ( ;	$i <= $def_options;	$i++	)
		{
			$string .= "<tr><td width=\"24%\" class=\"title\"><div align=\"right\">".$strVoteSel.$i."</div></td><td width=\"76%\" class=\"con\"><input name=\"option_id[{$i}]\" type=\"text\" size=\"30\"><select class=\"select\" name=\"color[{$i}]\" onChange=\"javascript:ChangeBar(options[selectedIndex].value,{$i})\">\r\n              <option value=\"blank\" >---</option>\r\n              <option value=\"aqua\" selected>".$strVoteColor1."</option>\r\n              <option value=\"blue\">".$strVoteColor2."</option>\r\n              <option value=\"brown\">".$strVoteColor3."</option>\r\n              <option value=\"darkgreen\">".$strVoteColor4."</option>\r\n              <option value=\"gold\">".$strVoteColor5."</option>\r\n              <option value=\"green\">".$strVoteColor6."</option>\r\n              <option value=\"grey\">".$strVoteColor7."</option>\r\n              <option value=\"orange\">".$strVoteColor8."</option>\r\n              <option value=\"pink\">".$strVoteColor9."</option>\r\n              <option value=\"purple\">".$strVoteColor10."</option>\r\n              <option value=\"red\">".$strVoteColor11."</option>\r\n              <option value=\"yellow\">".$strVoteColor12."</option>\r\n              </select><img src=\"images/blank.gif\" name=\"bar{$i}\" width=\"8\" height=\"8\" align=\"absmiddle\"></td></tr>";
		}
		return $string;
	}
	echo select_value( );
	echo " \r\n          <tr> \r\n            <td colspan=\"2\" class=\"title\">\r\n              <div align=\"center\">";
	echo $strVoteStat;
	echo "                ";
	echo "<s";
	echo "elect name=\"status\" id=\"status\">\r\n            <option value=\"0\">";
	echo $strClose;
	echo "</option>\r\n            <option value=\"1\" selected >";
	echo $strOpen;
	echo "</option>\r\n            <option value=\"2\">";
	echo $strHidden;
	echo "</option>\r\n          </select>\r\n                 ";
	echo $strVoteExpday;
	echo " \r\n                \r\n          <input name=\"day\" type=\"text\" id=\"day\" size=\"3\" value=\"30\">\r\n                \r\n                <input name=\"expire\" type=\"checkbox\" id=\"expire\" value=\"1\">";
	echo $strVoteNotExp;
	echo " \r\n                <input name=\"cc\" type=\"submit\" id=\"cc\" value=\"";
	echo $strVoteNewGroup;
	echo "\">\r\n                <input name=\"Resert\" type=\"reset\" id=\"Resert\" value=\"";
	echo $strVoteReset;
	echo "\">\r\n              </div>\r\n            </td>\r\n          </tr>\r\n        </form>\r\n      </table>\r\n      \r\n";
}
else if ( $action == "show" )
{
	echo " \r\n<table width=\"625\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" height=\"22\">\r\n  <tr> \r\n    <td class=title align=\"left\" height=\"22\" valign=\"top\" width=\"3\"><img src=\"images/menubg16.gif\" width=\"3\" height=\"30\"></td>\r\n    <td class=title align=\"center\" height=\"22\" colspan=\"2\">";
	echo $strVoteGroupList;
	echo "</td>\r\n    <td class=title align=\"right\" height=\"22\" width=\"3\" valign=\"top\"><img src=\"images/menubg17.gif\" width=\"3\" height=\"30\"></td>\r\n  </tr>\r\n</table>\r\n<table width=\"625\" height=\"73\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"1\">\r\n  <tr> \r\n    <td height=\"23\" class=\"title\" width=\"30\"> \r\n      <div align=\"center\">";
	echo $strNumber;
	echo "</div>\r\n    </td>\r\n    <td class=\"title\"> \r\n      <div align=\"center\">";
	echo $strVoteTitle;
	echo "</div>\r\n    </td>\r\n    <td width=\"60\" class=\"title\"> \r\n      <div align=\"center\">";
	echo $strVotedate;
	echo "</div>\r\n    </td>\r\n    <td width=\"60\" class=\"title\"> \r\n      <div align=\"center\">";
	echo $strVoteExpday;
	echo "</div>\r\n    </td>\r\n    <td width=\"60\" class=\"title\"> \r\n      <div align=\"center\">";
	echo $strVoteExpday1;
	echo "</div>\r\n    </td>\r\n\r\n\t <td width=\"80\" class=\"title\" align=center> \r\n      ";
	echo $strVotePlus;
	echo "    </td>\r\n    <td width=\"32\" class=\"title\" align=\"center\">";
	echo $strModify;
	echo "</td>\r\n    <td width=\"32\" class=\"title\"> \r\n      <div align=\"center\">";
	echo $strDelete;
	echo "</div>\r\n    </td>\r\n  </tr>\r\n  ";
	function listpoll( )
	{
		global $msql;
		global $auth;
		global $pollvars;
		global $entry;
		global $lang;
		global $weekday;
		global $months;
		global $tbl_poll_index;
		global $tbl_poll_data;
		global $tbl_poll_config;
		if ( !isset( $entry ) )
		{
			$entry = 0;
		}
		$msql->query( " SELECT * FROM {$tbl_poll_index} order by poll_id desc " );

⌨️ 快捷键说明

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