user_info.php
<?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);
if(file_exists("include/contents/user/user_gb.php")){
$abf8 = "SELECT COUNT(*) AS gb_eintraege FROM prefix_usergb WHERE uid = ".$uid."";
$erg8 = db_query($abf8);
$row8 = db_fetch_assoc($erg8);
if($row8['gb_eintraege'] == 0 ){
$gb_eintraege = "keine Einträge (<a href="index.php?user-usergb-view-".$uid."">eintragen</a>)";
}elseif($row8['gb_eintraege'] == 1 ){
$gb_eintraege = "1 Eintrag (<a href="index.php?user-usergb-view-".$uid."">eintragen</a>)";
}else{
$gb_eintraege = $row8['gb_eintraege']." Einträge";
}
} else {
$gb_eintraege = "Kein Gästebuch vorhanden";
}
$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://wwp.icq.com/scripts/search.dll?to=".$row['icq']."" target="_blank"><img src="http://status.icq.com/online.gif?icq=".$row['icq']."&img=5" border="0"></a>";
}else{
$icq = "keine Angabe";
}
if($row9['gallery_eintraege'] == 0){
$gallery_eintraege = "keine Bilder";
}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['staat'])){
$staat = "<img src="include/images/flags/".$row['staat']."" border="0" />";
} else {
$staat = "";
}
$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/male.png" align="center" border="0">';
}
$avatar2 = '';
if ( file_exists($row['avatar2'])) {
$avatar2 = '<img src="'.$row['avatar2'].'" 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 = "Zwillige";
}
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 = "Keine Angabe";
}
?>
und user_details.php
<?php
# Copyright by: Manuel Staechele
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
$uid = $menu->get(2);
include('user_infos.php');
$ar = array (
'NAME' => $row['name'],
'JOINED' => date('d.m.Y',$row['regist']),
'LASTAK' => date('d.m.Y - H:i',$row['llogin']),
'POSTS' => $row['posts'],
'postpday' => $postpday,
'RANG' => userrang ($row['posts'],$uid),
'AVATA' => $avatar,
'ONLINE' => $online,
'USERTITEL' => $usertitel,
'EMAIL' => $email,
'HOMEPAGE' => $homepage,
'GESCHLECHT' => $geschlecht,
'GEBDATUM' => $gebdatum,
'ALTER' => $alter,
'WOHNORT' => $wohnort,
'FORUMTOPICS' => $row4['forumtopics'],
'NEWSTOPICS' => $row5['newstopics'],
'NEWSPOSTS' => $row6['newsposts'],
'FORUMPOSTS' => $row7['forumposts'],
'SIGNATUR' => bbcode($row['sig']),
'STAAT' => $staat,
'UID' => $uid,
'STERNZEICHEN' => $sternzeichen,
'GB_EINTRAEGE' => $gb_eintraege,
'GALLERIE_EINTRAEGE' => $gallery_eintraege,
'ICQ' => $icq,
'AVATA2' => $avatar2,
);
$title = $allgAr['title'].' :: Users :: Details von '.$row['name'];
$hmenu = $extented_forum_menu.'<a class="smalfont" href="index.php?user">Users</a><b> » </b> <a href=index.php?user-details-'.$uid.'>Details von '.$row['name']."</a>".$extented_forum_menu_sufix;
$design = new design ( $title , $hmenu, 1);
$design->header();
$tpl = new tpl ( 'user/userdetails' );
$l = profilefields_show ( $uid );
$ar['rowspan'] = 4 + substr_count($l, '<tr><td class="');
$ar['profilefields'] = $l;
$tpl->set_ar_out($ar,0);
$design->footer();
?>
hoffe das ich jetzt nichts vergessen habe
Zuletzt modifiziert von Nano.v1 am 02.04.2009 - 19:30:29