GoOdZeLlA uPlOaD
مركز تحميل الصور
"; echo "إستعرض الصور في جهازك واختر المناسب منها وادخل مسمى جديد للصورة إذا رغبت بذلك .:
إختر ملف :
"; echo "
أعد تسميته إذا رغبت :
"; echo "
"; echo "
"; echo "
"; break; case two: //collect the name from POST VARS $ime="{$HTTP_POST_VARS['name']}"; //get type of file $ekst=$uploadedfile_type; //get lenght of image type $duzina=strlen($ekst); //get part of file image to build image extension $pos=strpos($ekst,"/")+1; //build extension of image $ekstenzija=substr($ekst,$pos,$duzina); //correct errors with some images //jpg if($ekstenzija=="pjpeg"){ $ekstenzija="jpg"; } //png if($ekstenzija=="x-png"){ $ekstenzija="png"; } //wmf if($ekstenzija=="x-wmf"){ $ekstenzija="wmf"; } //psd if($ekstenzija=="octet-stream"){ $ekstenzija="psd"; } //added in version 0.2 //if the name is empty copy name of image from your HDD //that correct error if you do not enter new name of image if (!$ime) { $ime=$uploadedfile_name; } //build new name of name that you specified, . and extension of image else { $ime.=".".$ekstenzija; } //if image exist, upload it in correct dir if($uploadedfile<>"none") { if(!copy($uploadedfile,"$dir/$ime")) { //display errors print("
خطأ:
لم ترسل الصورة !
"); print("Image is too big or it does not exist.
"); print("Try again."); } //or finish else { print("
تم تحميل الملف بنجاح .
تفضل اللينك:
$apsolut_dir/$ime
"); } } break; } ?>