* * Last Modified: 26th March 2003 * */ error_reporting(0); if (!(include("./modules/header.lib.php"))) { die("

There was an error loading the header module

"); } // The user doesn't have permission to upload files if ($params["upload"] != 1) { redirect($scripts["main"] . "?msg=no_per_upload"); } // Get the variables $dir = param("dir", "GET"); // Clean the paths $dir = cleanpath($dir); if (eregi("win", PHP_OS) == TRUE) { // Check for / in the URL even though the system is Windows (i.e. the user is using Opera) $dir = str_replace("/", "\\", $dir); } // Get the form and display it according to the setting $blocks = get_blocks(array("upload"), $script_dir . "/settings/templates/upload.tpl"); $form = ""; for ($i=1; $i<=$upload_limit; $i++) { $data = array("name_lbl" => preg_replace("/%i/i", $i, $uploads["file"])); $form .= parse_dynamic($data, $blocks["upload"]); } $blocks["upload"] = $form; // Finish up by outputting the completed page $output = dyn_template($blocks, $script_dir . "/settings/templates/upload.tpl"); $page = array("javascript" => "", "content" => $output, "title" => $uploads["title"], "main" => $scripts["main"], "dir" => $dir, "areas" => area_buttons(), "submit" => $uploads["submit"], "copyright" => $copyright, "dir" => preg_replace("/\\\([0-9]+?)/i", "/$1", $dir)); template($page, $script_dir . "/settings/templates/global.tpl"); ?>