Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQAAdminConfig.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_ADMINCONFIGSETTINGS;
include ("header.php");
nqmenuheader();
OpenTable();
if($nq_config['install'] == 1){
$submitvalue = "disabled='disabled'";
}
echo "<form method='post' action='".$admin_file.".php'>";
$sel0 = $sel1 = $sel2 = $sel3 = "";
echo "<input type='hidden' name='op' value='nqadminconfigsave'>";
echo "<br><center>";
echo "<table width='100%' border='0' cellpadding='1' cellspacing='1'><tr>";
echo "<th colspan='2'>"._NQ_ADMINCONFIG."</th><th>"._NQ_BLOCKSCONFIG."</th></tr>";
echo "<td class='row1' width='33%' width='100%' align='center' valign='top'>";
echo "<table border='0' cellpadding='1' cellspacing='1'><tr>";
if ($nq_config['user_help']== '0') { $sel0 = "selected"; } elseif ($nq_config['user_help']== '1') { $sel1 = "selected"; }
echo "<td>".quizhelp_img(_NQ_HELPUSERHELP)."</td>";
echo "<td align='left'>"._NQ_USERHELPONOFF."</td><td align='left'><select name='user_help'>";
echo "<option value='0'$sel0>"._NQ_OFF."</option>";
echo "<option value='1'$sel1>"._NQ_ON."</option>";
echo "</select></td></tr><tr>";
##Removed till next version
//if ($nq_config['user_question']=='0') { $sel0 = "selected"; } elseif ($nq_config['user_question']=='1') { $sel1 = "selected"; }
//echo "<td>".quizquizhelp_img(_NQ_HELPUSERSUBMISSION)."</td>";
//echo "<td align='left'>"._NQ_USERQUESONOFF."</td><td align='left'><select name='user_question'>";
//echo "<option value='0'$sel0>"._NQ_OFF."</option>";
//echo "<option value='1'$sel1>"._NQ_ON."</option>";
//echo "</select></td></tr><tr>";
echo "<td>".quizhelp_img(_NQ_HELPTHUMBSSIZE)."</td>";
echo "<td align='left'>"._NQ_THUMBSSIZE."</td><td align='left'><input type='text' name='maxthumbs' size='4' value='".$nq_config['maxthumbs']."'></td></tr>";
echo "<td>".quizhelp_img(_NQ_HELPMAXIMAGESIZE)."</td>";
echo "<td align='left'>"._NQ_MAXIMAGESIZE."</td><td align='left'><input type='text' name='maximagesize' size='4' value='".$nq_config['maximagesize']."'></td></tr>";
echo "<td>".quizhelp_img(_NQ_HELPPAGELIST)."</td>";
echo "<td align='left'>"._NQ_PAGELIST."</td><td align='left'><select name='pagenum'>";
echo "<option value='".$nq_config['pagenum']."' selected> ".$nq_config['pagenum']." </option>";
for ($i=1; $i <= 5; $i++) { $pagenum = $i * 5; echo "<option value='$pagenum'> $pagenum </option>"; }
echo "</select></td></tr><tr>";		
echo "<td>".quizhelp_img(_NQ_HELPNUKEPOINTS)."</td>";
echo "<td align='left'>"._NQ_NUKEPOINTSA."</td><td align='left'>";
echo "<select name='nukepoints'>";
if ($nq_config['nukepoints'] == '0') { $sel0 = "selected"; } elseif ($nq_config['nukepoints'] == '1') { $sel1 = "selected"; } elseif ($nq_config['nukepoints'] == '2') { $sel2 = "selected"; }
echo "<option value='0' $sel0>"._NQ_SYSOFF."</option>";
echo "<option value='1' $sel1>"._NQ_ADDSETUSRPTS."</option>";
echo "<option value='2' $sel2>"._NQ_ADDSCOREPTS."</option>";
echo "</select></td></tr><tr>";
echo "<td>".quizhelp_img(_NQ_HELPNUSRPNTS)."</td>";
echo "<td align='left'>"._NQ_NUSERPOINTS."</td><td align='left'><input type='text' name='userpoints' size='4' value='".$nq_config['userpoints']."'></td></tr>";
if($nq_config['install'] == 1){
echo "<td>".quizhelp_img(_NQ_HELPIMGDIR)."</td>";
echo "<td>"._NQ_IMAGEDIRECTORYNAME."</td><td align='left'><b><font color='#CC0000'>".$nq_config['images_directory']."</b></font></td></tr>";
} else{
echo "<td>".quizhelp_img(_NQ_HELPIMGDIR)."</td>";
echo "<td align='left'>"._NQ_IMAGEDIRECTORYNAME."</td><td align='left'><input type='text' name='images_directory' size='16' maxlength='12' value='".$nq_config['images_directory']."' $submitvalue></td></tr>";
}	
if($nq_config['install'] == 1){
echo "<td>".quizhelp_img(_NQ_HELPBCKDIR)."</td>";
echo "<td align='left'>"._NQ_BACKUPDIRECTORYNAME."</td><td align='left'><b><font color='#CC0000'>".$nq_config['backup_directory']."</b></font></td></tr>";
} else{
echo "<td>".quizhelp_img(_NQ_HELPBCKDIR)."</td>";
echo "<td align='left'>"._NQ_BACKUPDIRECTORYNAME."</td><td align='left'><input type='text' name='backup_directory' size='16' maxlength='12' value='".$nq_config['backup_directory']."' $submitvalue></td></tr>";
}
echo "</table></td><td class='row1' width='33%' align='center' valign='top'><table width='100%' border='0' cellpadding='1' cellspacing='1'>";
echo "<tr><td>".quizhelp_img(_NQ_HELPDATEFORMAT)."</td>";
echo "<td align='left'>"._NQ_DATEFORMAT."</td><td align='left'><input type='text' name='dateformat' size='16' value='".$nq_config['dateformat']."'></td>";
echo "</tr>";
echo "<td>".quizhelp_img(_NQ_HELPMULTIUPLOADS)."</td>";
echo "<td align='left'>"._NQ_MULTIUPLOADS."</td><td align='left'><select name='uploads'>";
echo "<option value='".$nq_config['uploads']."' selected> ".$nq_config['uploads']." </option>";
for ($i=1; $i <= 10; $i++) { $uploads = $i * 1; echo "<option value='$uploads'> $uploads </option>"; }
echo "</select></td></tr><tr>";
echo "<td>".quizhelp_img(_NQ_HELPMAXFILESIZE)."</td>";
echo "<td align='left'>"._NQ_MFILESZ."</td><td align='left'><input type='text' name='max_filesize' size='9' value='".$nq_config['max_filesize']."'></td></tr>";
echo "<td>".quizhelp_img(_NQ_HELPTEMPLATES)."</td>";
echo "<td align='left'>"._NQ_TEMPLATES."</td><td align='left'>";
echo "<select name='templates'>";
$seltheme0 = $seltheme1 = $seltheme2 ="";
if($nq_config['templates'] == ""._NQ_THEMED."") $seltheme0 = "selected";
if($nq_config['templates'] == ""._NQ_DESIGNED."") $seltheme1 = "selected";
if($nq_config['templates'] == ""._NQ_PLAIN."") $seltheme2 = "selected";
echo "<option value='Theme'$seltheme0>"._NQ_THEMED."</option>";
echo "<option value='Designed'$seltheme1>"._NQ_DESIGNED."</option>";
echo "<option value='Plain'$seltheme2>"._NQ_PLAIN."</option>";
echo "</font></select></td></tr><tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPNOREPLYEMAIL)."</td>";
echo "<td align='left' colspan='2'><input type='text' name='reply_email' size='36' value='".$nq_config['reply_email']."'></td>";
echo "</tr>";
$sel0 = $sel1 = $sel2 = $sel3 ="";
if($nq_config['league_orderby'] == 'average') $sel0 = "selected";
if($nq_config['league_orderby'] == 'score') $sel1 = "selected";
if($nq_config['league_orderby'] == 'perc') $sel2 = "selected";
if($nq_config['league_orderby'] == 'count') $sel3 = "selected";
echo "<tr><td>".quizhelp_img(_NQ_HELPLEAGUEORDERBY)."</td>";
echo "<td align='left'>"._NQ_ORDERBY."</td><td align='left'><select name='league_orderby'>";
echo "<option value='average'$sel0>"._NQ_AVG."</option>";
echo "<option value='score'$sel1>"._NQ_SCORE."</option>";
echo "<option value='perc'$sel2>"._NQ_PERCENT."</option>";
echo "<option value='count'$sel3>"._NQ_COMPLETED."</option>";
echo "</select></td></tr><tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPLEAGUECOUNT)."</td>";
echo "<td align='left'>"._NQ_COMPLETED."</td><td align='left'><select name='leaguecount'>";
echo "<option value='".$nq_config['league_count']."' selected> ".$nq_config['league_count']." </option>";
for ($i=1; $i <= 10; $i++) { $leaguecount = $i * 1; echo "<option value='$leaguecount'> $leaguecount </option>"; }
echo "</select></td></tr><tr>";
if ($nq_config['league_graphics']=='0') { $sel0 = " selected"; } elseif ($nq_config['league_graphics']=='1') { $sel1 = " selected"; }
echo "<tr><td>".quizhelp_img(_NQ_HELPLEAGUEGRAPHICS)."</td>";
echo "<td align='left'>"._NQ_LEAGUEGRAPHICSONOFF."</td><td align='left'><select name='league_graphics'>";
echo "<option value='0'$sel0>"._NQ_OFF."</option>";
echo "<option value='1'$sel1>"._NQ_ON."</option>";
echo "</select></td></tr></table>";
echo "</td><td width='33%' class='row1' align='center' valign='top'><table width='100%' border='0' cellpadding='1' cellspacing='1'><tr>";
echo "<td>".quizhelp_img(_NQ_HELPBLOCKLIST)."</td>";
echo "<td align='left'>"._NQ_BLOCKSLIST."</td><td align='left'><select name='blocklist'>";
echo "<option value='".$nq_config['blocklist']."' selected> ".$nq_config['blocklist']." </option>";
for ($i=1; $i <= 5; $i++) { $blocklist = $i * 5; echo "<option value='$blocklist'> $blocklist </option>"; }
echo "</select></td></tr><tr>";
if ($nq_config['scroll']=='0') { $sel0 = " selected"; } elseif ($nq_config['scroll']=='1') { $sel1 = " selected"; }
echo "<tr><td>".quizhelp_img(_NQ_HELPSCROLLERONOFF)."</td>";
echo "<td align='left'>"._NQ_SCROLLERSW."</td><td align='left'><select name='scroll'>";
echo "<option value='0'$sel0>"._NQ_OFF."</option>";
echo "<option value='1'$sel1>"._NQ_ON."</option>";
echo "</select></td></tr><tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPNAMECUTOFF)."</td>";
echo "<td align='left'>"._NQ_NCOFF."</td><td align='left'><select name='cutoff'>";
echo "<option value='".$nq_config['cutoff']."' selected> ".$nq_config['cutoff']." </option>";
for ($i=2; $i <= 10; $i++) { $cutoff = $i * 2; echo "<option value='$cutoff'> $cutoff </option>"; }
echo "</select></td></tr><tr>";
$seldir0 = $seldir1 = "";
if($nq_config['scrdir'] == "Up") $seldir0 = "selected";
if($nq_config['scrdir'] == "Down") $seldir1 = "selected";
echo "<tr><td>".quizhelp_img(_NQ_HELPSCROLLDIR)."</td>";
echo "<td align='left'>"._NQ_BLKDIR."</td><td align='left'><select name='scrdir'>";
echo "<option value='"._NQ_UP."'$seldir0>"._NQ_UP."</option>";
echo "<option value='"._NQ_DOWN."'$seldir1>"._NQ_DOWN."</option>";
echo "</select></td></tr><tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPSCROLLH)."</td>";
echo "<td align='left'>"._NQ_SCROLLHEI."</td><td align='left'><input type='text' name='scrollheight' size='6' value='".$nq_config['scrollheight']."'></td>";
echo "</tr>";
echo "</table></center></td></tr></table>";
echo "<br><center><input type='submit' class='optionlite' value='"._NQ_SAVE."'></center>";
echo "</form><br><br>";
CloseTable();
include ("footer.php");
?>
Return current item: Nukequiz