Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQADisplayQuestionFiles.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	 */
/*****************************************************************/
$Theme_Sel = get_theme();
echo "<html><link rel=\"StyleSheet\" href=\"$nukeurl/themes/$Theme_Sel/style/style.css\" TYPE=\"text/css\"><head>";
include_once("themes/$Theme_Sel/theme.php");
echo "<title>"._NQ_IMAGEVIEW."&nbsp;&raquo;&nbsp;$title</title></head>";
$imagesdir = $nq_config['images_directory'];
$dir_name="modules/$module_name/$imagesdir/$quizdir";
$handle=opendir($dir_name);
viewfullimage();
$x = 0;
$a = 0;
echo "<center><table width='100%' height='100%' cellpadding='0' cellspacing='0' border='0'><tr>";
echo "<td class='row1' valign='top' align='center'>";
echo "<br><table width='95%' cellpadding='2' cellspacing='2' border='0'>";
while (($file = readdir($handle))!==false) {
if ($file != "." && $file != ".." && $file!= "Thumbs.db" && $file!= "thumbs" && $file!= "watermark.txt"){
$result = $db->sql_query("SELECT quesid, file FROM ".$prefix."_nquiz_questions WHERE file='$file'");
list($quesid, $quesfile) = $db->sql_fetchrow($result);
if ($a == 0) { echo "<tr>"; }
if ($quesfile==$file){$status="<b>&bull;&nbsp;$quesid</b><br>";}else{$status="<br>";}

if (substr($file,-4) == ".jpg" || substr($file,-4) == ".png" || substr($file,-4) == ".gif"){
$image = "$dir_name/$file";
$th_image = "$dir_name/thumbs/th_$file";
$display = "<a href=\"javascript:imgsig ('$image');\"><img src=\"$th_image\" title=\""._NQ_IMAGEFILE."\" onMouseOver=\"self.status='".NQ_IMAGEFILE." ';return true\" onmouseout=\"self.status='';return true\"alt=\""._NQ_IMAGEFILE."\"alt=\"".NQ_IMAGEFILE."\" border='0'></a><br>$file<br>$status";
}
else {
$image = "$dir_name/$file";
$th_image = "$dir_name/thumbs/th_sound.png"; 
$display = "<img src='$th_image' title=\""._NQ_SOUNDFILE."\" onMouseOver=\"self.status='"._NQ_SOUNDFILE." ';return true\" onmouseout=\"self.status='';return true\"alt=\""._NQ_SOUNDFILE."\"alt=\""._NQ_SOUNDFILE."\" border='0'><br>$file<br>$status";
}
echo "<td align='center'>$display</td>";
$a++;
if ($a == 4) { echo "</tr>"; $a = 0; }
}
}//dir list
if ($a == 1) { echo "<td width='25%'>&nbsp;</td></tr>"; } else { echo "</tr>"; }
echo "</table><br><center>"._NQ_DISPLAYDIRNOTES."<br></center></td></tr></table>$filecount";
closedir($handle);
echo "</body></html>";
?>
Return current item: Nukequiz