Dear visitor, welcome to Coder Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
PHP Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
<?PHP // Variablen auslesen while (list($key,$val)=each($_GET)) { ${$key} = $val; } include("setup.inc"); $sizea = 100000; $nick3 = "tristar"; if ($acti == "save") { $errortext=''; IF($photo[error]){ // No files uploaded $errortext= "keine BILD ausgewählt"; }ELSE{ // Check file size. IF($photo['size']>$session->config->max_photo_size){ // Uploaded file is too large $errortext=STR_REPLACE('{SIZE}', $sitzea, "zu groß"); }ELSE{ // Store file $tmp_name=MD5($session_id.MICROTIME().RAND(-TIME(), TIME())); $tmp_fullname='pics/'.$tmp_name; MOVE_UPLOADED_FILE($photo['tmp_name'], $tmp_fullname); // Check file mime type $type_ok=FALSE; $allowed_types=ARRAY('jpg' => '.jpg', 'jpeg' => '.jpeg', 'gif' => '.gif', 'ief' => '.ief', 'png' => '.png', 'tiff' => '.tiff', 'bmp' => '.bmp', 'wbmp' => '.wbmp'); IF(FUNCTION_EXISTS('getimagesize')){ $imgdata=GETIMAGESIZE($tmp_fullname); IF(EMPTY($imgdata) || EMPTY($imgdata['mime'])){ $imgdata=NULL; } }ELSE{ $imgdata=NULL; } FOREACH($allowed_types AS $chk_type=>$extension){ IF(!EMPTY($imgdata)){ $type_ok= !EMPTY($imgdata[0]) && !EMPTY($imgdata[1]) && FALSE!==STRPOS(STRTOLOWER($imgdata['mime']), $chk_type); }ELSE{ $type_ok=FALSE!==STRPOS(STRTOLOWER($photo['type']), $chk_type); } IF($type_ok){ RENAME($tmp_fullname, $tmp_fullname.$extension); $tmp_name.=$extension; BREAK; } } IF(!$type_ok){ // File is not an image or has non-supported format $errortext=$lng['notanimage']; UNLINK($tmp_fullname); }ELSE{ // Image is OK // Update user's profile //$user->updateUser($session, $profile_user_id, 'photo = "'.$tmp_name.'"'); $comment = str_replace("(b)", "<b>", $comment); $comment = str_replace("(/b)", "</b>", $comment); $comment = str_replace("(i)", "<i>", $comment); $comment = str_replace("(/i)", "</i>", $comment); $comment = str_replace("[b]", "<b>", $comment); $comment = str_replace("[/b]", "</b>", $comment); $comment = str_replace("[i]", "<i>", $comment); $comment = str_replace("[/i]", "</i>", $comment); echo "llll"; $eintrag = "INSERT INTO icc_galerie (nick, pic, comment, usid) VALUES ('$nick3','$tmp_name' ,'$comment','$usid3')"; mysql_query($eintrag)or die(mysql_error()); REQUIRE("see.inc.php"); BREAK; } } } } echo $tmp_fullname; REQUIRE("upload.tpl.php"); ?> |
Quoted
Warning: getimagesize(pics/3a37bcb92b52529867ffa675e337be57) [function.getimagesize]: failed to open stream: No such file or directory in D:\Programme\xampp\htdocs\autopflege\admin\upload.inc.php on line 36
Warning: unlink(pics/3a37bcb92b52529867ffa675e337be57) [function.unlink]: No such file or directory in D:\Programme\xampp\htdocs\autopflege\admin\upload.inc.php on line 60
pics/3a37bcb92b52529867ffa675e337be57
|
|
PHP Quellcode |
1 2 3 4 5 |
<FORM name="photo_upload" action="main.php" method="post" enctype="multipart/form-data"> <INPUT type="hidden" name="s" value="<?=$s?>"> <INPUT type="hidden" name="include" value="<?=$include?>"> <input type="hidden" name="acti" value="save" /> <INPUT type="file" name="photo" SIZE="40"> |
|
|
PHP Quellcode |
1 |
$tmp_fullname='pics/'.$tmp_name; |
|
|
PHP Quellcode |
1 2 |
23 $tmp_fullname='pics\'.$tmp_name; 24 MOVE_UPLOADED_FILE($photo['tmp_name'], $tmp_fullname); |
Quoted
Warning: getimagesize(./images/pics/943c90dc7fe47c18d1d4a770a0a7a983) [function.getimagesize]: failed to open stream: No such file or directory in D:\Programme\xampp\htdocs\autopflege\admin\upload.inc.php on line 37
Warning: unlink(./images/pics/943c90dc7fe47c18d1d4a770a0a7a983) [function.unlink]: No such file or directory in D:\Programme\xampp\htdocs\autopflege\admin\upload.inc.php on line 61
./images/pics/943c90dc7fe47c18d1d4a770a0a7a983