1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-01 18:32:44 +02:00

First cut of modified upload system - uses class-based limits in filetypes.xml

This commit is contained in:
e107steved
2008-04-22 20:32:59 +00:00
parent 7df7e2e6dd
commit 958e68d6a0
9 changed files with 723 additions and 329 deletions

View File

@@ -11,14 +11,33 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/help/upload.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:43 $
| $Author: mcfly_e107 $
| $Revision: 1.2 $
| $Date: 2008-04-22 20:32:49 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
if (e_QUERY) list($action,$junk) = explode('.',e_QUERY); else $action = 'list';
$text = "From here you can allow / disallow the ability for users to upload files and manage those files that have been uploaded.";
switch ($action)
{
case 'filetypes' :
$text = "The file types and maximum file size which can be uploaded are set by user class. This option generates a file called ".e_UPLOAD_TEMP_DIR.e_SAVE_FILETYPES.",
which must be copied or moved to directory ".e_ADMIN_ABS." and renamed to ".e_READ_FILETYPES." before it takes effect.<br />
One definition per class is permitted.<br />
Note that these definitions apply site-wide, even if the public uploads feature is disabled.";
break;
case 'options' :
$text = "The complete public uploads system may be disabled here.<br />
Flatfile storage is generally appropriate (otherwise the maximum file size is hard-limited to 500kb).<br />
The maximum filesize overrides any definitions set in filetypes.xml.<br />
Public uploads may be restricted to a particular user class, but these settings also apply to other areas of the site where uploads may be permitted, such as
news and forms.";
break;
case 'view' :
default :
$text = "This page lists any submitted uploads. You may choose to delete them, transfer them to downloads, or post them to news";
}
$ns -> tablerender("Public Uploads Help", $text);
?>

View File

@@ -4,8 +4,8 @@
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_upload.php,v $
| $Revision: 1.2 $
| $Date: 2007-09-22 12:40:12 $
| $Revision: 1.3 $
| $Date: 2008-04-22 20:32:49 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -39,34 +39,57 @@ define("UPLLAN_26", "No public uploads will be permitted if disabled");
define("UPLLAN_27", "unmoderated public uploads");
define("UPLLAN_29", "Storage type");
define("UPLLAN_30", "Choose how to store uploaded files, either as normal files on server or as binary info in database<br /><b>Note</b> binary is only suitable for smaller files under approximately 500kb");
define("UPLLAN_30", "Choose how to store uploaded files, either as normal files on server or as binary info in database<br /><b>Note</b> binary is only suitable for smaller files, and is hard-limited to a maximum of approximately 500kb");
define("UPLLAN_31", "Flatfile");
define("UPLLAN_32", "Binary");
define("UPLLAN_33", "Maximum file size");
define("UPLLAN_34", "Maximum upload size in bytes - leave blank to use settings from php.ini");
define("UPLLAN_35", "Allowed file types");
define("UPLLAN_36", "Please enter one type per line");
define("UPLLAN_34", "Absolute maximum upload size in bytes. Further limited by settings from php.ini, and by the settings in filetypes.xml");
define("UPLLAN_35", 'Size');
//define("UPLLAN_36", "Please enter one type per line");
define("UPLLAN_37", "Permission");
define("UPLLAN_38", "Select to allow only certain users to upload");
define("UPLLAN_39", "Submit");
define("UPLLAN_41", "Please note - file uploads are disabled from your php.ini, it will not be possible to upload files until you set it to On.");
define("UPLLAN_42", "Actions");
define("UPLLAN_43", "Uploads");
define("UPLLAN_44", "Upload");
define("UPLLAN_45", "Are you sure you want to delete the following file...");
define("UPLAN_COPYTODLM", "copy to download manager");
define("UPLAN_IS", "is ");
define("UPLAN_ARE", "are ");
define("UPLAN_COPYTODLS", "Copy to Downloads");
define('UPLAN_DELETE', 'Delete');
/*
define("UPLLAN_48", "For security reasons allowed file types has been moved out of the database into a
flatfile located in your admin directory. To use, rename the file e107_admin/filetypes_.php to e107_admin/filetypes.php
and add a comma delimited list of file type extensions to it. You should not allow the upload of .html, .txt, etc., as an attacker may upload a file of this type which includes malicious javascript. You should also, of course, not allow
the upload of .php files or any other type of executable script.");
*/
define('UPLLAN_49', 'File Types');
define('UPLLAN_50', 'Options');
define('UPLLAN_51', 'List Uploads');
define('UPLLAN_52', 'This page helps you create a file for managing file upload permissions. The file is saved as --SOURCE--, and must be copied to --DEST-- before it takes effect.');
define('UPLLAN_53', 'User Class');
define('UPLLAN_54', 'File Extensions');
define('UPLLAN_55', 'Max upload size');
define('UPLLAN_56', 'Generate file');
define('UPLLAN_57', 'Source for values: ');
define('UPLLAN_58', 'Default');
define('UPLLAN_59', 'Settings written to ');
define('UPLLAN_60', 'Now move this file to ');
define('UPLLAN_61', 'Error writing file: ');
define('UPLLAN_62', '');
define('UPLLAN_63', '');
define('UPLLAN_64', '');
define('UPLLAN_65', '');
define('UPLLAN_66', '');
define('UPLLAN_67', '');
define('UPLLAN_68', '');
define('UPLLAN_69', '');
define('UPLLAN_70', '');
?>

View File

@@ -4,8 +4,8 @@
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_upload.php,v $
| $Revision: 1.2 $
| $Date: 2007-11-23 21:52:44 $
| $Revision: 1.3 $
| $Date: 2008-04-22 20:32:50 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -16,6 +16,12 @@ define('LAN_UL_002', 'You do not have the correct permissions to upload files to
define('LAN_UL_020', 'Error');
define('LAN_UL_021', 'Upload Failure');
define('LAN_UL_022', 'May vary by file type');
define('LAN_UL_023', 'Type');
define('LAN_UL_024', 'Max Size');
define('LAN_UL_025', 'Uploads not allowed ');
define('LAN_UL_026', '');
define('LAN_UL_027', '');
define("LAN_61", "Your Name: ");
define("LAN_112", "Email Address: ");
@@ -35,7 +41,7 @@ define("LAN_414", "Working demo");
define("LAN_415", "enter URL to site where demo can be viewed");
define("LAN_416", "Submit and Upload");
define("LAN_417", "Upload File");
define("LAN_418", "Maximum file size: ");
define("LAN_418", "Absolute maximum file size: ");
define("DOWLAN_11", "Category");
define("LAN_419", "Allowed filetypes");
define("LAN_420", "fields are required");