📄 index.php
字号:
<?php
require( "inc/init.php" );
require( "inc/mysql.php" );
require( "inc/functions.php" );
require( "inc/pfunctions.php" );
header( "location:admin/main.php" );
$varnames = array( );
setvars( $varnames );
setlanguage( "" );
$surveylist = $phpQlang['SurveyList'];
$contents = "\r\n<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=600>\r\n<TR><TD WIDTH=48></TD><TD WIDTH=500></TD><TD WIDTH=48></TD>\r\n<TR>\r\n\t<TD></TD>\r\n\t<TD COLSPAN=2><h2>{$surveylist}</h2></TD>\r\n</TR>\r\n<TR>\r\n\t<TD> </TD>\r\n\t<TD ALIGN=center>\r\n\t<TABLE CELLPADDING=2 CELLSPACING=0 BORDER=0>\r\n\t<TR><TD COLSPAN=2><HR SIZE=1 NOSHADE></TD></TR>\r\n";
if ( $phpQAdmin['ListSurvey'] == "y" )
{
$qstring = "select *, unix_timestamp() as unw, unix_timestamp(StartDate) as usd, unix_timestamp(EndDate) as ued ";
$qstring .= "from phpQSurvey where Active = \"y\" ";
$qstring .= "order by Active, Name";
$mqsurvey = mysql_query( $qstring );
while ( $masurvey = mysql_fetch_array( $mqsurvey ) )
{
$validtime = true;
$validtime = substr( $masurvey['StartDate'], 0, 10 ) != "0000-00-00" ? $masurvey['usd'] <= $masurvey['unw'] ? $validtime : false : $validtime;
$validtime = substr( $masurvey['EndDate'], 0, 10 ) != "0000-00-00" ? $masurvey['unw'] <= $masurvey['ued'] ? $validtime : false : $validtime;
if ( $validtime )
{
$responseloc = "";
if ( $masurvey['SurveyResults'] )
{
$mqresponse = mysql_query( "select count(*) as ct from phpQUser where SID = \"".protectmysql( $masurvey['SID'] )."\"" );
$responsect = 0;
if ( $maresponse = mysql_fetch_array( $mqresponse ) )
{
$responsect = $maresponse['ct'];
}
$responsemsg = $responsect == 1 ? $phpQlang['response'] : $phpQlang['responses'];
$responsemsg = sprintf( $responsemsg, $responsect );
$responseloc = "(<A HREF=\"stats.php?sid=".$masurvey['SID']."\" CLASS=link>{$responsemsg}</A>)";
}
$sid = $masurvey['SID'];
$lnkstyle = "CLASS=link";
$svname = protecthtml( $masurvey['Name'] );
$svname = 50 < strlen( $svname ) ? substr( $svname, 0, 50 )."..." : $svname;
$contents .= "<TR><TD ALIGN=right><A HREF=\"fillsurvey.php?sid={$sid}\" {$lnkstyle}>--</A></TD>";
$contents .= "<TD><A HREF=\"fillsurvey.php?sid={$sid}\" {$lnkstyle}><B>{$svname}</B></A> {$responseloc}</TD>";
if ( $masurvey['Description'] )
{
$contents .= "<TR><TD ALIGN=right VALIGN=top> </TD>";
$contents .= "<TD>".$masurvey['Description']."</TD></TR>";
}
$contents .= "<TR><TD COLSPAN=2><HR SIZE=1 NOSHADE></TD></TR>";
}
}
}
else
{
$contents .= "<TR><TD COLSPAN=2>".$phpQlang['NoSurveys']."</TD></TR>\n";
}
$contents .= "\r\n\t</TABLE>\r\n\t</TD>\r\n\t<TD> </TD>\r\n</TR>\r\n</TABLE>\r\n";
createpage( 0, $phpQlang['SurveyList'], $contents, false, "" );
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -