$page_name = "upload";
    // Include header if "on" in config.php.
    if ($head == "on") {
        include "header.php";
    }
    session_destroy();
    session_unset($_SESSION['pass_hash_upload']);
    echo "<script type=\"text/javascript\">\n<!--\nvar URL   = \"DoorHangers.php\"\nvar speed = {$edit_redirect}\nfunction reload() {\nlocation = URL\n}\nsetTimeout(\"reload()\", speed);\n//-->\n</script>";
    echo "{$p}\n{$l_global10}\n{$p2}\n{$p}\n{$l_global11}\n{$p2}";
    // Include footer if "on" in config.php.
    if ($head == "on") {
        include "footer.php";
    }
}
switch (@$_REQUEST['cmd']) {
    default:
        upload1();
        break;
    case "upload2":
        upload2(@$_POST['ftp_file'], @$_POST['upload_type'], $_POST['submit']);
        break;
    case "upload_delete":
        upload_delete($_POST['file'], $_POST['pg']);
        break;
    case "upload_rename":
        upload_rename($_POST['file'], $_POST['upload_newname'], $_POST['pg']);
        break;
    case "logout":
        logout();
        break;
}
function upload_do_submit2()
{
    global $db, $current_user;
    upload_delete(array("link_id" => $_POST['id']));
    upload_save_files();
}