diff --git a/e107_files/shortcode/batch/download_shortcodes.php b/e107_files/shortcode/batch/download_shortcodes.php index a04926685..4a19464a5 100644 --- a/e107_files/shortcode/batch/download_shortcodes.php +++ b/e107_files/shortcode/batch/download_shortcodes.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/download_shortcodes.php,v $ -| $Revision: 1.15 $ -| $Date: 2008-10-19 12:04:04 $ +| $Revision: 1.16 $ +| $Date: 2008-12-08 21:15:57 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -449,7 +449,7 @@ SC_BEGIN DOWNLOAD_CATEGORY_SELECT exit; } - $boxinfo .= " \n"; // Its a structured display option - need a 2-step process to create a tree diff --git a/e107_languages/English/lan_upload.php b/e107_languages/English/lan_upload.php index 9c168f15d..9c25e3a29 100644 --- a/e107_languages/English/lan_upload.php +++ b/e107_languages/English/lan_upload.php @@ -4,8 +4,8 @@ | e107 website system - Language File. | | $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_upload.php,v $ -| $Revision: 1.3 $ -| $Date: 2008-04-22 20:32:50 $ +| $Revision: 1.4 $ +| $Date: 2008-12-08 21:16:03 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -23,6 +23,14 @@ define('LAN_UL_025', 'Uploads not allowed '); define('LAN_UL_026', ''); define('LAN_UL_027', ''); +define('LAN_UL_032', 'You must select a category'); +define('LAN_UL_033', 'You must enter a valid email address'); +define('LAN_UL_034', 'You must specify the file name'); +define('LAN_UL_035', 'You must enter a description'); +define('LAN_UL_036', 'You must specify the file to upload'); +define('LAN_UL_037', 'You must specify a category'); +define('LAN_UL_038', ''); + define("LAN_61", "Your Name: "); define("LAN_112", "Email Address: "); define("LAN_144", "Website URL: "); diff --git a/upload.php b/upload.php index d64c673e3..4e6f35dee 100644 --- a/upload.php +++ b/upload.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/upload.php,v $ -| $Revision: 1.6 $ -| $Date: 2008-10-19 11:35:00 $ +| $Revision: 1.7 $ +| $Date: 2008-12-08 21:15:57 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -41,7 +41,7 @@ $message = ''; $postemail =''; if (isset($_POST['upload'])) { - if (($_POST['file_email'] || USER == TRUE) && $_POST['file_name'] && $_POST['file_description']) + if (($_POST['file_email'] || USER == TRUE) && $_POST['file_name'] && $_POST['file_description'] && $_POST['download_category']) { require_once(e_HANDLER."upload_handler.php"); // $uploaded = file_upload(e_FILE."public/", "unique"); @@ -81,6 +81,11 @@ if (isset($_POST['upload'])) } // The upload handler checks max file size + $downloadCategory = intval($_POST['download_category']); + if (!$downloadCategory) + { + $message .= LAN_UL_037.'
'; + } // $message non-null here indicates an error - delete the files to keep things tidy if ($message) @@ -123,8 +128,8 @@ if (isset($_POST['upload'])) if ($postemail == '-witheld-') $postemail = ''; $_POST['file_description'] = $tp->toDB($_POST['file_description']); $file_time = time(); - $sql->db_Insert("upload", "0, '".$poster."', '".$postemail."', '".$tp -> toDB($_POST['file_website'])."', '".$file_time."', '".$tp -> toDB($_POST['file_name'])."', '".$tp -> toDB($_POST['file_version'])."', '".$file."', '".$image."', '".$tp -> toDB($_POST['file_description'])."', '".$tp -> toDB($_POST['file_demo'])."', '".$filesize."', 0, '".$tp -> toDB($_POST['download_category'])."'"); - $edata_fu = array("upload_user" => $poster, "upload_email" => $postemail, "upload_name" => $tp -> toDB($_POST['file_name']),"upload_file" => $file, "upload_version" => $_POST['file_version'], "upload_description" => $tp -> toDB($_POST['file_description']), "upload_size" => $filesize, "upload_category" => $tp -> toDB($_POST['download_category']), "upload_website" => $tp -> toDB($_POST['file_website']), "upload_image" => $image, "upload_demo" => $tp -> toDB($_POST['file_demo']), "upload_time" => $file_time); + $sql->db_Insert("upload", "0, '".$poster."', '".$postemail."', '".$tp -> toDB($_POST['file_website'])."', '".$file_time."', '".$tp -> toDB($_POST['file_name'])."', '".$tp -> toDB($_POST['file_version'])."', '".$file."', '".$image."', '".$tp -> toDB($_POST['file_description'])."', '".$tp -> toDB($_POST['file_demo'])."', '".$filesize."', 0, '".$downloadCategory."'"); + $edata_fu = array("upload_user" => $poster, "upload_email" => $postemail, "upload_name" => $tp -> toDB($_POST['file_name']),"upload_file" => $file, "upload_version" => $_POST['file_version'], "upload_description" => $tp -> toDB($_POST['file_description']), "upload_size" => $filesize, "upload_category" => $downloadCategory, "upload_website" => $tp -> toDB($_POST['file_website']), "upload_image" => $image, "upload_demo" => $tp -> toDB($_POST['file_demo']), "upload_time" => $file_time); $e_event->trigger("fileupload", $edata_fu); $message .= "
".LAN_404; } @@ -139,14 +144,15 @@ if (isset($_POST['upload'])) if ($message) { - $ns->tablerender("", "
".$message."
"); + $text = "
".$message."
"; + $ns->tablerender("", $text); require_once(FOOTERF); exit; } $text = "
-
+ @@ -216,14 +222,14 @@ if (!USER) - + "; } $text .= " - + @@ -234,7 +240,7 @@ $text .= " - + @@ -244,7 +250,7 @@ $text .= " - + @@ -267,4 +273,37 @@ $text .= " $ns->tablerender(LAN_417, $text); require_once(FOOTERF); + + +function headerjs() +{ + $script = ""; + return $script; +} + + ?>
".LAN_112."
".LAN_409."
".LAN_411."
".LAN_413."