관리-도구
편집 파일: XUploadConfig.pm
package XUploadConfig; use strict; use Exporter (); @XUploadConfig::ISA = qw(Exporter); @XUploadConfig::EXPORT = qw($c); use vars qw( $c ); $c= { # Directory for temporary using files temp_dir => '/home/finest09/public_html/cgi-bin/temp', # You can use different upload modes for different upload forms # Specify upload mode in xmode hidden input in upload_form.html modes => { 1 => { # Directory for uploaded files target_dir => '/home/finest09/public_html/cgi-bin/uploads', # URL to send all input values from upload page #url_post => 'http://sds:8071/cgi-bin/UPLOAD2/post2.cgi', url_post => 'http://www.finestweddingsites.com/ftp-app/upload/post.php', #url_post => 'http://www.finestweddingsites.com/scgi-bin/post.cgi', # Max number of upload fields max_upload_files => 5, # Minimum/Maximum Total upload size limit in MBytes (empty or zero to disable) min_upload_size => 0, max_upload_size => 500, # Minimum/Maximum upload Filesize limit in Mbytes (empty or zero to disable) min_upload_filesize => 0, max_upload_filesize => 500, # Allowed file extensions delimited with '|' # Use '.*' to allow all extensions #ext_allowed => 'jpg|jpeg', ext_allowed => '', # Not Allowed file extensions delimited with '|' # Leave it blank to disable this filter ext_not_allowed => '', }, 2 => { # Directory for uploaded files target_dir => '/home/finest09/public_html/scgi-bin/uploads', # URL to send all input values from upload page url_post => 'http://www.finestweddingsites.com/scgi-bin/post.cgi', # Max number of upload fields max_upload_files => 4, # Minimum/Maximum Total upload size in Mbytes (leave empty or zero to disable) min_upload_size => 0, max_upload_size => 1000, # Minimum/Maximum upload Filesize limit in Mbytes (empty or zero to disable) min_upload_filesize => 10, max_upload_filesize => 700, # Allowed file extensions delimited with '|' # Use '.*' to allow all extensions ext_allowed => 'jpg|jpeg|gif|png|rar|zip|avi|txt|csv|wma|app|bz2|mp3', # Not Allowed file extensions delimited with '|' # Leave it blank to disable this filter ext_not_allowed => 'exe|msi|bat|com|inf', }, }, # Allowed referer domains delimited with '|' # Leave it blank to disable this filter referer_allowed => '', # IP restrictions # Examples: '^(10\.0\.0\.182)$' - allow only 10.0.0.182, '^(10\.0\.1\.125|10\.0\.0\.\d+)$' - allow 10.0.1.125 & 10.0.0.* (*=number is wildcard) # Use '^.*$' for no restrictions ip_allowed => '^.*$', # Max length of uploaded filenames(without ext). Longer filenames will be cuted. max_name_length => 64, # Create files with random name # 0 to disable randon_filename => 0, # Type of behavior when uploaded file already exist on disc. Available 3 modes: Rewrite/Rename/Warn copy_mode => 'Rename', # Enable extracting ZIP archives with multiple files inside. (Experimental) # Requires these Perl modules installed: Archive::Zip, File::Find, File::Path. extract_zip_archives => 1, # Filename required mask (use standard perl regexp) # Extension is not using here (e.g. will use 'song123' for 'song123.mp3') # Leave empty if you don't need this custom filename validation # Examples: '^\w+$' - alphanumeric only, '^photo' - starting with 'photo' filaname_mask => '', # Filename rename mask (use standard perl regexp) # Removing all characters except these from the mask # Extension is not using here (e.g. will use 'song123' for 'song123.mp3') # Leave empty if you don't need this custom filename renaming # Examples: 'a-zA-Z' - will keep letters only, '\w' - will keep alphanumeric only filename_rename_mask => '', # Allow relative folder path for uploading files from HTML form ext_folder field # Pathes with '..' are not allowed # 0=no,1=yes. [Security Warning!] allow_ext_folder => 1, # Password for upload (optional) # Allow uploads only with correct password. Add '<input type="password" name="upload_password">' to your upload_form.html to use this feature. # Leave empty to disable upload_password => '', # Email field required (optional) # Force users to enter their email address. Upload notification to that email will be sent. # Leave empty to disable, set to 1 to enable email_required => '', # Logfile name uploads_log => 'logs.txt', # Enable users to add descriptions to files # Empty to disable, 1 to enable enable_file_descr => 1, # Uploaded files expiration time # days # Leave blank or zero to disable # WARNING: setting up this value could remove your old files older than X days uploaded_files_lifetime => 0, ##### Email confirmation ##### ### Leave all fields blank OR comment them if you don't want to send confirmations # Path to sendmail sendmail_path => '/usr/sbin/sendmail', # Email that confirmations will be sent to confirm_email => 'sharadgarg4@gmail.com', # This email will be in "From:" field in confirmation emails confirm_email_from => 'anshulbhaigupta@yahoo.co.in', # Subject for email notification email_subject => "Xupload: new file(s) uploaded", # Attach files in admin confirmation email email_file_attach => 0, ##### Custom error messages ##### msg => { upload_size_big => "Maximum total upload size exceeded<br>Please stop transfer right now.<br>Max total upload size is: ", upload_size_small => "Minimum total upload size limit detected.<br>Please stop transfer right now.<br>Min total upload size is:", file_size_big => "exceeded Max filesize limit! Skipped.", file_size_small => "size is less than Min filesize limit! Skipped.", no_temp_dir => "No temp dir exist! Please fix your temp_dir variable in config.", no_target_dir => "No target dir exist! Please fix your target_dir variable in config.", no_templates_dir => "No Templates dir exist! Please fix your templates_dir variable in config.", transfer_complete => "Transfer complete!", transfer_failed => "Upload failed!", null_filesize => "have null filesize or wrong file path", bad_filename => "is not acceptable filename! Skipped.", bad_extension => "have unallowed extension! Skipped.", too_many_files => "wasn't saved! Number of files limit exceeded.", already_exist => "already exist!<br>Renaming to ", saved_ok => "was saved successfully.", wrong_password => "You've entered wrong password.<br>Authorization required.", ip_not_allowed => "You are not allowed to upload files", send_email_note => "Sending email notification", }, }; 1;