Also ich hab ne kleine Community. Unter anderem kann na durch ein php Script sehen, wer gerade online ist. Jetzt würde ich es gerne so machen, dass männlein und weiblein durch unterschiedliche Farben herforgehebt werden. Kann mir vielleicht jemand helfen?!?! ;-) VIELEN DANK!!!
<?php
global $advertise,$db_handle,$cfg,$BaseCfg,$HTTP_POST_VARS,$HTTP_SESSION_VARS,$counter;
if(isset($counter)) {$out = $counter;}
else {
$result = $db_handle->query("SELECT community, COUNT(community) as anzahl FROM csb_onlinecounter group by community");
$gaeste = 0;
$member = 0;
$chat = 0;
while ($dbdata = $db_handle->fetch_array($result)) {
if($dbdata['community'] == 'n') $gaeste = $dbdata['anzahl'];
else $member = $dbdata['anzahl'];
}
$db_handle->free_result($result);
if(eregi("#chat#",$cfg['003'])) {
$dbdata = $db_handle->query_once("SELECT COUNT(nick) as anzahl FROM csb_onlinecounter where query LIKE '%chatcenter%' and time + 240 > UNIX_TIMESTAMP(NOW())");
$chat = $dbdata['anzahl'];
}
$user = $gaeste + $member;
$out = str_replace("#guest#",$gaeste,$cfg['003']);
$out = str_replace("#user#",$user,$out);
$out = str_replace("#chat#",$chat,$out);
$out = str_replace("#member#",$member,$out);
if($output==1) {
$result = $db_handle->query("SELECT ************,age,nick,privat FROM csb_onlinecounter where community='y' and privat < 2 order by time,************ desc,age LIMIT 0,100");
$outputC = "";
$outputM = "";
while ($dbdata = $db_handle->fetch_array($result)) {
if(strlen($dbdata['nick']) != 32 && $dbdata['nick'] != '') $outputC .= "<option value='$dbdata[nick]'>$dbdata[nick]</option>\n";
}
$db_handle->free_result($result);
$out = str_replace("#out#",$out,$cfg['004']);
$out = str_replace("#nicks#",$outputC,$out);
} else {$out = "<a href=\"$BaseCfg[CommURL]/community/useronline.php?$HTTP_SESSION_VARS[SIDl]\">$out</a>"; }
}
?>
<?php
global $advertise,$db_handle,$cfg,$BaseCfg,$HTTP_POST_VARS,$HTTP_SESSION_VARS,$counter;
if(isset($counter)) {$out = $counter;}
else {
$result = $db_handle->query("SELECT community, COUNT(community) as anzahl FROM csb_onlinecounter group by community");
$gaeste = 0;
$member = 0;
$chat = 0;
while ($dbdata = $db_handle->fetch_array($result)) {
if($dbdata['community'] == 'n') $gaeste = $dbdata['anzahl'];
else $member = $dbdata['anzahl'];
}
$db_handle->free_result($result);
if(eregi("#chat#",$cfg['003'])) {
$dbdata = $db_handle->query_once("SELECT COUNT(nick) as anzahl FROM csb_onlinecounter where query LIKE '%chatcenter%' and time + 240 > UNIX_TIMESTAMP(NOW())");
$chat = $dbdata['anzahl'];
}
$user = $gaeste + $member;
$out = str_replace("#guest#",$gaeste,$cfg['003']);
$out = str_replace("#user#",$user,$out);
$out = str_replace("#chat#",$chat,$out);
$out = str_replace("#member#",$member,$out);
if($output==1) {
$result = $db_handle->query("SELECT ************,age,nick,privat FROM csb_onlinecounter where community='y' and privat < 2 order by time,************ desc,age LIMIT 0,100");
$outputC = "";
$outputM = "";
while ($dbdata = $db_handle->fetch_array($result)) {
if(strlen($dbdata['nick']) != 32 && $dbdata['nick'] != '') $outputC .= "<option value='$dbdata[nick]'>$dbdata[nick]</option>\n";
}
$db_handle->free_result($result);
$out = str_replace("#out#",$out,$cfg['004']);
$out = str_replace("#nicks#",$outputC,$out);
} else {$out = "<a href=\"$BaseCfg[CommURL]/community/useronline.php?$HTTP_SESSION_VARS[SIDl]\">$out</a>"; }
}
?>
Kommentar