Ich versuche seit tagen vergeblich zwei profilfelder im profiledit zu adden, wo man mit einem drop down menu bestimmte werte auswählen kann.
Habe das über enen array versucht aber iwie falsch gemacht es funzt ne wirklich^^ (profilfelder klasse & rasse)
nicht wundern arraywerte sind noch beabsichtigt anders^^ war erstmal zum test
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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | <?php # Copyright by: Manuel # Support: www.ilch.de defined ( 'main' ) or die ( 'no direct access' ); $title = $allgAr [ 'title' ]. ' :: Users :: Profil' ; $hmenu = $extented_forum_menu . '<a class="smalfont" href="?user">Users</a><b> » </b> Profil' . $extented_forum_menu_sufix ; $design = new design ( $title , $hmenu , 1); $klasse = arlistee ( $klasse , $klasse_ar ); $rasse = arlistee ( $rasse , $rasse_ar ); $klasse_ar = array ( 1 => $lang [ 'no' ], 2 => $lang [ 'yes' ], ); $rasse = array ( 1 => $lang [ 'no' ], 2 => $lang [ 'yes' ], ); if ( $_SESSION [ 'authright' ] <= -1 ) { if ( empty ( $_POST [ 'submit' ]) ) { $design ->header(); $abf = 'SELECT email,wohnort,homepage,aim,msn,icq,yahoo,avatar,status,staat,gebdatum,sig,opt_pm_popup,opt_pm,opt_mail,geschlecht,spezrank,spielerfahrungen,klasse,rasse,waffe,essen,trinken,film,musik,sport,cpu,mainboard,ram,monitor,grafikkarte,soundkarte,festplatte,i_net_verbindung,tastatur,maus,jappy,facebook,wkw,studivz,myspace,youtube FROM `prefix_user` WHERE id = "' . $_SESSION [ 'authid' ]. '"' ; $erg = db_query( $abf ); if ( db_num_rows( $erg ) > 0 ) { $row = db_fetch_assoc( $erg ); $tpl = new tpl ( 'user/profil_edit' ); $row [ 'staat' ] = '<option></option>' .arliste ( $row [ 'staat' ] , get_nationality_array() , $tpl , 'staat' ); $row [ 'geschlecht0' ] = ( $row [ 'geschlecht' ] < 1 ? 'checked' : '' ); $row [ 'geschlecht1' ] = ( $row [ 'geschlecht' ] == 1 ? 'checked' : '' ); $row [ 'geschlecht2' ] = ( $row [ 'geschlecht' ] == 2 ? 'checked' : '' ); if ( $row [ 'status' ] == 1 ) { $row [ 'status1' ] = 'checked' ; $row [ 'status0' ] = '' ; } else { $row [ 'status1' ] = '' ; $row [ 'status0' ] = 'checked' ; } if ( $row [ 'opt_mail' ] == 1 ) { $row [ 'opt_mail1' ] = 'checked' ; $row [ 'opt_mail0' ] = '' ; } else { $row [ 'opt_mail1' ] = '' ; $row [ 'opt_mail0' ] = 'checked' ; } if ( $row [ 'opt_pm' ] == 1 ) { $row [ 'opt_pm1' ] = 'checked' ; $row [ 'opt_pm0' ] = '' ; } else { $row [ 'opt_pm1' ] = '' ; $row [ 'opt_pm0' ] = 'checked' ; } if ( $row [ 'opt_pm_popup' ] == 1 ) { $row [ 'opt_pm_popup1' ] = 'checked' ; $row [ 'opt_pm_popup0' ] = '' ; } else { $row [ 'opt_pm_popup1' ] = '' ; $row [ 'opt_pm_popup0' ] = 'checked' ; } $row [ 'avatarbild' ] = ( file_exists ( $row [ 'avatar' ] ) ? '<img src="' . $row [ 'avatar' ]. '" alt=""><br />' : '' ); $row [ 'Fabreite' ] = $allgAr [ 'Fabreite' ]; $row [ 'Fahohe' ] = $allgAr [ 'Fahohe' ]; $row [ 'Fasize' ] = $allgAr [ 'Fasize' ]; $row [ 'forum_max_sig' ] = $allgAr [ 'forum_max_sig' ]; $row [ 'uid' ] = $_SESSION [ 'authid' ]; $row [ 'forum_usergallery' ] = $allgAr [ 'forum_usergallery' ]; $tpl ->set_ar_out( $row ,0); if ( $allgAr [ 'forum_avatar_upload' ]) $tpl ->out(1); $tpl ->set_ar_out( $row ,2); profilefields_change ( $_SESSION [ 'authid' ] ); $tpl ->out(3); } else { $tpl = new tpl ( 'user/login.htm' ); $tpl ->set_out( 'WDLINK' , 'index.php' ,0); } } else { # submit # change poassword if ( ! empty ( $_POST [ 'np1' ]) AND ! empty ( $_POST [ 'np2' ]) AND ! empty ( $_POST [ 'op' ])) { if ( $_POST [ 'np1' ] == $_POST [ 'np2' ]) { $akpw = db_result(db_query( "SELECT pass FROM prefix_user WHERE id = " . $_SESSION [ 'authid' ]),0); if ( $akpw == md5( $_POST [ 'op' ])) { $newpw = md5( $_POST [ 'np1' ]); db_query( "UPDATE prefix_user SET pass = '" . $newpw . "' WHERE id = " . $_SESSION [ 'authid' ]); setcookie(session_und_cookie_name(), $_SESSION [ 'authid' ]. '=' . $newpw , time() + 31104000, "/" ); $fmsg = $lang [ 'passwortchanged' ]; } else { $fmsg = $lang [ 'passwortwrong' ]; } } else { $fmsg = $lang [ 'passwortnotequal' ]; } } # avatar speichern START $avatar_sql_update = '' ; if ( ! empty ( $_FILES [ 'avatarfile' ][ 'name' ] ) AND $allgAr [ 'forum_avatar_upload' ] ) { $file_tmpe = $_FILES [ 'avatarfile' ][ 'tmp_name' ]; $rile_type = ic_mime_type ( $_FILES [ 'avatarfile' ][ 'tmp_name' ]); $file_type = $_FILES [ 'avatarfile' ][ 'type' ]; $file_size = $_FILES [ 'avatarfile' ][ 'size' ]; $fmsg = $lang [ 'avatarisnopicture' ]; $size = @ getimagesize ( $file_tmpe ); $endar = array (1 => 'gif' , 2 => 'jpg' , 3 => 'png' ); if ( ( $size [2] == 1 OR $size [2] == 2 OR $size [2] == 3) AND $size [0] > 10 AND $size [1] > 10 AND substr ( $file_type , 0 , 6 ) == 'image/' AND substr ( $rile_type , 0 , 6 ) == 'image/' ) { $endung = $endar [ $size [2]]; $breite = $size [0]; $hoehe = $size [1]; $fmsg = $lang [ 'avatarcannotupload' ]; if ( $file_size <= $allgAr [ 'Fasize' ] AND $breite <= $allgAr [ 'Fabreite' ] AND $hoehe <= $allgAr [ 'Fahohe' ] ) { $neuer_name = 'include/images/avatars/' . $_SESSION [ 'authid' ]. '.' . $endung ; @unlink (db_result(db_query( "SELECT avatar FROM prefix_user WHERE id = " . $_SESSION [ 'authid' ]),0)); move_uploaded_file ( $file_tmpe , $neuer_name ); @ chmod ( $neuer_name , 0777); $avatar_sql_update = "avatar = '" . $neuer_name . "'," ; $fmsg = $lang [ 'pictureuploaded' ]; } } } elseif ( isset( $_POST [ 'avatarloeschen' ]) ) { $fmsg = $lang [ 'picturedelete' ]; @unlink (db_result(db_query( "SELECT avatar FROM prefix_user WHERE id = " . $_SESSION [ 'authid' ]),0)); $avatar_sql_update = "avatar = ''," ; } # avatar speichern ENDE # email aendern if ( $_POST [ 'email' ] != $_POST [ 'aemail' ]) { $id = $_SESSION [ 'authid' ]. '||' .md5 (uniqid (rand())); db_query("INSERT INTO prefix_usercheck (`check`,email,datime,ak) VALUES ( '".$id."' , '".escape($_POST[' email '],' string ')."' ,NOW(),3)"); $page = $_SERVER [ "HTTP_HOST" ]. $_SERVER [ "SCRIPT_NAME" ]; $text = $lang [ 'changedthemail' ] . sprintf ( $lang [ 'registconfirmlink' ], $page , $id ); icmail ( $_POST [ 'email' ], $lang [ 'mail' ]. ' ' . $lang [ 'changed' ], $text ); $fmsg = $lang [ 'pleaseconfirmmail' ]; } # #remove account if (isset( $_POST [ 'removeaccount' ])) { $id = $_SESSION [ 'authid' ]. '-remove-' .md5 (uniqid (rand())); db_query("INSERT INTO prefix_usercheck (`check`,email,datime,ak) VALUES ( '".$id."' , '".escape($_POST[' email '],' string ')."' ,NOW(),5)"); $page = $_SERVER [ "HTTP_HOST" ]. $_SERVER [ "SCRIPT_NAME" ]; $text = $lang [ 'removeconfirm' ] . sprintf ( $lang [ 'registconfirmlink' ], $page , $id ); icmail ( $_POST [ 'email' ], html_entity_decode( $lang [ 'removeaccount' ]), $text ); $fmsg = $lang [ 'pleaseconfirmremove' ]; } #remove account # statische felder speichern db_query("UPDATE prefix_user SET homepage = '".get_homepage(escape($_POST[' homepage '], ' string '))."' , wohnort = '".escape($_POST[' wohnort '], ' string ')."' , icq = '".escape($_POST[' icq '], ' string ')."' , msn = '".escape($_POST[' msn '], ' string ')."' , yahoo = '".escape($_POST[' yahoo '], ' string ')."' , ".$avatar_sql_update." aim = '".escape($_POST[' aim '], ' string ')."' , staat = '".escape($_POST[' staat '], ' string ')."' , geschlecht = '".escape($_POST[' geschlecht '], ' string ')."' , status = '".escape($_POST[' status '], ' string ')."' , opt_mail = '".escape($_POST[' opt_mail '], ' string ')."' , opt_pm = '".escape($_POST[' opt_pm '], ' string ')."' , opt_pm_popup = '".escape($_POST[' opt_pm_popup '], ' string ')."' , gebdatum = '".get_datum(escape($_POST[' gebdatum '], ' string '))."' , spielerfahrungen = '".escape($_POST[' spielerfahrungen '], ' string ')."' , klasse = '".escape($_POST[' klasse '], ' string ')."' , rasse = '".escape($_POST[' rasse '], ' string ')."' , waffe = '".escape($_POST[' waffe '], ' string ')."' , essen = '".escape($_POST[' essen '], ' string ')."' , trinken = '".escape($_POST[' trinken '], ' string ')."' , film = '".escape($_POST[' film '], ' string ')."' , musik = '".escape($_POST[' musik '], ' string ')."' , sport = '".escape($_POST[' sport '], ' string ')."' , cpu = '".escape($_POST[' cpu '], ' string ')."' , mainboard = '".escape($_POST[' mainboard '], ' string ')."' , ram = '".escape($_POST[' ram '], ' string ')."' , monitor = '".escape($_POST[' monitor '], ' string ')."' , grafikkarte = '".escape($_POST[' grafikkarte '], ' string ')."' , soundkarte = '".escape($_POST[' soundkarte '], ' string ')."' , festplatte = '".escape($_POST[' festplatte '], ' string ')."' , i_net_verbindung = '".escape($_POST[' i_net_verbindung '], ' string ')."' , tastatur = '".escape($_POST[' tastatur '], ' string ')."' , maus = '".escape($_POST[' maus '], ' string ')."' , jappy = '".get_homepage(escape($_POST[' jappy '], ' string '))."' , facebook = '".get_homepage(escape($_POST[' facebook '], ' string '))."' , wkw = '".get_homepage(escape($_POST[' wkw '], ' string '))."' , studivz = '".get_homepage(escape($_POST[' studivz '], ' string '))."' , myspace = '".get_homepage(escape($_POST[' myspace '], ' string '))."' , youtube = '".get_homepage(escape($_POST[' youtube '], ' string '))."' , sig = '".substr(escape($_POST[' sig '], ' string '),0,$allgAr[' forum_max_sig '])."' WHERE id = ". $_SESSION [ 'authid' ] ); # change other profil fields profilefields_change_save ( $_SESSION [ 'authid' ] ); $design ->header(); # definie and print msg $fmsg = ( isset( $fmsg ) ? $fmsg : $lang [ 'changesuccessful' ] ); wd( '?user-8' , $fmsg , 3 ); } } else { $tpl = new tpl ( 'user/login' ); $tpl ->set_out( 'WDLINK' , '?user-8' , 0); } $design ->footer(); ?> |
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 | <form action="index.php?user-profil" method="POST" enctype="multipart/form-data"> <fieldset> <legend>Persönliche Daten ändern</legend> <br /> <label style="float:left; width:35%;">{_lang_mail}</label><input style="margin-bottom:2px;" name="email" value="{email}" /><input type="hidden" name="aemail" value="{email}" /><font class="smalfont">{_lang_mustbeentered}</font><br /> <label style="float:left; width:35%;">{_lang_homepage}</label><input style="margin-bottom:2px;" name="homepage" value="{homepage}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_hometown}</label><input style="margin-bottom:2px;" name="wohnort" value="{wohnort}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_icq}</label><input style="margin-bottom:2px;" name="icq" value="{icq}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_msn}</label><input style="margin-bottom:2px;" name="msn" value="{msn}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_yahoo}</label><input style="margin-bottom:2px;" name="yahoo" value="{yahoo}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_aim}</label><input style="margin-bottom:2px;" name="aim" value="{aim}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_birthday}</label><input style="margin-bottom:2px;" name="gebdatum" value="{gebdatum}" /><font class="smalfont">{_lang_dateformat}</font><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_state}</label><select style="margin-bottom:2px;" name="staat">{_list_staat@<option%1 value="%2">%3</option>}</select><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_sex}</label><input style="margin-bottom:2px;" type="radio" value="1" id="geschlecht1" name="geschlecht" {geschlecht1} /><label for="geschlecht1"> {_lang_male}</label>, <input id="geschlecht2" type="radio" value="2" name="geschlecht" {geschlecht2} /><label for="geschlecht2"> {_lang_female}</label>, <input id="geschlecht0" type="radio" value="0" name="geschlecht" {geschlecht0} /><label for="geschlecht0"> {_lang_itdoesntmatter}</label><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_status}</label><input id="status_aktiv" type="radio" value="1" name="status" {status1} /><label for="status_aktiv"> {_lang_active}</label>, <input id="status_inaktiv" type="radio" value="0" name="status" {status0} /><label for="status_inaktiv"> {_lang_inactive}</label><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_mails}<span class="smalfont"> {_lang_fromotherusers}?</span></label><input id="opt_mail1" type="radio" value="1" name="opt_mail" {opt_mail1} /><label for="opt_mail1"> {_lang_yes}</label>, <input id="opt_mail0" type="radio" value="0" name="opt_mail" {opt_mail0} /><label for="opt_mail0"> {_lang_no}</label><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_privatemessages}<span class="smalfont"> {_lang_fromotherusers}?</span></label><input id="opt_pm1" type="radio" value="1" name="opt_pm" {opt_pm1} /><label for="opt_pm1"> {_lang_yes}</label>, <input id="opt_pm0" type="radio" value="0" name="opt_pm" {opt_pm0} /><label for="opt_pm0"> {_lang_no}</label><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_privatemessages}<span class="smalfont"> {_lang_popupbynewmsg}?</span></label><input id="opt_pm_popup1" type="radio" value="1" name="opt_pm_popup" {opt_pm_popup1} /><label for="opt_pm_popup1"> {_lang_yes}</label>, <input id="opt_pm_popup0" type="radio" value="0" name="opt_pm_popup" {opt_pm_popup0} /><label for="opt_pm_popup0"> {_lang_no}</label><br style="fclear:both;" /><br /> <label style="float:left; width:35%;">{_lang_spielerfahrungen}</label><input style="margin-bottom:2px;" name="spielerfahrungen" value="{spielerfahrungen}" /><br style="clear:both;" /> <label style="float:left; width:100px; ">{_lang_klasse}?</label><select name="klasse">{klasse}</select> <label style="float:left; width:100px; ">{_lang_rasse}?</label><select name="rasse">{rasse}</select> <label style="float:left; width:35%;">{_lang_waffe}</label><input style="margin-bottom:2px;" name="waffe" value="{waffe}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_essen}</label><input style="margin-bottom:2px;" name="essen" value="{essen}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_trinken}</label><input style="margin-bottom:2px;" name="trinken" value="{trinken}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_film}</label><input style="margin-bottom:2px;" name="film" value="{film}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_musik}</label><input style="margin-bottom:2px;" name="musik" value="{musik}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_sport}</label><input style="margin-bottom:2px;" name="sport" value="{sport}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_cpu}</label><input style="margin-bottom:2px;" name="cpu" value="{cpu}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_mainboard}</label><input style="margin-bottom:2px;" name="mainboard" value="{mainboard}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_ram}</label><input style="margin-bottom:2px;" name="ram" value="{ram}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_monitor}</label><input style="margin-bottom:2px;" name="monitor" value="{monitor}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_grafikkarte}</label><input style="margin-bottom:2px;" name="grafikkarte" value="{grafikkarte}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_soundkarte}</label><input style="margin-bottom:2px;" name="soundkarte" value="{soundkarte}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_festplatte}</label><input style="margin-bottom:2px;" name="festplatte" value="{festplatte}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_i_net_verbindung}</label><input style="margin-bottom:2px;" name="i_net_verbindung" value="{i_net_verbindung}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_tastatur}</label><input style="margin-bottom:2px;" name="tastatur" value="{tastatur}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_maus}</label><input style="margin-bottom:2px;" name="maus" value="{maus}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_jappy}</label><input style="margin-bottom:2px;" name="jappy" value="{jappy}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_facebook}</label><input style="margin-bottom:2px;" name="facebook" value="{facebook}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_wkw}</label><input style="margin-bottom:2px;" name="wkw" value="{wkw}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_studivz}</label><input style="margin-bottom:2px;" name="studivz" value="{studivz}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_myspace}</label><input style="margin-bottom:2px;" name="myspace" value="{myspace}" /><br style="clear:both;" /> <label style="float:left; width:35%;">{_lang_youtube}</label><input style="margin-bottom:2px;" name="youtube" value="{youtube}" /><br style="clear:both;" /> {_if_{forum_usergallery}=='1'}<div align="center"> <a href="index.php?user-usergallery-{uid}">Usergallery</a> <a href="index.php?user-remove"/></a> </div>{/_endif}<br /> {EXPLODE} <fieldset> <legend>{_lang_removeaccount}</legend> <label style="float:left; width:35%;"> </label><input type="checkbox" value="yes" name="removeaccount" /> {_lang_delete}? <font class="smalfont">{_lang_mustbeentered}</font> </fieldset> <fieldset> <legend>{_lang_avatar}</legend> <label style="float:left; width:35%;"> </label>{avatarbild}<input type="checkbox" value="yes" name="avatarloeschen" /> {_lang_delete}?<br /><br /> <label style="float:left; width:35%;"> </label><input style="margin-bottom:2px;" type="file" name="avatarfile" /><br /><font class="smalfont"><br />{_lang_criterions}: {_lang_maxwidth} {Fabreite}px, {_lang_maxheight} {Fahohe}px {_lang_and} max size {Fasize} bytes. {_lang_otherwisenoaction}.</font><br /> </fieldset> <br /> {EXPLODE} <fieldset> <legend>{_lang_signature}</legend> <label style="float:left; width:35%;"><font class="smalfont">{_lang_max} {forum_max_sig} {_lang_signs}.</font></label><textarea style="margin-bottom:2px;" cols="60" rows="2" name="sig">{sig}</textarea><br /> </fieldset> <br /> <fieldset> <legend>{_lang_editpassword}</legend> <br /> <label style="float:left; width:35%;">{_lang_current}</label><input style="margin-bottom:2px;" type="password" name="op" maxlength="20"><br /> <label style="float:left; width:35%;">{_lang_new}</label><input style="margin-bottom:2px;" type="password" name="np1" maxlength="20"><br /> <label style="float:left; width:35%;">{_lang_repeat}</label><input style="margin-bottom:2px;" type="password" name="np2" maxlength="20"><br /> </fieldset> <br /> <fieldset> <br /> {EXPLODE} </fieldset> <br /> <div align="center"> <input style="margin-bottom:2px;" type="submit" value="{_lang_send2}" name="submit"> </div> </fieldset> </form> |
hpoofe ihr könnt mir helfen