Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQACategoryEdit.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_ADMINMODIFYC;
include ("header.php");
nqmenuheader();
OpenTable();
echo "<br><center><font class='title'>"._NQ_ADDCATEGORY."</font></center><br>";
nqdisplayimagewin();
echo "<center><table border='0' cellpadding='2' cellspacing='2'>";
echo "<tr><td>".quizhelp_img(_NQ_HELPCATDISPLAY)."</td><td><a href='".$admin_file.".php?&amp;op=nqdisplaycatimages&amp;folder=images' Onclick=\"displayimage(this.href,'','550','500','yes');return false;\">"._NQ_VIEWCATLOGOS."</a></td></tr>";
echo "<form method='post' action='".$admin_file.".php'>";
echo "<input type='hidden' name='op' value='nqcreatesection'>";
echo "<tr><td>".quizhelp_img(_NQ_HELPQCAT)."</td><td><b>"._NQ_CAT."</b></td><td><input type='text'  name='secname' size='45'></td>";
echo "<tr><td>".quizhelp_img(_NQ_HELPQDESC)."</td><td><b>"._NQ_COMMENT."</b></td><td><textarea  wrap='virtual' cols='60' rows='4' name='secdesc'></textarea></td>";
echo "<tr><td>".quizhelp_img(_NQ_HELPQCATIMAGE)."</td><td><b>"._NQ_IMAGE."</b></td><td><select name='secimage'>";
$dir_name="modules/$module_name/images/";
$handle=opendir($dir_name); 
while ($file = readdir($handle)) {
if (substr($file,0,5) == "logo_"){
if(ereg(".gif|.png|.jpg",$file))  { $tlist[] = $file; } }
}
closedir($handle);
sort($tlist);
echo "<option name='secimage' value='' $sel>"._NQ_SELECTCATIMAGE."</option>";
for ($i=0; $i < sizeof($tlist); $i++) {
if($tlist[$i]!="") {
echo "<option name='secimage' value=\"$tlist[$i]\">$tlist[$i]";
}
}
echo "</select><br></td></tr><tr><td colspan='3' align='center'>";
echo "<br><input type='submit' class='optionlite' value='"._NQ_SAVE."'></td></tr></form></table><br>";
CloseTable();

OpenTable();
echo "<table width='100%' border='0' cellpadding='1' cellspacing='1'><tr><td align='center'>";
echo "<font class='title'><b>"._NQ_DELCATEGORY."</b></font><br>";
echo "<form method='post' action='".$admin_file.".php'>";
echo "<input type='hidden' name='op' value='nqdeletesection'>";
echo "<table width='100%' border='0' cellpadding='2' cellspacing='2'>";
echo "<tr><td align='center'><select name='sid'><option value='' selected>"._NQ_SELECTCAT."</option>";
$result = $db->sql_query("SELECT sid, secname FROM ".$prefix."_nquiz_sections");
while(list($sid, $secname) = $db->sql_fetchrow($result)){
echo "<option value='$sid'>$secname</option>";
}
echo "</select></td></tr><tr><td align='center'><input type='submit' class='optionlite' value='"._NQ_DELETE."'></td></tr></form></table>";
echo "</td><td align='center'><font class='title'>"._NQ_MODIFYCATEGORY."</font></center><br>";
echo "<form method='post' action='".$admin_file.".php'>";
echo "<input type='hidden' name='op' value='nqmodifysection'>";
echo "<table width='100%' border='0' cellpadding='2' cellspacing='2'>";
echo "<tr><td align='center'><select name='sid'><option value='' selected>"._NQ_SELECTCAT."</option>";
$result = $db->sql_query("SELECT sid, secname FROM ".$prefix."_nquiz_sections");
while(list($sid, $secname) = $db->sql_fetchrow($result)){
echo "<option value='$sid'>$secname</option>";
}
echo "</select></td></tr><tr><td align='center'><input type='submit' class='optionlite' value='"._NQ_MODIFY."'>";
echo "</td></tr></table></form></td></tr></table>";
CloseTable();
include ("footer.php");
?>
Return current item: Nukequiz