<?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 */
/*****************************************************************/
/* Scroll Center Block To Show Catergories 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");
$configresult = $db->sql_query("SELECT config_name, config_value FROM ".$prefix."_nquiz_config");
while (list($config_name, $config_value) = $db->sql_fetchrow($configresult)) {
$config[$config_name] = $config_value;
$blkh = intval($config['blocklist']);
$name_len = $config['cutoff'];
$scrdir = $config['scrdir'];
$height = $config['scrollheight'];
$dateformat = $config['dateformat'];
$scroll = intval($config['scroll']);
}
$content .= "<center><table cellpadding='3' cellspacing='3' border='0'><tr><td>";
if ($scroll == '1') {
$content .= "<br><Marquee Behavior='Scroll' Direction='$scrdir' Height='$height' ScrollAmount='3' ScrollDelay='100' onMouseOver=\"this.stop()\" onMouseOut=\"this.start()\"><br>";
}
$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,$blkh");
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>◊ </b><a href='modules.php?name=$module_name&file=index&op=startquiz&qid=$qid'>$title</a><b> ◊</b><br><br>";
}
$content .= "</td><tr>";
}
$content .= "</tr></table></center></marqee><br></td></tr></table>";
//* 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> ";
?>