$title = "Himmel";
$header = "Deine persönlichen Einstellungen";
include ("./inc/header.php");
include ("./inc/crypt.php");
if (!IsSet($action)) {
echo Get_Text(1).$_SESSION['Nick'].",
\n\n";
Print_Text(13);
?>
Print_Text("pub_einstellungen_Text_UserData");?>
Print_Text(14);?>
} else {
switch ($action) {
case 'set':
if ($new1==$new2){
Print_Text(25);
$sql = "select * from User where UID=".$_SESSION['UID'];
$Erg = mysql_query($sql, $con);
if (PassCrypt($old)==mysql_result($Erg, $i, "Passwort")) {
Print_Text(26);
Print_Text(27);
$usql = "update User set Passwort='".PassCrypt($new1)."' where UID=".$_SESSION['UID']." limit 1";
$Erg = mysql_query($usql, $con);
if ($Erg==1) {
Print_Text(28);
} else {
Print_Text(29);
}
} else {
Print_Text(30);
}
} else {
Print_Text(31);
}
break;
case 'colour':
$chsql="Update User set color= \"$colourid\" where UID = \"".$_SESSION['UID']."\" limit 1";
$Erg = mysql_query($chsql, $con);
$_SESSION['color']=$colourid;
if ($Erg==1) {
Print_Text(32);
} else {
Print_Text(29);
}
break;
case 'sprache':
$chsql="Update User set Sprache = \"$language\" where UID = \"".$_SESSION['UID']."\" limit 1";
$Erg = mysql_query($chsql, $con);
$_SESSION['Sprache']=$language;
if ($Erg==1) {
Print_Text(33);
} else {
Print_Text(29);
}
break;
case 'avatar':
$chsql="Update User set Avatar = \"$eAvatar\" where UID = \"".$_SESSION['UID']."\" limit 1";
$Erg = mysql_query($chsql, $con);
$_SESSION['Avatar']=$eAvatar;
if ($Erg==1) {
Print_Text(34);
} else {
Print_Text(29);
}
break;
case 'setUserData':
$chsql= "UPDATE User SET ".
"`Nick`='$eNick', `Name`='$eName', `Vorname`='$eVorname', ".
"`Alter`='$eAlter', `Telefon`='$eTelefon', `Handy`='$eHandy', ".
"`DECT`='$eDECT', `email`='$eemail' ".
"WHERE UID='". $_SESSION['UID']. "' LIMIT 1;";
$Erg = mysql_query($chsql, $con);
if ($Erg==1)
{
$_SESSION['Nick'] = $eNick;
$_SESSION['Name'] = $eName;
$_SESSION['Vorname'] = $eVorname;
$_SESSION['Alter'] = $eAlter;
$_SESSION['Telefon'] = $eTelefon;
$_SESSION['Handy'] = $eHandy;
$_SESSION['DECT'] = $eDECT;
$_SESSION['email'] = $eemail;
Print_Text("pub_einstellungen_UserDateSaved");
}
else
{
Print_Text(29);
echo mysql_error( $con);
}
break;
}
}
include ("./inc/footer.php");
?>