Hallo,
Brauche auch den Code geändert für die Online box damit der
Instant Messenger auch in der online box angezeigt wird und geöffnet werden kann.
Hier meine jetzige online Box
<?php
#error_reporting(E_ALL);
if (!defined('main')) {die("no direct access");}
$dif = date('Y-m-d H:i:s', time() - 60);
$abf = "SELECT uid FROM `prefix_online` WHERE uptime > '". $dif."' limit 5";
$resultID = db_query($abf);
$brk='';
$uid = array();
$guests = 0;
$guestn = $lang['guests'];
$content='';
while ($row = db_fetch_object($resultID)) {
if ($row->uid != 0 AND $brk!=$row->uid) {
$abf1 = db_query("SELECT id,name, geschlecht, gebdatum FROM prefix_user WHERE id= '".$row->uid."' ");
$row1 = db_fetch_object($abf1);
if ($row->uid != 0 AND $brk!=$row->uid) {
$t1 = 0;
$t2 = 0;
$t3 = 0;
$age1=explode("-",$row1->gebdatum);
$age2 = date("Y",time())-$age1[0];
$a=explode("-",$row1->gebdatum);
$tag = $a[2];
$mon = $a[1];
$jah = $a[0];
if ($mon > date("m")){$t1 = 2;}
if ($mon == date("m")){$t1 = 1;}
if ($tag > date("d")){$t2 = 1;}
$t3 = ($t1 + $t2);
if ($t3 > 1){
$age = ($age2 -1);
}else{
$age = $age2;
}
if ($row1->geschlecht == 0){
if ($row1->gebdatum != 0000-00-00 ){
$content.= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"></td>';
$content.='<td><a href="index.php?user-details-'.$row->uid.'">('.$age.') '.$row1->name.'</a></td></tr>'."\n";
$uid[] = $row->uid;
}else{
$content.= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"></td>';
$content.='<td><a href="index.php?user-details-'.$row->uid.'">'.$row1->name.'</a></td></tr>'."\n";
$uid[] = $row->uid;
}
}
elseif ($row1->geschlecht == 1){
if ($row1->gebdatum != 0000-00-00 ){
$content.= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"></td>';
$content.='<td><a href="index.php?user-details-'.$row->uid.'">(M-'.$age.') '.$row1->name.'</a></td></tr>'."\n";
$uid[] = $row->uid;
}else{
$content.= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"></td>';
$content.='<td><a href="index.php?user-details-'.$row->uid.'">(M) '.$row1->name.'</a></td></tr>'."\n";
$uid[] = $row->uid;
}
}
elseif ($row1->geschlecht == 2){
if ($row1->gebdatum != 0000-00-00 ){
$content.= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"></td>';
$content.='<td><a href="index.php?user-details-'.$row->uid.'">(W-'.$age.') '.$row1->name.'</a></td></tr>'."\n";
$uid[] = $row->uid;
}else{
$content.= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"></td>';
$content.='<td><a href="index.php?user-details-'.$row->uid.'">(W) '.$row1->name.'</a></td></tr>'."\n";
$uid[] = $row->uid;
}
}
}
}
if ($row->uid == 0) { $guests++; }
$brk=$row->uid;
}
if ($guests == 1) { $guestn = $lang['guest']; }
if (empty($content)) { $content.='<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><font color="#003366">0 User </font></td></tr>'."\n"; }
$content.='<tr><td colspan="2"><hr style="height: 0px; border: dashed #9AB1C8 0px; border-top-width: 1px;"></td></tr>'."\n";
$where = (count($uid)>0) ? 'WHERE id NOT IN ('.implode(', ', $uid).')' : '';
$abf2 = 'SELECT * FROM prefix_user '.$where.' ORDER BY llogin DESC LIMIT 0,5';
$erg2 = db_query($abf2);
while ($row2 = db_fetch_object($erg2)) {
$datum = date('H:i d.m.y',$row2->llogin);
$user = $row2->name;
$abf2 = db_query("SELECT id,name, geschlecht, gebdatum FROM prefix_user WHERE id= '".$row2->id."' ");
$row0 = db_fetch_object($abf2);
$t1 = 0;
$t2 = 0;
$t3 = 0;
$age1=explode("-",$row0->gebdatum);
$age = date("Y",time())-$age1[0];
$geb = $row0->gebdatum;
$a = explode('-', $geb);
$endung = $a[count($a) - 1];
$tag = $a[2];
$mon = $a[1];
$jah = $a[0];
if ($mon > date("m")){$t1 = 2;}
if ($mon == date("m")){$t1 = 1;}
if ($tag > date("d")){$t2 = 1;}
$t3 = ($t1 + $t2);
if ($t3 > 1){$age2 = ($age -1);}
else{$age2 = $age;}
if ($row0->geschlecht == 0){
if ($row0->gebdatum != 0000-00-00 ){
$content.='<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><a href="index.php?user-details-'.$row0->id.'" title="'.$lang['lasttimeonline'].$datum.'">('.$age.') '.$row0->name.'</a></td></tr>'."\n";
}else{
$content.='<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><a href="index.php?user-details-'.$row0->id.'" title="'.$lang['lasttimeonline'].$datum.'">'.$row0->name.'</a></td></tr>'."\n";
}
}
elseif ($row0->geschlecht == 1){
if ($row0->gebdatum != 0000-00-00 ){
$content.='<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><a href="index.php?user-details-'.$row0->id.'" title="'.$lang['lasttimeonline'].$datum.'">(M-'.$age.') '.$row0->name.'</a></td></tr>'."\n";
}else{
$content.='<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><a href="index.php?user-details-'.$row0->id.'" title="'.$lang['lasttimeonline'].$datum.'">(M) '.$row0->name.'</a></td></tr>'."\n";
}
}
elseif ($row0->geschlecht == 2){
if ($row0->gebdatum != 0000-00-00 ){
$content.='<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><a href="index.php?user-details-'.$row0->id.'" title="'.$lang['lasttimeonline'].$datum.'">(W-'.$age.') '.$row0->name.'</a></td></tr>'."\n";
}else{
$content.='<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><a href="index.php?user-details-'.$row0->id.'" title="'.$lang['lasttimeonline'].$datum.'">(W) '.$row0->name.'</a></td></tr>'."\n";
}
}
}
if ($guests == 0) {
$content.= '<tr><td colspan="2"><hr style="height: 0px; border: dashed #9AB1C8 0px; border-top-width: 1px";></td></tr>'."\n".'
<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><font size="-1" color="#003366">0 '.$lang['guests'].'</td></tr>'."\n";
} else {
$content.= '<tr><td colspan="2"><hr style="height: 0px; border: dashed #9AB1C8 0px; border-top-width: 1px;"></td></tr>'."\n".'
<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"></td><td><font size=-1>'.$guests.' '.$guestn.'</font></td></tr>'."\n";
}
?>
<table align="center" border="0" cellpadding="0" cellspacing="0" >
<?php echo $content; ?>
</table>
! Bitte Code im vorgesehenen Tag [code] setzen. Siehe
über dem Eingabefeld.
BBCode Hilfe. Gruß Lord|S.
!
Zuletzt modifiziert von Lord|Schirmer am 14.11.2012 - 21:56:34