Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQAUpdateWatermark.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	 */
/*****************************************************************/
include('header.php');
nqmenuheader();
OpenTable();
echo "<br><center><font class='title'>"._NQ_DIRUPDATEFOR."</font></center><br>";
echo "<center><table width='100%' border='0' cellpadding='2' cellspacing='2'><tr><th>#</th><th>"._NQ_TITLE."</th>";
echo "<th>"._NQ_DIRNAME."</th><th>"._NQ_STATUS."</th></tr><tr>";
$checkresult = $db->sql_query("SELECT qid, dir, title FROM ".$prefix."_nquiz_quiz ORDER BY qid ASC");
if (!$db->sql_numrows($checkresult)){
echo "<td align='center' colspan='6'><b><br>"._NQ_NORESULTS."</b></td></tr></table>";
}
else {
while(list($qid,$dir,$title) = $db->sql_fetchrow($checkresult))
{
$imagesdir = $nq_config['images_directory'];
$handle=opendir("modules/$module_name/$imagesdir/$dir");
while (($file = readdir($handle))!==false) {
if ($file != "." && $file != ".." && $file!= "Thumbs.db" && $file!= "thumbs"){
if (substr($file,-4) == ".jpg" || substr($file,-4) == ".png" || substr($file,-4) == ".gif"){
$source_file = "modules/$module_name/images/watermark.txt";
$destination_file = "modules/$module_name/$imagesdir/$dir/watermark.txt";
copy ($source_file, $destination_file);
unlink("modules/$module_name/$imagesdir/$dir/index.html");
unlink("modules/$module_name/$imagesdir/$dir/index.htm");
}
}
}
closedir($handle);
echo "<td align='center' class='row1'>$qid</td><td class='row1'>$title</td><td class='row1'>$dir";
echo "</td><td align='center' class='row1'>"._NQ_CHECKED."</td></tr><tr>";
}
echo "</table><br>";
}
echo "<br>[&nbsp;<a href='".$admin_file.".php?op=nqnukequiztools'>"._NQ_OK."</a>&nbsp;]<br><br></center>";
CloseTable();
include ('footer.php');
?>
Return current item: Nukequiz