Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQAViewQuizEntries.php
<?php
/*****************************************************************/
/* Nukequiz (tm)    v 3.1.0                                		 */
/* By: Kissoftware (hide@address.com)      		     */
/* http://www.kissoftware.org.uk                           		 */
/* http://www.kissoftware.co.uk                       		     */
/* Copyright © 2003-2008 by Kissoftware         				 */
/* See Docs For Information & Credits                 			 */
/* For More information Visit Forums Or The Online Help Manual	 */
/*****************************************************************/
$pagetitle = _NQ_ADMINQENTRIES;
$qid = intval($qid);
include ("header.php");
nqmenuheader();
$trecords = $db->sql_query("SELECT COUNT(*) as help FROM ".$prefix."_nquiz_scoreboard WHERE qid='$qid'");
list($pagenum) = $db->sql_fetchrow($trecords);
OpenTable();
echo "<center><table width='100%' border='0' cellpadding='3' cellspacing='3'><tr>";
echo "<form method='post' action='".$admin_file.".php' id='delet'>";
echo "<input type='hidden' name='op' value='nqdeleteuser'>";
echo "<td colspan='8' align='center'><font class='title'>"._NQ_TOPRES."&nbsp;:&nbsp;$pagenum</font><br><br></td></tr>";
echo "<tr><th>"._NQ_NAME."</th><th>"._NQ_EMAIL."</th><th>"._NQ_PTS."</th><th>"._NQ_PERCENT."</th>";
echo "<th align='center'>"._NQ_TTAKEN."</th><th>"._NQ_SUBMITTED."</th><th>"._NQ_ATTEMPTS."</th><th>"._NQ_OPTIONS."</th></tr>";
$totalpages = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nquiz_scoreboard WHERE qid='$qid'"));
$result = $db->sql_query("SELECT * FROM ".$prefix."_nquiz_scoreboard WHERE qid='$qid' ORDER BY perc DESC, ttime ASC");
if (!$db->sql_numrows($result)){
echo "<td align='center' colspan='8'><font class='title'><br>"._NQ_NORESULTS."</font><br></td>";
}
else {
while(list($sbid, $ip, $starttime, $endtime, $username, $email, $qid, $score, $perc, $qcorrect, $qwrong, $ttime, $date) = $db->sql_fetchrow($result)){
$prevtotal = $db->sql_query("SELECT COUNT(*) as help FROM ".$prefix."_nquiz_scoreboard WHERE (username='$username' AND qid='$qid')");
list($prevrecords) = $db->sql_fetchrow($prevtotal);
$formatdate = $nq_config['dateformat'];
$date = date($formatdate,$date);
echo "<tr><td class='row1'><a href='modules.php?name=Your_Account&amp;op=userinfo&amp;username=$username' target='_blank'>$username</a><input type='hidden' name='username' value='$username'></td><td class='row1' align='center'><input type='hidden' name='email' value='$email'><a href='mailto:$email?subject="._NQ_MAILSUBJECT."'><img src='modules/$module_name/images/mail.png' valign='absmiddle'></a></td><td align='center' class='row1'>$score</td><td align='center' class='row1'>$perc%</td><td align='center' class='row1'>$ttime</td><td align='center' class='row1'>$date</td><td class='row1' align='center'>$prevrecords</td>";
echo "<td align='center' class='row1'><input type=checkbox name=sbid[] value='".$sbid."'><input type='hidden' name='qid' value='$qid'></td>";
}
echo "</tr><tr>";
}
echo "</tr></table>";
echo "<br><table align='center' border='0' width='60%'><tr><td align='center'>";
nqselectall();
echo"<a href=\"javascript:checkedAll('delet', true)\">"._NQ_CHECKALL."</a>&nbsp;&ndash;&nbsp;&loz;&nbsp;&ndash;&nbsp;<a href=\"javascript:checkedAll('delet', false)\">"._NQ_UNCHECKALL."</a><br><br><br>";
echo"<input type='submit' name='submit' value='"._NQ_DELETESELECTED."'><br><br></center>";
echo ""._GOBACK."</td></form></tr></table></center><br>";
CloseTable();
include ("footer.php");
?>
Return current item: Nukequiz