\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="
Password Required
Enter Password:
\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="
\n"; $password_form.="\n"; } } // Function to get the extension a file. function get_ext($key) { $key=strtolower(substr(strrchr($key, "."), 1)); // Cause there the same right? $key=str_replace("jpeg","jpg",$key); return $key; } $ext_count=count($allow_types); $i=0; foreach($allow_types AS $extension) { //Gets rid of the last comma for display purpose.. If($i <= $ext_count-2) { $types .="*.".$extension.", "; } Else { $types .="*.".$extension; } $i++; } unset($i,$ext_count); // why not $error=""; $display_message=""; $uploaded==false; // Dont allow post if $password_form has been populated If($_POST['submit']==true AND !$password_form) { For($i=0; $i <= $file_uploads-1; $i++) { If($_FILES['file']['name'][$i]) { $ext=get_ext($_FILES['file']['name'][$i]); $size=$_FILES['file']['size'][$i]; $max_bytes=$max_file_size*1024; // For random names If($random_name){ $file_name[$i]=time()+rand(0,100000).".".$ext; } Else { $file_name[$i]=$_FILES['file']['name'][$i]; } //Check if the file type uploaded is a valid file type. If(!in_array($ext, $allow_types)) { $error.= "Invalid extension for your file: ".$_FILES['file']['name'][$i].", only ".$types." are allowed.
Your file(s) were not uploaded.
"; //Check the size of each file } Elseif($size > $max_bytes) { $error.= "Your file: ".$_FILES['file']['name'][$i]." is to big. Max file size is ".$max_file_size."kb.
Your file(s) were not uploaded.
"; // Check if the file already exists on the server.. } Elseif(file_exists($folder.$file_name[$i])) { $error.= "The file: ".$_FILES['file']['name'][$i]." exists on this server, please rename your file.
Your file(s) were not uploaded.
"; } } // If Files } // For //Tally the size of all the files uploaded, check if it's over the ammount. $total_size=array_sum($_FILES['file']['size']); $max_combined_bytes=$max_combined_size*1024; If($total_size > $max_combined_bytes) { $error.="The max size allowed for all your files combined is ".$max_combined_size."kb
"; } // If there was an error take notes here! If($error) { $display_message=$error; } Else { // No errors so lets do some uploading! For($i=0; $i <= $file_uploads-1; $i++) { If($_FILES['file']['name'][$i]) { If(@move_uploaded_file($_FILES['file']['tmp_name'][$i],$folder.$file_name[$i])) { $uploaded=true; } Else { $display_message.="Couldn't copy ".$file_name[$i]." to server, please make sure ".$folder." is chmod 777 and the path is correct.\n"; } } } //For } // Else } // $_POST AND !$password_form /* //================================================================================ * Start the form layout //================================================================================ :- Please know what your doing before editing below. Sorry for the stop and start php.. people requested that I use only html for the form.. */ ?> <br /> <b>Notice</b>: Undefined variable: websitename in <b>/home/irpdf/domains/irpdf.com/public_html/uc/index.php</b> on line <b>200</b><br />
فایل شما آپلود شد

File #".$file.": ".$full_url.$file_name[$i]."

\n"); } } ?>

آپلود فایل جدید


Notice: Undefined variable: display_message in /home/irpdf/domains/irpdf.com/public_html/uc/index.php on line 340


Notice: Undefined variable: websitename in /home/irpdf/domains/irpdf.com/public_html/uc/index.php on line 350

Allowed Types:
Notice: Undefined variable: types in /home/irpdf/domains/irpdf.com/public_html/uc/index.php on line 355

بیشترین حجم مجاز 30 مگابایت می باشد

بعد از آپلود می توانید کتاب را از طریق این فرم ارسال نمایید.

انتخاب فایل: