'.getnickname($userID).'';
$lastlogin = date('d.m.Y, H:i',$_SESSION['ws_lastlogin']);
$registerdate = date('d.m.Y, H:i',$ds[registerdate]);
//messages?
$newmessages = getnewmessages($userID);
if($newmessages==1) $newmessages='There is one new message.';
elseif($newmessages>1) $newmessages='There are '.$newmessages.' new messages.';
else $newmessages='No new messages.';
//boardposts?
$posts=safe_query("SELECT p.topicID, p.date, p.message, t.topic FROM `".PREFIX."forum_posts` AS p, `".PREFIX."forum_topics` AS t WHERE p.date>".$_SESSION['ws_lastlogin']." AND p.topicID = t.topicID AND t.intern<=".isinternboarduser($userID));
$topics=safe_query("SELECT * FROM ".PREFIX."forum_topics WHERE intern<=".isinternboarduser($userID)." AND date>".$_SESSION['ws_lastlogin']);
$new_posts=mysql_num_rows($posts);
$new_topics=mysql_num_rows($topics);
//new topics
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.='
|
';
$n++;
}
}
else $topiclist='
no new topics |
';
//new posts
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.='
|
';
$n++;
}
}
else $postlist='
no new posts |
';
//clanmember/admin/referer
if(isclanmember($userID)) $cashboxpic = ' | | '; else $cashboxpic = ' | | ';
if(isanyadmin($userID)) $admincenterpic = ' | | '; else $admincenterpic = ' | | ';
if(isset($_SESSION['referer'])) { $referer_uri = 'Back to last page |
'; unset($_SESSION['referer']); }
//upcoming
if(isclanmember($userID)) {
$clanwars .= '
Upcoming clanwars |
';
$squads=safe_query("SELECT squadID FROM `".PREFIX."squads_members` WHERE userID='".$userID."'");
while($squad=mysql_fetch_array($squads)) {
if(isgamesquad($squad[squadID])) {
$dn=mysql_fetch_array(safe_query("SELECT name FROM `".PREFIX."squads` WHERE squadID='".$squad[squadID]."' AND gamesquad='1'"));
$clanwars .= 'Squad: '.$dn[name].' |
';
$n = 1;
$ergebnis=safe_query("SELECT * FROM `".PREFIX."upcoming` WHERE type='c' AND squad='".$squad[squadID]."' AND date>".time()." ORDER by date");
$anz = mysql_num_rows($ergebnis);
if($anz) {
$clanwars .= 'Date | against | Announcement | announce | ';
while($ds=mysql_fetch_array($ergebnis)) {
if($n%2) {
$bg1=BG_3;
$bg2=BG_4;
$bg3=BG_1;
$bg4=BG_2;
}
else {
$bg1=BG_2;
$bg2=BG_3;
$bg3=BG_4;
$bg4=BG_1;
}
$date=date("d.m.y", $ds[date]);
$anmeldung=safe_query("SELECT * FROM ".PREFIX."upcoming_announce WHERE upID='$ds[upID]' ");
if(mysql_num_rows($anmeldung)) {
$i=1;
unset($players);
while ($da = mysql_fetch_array($anmeldung)) {
if ($da[status] == "y") $fontcolor = $wincolor;
elseif ($da[status] == "n") $fontcolor = $loosecolor;
else $fontcolor = $drawcolor;
if($i>1) $players.=', '.getnickname($da[userID]).'';
else $players.=''.getnickname($da[userID]).'';
$i++;
}
} else $players='no players announced';
$tag = date("d", $ds[date]);
$monat = date("m", $ds[date]);
$yahr = date("Y", $ds[date]);
$clanwars .= ''.$date.' | '.$ds[opptag].' / '.$ds[opponent].' | '.$players.' | click | ';
$n++;
}
$clanwars .= '
|
';
} else $clanwars .= 'no entries';
}
}
$clanwars.=' |
';
}
unset($events);
$ergebnis=safe_query("SELECT * FROM `".PREFIX."upcoming` WHERE type='d' AND date>".time()." ORDER by date");
$anz = mysql_num_rows($ergebnis);
if($anz) {
while($ds=mysql_fetch_array($ergebnis)) {
if($n%2) {
$bg1=BG_3;
$bg2=BG_4;
$bg3=BG_1;
$bg4=BG_2;
}
else {
$bg1=BG_2;
$bg2=BG_3;
$bg3=BG_4;
$bg4=BG_1;
}
$events.=''.$ds[title].' | '.date('d.m.y, h:i', $ds[date]).' | '.date('d.m.y, h:i', $ds[enddate]).' | '.$ds[location].' | click |
';
}
} else $events='No events |
';
$bg1=BG_1;
$bg2=BG_2;
$bg3=BG_3;
$bg4=BG_4;
eval ("\$loginoverview = \"".gettemplate("loginoverview")."\";");
echo $loginoverview;
} else echo'You have to be logged in to view the login overview!
• register now
• log in';
?>