zorg.ch
16:14 Uhr
Events
Forum
Games
Wetten
Rezepte
Tauschbörse
Books
Space
User
1 up
|
PHP Fileupload Problem n'abend
^^^ Additional posts ^^^
zorg.ch
#71922
by
DaKine
@
14.04.2005 18:33, edited @
14.04.2005 18:36
- nach oben -
en traum, verzellmer bitte wiäni do chan en code-insert mache ohni das noher dä interpretiert wird...?
zorg.ch
#71923
by
freiländer
@
14.04.2005 18:40, edited @
14.04.2005 18:42
- nach oben -
smarty syntax error on line 6: unrecognized tag '/literal'
zorg.ch
#71924
by
freiländer
@
14.04.2005 18:43
- nach oben -
also hä dä ding heisst literal i gschweifte chlamere und mitme slash zums wieder schlüsse...schints chamme literals nöd verschachtle
zorg.ch
#71926
by
DaKine
@
14.04.2005 19:36
- nach oben -
ähä, und uf dütsch?
zorg.ch
#71927
by
freiländer
@
14.04.2005 19:40
- nach oben -
http://smarty.php.net/manual/de/language.escaping.php
lueg selber!
zorg.ch
#71928
by
lukas
@
14.04.2005 20:06
- nach oben -
echo "geschweifte klammer auf";
echo "literal";
echo "geschweifte klammer zu";
?>
zorg.ch
#71968
by
freiländer
@
15.04.2005 18:20
- nach oben -
i gseh do aber schomol das du nirgends $_FILES[] verwendisch...döt ine werded aber d'infos zude ufegladne files gspeicheret...
wemmer gad däbi sind, wo isch s'formular zum da züg ufelade ?
ps. i cha nöd uf dä post vom kine mitem code antworte...schinbaar verrissts s'post formular...
zorg.ch
#71974
by
DaKine
@
16.04.2005 00:13
- nach oben -
es isch ume... aber verzell mir bitte churz meh über $_FILES[], i anderne scripts hanis au ohni gschaft, z.B. idä afäng vo XMDB wo mittlerwiel gstorbe isch.
[ Link ]
Zum Teschte:
Username: DaKine
pw: 123
zorg.ch
#71990
by
freiländer
@
16.04.2005 12:57
- nach oben -
http://ch2.php.net/features.file-upload
zorg.ch
#71933
by
DaKine
@
14.04.2005 22:01, edited @
14.04.2005 22:02
- nach oben -
inc_profile.php
// Props $php_file_name = "inc_profile.php"; $php_file_coder = "DaKine"; $php_file_lastupdate = "09.02.05"; // Is the visitor logged in? if($_SESSION['login'] == "TRUE") { switch($func_profile_update) { case "pic_upload": // upload of userpic if(!empty($profile_usr_pic_name)) { // Insert new pic into db. $pic_name .= $_SESSION[user_nick]; $pic_name .= "_"; $pic_name .= $profile_usr_pic; $pic_location = "/v4/images/users"; $pic_type = "userpic"; mysql_query("INSERT INTO t_pics (pic_usr_id, pic_type, pic_name, pic_location) VALUES ('$_SESSION[user_id]', '$pic_type', '$pic_name', '$pic_location')"); if(!copy($profile_usr_pic, "./users/juhu.jpg")) { echo $pic_name; ?>
$profile_msg = "upload_fail"; mysql_query("UPDATE t_pics SET pic_status = 'deleted' WHERE pic_usr_id = '$_SESSION[user_id]' AND pic_type = '$pic_type' AND pic_status = 'okay'"); } else { $profile_msg = "upload_done"; } } else { $profile_msg = "upload_fail"; } break; case "pic_delete": // removes userpic on the server and sets "none.jpg" as default userpic. $kine_usr_result = mysql_query("SELECT * FROM t_users WHERE usr_name = '$_SESSION[user_nick]'"); $kine_row = mysql_fetch_array($kine_usr_result); mysql_query("UPDATE t_users SET usr_pic = 'false' WHERE usr_id = '$kine_row[usr_id]'"); if(@unlink("images/userpics/$kine_row[usr_id].jpg")) { $profile_msg = "del_pic_done"; } else { $profile_msg = "del_pic_fail"; } break; case "change_data": // To change all the data shit. // can e-mail be public? if($prof_email_public == "") { $prof_email_public = "true"; } mysql_query("UPDATE t_users SET usr_publicmail = '$prof_email_public' WHERE usr_nick = '$_SESSION[user_nick]'"); // can profile be public? if($prof_public_profile == "") { $prof_public_profile = "true"; } mysql_query("UPDATE t_users SET usr_publicprofile = '$prof_public_profile' WHERE usr_nick = '$_SESSION[user_nick]'"); // is password going to change? if($prof_password != "") { if($prof_conf_password == $prof_password) { mysql_query("UPDATE t_users SET usr_password = '$prof_password' WHERE usr_nick = '$_SESSION[user_nick]'"); } else { $profile_msg = "password_wrong"; } } mysql_query("UPDATE t_users SET usr_mail = '$prof_email' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_forname = '$prof_vorname' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_name = '$prof_name' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_adress = '$prof_adress' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_city = '$prof_ort' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_zipcode = '$prof_zipcode' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_birth = '$prof_birth' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_job = '$prof_job' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_uin = '$prof_uin' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_msn = '$prof_msn' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_yahoo = '$prof_y' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_phone = '$prof_phone' WHERE usr_nick = '$_SESSION[user_nick]'"); mysql_query("UPDATE t_users SET usr_cell_phone = '$prof_cell_phone' WHERE usr_nick = '$_SESSION[user_nick]'"); if($profile_msg == "") { $profile_msg = "update_okay"; } break; default: // show users profile. { $query = mysql_query("SELECT * FROM t_users WHERE usr_nick = '$_SESSION[user_nick]'"); $query_row = mysql_fetch_array($query); ?>
My Profile
[ Help ]
Nickname:
echo $query_row[usr_nick]; ?>
Registered since:
echo date("d.m.y",$query_row[usr_reg_date]); ?>
e-mail
New Password
Re-New Password
checked } ?>> Hide e-mail from public
checked } ?>> Hide Profile from registred users
Forname
Name
Street / No.
City
Zip
Date of Birth
Job
UIN / ICQ
MSN
Yahoo
Phone
Cell Phone
} break; } switch($profile_msg) { case "del_pic_done": // Pic is deleted ?>
My Profile
[ Help ]
Picture Removed
Your Userpic has been successfully unlinked.
break; case "del_pic_fail": // Pic is not deleted ?>
My Profile
[ Help ]
Error
Your request to remove a UserPic has failed.
Try again or contact a Webmaster.
break; case "upload_done": // Upload okay ?>
My Profile
[ Help ]
Upload Complete
Your new Userpic has been saved.
break; case "upload_fail": // upload failed ?>
My Profile
[ Help ]
Error
As usual - something went wrong.
That god damn upload always gets stuck!
break; case "update_okay": // data-update complete ?>
My Profile
[ Help ]
Done
Your changes have been applied.
break; case "password_wrong": // New password was not applied! ?>
My Profile
[ Help ]
Sorry
Your Password couldn't be changed
Try again and enter both correct.
default: // Just nothing break; } } else { ?>
Please Login first.
} ?> sorry aber da verriiist jetzt echt alles... i wörfsch gschider als download anne.