📄 13.php
字号:
<?php
function is_priview13( $str, $priview )
{
$str_array = explode( ",", $str );
$priview = explode( ",", $priview );
$i = 0;
for ( ; $i < sizeof( $priview ); ++$i )
{
if ( in_array( $str_array[$i], $priview ) )
{
return true;
}
else
{
return false;
}
}
}
$GLOBALS['inAdmin'] = 1;
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
require( "./../vote/inc/init.php" );
require( "./../vote/inc/mysql.php" );
require( "./../vote/inc/functions.php" );
require( "./../vote/inc/pfunctions.php" );
$sql = "SELECT UP.FUNC_ID_STR FROM user AS U,user_priv AS UP WHERE U.USER_ID='".$_SESSION['LOGIN_USER_ID']."' AND U.USER_PRIV=UP.USER_PRIV";
$cursor = exequery( $connection, $sql );
if ( $row = mysql_fetch_array( $cursor ) )
{
$u_priv = $row['FUNC_ID_STR'];
}
$strlink = $_SERVER['PHP_SELF'];
if ( strpos( $strlink, "block_02.php" ) === false )
{
$isimg = true;
}
if ( $isimg == true )
{
$imgurl01 = "background=\"/theme/4/bg_mt_line_.gif\"";
$imgurl02 = "background=\"/theme/1/newsbg.gif\"";
$imgurl04 = "";
$strimg = "<img src=\"/theme/1/gray_up_arrow.gif\" width=\"30\" height=\"22\" border=\"0\" id=\"imgarrow13\" title=\"展开/收缩\" onClick=\"ControlContent13();\" style=\"cursor:hand\">";
$td04width = "30";
$tdbgcolor = "#EBEBEB";
$fontstyle = "a";
$jscontrolu = "/theme/1/gray_up_arrow.gif";
$jscontrold = "/theme/1/gray_down_arrow.gif";
}
else
{
$imgurl01 = "background=\"/theme/1/darkheadleft.gif\"";
$imgurl02 = "background=\"/theme/1/darkheadbg.gif\"";
$imgurl04 = "/theme/1/darkheadbg.gif\"";
$strimg = "<img src=\"/theme/1/black_up_arrow.gif\" width=\"19\" height=\"28\" border=\"0\" id=\"imgarrow13\" title=\"展开/收缩\" onClick=\"ControlContent13();\" style=\"cursor:hand\">";
$td04width = "19";
$tdbgcolor = "#ABABAB";
$fontstyle = "b";
$jscontrolu = "/theme/1/black_up_arrow.gif";
$jscontrold = "/theme/1/black_down_arrow.gif";
}
echo "<s";
echo "cript>\r\nfunction ControlContent13(){\r\n if (contentid13.style.display == 'none'){\r\n\t contentid13.style.display = '';\r\n\t\timgarrow13.src = '";
echo $jscontrolu;
echo "';\r\n\t}\r\n else {\r\n\t contentid13.style.display = 'none';\r\n\t\timgarrow13.src = '";
echo $jscontrold;
echo "';\r\n\t}\t\r\n\r\n}\r\n</script>\r\n\r\n<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"newsbg\" align=\"center\">\r\n <tr>\r\n <td width=\"88\" ";
echo $imgurl01;
echo "><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr>\r\n <td width=\"15%\"> </td>\r\n <td height=\"18\">";
if ( !is_priview13( "250,", $u_priv ) )
{
echo "<span style=\"font:bold;\">投票调查</span>";
}
else
{
echo "<a href=\"../vote/admin/surveyresult.php\" target=\"main\" class=\"".$fontstyle."\">投票调查</a>";
}
echo "</td>\r\n </tr>\r\n </table></td>\r\n <td ";
echo $imgurl02;
echo "> </td>\r\n <td width=\"";
echo $td04width;
echo "\" align=\"right\" ";
echo $imgurl04;
echo ">";
echo $strimg;
echo "</td>\r\n </tr>\r\n</table>\r\n<div class=\"small\">\r\n <table width=\"100%\" id=\"contentid13\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" class=\"darkbord\">\r\n ";
if ( !is_priview13( "250,", $u_priv ) )
{
echo " <tr>\r\n <td>";
message( "", "无权查看此栏目!" );
echo "</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"2\" bgcolor=\"";
echo $tdbgcolor;
echo "\" height=\"1\"></td>\r\n </tr>\r\n ";
}
else
{
$query = "select SID, Name, Active, StartDate, EndDate, (now() > EndDate) as Expired from phpqsurvey where Active='y' order by SID";
$cursor = exequery( $connection, $query );
$surveycount = 0;
while ( $row = mysql_fetch_array( $cursor ) )
{
++$surveycount;
$sid = $row['SID'];
$name = $row['Name'];
$active = $row['Active'];
$startdate = $row['StartDate'];
$enddate = $row['EndDate'];
$startdate = explode( " ", $startdate );
$edate = explode( " ", $enddate );
$activeimg = "<img src=\"/images/email_close.gif\" alt=\"生效\">";
$query2 = "select count(SID) from phpquser where SID=".$sid;
$cursor2 = exequery( $connection, $query2 );
$row2 = mysql_fetch_array( $cursor2 );
$now = date( "YmdHis" );
$ed = str_replace( " ", "", $edate );
$ed = str_replace( "-", "", $edate );
$ed = str_replace( ":", "", $edate );
if ( $row['Expired'] && substr( $enddate, 0, 10 ) != "0000-00-00" )
{
continue;
}
else
{
echo " <tr>\r\n <td width=\"2%\"> </td>\r\n <td>";
echo $activeimg;
if ( $now < $ed )
{
echo "<a href=\"../vote/fillsurvey.php?sid=".$sid."\" class=\"link\" target=\"_new\">".$name."</a>";
if ( $active == "y" )
{
echo "(<a href=\"../vote/stats.php?sid=".$sid."&st=a&vw=a&fa=1&view=1\" target=\"_new\" class=link>已提交".$row2[0]."份</a>) ";
echo "<span style=\"font-size:9px;color:#999999;\">".$startdate[0]." 至 ".$edate[0]."</span>";
}
}
echo "</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"4\" bgcolor=\"";
echo $tdbgcolor;
echo "\" height=\"1\"></td>\r\n </tr>\r\n ";
}
if ( $surveycount == 0 )
{
echo " <tr>\r\n <td width=\"2%\"> </td>\r\n <td>无投票调查</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"4\" bgcolor=\"";
echo $tdbgcolor;
echo "\" height=\"1\"></td>\r\n </tr>\r\n ";
}
}
}
echo " </table>\r\n</div>\r\n<br>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -