Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQACreateDir.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	 */
/*****************************************************************/
$imagesdir = $nq_config['images_directory'];
$old_umask = umask(0);
$path = "modules/$module_name/$imagesdir";
$main_dir = "modules/$module_name/$imagesdir";
if (!file_exists("$main_dir")) {
mkdir("$main_dir", 0777);
}
$newdir = nqmakedir();
$db->sql_query("UPDATE ".$prefix."_nquiz_quiz SET  dir='$newdir' WHERE qid='$qid'");
$upload_dir = "modules/$module_name/$imagesdir/$newdir";
$path = "$upload_dir";
if (!file_exists("$upload_dir")) {
mkdir("$upload_dir", 0777);
}
$thumbs_dir = "modules/$module_name/$imagesdir/$newdir/thumbs";
$path = "$upload_dir";
if (!file_exists("$thumbs_dir")) {
mkdir("$thumbs_dir", 0777);
}
$source = "modules/$module_name/images/th_sound.jpg";
$destination = "modules/$module_name/$imagesdir/$newdir/thumbs/th_sound.jpg";
copy ($source, $destination);
umask($old_umask); 
Header("Location: ".$admin_file.".php?op=nqcheckdir");
?>
Return current item: Nukequiz