Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQAImportQuestions.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_ADMINIMPORTQ;
include ("header.php");
nqmenuheader();
$dir_name="modules/$module_name/import";
OpenTable();
$result = $db->sql_query("SELECT qid, title FROM ".$prefix."_nquiz_quiz WHERE qid='$qid'");
list($qid, $title) = $db->sql_fetchrow($result);
echo "<br><center><b>"._NQ_IMPORT."</b>:&nbsp;$title</center><br>";
echo "<form method='post' action='".$admin_file.".php'>";
echo "<input type='hidden' name='file' value='admin'>";
echo "<input type='hidden' name='qid' value='$qid'>";
echo "<input type='hidden' name='title' value='$title'>";
echo "<input type='hidden' name='op' value='nqimportquesexec'>";
echo "<center><table border='0' cellpadding='1' cellspacing='1'><tr>";
echo "<td><select name='filename'>";
$handle=opendir($dir_name);
$count=0;
while (($file = readdir($handle))!==false) {	
if (substr($file,-4) == ".csv" ||  substr($file,-4) == ".txt"){
$clist .= "$file ";
}
}
closedir($handle); 
echo "<option name='filename' value=\"$clist[i]\" selected>"._NQ_SELECTFILE."</option>";
$clist = explode(" ", $clist);
sort($clist);
for ($i=1; $i < sizeof($clist); $i++) {
if($clist[$i]!="") {
echo "<option name='filename' value=\"$clist[$i]\">$clist[$i]";
}
}
echo "</select></td></tr></table>";
echo "<br><input type='submit' class='optionlite' value='"._NQ_IMPORT."'>";
echo "</form><br><br></center>";
echo "<center>"._GOBACK."</center><br><br>";
CloseTable();
include ('footer.php');
?>
Return current item: Nukequiz