<?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);
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,game,spielerfahrungen,clan,map,waffe,essen,trinken,film,musik,sport,system,headset,cpu,mainboard,ram,monitor,grafikkarte,soundkarte,festplatte,i_net_verbindung,tastatur,maus,facebook,studivz,myspace,youtube,game1,game2,game3,game4,game5 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['game1'] = '<option></option>'.arliste ( $row['game1'] , get_nationality_array1() , $tpl , 'game1' );
$row['game2'] = '<option></option>'.arliste ( $row['game2'] , get_nationality_array2() , $tpl , 'game2' );
$row['game3'] = '<option></option>'.arliste ( $row['game3'] , get_nationality_array3() , $tpl , 'game3' );
$row['game4'] = '<option></option>'.arliste ( $row['game4'] , get_nationality_array2() , $tpl , 'game4' );
$row['game5'] = '<option></option>'.arliste ( $row['game5'] , get_nationality_array3() , $tpl , 'game5' );
$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')."',
game1 = '".escape($_POST['game1'], 'string')."',
game2 = '".escape($_POST['game2'], 'string')."',
game3 = '".escape($_POST['game3'], 'string')."',
game4 = '".escape($_POST['game4'], 'string')."',
game5 = '".escape($_POST['game5'], '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'))."',
game = '".escape($_POST['game'], 'string')."',
spielerfahrungen = '".escape($_POST['spielerfahrungen'], 'string')."',
clan = '".escape($_POST['clan'], 'string')."',
map = '".escape($_POST['map'], 'string')."',
waffe = '".escape($_POST['waffe'], 'string')."',
essen = '".escape($_POST['essen'], 'string')."',
photoshop = '".escape($_POST['photoshop'], 'string')."',
html = '".escape($_POST['html'], 'string')."',
php = '".escape($_POST['php'], 'string')."',
flash = '".escape($_POST['flash'], 'string')."',
ilch = '".escape($_POST['ilch'], 'string')."',
datenbank = '".escape($_POST['datenbank'], 'string')."',
jet = '".escape($_POST['jet'], 'string')."',
tank = '".escape($_POST['tank'], 'string')."',
sani = '".escape($_POST['sani'], 'string')."',
versorger = '".escape($_POST['versorger'], 'string')."',
sniper = '".escape($_POST['sniper'], 'string')."',
inge = '".escape($_POST['versorger'], 'inge')."',
helli = '".escape($_POST['versorger'], 'helli')."',
trinken = '".escape($_POST['trinken'], 'string')."',
film = '".escape($_POST['film'], 'string')."',
musik = '".escape($_POST['musik'], 'string')."',
sport = '".escape($_POST['sport'], 'string')."',
system = '".escape($_POST['system'], 'string')."',
headset = '".escape($_POST['headset'], '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')."',
facebook = '".get_homepage(escape($_POST['facebook'], '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();
?>
<?php
$abf = 'SELECT * FROM prefix_user WHERE id = "'.$uid.'"';
$erg = db_query($abf);
$row = db_fetch_assoc($erg);
$user_name = $row['name'];
$abf2 = "SELECT * FROM prefix_online";
$erg2 = db_query($abf2);
$row2 = db_fetch_assoc($erg2);
$recht = $row['recht'];
$abf3 = "SELECT * FROM prefix_grundrechte WHERE id = ".$recht."";
$erg3 = db_query($abf3);
$row3 = db_fetch_assoc($erg3);
$abf4 = "SELECT COUNT(*) AS forumtopics FROM prefix_topics WHERE erst = '$user_name'";
$erg4 = db_query($abf4);
$row4 = db_fetch_assoc($erg4);
$abf5 = "SELECT COUNT(*) AS newstopics FROM prefix_news WHERE user_id = ".$uid."";
$erg5 = db_query($abf5);
$row5 = db_fetch_assoc($erg5);
$abf6 = "SELECT COUNT(*) AS newsposts FROM prefix_koms WHERE name = '$user_name'";
$erg6 = db_query($abf6);
$row6 = db_fetch_assoc($erg6);
$abf7 = "SELECT COUNT(*) AS newsposts FROM prefix_koms WHERE name = '$user_name'";
$erg7 = db_query($abf7);
$row7 = db_fetch_assoc($erg7);
$abf9 = "SELECT COUNT(*) AS gallery_eintraege FROM prefix_usergallery WHERE uid = ".$uid."";
$erg9 = db_query($abf9);
$row9 = db_fetch_assoc($erg9);
if(!empty($row['icq'])){
$icq = "<a href=\"http://www.icq.com/people/".$row['icq']."\" target=\"_blank\"><img src=\"http://status.icq.com/online.gif?icq=".$row['icq']."&img=5\" border=\"0\"></a>";
}else{
$icq = "<span style=\"font-size:9px\"><i>Nicht vorhanden</i></span>";
}
if($row9['gallery_eintraege'] == 0){
$gallery_eintraege = "<span style=\"font-size:9px\"><i>keine Bilder</i></span>";
}elseif($row9['gallery_eintraege'] == 1){
$gallery_eintraege = "1 Bild vorhanden";
} else {
$gallery_eintraege = $row9['gallery_eintraege']." Bilder";
}
if(!empty($row['email']) && $row['opt_mail'] == 1){
$email = "<a href=\"mailto:".$row['email']."\"><img src=\"include/images/icons/email_icon.png\" border=\"0\" /></a>";
}elseif(!empty($row['email']) && $row['opt_mail'] == 0){
$email = "<img src=\"include/images/icons/email_icon.png\" border=\"0\" /></a>";
} else {
$email = "<img src=\"include/images/icons/no_email_icon.png\" border=\"0\" />";
}
if(!empty($row['homepage'])){
$homepage = "<a href=\"".$row['homepage']."\" target=\"_blank\"><img src=\"include/images/icons/website_icon.png\" border=\"0\" /></a>";
} else {
$homepage = "<img src=\"include/images/icons/no_website_icon.png\" border=\"0\" />";
}
if(!empty($row['facebook'])){
$facebook = "<a href=\"".$row['facebook']."\" class=\"box\" target=\"_blank\"><img src=\"include/images/userdetails/facebook.png\" border=\"0\" /><i> » zum Profil</i></a>";
} else {
$facebook = "<img src=\"include/images/userdetails/no_facebook.png\" border=\"0\" /> <span style=\"font-size:9px\"><i>Nicht vorhanden</i></span>";
}
if(!empty($row['studivz'])){
$studivz = "<a href=\"".$row['studivz']."\" class=\"box\" target=\"_blank\"><img src=\"include/images/userdetails/studivz.png\" border=\"0\" /><i> » zum Profil</i></a>";
} else {
$studivz = "<img src=\"include/images/userdetails/no_studivz.png\" border=\"0\" /> <span style=\"font-size:9px\"><i>Nicht vorhanden</i></span>";
}
if(!empty($row['myspace'])){
$myspace = "<a href=\"".$row['myspace']."\" class=\"box\" target=\"_blank\"><img src=\"include/images/userdetails/myspace.png\" border=\"0\" /><i> » zur Page </i></a>";
} else {
$myspace = "<img src=\"include/images/userdetails/no_myspace.png\" border=\"0\" /> <span style=\"font-size:9px\"><i>Nicht vorhanden</i></span>";
}
if(!empty($row['youtube'])){
$youtube = "<a href=\"".$row['youtube']."\" class=\"box\" target=\"_blank\"><img src=\"include/images/userdetails/youtube.png\" border=\"0\" /><i> » zum Kanal </i></a>";
} else {
$youtube = "<img src=\"include/images/userdetails/no_youtube.png\" border=\"0\" /> <span style=\"font-size:9px\"><i>Nicht vorhanden</i></span>";
}
if(!empty($row['staat'])){
$staat = "<img src=\"include/images/flags/".$row['staat']."\" border=\"0\" />";
} else {
$staat = "";
}
if(!empty($row['game1'])){
$game1 = "<img src=\"include/images/game_icon/".$row['game1']."\" border=\"0\" />";
} else {
$game1 = "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['game2'])){
$game2 = "<img src=\"include/images/game_icon/".$row['game2']."\" border=\"0\" />";
} else {
$game2 = "";
}
if(!empty($row['game3'])){
$game3 = "<img src=\"include/images/game_icon/".$row['game3']."\" border=\"0\" />";
} else {
$game3 = "";
}
if(!empty($row['game4'])){
$game4 = "<img src=\"include/images/game_icon/".$row['game4']."\" border=\"0\" />";
} else {
$game4 = "";
}
if(!empty($row['game5'])){
$game5 = "<img src=\"include/images/game_icon/".$row['game5']."\" border=\"0\" />";
} else {
$game5 = "";
}
$avatar = '';
if (file_exists($row['avatar'])) {
$avatar = '<img src="'.$row['avatar'].'" align="center" border="0">';
} elseif ($row['avatar'] == "" && $row['geschlecht'] == "1") {
$avatar = '<img src="include/images/avatars/male.png" align="center" border="0">';
} elseif ($row['avatar'] == "" && $row['geschlecht'] == "2") {
$avatar = '<img src="include/images/avatars/female.png" align="center" border="0">';
} else {
$avatar = '<img src="include/images/avatars/wurstegal.png" align="center" border="0">';
}
$regsek = mktime ( 0,0,0, date('m'), date('d'), date('Y') ) - $row['regist'];
$regday = round($regsek / 86400);
$postpday = ( $regday == 0 ? 0 : round($row['posts'] / $regday, 2 ) );
$usertitel = $row3['name'];
if($row2['uid'] == $uid){
$online = "<b>online</b>";
}else{
$online = "<b>offline</b>";
}
if($row['geschlecht'] == 1){
$geschlecht = "männlich";
}elseif($row['geschlecht'] == 2){
$geschlecht = "weiblich";
}else{
$geschlecht = "unentschlossen";
}
if($row['gebdatum'] !== "0000-00-00"){
$gebdatum = date('d.m.Y',strtotime($row['gebdatum']));
$tag = date('d',strtotime($row['gebdatum']));
$monat = date('m',strtotime($row['gebdatum']));
$jahr = date('Y',strtotime($row['gebdatum']));
$jetzt = mktime(0,0,0,date("m"),date("d"),date("Y"));
$geburtstag = mktime(0,0,0,$monat,$tag,$jahr);
$alter = "(".intval(($jetzt - $geburtstag) / (3600 * 24 * 365)).")";
} else {
$gebdatum = "Kein Datum angegeben";
$alter = "";
}
function Sternzeichen($t,$m,$j) {
$tag = date("d",mktime(0,0,0,$m,$t,$j));
$monat = date("n",mktime(0,0,0,$m,$t,$j));
if ($tag > 20 && $monat == 3 || $tag < 21 && $monat == 4) {
$zeichen = "Widder";
}
if ($tag > 20 && $monat == 4 || $tag < 21 && $monat == 5) {
$zeichen = "Stier";
}
if ($tag > 20 && $monat == 5 || $tag < 22 && $monat == 6) {
$zeichen = "Zwillinge";
}
if ($tag > 21 && $monat == 6 || $tag < 23 && $monat == 7) {
$zeichen = "Krebs";
}
if ($tag > 22 && $monat == 7 || $tag < 24 && $monat == 8) {
$zeichen = "Löwe";
}
if ($tag > 23 && $monat == 8 || $tag < 24 && $monat == 9) {
$zeichen = "Jungfrau";
}
if ($tag > 23 && $monat == 9 || $tag < 24 && $monat == 10) {
$zeichen = "Waage";
}
if ($tag > 23 && $monat == 10 || $tag < 23 && $monat == 11) {
$zeichen = "Skorpion";
}
if ($tag > 22 && $monat == 11 || $tag < 22 && $monat == 12) {
$zeichen = "Schütze";
}
if ($tag > 21 && $monat == 12 || $tag < 21 && $monat == 1) {
$zeichen = "Steinbock";
}
if ($tag > 20 && $monat == 1 || $tag < 20 && $monat == 2) {
$zeichen = "Wassermann";
}
if ($tag > 19 && $monat == 2 || $tag < 21 && $monat == 3) {
$zeichen = "Fische";
}
return "$zeichen";
}
if($row['gebdatum'] !== "0000-00-00"){
$sternzeichen = Sternzeichen($tag,$monat,$jahr);
} else {
$sternzeichen = "Unbekannt";
}
if(!empty($row['wohnort'])){
$wohnort = $row['wohnort'];
} else {
$wohnort = "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['game'])){
$game = $row['game'];
} else {
$game= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['spielerfahrungen'])){
$spielerfahrungen = $row['spielerfahrungen'];
} else {
$spielerfahrungen= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['clan'])){
$clan = $row['clan'];
} else {
$clan= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['map'])){
$map = $row['map'];
} else {
$map= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['waffe'])){
$waffe = $row['waffe'];
} else {
$waffe= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['essen'])){
$essen = $row['essen'];
} else {
$essen= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['trinken'])){
$trinken = $row['trinken'];
} else {
$trinken= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['film'])){
$film = $row['film'];
} else {
$film= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['musik'])){
$musik = $row['musik'];
} else {
$musik= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['sport'])){
$sport = $row['sport'];
} else {
$sport= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['system'])){
$system = $row['system'];
} else {
$system= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['headset'])){
$headset = $row['headset'];
} else {
$headset= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['cpu'])){
$cpu = $row['cpu'];
} else {
$cpu= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['mainboard'])){
$mainboard = $row['mainboard'];
} else {
$mainboard= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['ram'])){
$ram = $row['ram'];
} else {
$ram= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['monitor'])){
$monitor = $row['monitor'];
} else {
$monitor= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['grafikkarte'])){
$grafikkarte = $row['grafikkarte'];
} else {
$grafikkarte= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['soundkarte'])){
$soundkarte = $row['soundkarte'];
} else {
$soundkarte= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['festplatte'])){
$festplatte = $row['festplatte'];
} else {
$festplatte= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['i_net_verbindung'])){
$i_net_verbindung = $row['i_net_verbindung'];
} else {
$i_net_verbindung= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['tastatur'])){
$tastatur = $row['tastatur'];
} else {
$tastatur= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['maus'])){
$maus = $row['maus'];
} else {
$maus= "<span style=\"font-size:9px\"><i>Keine Angabe</i></span>";
}
if(!empty($row['photoshop'])){
$photoshop = $row['photoshop'];
} else {
$photoshop= "";
}
if(!empty($row['html'])){
$html = $row['html'];
} else {
$html= "";
}
if(!empty($row['php'])){
$php = $row['php'];
} else {
$php= "";
}
if(!empty($row['datenbank'])){
$datenbank = $row['datenbank'];
} else {
$datenbank= "";
}
if(!empty($row['flash'])){
$flash = $row['flash'];
} else {
$flash= "";
}
if(!empty($row['ilch'])){
$ilch = $row['ilch'];
} else {
$ilch= "";
}
?>
?>
<?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);
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,game,spielerfahrungen,clan,map,waffe,essen,trinken,film,musik,sport,system,headset,cpu,mainboard,ram,monitor,grafikkarte,soundkarte,festplatte,i_net_verbindung,tastatur,maus,facebook,studivz,myspace,youtube,game1,game2,game3,game4,game5 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['game1'] = '<option></option>'.arliste ( $row['game1'] , get_nationality_array1() , $tpl , 'game1' );
$row['game2'] = '<option></option>'.arliste ( $row['game2'] , get_nationality_array2() , $tpl , 'game2' );
$row['game3'] = '<option></option>'.arliste ( $row['game3'] , get_nationality_array3() , $tpl , 'game3' );
$row['game4'] = '<option></option>'.arliste ( $row['game4'] , get_nationality_array2() , $tpl , 'game4' );
$row['game5'] = '<option></option>'.arliste ( $row['game5'] , get_nationality_array3() , $tpl , 'game5' );
$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')."',
game1 = '".escape($_POST['game1'], 'string')."',
game2 = '".escape($_POST['game2'], 'string')."',
game3 = '".escape($_POST['game3'], 'string')."',
game4 = '".escape($_POST['game4'], 'string')."',
game5 = '".escape($_POST['game5'], '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'))."',
game = '".escape($_POST['game'], 'string')."',
spielerfahrungen = '".escape($_POST['spielerfahrungen'], 'string')."',
clan = '".escape($_POST['clan'], 'string')."',
map = '".escape($_POST['map'], 'string')."',
waffe = '".escape($_POST['waffe'], 'string')."',
essen = '".escape($_POST['essen'], 'string')."',
photoshop = '".escape($_POST['photoshop'], 'string')."',
html = '".escape($_POST['html'], 'string')."',
php = '".escape($_POST['php'], 'string')."',
flash = '".escape($_POST['flash'], 'string')."',
ilch = '".escape($_POST['ilch'], 'string')."',
datenbank = '".escape($_POST['datenbank'], 'string')."',
jet = '".escape($_POST['jet'], 'string')."',
tank = '".escape($_POST['tank'], 'string')."',
sani = '".escape($_POST['sani'], 'string')."',
versorger = '".escape($_POST['versorger'], 'string')."',
sniper = '".escape($_POST['sniper'], 'string')."',
inge = '".escape($_POST['versorger'], 'inge')."',
helli = '".escape($_POST['versorger'], 'helli')."',
trinken = '".escape($_POST['trinken'], 'string')."',
photoshop = '".escape($_POST['photoshop'], 'string')."',
html = '".escape($_POST['html'], 'string')."',
php = '".escape($_POST['php'], 'string')."',
flash = '".escape($_POST['flash'], 'string')."',
ilch = '".escape($_POST['ilch'], 'string')."',
tank = '".escape($_POST['datenbank'], 'string')."',
jet = '".escape($_POST['datenbank'], 'string')."',
helli = '".escape($_POST['datenbank'], 'string')."',
sniper = '".escape($_POST['datenbank'], 'string')."',
sani = '".escape($_POST['datenbank'], 'string')."',
versorger = '".escape($_POST['datenbank'], 'string')."',
inge = '".escape($_POST['datenbank'], 'string')."',
film = '".escape($_POST['film'], 'string')."',
musik = '".escape($_POST['musik'], 'string')."',
sport = '".escape($_POST['sport'], 'string')."',
system = '".escape($_POST['system'], 'string')."',
headset = '".escape($_POST['headset'], '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')."',
facebook = '".get_homepage(escape($_POST['facebook'], '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();
?>
so da ich glaube das ich bei den php,s nen Fehler gemacht habe irgend wo oder was nicht verstehe habe ich die erstmal gepostet, were aber net wen du mir die llösung vertaten würdest.
Ein Xd und ^^ und LOL und D Beweist Skill wen mans nach Jedem Satz Schreibt ^^xd LOL D