"; if(isignored($userID, $db[buddy])) $buddy='back to buddy-list'; elseif(isbuddy($userID, $db[buddy])) $buddy='ignore user'; elseif($userID==$db[buddy]) $buddy=''; else $buddy='add to buddylist'; if(isonline($db[buddy])=="offline") $statuspic='offline'; else $statuspic='online'; $buddylist.='
'.$country.' '.$nicknamebuddy.' '.$email.'  '.$buddy.'  '.$statuspic.'
'; $n++; } } else $buddylist=' no buddys '; eval ("\$profile = \"".gettemplate("profile_buddys")."\";"); echo $profile; //galleries } elseif($_GET['action'] == "galleries") { eval ("\$title_profile = \"".gettemplate("title_profile")."\";"); echo $title_profile; $galclass = new Gallery(); $border=BORDER; $bgcat=BGCAT; $galleries=safe_query("SELECT * FROM ".PREFIX."gallery WHERE userID='$id'"); echo '
'; if($usergalleries) { if(mysql_num_rows($galleries)) { $n=1; while($ds=mysql_fetch_array($galleries)) { $n%2 ? $bg=BG_1 : $bg=BG_2; $piccount=mysql_num_rows(safe_query("SELECT * FROM ".PREFIX."gallery_pictures WHERE galleryID='".$ds[galleryID]."'")); $commentcount=mysql_num_rows(safe_query("SELECT * FROM ".PREFIX."comments WHERE parentID='".$ds[galleryID]."' AND type='ga'")); $gallery[date] = date("d.m.Y",$ds[date]); $gallery[title] = cleartext($ds[name]); $gallery[picture] = $galclass->randompic($ds[galleryID]); $gallery[galleryID] = $ds[galleryID]; $gallery[count] = mysql_num_rows(safe_query("SELECT picID FROM `".PREFIX."gallery_pictures` WHERE galleryID='".$ds[galleryID]."'")); eval ("\$profile = \"".gettemplate("profile_galleries")."\";"); echo $profile; $n++; } } else echo ''; } else echo ''; echo '
 • Galleries of '.getnickname($id).'
  Date Name Pictures
no galleries
User-Galleries disabled.
'; //profil: last posts } elseif($_GET['action'] == "lastposts") { eval ("\$title_profile = \"".gettemplate("title_profile")."\";"); echo $title_profile; if(!isinternboarduser($userID)) $intern = "AND intern='0'"; $topics=safe_query("SELECT * FROM ".PREFIX."forum_topics WHERE userID='".$id."' ".$intern." ORDER BY date DESC LIMIT 0,".$profilelast); if(mysql_num_rows($topics)) { $n=1; while($db=mysql_fetch_array($topics)) { $n%2 ? $bgcolor=BG_1 : $bgcolor=BG_2; $posttime=date("d.m.y h:i",$db[date]); $topiclist.='
'.$posttime.'
'.clearfromtags($db[topic]).'

'.$db[views].' views - '.$db[replys].' replys
'; $n++; } } else $topiclist=' no topics '; $posts=safe_query("SELECT ".PREFIX."forum_topics.topicID, ".PREFIX."forum_topics.topic, ".PREFIX."forum_posts.date, ".PREFIX."forum_posts.message FROM ".PREFIX."forum_posts, ".PREFIX."forum_topics WHERE ".PREFIX."forum_posts.poster='$id' AND ".PREFIX."forum_posts.topicID=".PREFIX."forum_topics.topicID ".$intern." ORDER BY date DESC LIMIT 0,".$profilelast); if(mysql_num_rows($posts)) { $n=1; while($db=mysql_fetch_array($posts)) { $n%2 ? $bgcolor1=BG_1 : $bgcolor1=BG_2; $n%2 ? $bgcolor2=BG_3 : $bgcolor2=BG_4; $posttime=date("d.m.y h:i",$db[date]); if(strlen($db['message']) > 100) $message=substr($db['message'],0,90+strpos(substr($db['message'],90,strlen($db['message']))," "))."..."; else $message = $db['message']; $postlist.='
'.$posttime.'
'.$db[topic].'
 
'.clearfromtags($message).'
 
'; $n++; } } else $postlist=' no posts '; eval ("\$profile = \"".gettemplate("profile_lastposts")."\";"); echo $profile; //user guestbook } elseif($_GET['action'] == "guestbook") { if($_POST['save']) { include("_mysql.php"); include("_settings.php"); include("_functions.php"); $date = time(); $ip = getenv(REMOTE_ADDR); $run=0; if($userID) { $name=getnickname($userID); $email=getemail($userID); $url=gethomepage($userID); $icq=geticq($userID); $run=1; } else { $name = $_POST['gbname']; $email = $_POST['gbemail']; $url = $_POST['gburl']; $icq = $_POST['icq']; $CAPCLASS = new Captcha; if($CAPCLASS->check_captcha($_POST['captcha'], $_POST['captcha_hash'])) $run=1; } if($run) { safe_query("INSERT INTO ".PREFIX."user_gbook (userID, date, name, email, hp, icq, ip, comment) values('$id', '$date', '".$_POST['gbname']."', '".$_POST['gbemail']."', '".$_POST['gburl']."', '".$_POST['icq']."', '$ip', '".$_POST['message']."')"); if($id != $userID) sendmessage($id,'New guestbook entry in your profile!','[b]There is a new guestbook entry![/b]\n\n [URL=index.php?site=profile&action=guestbook&id='.$id.']Click here[/URL] '); } redirect("index.php?site=profile&action=guestbook&id=$id",'',0); } elseif($_GET['delete']) { include("_mysql.php"); include("_settings.php"); include("_functions.php"); if(!isanyadmin($userID) AND $id != $userID) die('no access!'); foreach($_POST['gbID'] as $gbook_id) { safe_query("DELETE FROM ".PREFIX."user_gbook WHERE gbID='$gbook_id'"); } redirect("index.php?site=profile&action=guestbook&id=$id",'',0); } else { eval ("\$title_profile = \"".gettemplate("title_profile")."\";"); echo $title_profile; $gesamt = mysql_num_rows(safe_query("SELECT gbID FROM ".PREFIX."user_gbook WHERE userID='".$id."'")); $page = $_GET['page']; $type = $_GET['type']; $pages=1; if(!isset($page)) $page = 1; if(!isset($type)) $type = "DESC"; $max=$maxguestbook; for ($n=$max; $n<=$gesamt; $n+=$max) { if($gesamt>$n) $pages++; } if($pages>1) $page_link = makepagelink("index.php?site=guestbook&type=$type", $page, $pages); if ($page == 1) { $ergebnis = safe_query("SELECT * FROM ".PREFIX."user_gbook WHERE userID='$id' ORDER BY date $type LIMIT 0,$max"); if($type=="DESC") $n=$gesamt; else $n=1; } else { $start=$page*$max-$max; $ergebnis = safe_query("SELECT * FROM ".PREFIX."user_gbook WHERE userID='$id' ORDER BY date $type LIMIT $start,$max"); if($type=="DESC") $n = $all-($page-1)*$max; else $n = ($page-1)*$max+1; } if($type=="ASC") $sorter='Sort:    '; else $sorter='Sort:    '; echo'
'.$sorter.' '.$page_link.'
'; echo '
'; while ($ds = mysql_fetch_array($ergebnis)) { $n%2 ? $bg1=BG_1 : $bg1=BG_2; $date = date("d.m.Y - H:i", $ds[date]); $sem = '^[a-z0-9_\.-]+@[a-z0-9_-]+\.[a-z0-9_\.-]+$'; if(eregi($sem, $ds[email])) $email = 'email'; else $email=''; $sem = '^[http://]+[a-z0-9_\.-]+[a-z0-9_-]+$'; if(eregi($sem, $ds[hp])) $hp='homepage'; else $hp=''; $sem = '[0-9]{7,11}'; $icq_number = str_replace('-','',$ds[icq]); if(eregi($sem, $icq_number)) $icq = 'icq'; else $icq=""; $name=strip_tags($ds[name]); $message=cleartext($ds[comment]); $quotemessage=strip_tags($ds[comment]); $quotemessage=str_replace("'", "`", $quotemessage); $actions=''; $ip='logged'; $quote='quote'; if(isfeedbackadmin($userID)) { $actions=''; $ip=$ds[ip]; } eval ("\$profile_guestbook = \"".gettemplate("profile_guestbook")."\";"); echo $profile_guestbook; if($type=="DESC") $n--; else $n++; } if(isfeedbackadmin($userID)) $submit=' select all '; echo'
'.$page_link.' '.$submit.'
'; echo''; if($loggedin) { $name=getnickname($userID); $email=getemail($userID); $url=gethomepage($userID); $icq=geticq($userID); eval ("\$profile_guestbook_loggedin = \"".gettemplate("profile_guestbook_loggedin")."\";"); echo $profile_guestbook_loggedin; } else { $CAPCLASS = new Captcha; $captcha = $CAPCLASS->create_captcha(); $hash = $CAPCLASS->get_hash(); $CAPCLASS->clear_oldcaptcha(); eval ("\$profile_guestbook_notloggedin = \"".gettemplate("profile_guestbook_notloggedin")."\";"); echo $profile_guestbook_notloggedin; } } //profil: home } else { eval ("\$title_profile = \"".gettemplate("title_profile")."\";"); echo $title_profile; $date=time(); $ergebnis=safe_query("SELECT * FROM ".PREFIX."user WHERE userID='$id' "); $anz=mysql_num_rows($ergebnis); $ds=mysql_fetch_array($ergebnis); if($userID!=$id && $userID!=0) { safe_query("UPDATE ".PREFIX."user SET visits=visits+1 WHERE userID='$id'"); if(mysql_num_rows(safe_query("SELECT visitID FROM ".PREFIX."user_visitors WHERE userID='$id' AND visitor='$userID' "))) safe_query("UPDATE ".PREFIX."user_visitors SET date='$date' WHERE userID='$id' AND visitor='$userID'"); else safe_query("INSERT INTO ".PREFIX."user_visitors (userID, visitor, date) values ('$id', '$userID', '$date')"); } $anzvisits=$ds[visits]; if($ds[userpic]) $userpic=''; else $userpic=''; $nickname=$ds[nickname]; if(isclanmember($id)) $member=' Clanmember'; else $member=''; $registered=date("d.m.Y - H:i", $ds[registerdate]); $lastlogin=date("d.m.Y - H:i", $ds[lastlogin]); if($ds[avatar]) $avatar=''; else $avatar='n/a'; $status=isonline($ds[userID]); $email='e-mail'; $sem = '[0-9]{7,11}'; if(eregi($sem, $ds[icq])) $icq = 'icq'; else $icq='n/a'; if($loggedin && $ds[userID] != $userID) { $pm='messenger'; if(isignored($userID, $ds[userID])) $buddy='back to buddy-list'; elseif(isbuddy($userID, $ds[userID])) $buddy='ignore user'; elseif($userID==$ds[userID]) $buddy=''; else $buddy='add to buddylist'; } if($ds[homepage]) { if(eregi('http://', $ds[homepage])) $homepage=''.htmlspecialchars($ds[homepage]).''; else $homepage='http://'.htmlspecialchars($ds[homepage]).''; } $clanhistory=clearfromtags($ds[clanhistory]); if($clanhistory=='') $clanhistory="n/a"; $clanname=clearfromtags($ds[clanname]); if($clanname=='') $clanname="n/a"; $clanirc=clearfromtags($ds[clanirc]); if($clanirc=='') $clanirc="n/a"; if($ds[clanhp]=='' OR $ds[clanhp]=='n/a') $clanhp = 'n/a'; else { if(eregi('http://', $ds[clanhp])) $clanhp=''.htmlspecialchars($ds[clanhp]).''; else $clanhp=''.htmlspecialchars($ds[clanhp]).''; } $clantag=clearfromtags($ds[clantag]); if($clantag=='' OR $clantag=='n/a') $clantag=""; else $clantag = $clantag.' / '; $firstname=clearfromtags($ds[firstname]); $lastname=clearfromtags($ds[lastname]); $birthday=substr($ds[birthday],0,10); $res = mysql_query("SELECT birthday, DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW()) - TO_DAYS(birthday)), '%y') 'age' FROM ".PREFIX."user WHERE userID = '$id'"); $cur = mysql_fetch_array($res); $birthday=$birthday." (".$cur['age']." years)"; if($ds[sex]=="m") $sex='male'; else $sex='female'; $flag = '[flag]'.$ds[country].'[/flag]'; $profilecountry=flags($flag); $town=clearfromtags($ds[town]); $cpu=clearfromtags($ds[cpu]); $mainboard=clearfromtags($ds[mainboard]); $ram=clearfromtags($ds[ram]); $monitor=clearfromtags($ds[monitor]); $graphiccard=clearfromtags($ds[graphiccard]); $soundcard=clearfromtags($ds[soundcard]); $connection=clearfromtags($ds[verbindung]); $keyboard=clearfromtags($ds[keyboard]); $mouse=clearfromtags($ds[mouse]); $mousepad=clearfromtags($ds[mousepad]); $anznewsposts=getusernewsposts($ds[userID]); $anzforumtopics=getuserforumtopics($ds[userID]); $anzforumposts=getuserforumposts($ds[userID]); $comments[]=getusercomments($ds[userID], 'ne'); $comments[]=getusercomments($ds[userID], 'cw'); $comments[]=getusercomments($ds[userID], 'ar'); $comments[]=getusercomments($ds[userID], 'de'); $pmgot=0; $pmgot=$ds[pmgot]; $pmsent=0; $pmsent=$ds[pmsent]; if($ds[about]) $about=cleartext($ds[about]); else $about="n/a"; if(isforumadmin($ds[userID])) { $usertype="Administrator"; $rang=''; } elseif(isanymoderator($ds[userID])) { $usertype="Moderator"; $rang=''; } else { $posts = getuserforumposts($ds[userID]); $ergebnis=safe_query("SELECT * FROM ".PREFIX."forum_ranks WHERE $posts >= postmin AND $posts <= postmax"); $ds=mysql_fetch_array($ergebnis); $usertype=$ds[rank]; $rang=''; } $visitors=safe_query("SELECT * FROM ".PREFIX."user_visitors WHERE userID='$id' ORDER BY date DESC LIMIT 0,10"); if(mysql_num_rows($visitors)) { $n=1; while($dv=mysql_fetch_array($visitors)) { $n%2 ? $bgcolor=BG_1 : $bgcolor=BG_2; $flag = '[flag]'.getcountry($dv[visitor]).'[/flag]'; $country=flags($flag); $nicknamevisitor=getnickname($dv[visitor]); if(isonline($dv[visitor])=="offline") $statuspic='offline'; else $statuspic='online'; $time=time(); $visittime=$dv[date]; $sec=$time-$visittime; $days=$sec/86400; // sekunden / (60*60*24) $days=substr($days, 0, strpos($days,".")); // kommastelle $sec=$sec-$days*86400; $hours=$sec/3600; $hours=substr($hours, 0, strpos($hours,".")); $sec=$sec-$hours*3600; $minutes=$sec/60; $minutes=substr($minutes, 0, strpos($minutes,".")); if($time-$visittime<60) { $now="now"; $days=""; $hours=""; $minutes=""; } else { $now=''; $days==0 ? $days="" : $days=$days.'d'; $hours==0 ? $hours="" : $hours=$hours.'h'; $minutes==0 ? $minutes="" : $minutes=$minutes.'m'; } $lastvisits.='
'.$country.' '.$nicknamevisitor.' '.$now.$days.$hours.$minutes.' '.$statuspic.'
'; $n++; } } else $lastvisits=' no visits '; $bg1=BG_1; $bg2=BG_2; $bg3=BG_3; $bg4=BG_4; eval ("\$profile = \"".gettemplate("profile")."\";"); echo $profile; } } else { redirect('index.php?site=news', 'no userid set!'); } ?>