Ja genau immer wenn man was ändern will kommt das alles aber er ändert es trotzdem.
Ich poste mal die profil_edit.php datei vielleicht seht ihr ja denn Fehler.
<?php
# Copyright Original Dateien und Einträge by: Manuel Staechele
# Support: www.ilch.de
# Profil Mod by: orsnipe
# Profil Mod Code by: orsnipe, IRvD, Lord|Schirmer & www.ilch.de/forum
# Profil Mod Copyright by: www.capfx.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);
##
###
#### Funktion Spiele auslesen
function get_games_array () {
$ar = array(); $o = opendir ( 'include/images/wargames' );
while ( $f = readdir ( $o ) ) { if ( $f != '.' AND $f != '..' ) { $ar[$f] = $f; } }
asort ( $ar ); return ( $ar ); }
if ( $_SESSION['authright'] <= -1 ) {
if ( empty ($_POST['submit']) ) {
$design->header();
$abf = 'SELECT email,statustext,facebook,youtube,cd,twitter,battlelog,google,steam,xfire,teamspeak,games,system,sound,hdd,monitor,inet,headset,board,prozesor,ram,grafik,tasta,maus,cpubild,gpubild,clanlogo,cname,ctag,cseite,wohnort,homepage,aim,msn,icq,yahoo,avatar,status,staat,gebdatum,sig,opt_pm_popup,opt_pm,opt_mail,geschlecht,mich,spezrank,steampro 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['clanlogo'] = '<option></option>'.arliste ( $row['clanlogo'] , get_clanlogo_array() , $tpl , 'clanlogo' );
$row['cpubild'] = '<option></option>'.arliste ( $row['cpubild'] , get_cpubild_array() , $tpl , 'cpubild' );
$row['gpubild'] = '<option></option>'.arliste ( $row['gpubild'] , get_gpubild_array() , $tpl , 'gpubild' );
$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="" width="100"><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'];
##
###
#### Spiele zum auswaehlen
$gamestylepos = 'margin:4px;padding:0;width:16px;height:16px;border:none';
$gamestyledark = 'background-color:#050505;width:24px;height:24px;float:left;text-align:center;vertical-align:middle;margin:0 auto';
$gamestylemite = 'background-color:#0A0A0A;width:24px;height:24px;float:left;text-align:center;vertical-align:middle;margin:0 auto';
$argames = get_games_array ();
for ($x = 0; $x < sizeof($argames); ++$x)
{
$class = ($x % 2) ? $gamestyledark : $gamestylemite;
$gameimg = key($argames);
if (strpos($row['games'],$gameimg)===false) { $check = ''; } else { $check = 'checked'; }
$gamename = substr(key($argames), 0, -4);
$row['gamechoice'] .= '<div title="'.$gamename.'" style="float:left;margin:2px">
<div style="'.$class.'">
<img style="'.$gamestylepos.'" src="include/images/wargames/'.$gameimg.'" alt="'.$gamename.'">
</div>
<div style="'.$class.'">
<input style="'.$gamestylepos.'" type="checkbox" name="wargames[]" '.$check.' value="'.$gameimg.'">
</div>
</div>';
next ($argames);
}
#
### Skills Anzeigen
$row['SKILLS'] = '';
$ergS = db_query('SELECT * FROM `prefix_skill` ORDER BY pos, name DESC');
while ($rowS = db_fetch_object($ergS)) {
if ($rowS->cat == 1) {
$row['SKILLS'] .= '<tr><td colspan="2" height="25" class="inhalthintergrund"><b>» ' . $rowS->name . '</b></td></tr>';
} else {
$insert = @db_result(db_query("SELECT `insert` FROM prefix_skill_daten WHERE `skill_id` = '". $rowS->id ."' AND `user_id` = '".$_SESSION['authid']."'"),0);
if (empty($insert) or $insert == '') { $insert = '0'; }
$row['SKILLS'] .= '<tr>
<td width="40%" class="inhalthintergrund"><img src="include/images/profilmod/skill.png" width="20" height="20" border="0" /> ' . $rowS->name . '</td>
<td width="60%" class="inhalthintergrund">
<input type="text" name="skillid' . $rowS->id . '" value="'.$insert.'" maxlength="3" size="5" />%
</td>
</tr>';
}
}
### Skills Ende
$tpl->set_ar_out($row,0);
if ($allgAr['forum_avatar_upload']) $tpl->out(1);
if ($allgAr['forum_pcpic_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 (user_pw_check($_POST['op'], $akpw)) {
$newpw = user_pw_crypt($_POST['np1']);
db_query("UPDATE prefix_user SET pass = '".$newpw."' WHERE id = ".$_SESSION['authid']);
user_set_cookie($_SESSION['authid'], $newpw);
$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
if (isset($_REQUEST['cbutton'])) {
reset($_REQUEST['cbutton']);
foreach ($_REQUEST['cbutton'] as $k => $v) {
print "$k $v\n";
}
} else {
print "";
}
##
###
#### 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'], ILCH_ENTITIES_FLAGS, ILCH_CHARSET), $text );
$fmsg = $lang['pleaseconfirmremove'];
}
#remove account
##
###
#### Spiele Array
foreach($_POST['wargames'] as $value )
{
$gamechoises .= $value.'#';
}
$gamechoises = substr($gamechoises,0,-1);
### Skill speichern
$anz = db_result(db_query("SELECT MAX(pos) FROM prefix_skill"), 0);
db_query("DELETE FROM prefix_skill_daten WHERE user_id = '".$_SESSION['authid']."'");
for ($i = 1; $i <= $anz; $i++) {
$idnr = db_result(db_query("SELECT id FROM prefix_skill WHERE pos = '".$i."'"),0);
if (empty($_POST['skillid'.$idnr]) OR $_POST['skillid'.$idnr] == '') { $_POST['skillid'.$idnr] = '0'; }
db_query("INSERT INTO prefix_skill_daten (user_id, skill_id, `insert`) VALUES ('".$_SESSION['authid']."', '".$idnr."', '".escape($_POST['skillid'.$idnr], 'string')."')");
}
### Skills speichern Ende
# 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'))."',
statustext = '".escape($_POST['statustext'], 'string')."',
cname = '".escape($_POST['cname'], 'string')."',
ctag = '".escape($_POST['ctag'], 'string')."',
cseite = '".escape($_POST['cseite'], 'string')."',
clanlogo = '".escape($_POST['clanlogo'], 'string')."',
cpubild = '".escape($_POST['cpubild'], 'string')."',
gpubild = '".escape($_POST['gpubild'], 'string')."',
steampro = '".escape($_POST['steampro'], 'string')."',
facebook = '".escape($_POST['facebook'], 'string')."',
youtube = '".escape($_POST['youtube'], 'string')."',
cd = '".escape($_POST['cd'], 'string')."',
twitter = '".escape($_POST['twitter'], 'string')."',
battlelog = '".escape($_POST['battlelog'], 'string')."',
google = '".escape($_POST['google'], 'string')."',
steam = '".escape($_POST['steam'], 'string')."',
xfire = '".escape($_POST['xfire'], 'string')."',
teamspeak = '".escape($_POST['teamspeak'], 'string')."',
games = '".$gamechoises."',
system = '".escape($_POST['system'], 'string')."',
sound = '".escape($_POST['sound'], 'string')."',
hdd = '".escape($_POST['hdd'], 'string')."',
monitor = '".escape($_POST['monitor'], 'string')."',
inet = '".escape($_POST['inet'], 'string')."',
headset = '".escape($_POST['headset'], 'string')."',
board = '".escape($_POST['board'], 'string')."',
prozesor = '".escape($_POST['prozesor'], 'string')."',
ram = '".escape($_POST['ram'], 'string')."',
grafik = '".escape($_POST['grafik'], 'string')."',
tasta = '".escape($_POST['tasta'], 'string')."',
maus = '".escape($_POST['maus'], 'string')."',
mich = '".escape($_POST['mich'], '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();
?>