Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQAQuizLeague.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_ADMINQUIZLEAGUE;
include ("header.php");
nqmenuheader();
$league_count = $nq_config['league_count'];
$league_orderby = $nq_config['league_orderby'];
$pagenum = $nq_config['pagenum'];
$totalpages = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nquiz_league"));
if (!isset($min)) { $min = 0; }
if (!isset($max)) { $max = $min + $pagenum; } 
$total = $db->sql_query("SELECT COUNT(*) FROM ".$prefix."_nquiz_league");
list($numrecords) = $db->sql_fetchrow($total);
echo "<form method='post' action='".$admin_file.".php' id='delet'>";
echo "<input type='hidden' name='op' value='nqdeleteleagueuser'>";
OpenTable();
echo "<br><center><font class='title'>"._NQ_QUIZLEAGUE."&nbsp;$numrecords&nbsp;"._NQ_RESULTS."</font><br><br>";
echo "<center><br><table width='98%' border='0' cellpadding='2' cellspacing='2'><tr>";
echo "<th>"._NQ_NAME."</th><th>"._NQ_EMAIL."</th><th>"._NQ_PTS."</th><th>"._NQ_AVG."</th><th>"._NQ_PERCENT."</th><th>"._NQ_COMPLETEDQUIZZES."</th><th>"._NQ_OPTIONS."</th></tr><tr>";
$result = $db->sql_query("SELECT * FROM ".$prefix."_nquiz_league ORDER BY $league_orderby DESC LIMIT $min, $pagenum");
if ($db->sql_numrows($result)== ''){
echo "<td colspan='7' align='center'><br><b>"._NQ_NORESULTS."</b></td></tr><tr><td colspan='7' align='center'><br>"._GOBACK."</td></tr></table><br>";
}
else {
while(list($nqlid, $username, $email, $scount, $score, $average, $total, $totalqus, $perc, $updated) = $db->sql_fetchrow($result)){
echo  "<td class='row1' align='left'><a href='modules.php?name=Your_Account&amp;op=userinfo&amp;username=$username' target='_blank'>$username</a></td><td class='row1'align='center'><a href='mailto:$email'><img src='modules/$module_name/images/mail.png'></a></td><td align='center' class='row1'>$score&nbsp;"._NQ_PTS."</td>";
echo  "<td align='center' class='row1'>$average&nbsp;"._NQ_PTS."</td><td align='center' class='row1'>$perc&nbsp;%</td><td align='center' class='row1'>$scount</td><td align='center' valign='absmiddle' class='row1'><input type='checkbox' name='nqlid[]' value='".$nqlid."'>&nbsp;&nbsp;<a href='".$admin_file.".php?op=nqupdatenqlentries&amp;username=$username'><img src='modules/$module_name/images/calcadd.png'></a></td></tr>";
}
echo "</table></center><br>";
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></center>";
echo "</form></center><br>";
}
CloseTable();
pageleague($pagenum, $totalpages, $max, $min);
include ('footer.php');
?>
Return current item: Nukequiz