X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/be0e8b0e4cf5fd12cde0517e4b355bbc0633096a..f708ec8f896846e8fe7e33bd3d5012f52b4b54f5:/index.php diff --git a/index.php b/index.php index 660c18e..9fb43aa 100644 --- a/index.php +++ b/index.php @@ -35,9 +35,13 @@ if (file_exists (JIRAFEAU_ROOT . 'install.php') $writable = is_writable (VAR_FILES) && is_writable (VAR_LINKS); $res = array (); -if ($writable && isset ($_POST['jirafeau'])) +if ($writable && isset ($_POST['jirafeau']) && isset ($_FILES['file']) + && isset ($_POST['time'])) { - $key = $_POST['key']; + if (!isset ($_POST['key'])) + $key = ''; + else + $key = $_POST['key']; $time = time (); switch ($_POST['time']) @@ -64,7 +68,7 @@ if ($writable && isset ($_POST['jirafeau'])) $res = jirafeau_upload ($_FILES['file'], isset ($_POST['one_time_download']), - $key, $time, $cfg, $_SERVER['REMOTE_ADDR']); + $key, $time, $_SERVER['REMOTE_ADDR']); } require (JIRAFEAU_ROOT . 'lib/template/header.php'); @@ -138,13 +142,13 @@ if (!has_error () && $writable)