Location: PHPKode > projects > Nukequiz > html/blocks/block-NQ_Scroll_Side_Active_Quiz.php
<?php
/*****************************************************************/
/* Nukequiz (tm)    v 3.0.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	 */
/*****************************************************************/
/* Block To Show Each Active Quiz And The Catergorys (Sections)	 */
/* ***************************************************************/
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");
$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'];
$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>";
}
$content .= "<table width='100%' border='0' cellpadding='2' cellspacing='2'><tr>";
$result = $db->sql_query("SELECT sid, secname from ".$prefix."_nquiz_sections ORDER BY secname LIMIT 0,$blkh");
while(list($sid, $secname) = $db->sql_fetchrow($result)){
$r = $db->sql_query("SELECT qid, sid, active, title from ".$prefix."_nquiz_quiz WHERE sid='$sid' AND active ='1'");
if (strlen($secname) > '20')
$secname = substr($secname, 0, (16))."...";

$content .= "<td align='center'><b>&raquo;&nbsp;$secname&nbsp;&laquo;</b></td></tr><tr>";
$content .= "<td align='center'>";
while(list($qid, $sid, $active, $title) = $db->sql_fetchrow($r)){
if (strlen($title) > '20')
$title = substr($title, 0, (16))."...";
$content .= "<a href='modules.php?name=$module_name&file=index&op=startquiz&qid=$qid'>$title</a><br><br>";
}
$content .= "</td><tr>";
}
$content .= "</tr></table></marquee><br></td></tr></table>";
$content .= "<center>"._NQ_REGISTEREDACCESS."<br><br><a href='modules.php?name=Your_Account'>"._NQ_LOGIN."</a>&nbsp;&nbsp;"._NQ_OR."&nbsp;&nbsp;<a href='modules.php?name=Your_Account&op=new_user'>"._NQ_REGISTER."</a><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