Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQAViewTemplates.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_ADMINVIEWTEMPLATE;
include ("header.php");
nqmenuheader();
$templatedir = $nq_config['templates'];
$dir_name= "modules/$module_name/templates/$templatedir/";
$dir = "modules/$module_name/templates/";
$perms = "".substr(decoct(fileperms($dir)),-4,4)."";
if (!$perms = "0777") {
OpenTable();
echo "<center><br><b>"._NQ_FOLDERCHECK."</b><br><br></center>";
CloseTable();
}
OpenTable();
echo "<br><center><font class='title'>"._NQ_VIEWTEMPLATES."</font>&nbsp;:&nbsp;$templatedir</center><br>";
echo "<form method='post' action='".$admin_file.".php'>";
echo "<input type='hidden' name='file' value='admin'>";
echo "<input type='hidden' name='filename' value='$filename'>";
echo "<input type='hidden' name='sitename' value='$sitename'>";
echo "<input type='hidden' name='nukeurl' value='$nukeurl'>";
echo "<input type='hidden' name='op' value='nqshowtemplate'>";
echo "<center><table border='0' cellpadding='2' cellspacing='2'><tr>";
$handle=opendir($dir_name);
$count=0;
while (($file = readdir($handle))!==false) {	
if (substr($file,-4) == ".php"){
$tlist .= "$file ";
}
}
closedir($handle); 
echo "<th>"._NQ_FILENAME."</th><th>"._NQ_DESC."</th><th>"._NQ_OPTION."</th></tr>";
$tlist = explode(" ", $tlist);
sort($tlist);
for ($i=1; $i < sizeof($tlist); $i++) {
if($tlist[$i]!="") {
$description = array('',""._NQ_T1."",""._NQ_T2."",""._NQ_T3."",""._NQ_T4."",""._NQ_T5."",""._NQ_T6."",""._NQ_T7."",""._NQ_T8."",""._NQ_T9."",""._NQ_T10."");
displaytemplatewin($tlist);
echo "<tr><td class='row1'>$tlist[$i]</td><td class='row1'>$description[$i]</td>";
echo "<td align='center' class='row1'><a href='".$admin_file.".php?&amp;op=nqshowtemplate&amp;filename=$tlist[$i]'><img src='modules/$module_name/images/images.png' title='"._NQ_SHOWTEMPLATE."' onMouseOver=\"self.status='"._NQ_SHOWTEMPLATE." ';return true\" onmouseout=\"self.status='';return true\"alt=\""._NQ_SHOWTEMPLATE."\"></a></td></tr>";
}
}
echo "</table>";
echo "</form><br>"._GOBACK."<br></center><br>";
CloseTable();
include ('footer.php');
?>
Return current item: Nukequiz