ilch Forum » Ilch Clan 1.1 » Fehlersuche und Probleme » Instant Messenger

Geschlossen
  1. #1
    User Pic
    xRebellx Mitglied
    Registriert seit
    07.08.2012
    Beiträge
    577
    Beitragswertungen
    36 Beitragspunkte
    Hallo,

    Brauche 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.

    Wer kann mir da helfen??

    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>
    0 Mitglieder finden den Beitrag gut.
  2. #2
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    ->???????

    was für nen IM
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  3. #3
    User Pic
    xRebellx Mitglied
    Registriert seit
    07.08.2012
    Beiträge
    577
    Beitragswertungen
    36 Beitragspunkte
    Den Instant Messenger 1.0 von ilch
    0 Mitglieder finden den Beitrag gut.
  4. #4
    User Pic
    xRebellx Mitglied
    Registriert seit
    07.08.2012
    Beiträge
    577
    Beitragswertungen
    36 Beitragspunkte
    Hay,

    Weis denn keiner Rat ??
    0 Mitglieder finden den Beitrag gut.
  5. #5
    User Pic
    marco1978 Mitglied
    Registriert seit
    03.12.2008
    Beiträge
    116
    Beitragswertungen
    1 Beitragspunkte
    so habe dir das gemacht


    <?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."\"> ".$row1->name."</a>
    		             - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row->uid.", '".$row1->name."')\">IM</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>
    		             - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row->uid.", '".$row1->name."')\">IM</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>
    		             - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row->uid.", '".$row1->name."')\">IM</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>
    		             - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row->uid.", '".$row1->name."')\">IM</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>
    		             - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row->uid.", '".$row1->name."')\">IM</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>
    		             - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row->uid.", '".$row1->name."')\">IM</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>
     - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row0->id.", '".$row0->name."')\">IM</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>
     - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row0->id.", '".$row0->name."')\">IM</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>
     - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row0->id.", '".$row0->name."')\">IM</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>
     - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row0->id.", '".$row0->name."')\">IM</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>
     - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row0->id.", '".$row0->name."')\">IM</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>
     - <a href=\"javascript:void(0)\" onclick=\"javascript:chatWith(".$row0->id.", '".$row0->name."')\">IM</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>
    1 Mitglieder finden den Beitrag gut.
  6. #6
    User Pic
    xRebellx Mitglied
    Registriert seit
    07.08.2012
    Beiträge
    577
    Beitragswertungen
    36 Beitragspunkte
    Hallo marco1978,

    Du bist der beste :-) es funzt super :-)


    Danke das Du uns geholfen hast YesYesYesYesYesYesYesYes
    0 Mitglieder finden den Beitrag gut.
  7. #7
    User Pic
    marco1978 Mitglied
    Registriert seit
    03.12.2008
    Beiträge
    116
    Beitragswertungen
    1 Beitragspunkte
    bitte lächeln
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu Fehlersuche und Probleme

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten