Location: PHPKode > projects > Nukequiz > html/blocks/block-NQ_Random_Center_Active_Quiz.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	 */
/*****************************************************************/
/* Random Block To Show Catergory (Sections) With Active Quizzes */
/* ***************************************************************/
if(!defined('NUKE_FILE') && !defined('BLOCK_FILE')) { die('You can\'t access this file directly...'); }
global $prefix, $db, $currentlang;
$module_name = "Nukequiz";
include_once("modules/$module_name/language/lang-".$currentlang.".php");
include_once("includes/functions_nukequiz.php");
$ThemeSel = get_theme();
$content .= "<center><table border='0' cellpadding='4' cellspacing='4'><tr>";
$result = $db->sql_query("SELECT * FROM ".$prefix."_nquiz_sections ORDER BY rand() LIMIT 0,1");
while(list($sid, $secname, $secdesc, $secimage) = $db->sql_fetchrow($result)){
$nqimage = nquizimage("Nukequiz",$secimage);
$quizzes = $db->sql_query("SELECT qid, sid, active, title FROM ".$prefix."_nquiz_quiz WHERE sid='$sid' AND active='1'");
if ($nqimage!=""){
$content .="<td align='center'><img src=\"$nqimage\" border=\"0\" alt=\"$secname\"></a></td></tr><tr>";
}
else {
$content .= "<td align='center'><img src='modules/$module_name/images/$secimage' border='0'alt='$secname'></a></td></tr><tr>";
}
$content .= "<td align='center'>";
while(list($qid, $sid, $active, $title) = $db->sql_fetchrow($quizzes)){
$content .= "<b>&loz;&nbsp;</b><a href='modules.php?name=$module_name&file=index&op=startquiz&qid=$qid'>$title</a><b>&nbsp;&loz;</b><br><br>";
}
$content .= "</td><tr>";
}
$content .= "</tr></table></center><br>";	
//* Please Leave this Copyright Link In Here - Fair is Fair. Thanks */
$content .="<div align=\"right\"><a href=\"http://www.kissoftware.org.uk/\" target=\"_blank\"><img src=\"modules/$module_name/images/kiss.gif\"></a>&nbsp;";
?>
Return current item: Nukequiz