Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQAModifyCategory.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_ADMINMODIFYCAT;
include ("header.php");
nqmenuheader();
$dir_name="modules/$module_name/images/";
echo "<script type='text/javascript'>\n";
echo "<!--\n";
echo "function showimage() {\n";
echo "if(!document.images)\n";
echo "return\n";
echo "document.images.nqcats.src=\n";
echo "'$nukeurl/modules/Nukequiz/images/' + document.nqcatsadmin.secimage.options[document.nqcatsadmin.secimage.selectedIndex].value\n";
echo "}\n";
echo "//-->\n";
echo "</script>\n\n";
OpenTable();
$result = $db->sql_query("SELECT sid, secname, secdesc, secimage FROM ".$prefix."_nquiz_sections WHERE sid='$sid'");
list($sid, $secname, $secdesc, $secimage) = $db->sql_fetchrow($result);
echo "<br><center><font class='title'>"._NQ_MODIFYCATEGORY."</font></center><br>";
echo "<form name='nqcatsadmin' method='post' action='".$admin_file.".php'>";
echo "<center><table border='0' cellpadding='2' cellspacing='2'>";
echo "<tr><td><b>"._NQ_CAT."</b></td><td><input type='text' name='secname' size='45' value='$secname'></td>";
echo "<tr><td><b>"._NQ_IMAGE."</b></td><td><select name='secimage' onChange='showimage()'>";
$handle=opendir($dir_name);
while($file = readdir($handle)) { 
if (substr($file,0,5) == "logo_"){
if(ereg(".gif|.png|.jpg",$file))  { $clist[] = $file; } }
}
closedir($handle);
sort($clist);
for ($i=1; $i < sizeof($clist); $i++) {
if($clist[$i]!= "") {
$sel = "";
if($secimage == $clist[$i]) { $sel = "selected"; }
echo "<option name='secimage' value='$clist[$i]' $sel>$clist[$i]</option>\n";
}
}
echo "</select></td></tr>";
echo "<tr><td colspan='2' align='center'><img src='".$dir_name."$secimage' name='nqcats' width='350'><br></td>";
echo "<tr><td><b>"._NQ_COMMENT."</b></td><td><textarea  wrap='virtual' cols='45' rows='4' name='secdesc'>$secdesc</textarea></td>";
echo "<tr><td colspan='2' align='center'><input type='submit' class='optionlite' value='"._NQ_SAVE."'></td></tr></table>";
echo "<input type='hidden' name='op' value='nqsavemodifysection'>";
echo "<input type='hidden' name='sid' value='$sid'>";
echo "</form>";
echo "<br><center>"._GOBACK."</center><br>";
CloseTable();
include ('footer.php');
?>
Return current item: Nukequiz