Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQAShowTemplate.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	 */
/*****************************************************************/
$ThemeSel = get_theme();
$pagetitle = _NQ_ADMINMODTEMPLATE;
include ("header.php");
nqmenuheader();
$templatedir = $nq_config['templates'];
$old_umask = umask(0);
if (!is_writeable("modules/$module_name/templates")){
chmod("modules/$module_name/templates", 0777);
}
unlink("modules/$module_name/templates/tmp.htm");
$fp = fopen("modules/$module_name/templates/tmp.htm", "a");
include("modules/$module_name/templates/$templatedir/$filename");
chmod("modules/$module_name/templates/tmp.htm", 0777);
umask($old_umask); 
fwrite($fp, $emailbody);
fclose($fp);
echo "<script type=\"text/javascript\" language=\"JavaScript\">\n"
."<!--\n"
."function Preview(url){\n"
."Preview=window.open(url,'Preview','width=500,height=400,scrollbars,left = 30,top = 30')\n"
."}\n"
."Preview('modules/$module_name/templates/tmp.htm')\n"
."//-->\n"
."</script>\n";
$myFile = "modules/$module_name/templates/$templatedir/$filename";
$fh = fopen($myFile, 'r');
$theData = fread($fh, 8192);//8KB Max Filesize
fclose($fh);
OpenTable();
echo "<br><center><b>"._NQ_TEMPLATECODEVIEW."&nbsp;:&nbsp;</b>$templatedir/$filename<br><br></center>";
echo "<center><form method='post' action='".$admin_file.".php'>";
echo "<input type='hidden' name='file' value='admin'>";
echo "<input type='hidden' name='filename' value='$filename'>";
echo "<br><textarea wrap='virtual' name='theData' cols='110' rows='25'>$theData</textarea><br><br>";
echo "</form>"._NQ_NOTEDITORNOTE."<br><br>"._GOBACK."<br></center><br>";
CloseTable();
include ('footer.php');
?>
Return current item: Nukequiz