Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQACreateNewQuiz.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_ADMINCREATENEWQUIZ;
include ("header.php");
nqmenuheader();
OpenTable();
echo "<form method='post' action='".$admin_file.".php'>";
echo "<input type='hidden' name='op' value='nqsavenewquiz'>";
echo "<input type='hidden' name='file' value='admin'>";
echo "<br><center><table width='100%' border='0' cellpadding='3' cellspacing='3'>";
echo "<tr><td colspan='3' align='center'><font class='title'>"._NQ_CREATENEW."</font><br></td></tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPQTITLE)."</td>";
echo "<td align='left'>"._NQ_TITLE."</td><td align='left'><input type='text' name='title' value='$title' size='40'></td></tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPISCQUIZ)."</td>";
echo "<td align='left'>"._NQ_ISCQ."</td><td align='left'><input type='checkbox'  name='iscq'></td></tr>";
$totalpages = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nquiz_questions"));
if ($totalpages >='100'){
echo "<tr><td>".quizhelp_img(_NQ_HELPADDRANDQUESTIONS)."</td>";
echo "<td align='left'>"._NQ_ADDRANDQUESTIONS."</td><td align='left'><input type='checkbox'  name='arq'></td></tr>";
echo "<td>".quizhelp_img(_NQ_HELPNORANDQUEST)."</td>";
echo "<td align='left'>"._NQ_NUMRANDQ."</td><td align='left'><select name='randques'>";
echo "<option value='0'> 0 </option>";
for ($i=1; $i <= 5; $i++) { $randques = $i * 5; echo "<option value='$randques'> $randques </option>"; }
echo "</select></td></tr><tr>";	
}
else {
echo "<tr><td>".quizhelp_img(_NQ_HELPNORANDQUESTLIMITED)."</td>";
echo "<td align='left'>"._NQ_ADDRANDQUESTIONS."</td><td align='left'><b>"._NQ_FUNCNOTACTIVE."</b></td></tr>";
echo "<td>".quizhelp_img(_NQ_HELPNORANDQUESTLIMITED)."</td>";
echo "<td align='left'>"._NQ_NUMRANDQ."</td><td align='left'><b>"._NQ_FUNCNOTACTIVE."</b></td></tr><tr>";	
}
echo "<tr><td>".quizhelp_img(_NQ_HELPPRIZEDESC)."</td>";
echo "<td align='left'>"._NQ_PRIZEDESC."</td><td align='left'><input type='text' name='prize_desc' value='$prize_desc' size='55'></td></tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPQSPON)."</td>";
echo "<td align='left'>"._NQ_SPONSORNAME."</td><td align='left'>";
echo "<input type='text' name='sponsor' value='$sponsor' size='55'></td></tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPCAT)."</td>";
echo "<td align='left'>"._NQ_CATEGORY."</td><td align='left'><select name='sid'>";
$result = $db->sql_query("SELECT sid, secname FROM ".$prefix."_nquiz_sections");
while(list($secid, $secname) = $db->sql_fetchrow($result))
{
if ($secid==$sid) { $sel = "selected "; }
echo "<option $sel value='$secid'>$secname</option>";
$sel = "";
}
echo "</select></td></tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPRANDOM)."</td>";
echo "<td align='left'>"._NQ_RANDOMISE."</td><td align='left'>";
echo "<select name='randomise'>";
echo "<option value='0' selected>"._NQ_ORDER."</option>"; 
echo "<option value='1' selected>"._NQ_REVERSE."</option>";
echo "<option value='2' selected>"._NQ_RANDOM."</option>";
echo "</select>";
echo "<tr><td>".quizhelp_img(_NQ_HELPACTIVE)."</td>";
echo "<td align='left'>"._NQ_ACTIVATE."</td><td align='left'><input type='checkbox'  name='active'></td></tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPANSWER)."</td>";
echo "<td align='left'>"._NQ_SHOWANSWER."</td><td align='left'><input type='checkbox'  name='view'></td></tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPEMAILUSER)."</td>";
echo "<td align='left'>"._NQ_EMAILUSER."</td><td align='left'><input type='checkbox' name='emailuser'></td></tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPLIMIT)."</td>";
echo "<td align='left'>"._NQ_LIMIT."</td><td align='left'><input type='checkbox'  name='limit'></td></tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPEMAILADMIN)."</td>";
echo "<td align='left'>"._NQ_SENDADMINEMAIL."</b></td><td align='left'><input type='checkbox'  name='emailadmin'></td></tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPADEMAIL)."</td> ";
echo "<td align='left'>"._NQ_ADEMAIL."</td><td align='left'><input type='text' name='adminemail' value='$adminmail' size='40'></td></tr>";
echo "<tr><td>".quizhelp_img(_NQ_HELPEXPIRES)."</td>";
echo"<td align='left'>"._NQ_EXPIRATION."</td><td align='left'>";
$xday = 1;
echo " "._NQ_DAY.": <select class='textbox' name='newday'>";
echo "<option name='day' selected>00</option>"; 
while ($xday <= 31) 
{
echo "<option name='day'>$xday</option>";
$xday++;
}
echo "</select>";
$xmonth = 1;
echo " "._NQ_MONTH.": <select class='textbox' name='newmonth'>";
echo "<option name='month' selected>00</option>"; 
while ($xmonth <= 12) 
{
echo "<option name='month'>$xmonth</option>";
$xmonth++;
}
echo "</select>";
$start_year = date ('Y');
echo " "._NQ_YEAR.": <select class='textbox' name='newyear'>";
echo "<option name='year' selected>0000</option>"; 
for ($y = $start_year; $y <=($start_year + 12); $y++) 
{
echo "<option name='year'>$y</option>";
$year++;
}
echo "</select>";
echo " "._NQ_HOUR.": <select class='textbox' name='newhour'>";
$xhour = "0";
$cero = "0";
echo "<option name='hour' selected>00</option>"; 
while ($xhour <= 23) 
{
$dummy = $xhour;
if ($xhour < 10) { $xhour = "$cero$xhour"; }
echo "<option name='hour'>$xhour</option>";
$xhour = $dummy;
$xhour++;
}
echo "</select>";
echo " "._NQ_MIN.": <select class='textbox' name='newmin'>";
$xmin = 0;
echo "<option name='min' selected>00</option>";
while ($xmin <= 59) 
{
if (($xmin == 0) OR ($xmin == 5)) { $xmin = "0$xmin"; }
echo "<option name='min'>$xmin</option>";
$xmin = $xmin + 5;
}
echo "</select>";
$now = time();
$formatdate = $nq_config['dateformat'];
$tnow = date($formatdate,$now);
echo "</td></tr>";
echo "<tr><td colspan='3'><center><b>"._NQ_TNOW."&nbsp;:&nbsp;</b>$tnow</center></td></tr>";
echo "</table></center>";
echo "<br><center><input type='submit' class='optionlite' value='"._NQ_SAVE."'><br><br>"._GOBACK."</center>";
echo "</form><br>";
CloseTable();
include ('footer.php');
?>
Return current item: Nukequiz