Und zwar wenn du auf der Homepage drauf bist sollte normalerweise in dein Profil "Online" stehn aber leider steht da "offline" da was vergessen wurde..
BSP:
So sieht es mit dem Fehler aus(NICHT KOPIEREN!!)
<?php # Copyright by: Manuel Staechele # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $uid = $menu->get(2); #Award Ausgabe $awards = ''; $ax = 0; $sqlA = db_query("SELECT a.platz, a.text, a.wofur, a.team, a.bild, DATE_FORMAT(a.`time`, '%d.%m.%Y') AS time FROM `prefix_awards` a INNER JOIN prefix_user b ON a.team = b.name WHERE b.id = ".$uid." ORDER BY `time` ASC"); while($rowA = db_fetch_assoc($sqlA)) { $ax++; if ($ax == 8) {$awards .= "<br>"; $ax = 0;} $awards .= (!empty($rowA['bild']) ? '<img style="padding:1px;border:0px;" src="'.$rowA['bild'].'" alt="'.$rowA['wofur'].'" title="'.$rowA['wofur'].'"/>' : $rowA['wofur']); } $awards = '<b><b><br><div style="text-align:center;">'.$awards.'</div>'; $lastbes_anz = 5; //Bei höhere Anzahl muss ggf. in der Datenbank die Größe der Felder bzw der Typ geändert werden if ($_SESSION['authid'] != $uid AND $_SESSION['authid'] != 0) { $lb = db_fetch_object(db_query('SELECT last_bes, last_user_time FROM prefix_user WHERE id = '.$uid)); $lba = explode('#',$lb->last_bes); $lbt = explode('#',$lb->last_user_time); $i = array_search($_SESSION['authid'],$lba); if ($i !== false) { unset($lba[$i]); unset($lbt[$i]); } elseif (count($lba) >= $lastbes_anz) { $lba = array_slice($lba,0,$lastbes_anz-1); $lbt = array_slice($lbt,0,$lastbes_anz-1); } array_unshift($lba,$_SESSION['authid']); array_unshift($lbt,time()); $i_lb = implode('#',$lba); $i_lbt = implode('#',$lbt); db_query("UPDATE prefix_user SET last_bes = '$i_lb', last_user_time = '$i_lbt' WHERE id = $uid"); } include('user_infos.php'); $ar = array ( 'UID' => $uid, 'NAME' => $row['name'], 'JOINED' => date('d.m.Y',$row['regist']), 'LASTAK' => date('d.m.Y - H:i',$row['llogin']), 'POSTS' => $row['posts'], 'postpday' => $postpday, 'RANG' => userrang ($row['posts'],$uid), 'AVATA' => $avatar, 'LASTUSER' => last_user($uid), 'STATUS2' => $online, 'USERTITEL' => $usertitel, 'EMAIL' => $email, 'HOMEPAGE' => $homepage, 'GESCHLECHT' => $geschlecht, 'GEBDATUM' => $gebdatum, 'ALTER' => $alter, 'WOHNORT' => $wohnort, 'FORUMTOPICS' => $row4['forumtopics'], 'NEWSTOPICS' => $row5['newstopics'], 'NEWSPOSTS' => $row6['newsposts'], 'FORUMPOSTS' => $row7['forumposts'], 'SIGNATUR' => bbcode($row['sig']), 'STAAT' => $staat, 'UID' => $uid, 'STERNZEICHEN' => $sternzeichen, 'GB_EINTRAEGE' => $gb_eintraege, 'GALLERIE_EINTRAEGE' => $gallery_eintraege, 'ICQ' => $icq, 'GAME' => $game, 'SPIELERFAHRUNG' => $spielerfahrungen, 'CLAN' => $clan, 'MAP' => $map, 'WAFFE' => $waffe, 'ESSEN' => $essen, 'TRINKEN' => $trinken, 'FILM' => $film, 'MUSIK' => $musik, 'SPORT' => $sport, 'CPU' => $cpu, 'MAINBOARD' => $mainboard, 'RAM' => $ram, 'MONITOR' => $monitor, 'GRAFIKKARTE' => $grafikkarte, 'SOUNDKARTE' => $soundkarte, 'FESTPLATTE' => $festplatte, 'I_NET_VERBINDUNG' => $i_net_verbindung, 'TASTATUR' => $tastatur, 'MAUS' => $maus, 'JAPPY' => $jappy, 'FACEBOOK' => $facebook, 'WKW' => $wkw, 'STUDIVZ' => $studivz, 'MYSPACE' => $myspace, 'YOUTUBE' => $youtube, 'AWARDS' => $awards, ); $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> <a href=index.php?user-details-'.$uid.'>Details von '.$row['name']."</a>".$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/userdetails' ); $l = profilefields_show ( $uid ); $ar['rowspan'] = 4 + substr_count($l, '<tr><td class="'); $ar['profilefields'] = $l; $tpl->set_ar_out($ar,0); $design->footer(); ?>
Und so sollte es aussehn(NICHT KOPIEREN!!!!)
<?php # Copyright by: Manuel Staechele # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $uid = $menu->get(2); #Award Ausgabe $awards = ''; $ax = 0; $sqlA = db_query("SELECT a.platz, a.text, a.wofur, a.team, a.bild, DATE_FORMAT(a.`time`, '%d.%m.%Y') AS time FROM `prefix_awards` a INNER JOIN prefix_user b ON a.team = b.name WHERE b.id = ".$uid." ORDER BY `time` ASC"); while($rowA = db_fetch_assoc($sqlA)) { $ax++; if ($ax == 8) {$awards .= "<br>"; $ax = 0;} $awards .= (!empty($rowA['bild']) ? '<img style="padding:1px;border:0px;" src="'.$rowA['bild'].'" alt="'.$rowA['wofur'].'" title="'.$rowA['wofur'].'"/>' : $rowA['wofur']); } $awards = '<b><b><br><div style="text-align:center;">'.$awards.'</div>'; $lastbes_anz = 5; //Bei höhere Anzahl muss ggf. in der Datenbank die Größe der Felder bzw der Typ geändert werden if ($_SESSION['authid'] != $uid AND $_SESSION['authid'] != 0) { $lb = db_fetch_object(db_query('SELECT last_bes, last_user_time FROM prefix_user WHERE id = '.$uid)); $lba = explode('#',$lb->last_bes); $lbt = explode('#',$lb->last_user_time); $i = array_search($_SESSION['authid'],$lba); if ($i !== false) { unset($lba[$i]); unset($lbt[$i]); } elseif (count($lba) >= $lastbes_anz) { $lba = array_slice($lba,0,$lastbes_anz-1); $lbt = array_slice($lbt,0,$lastbes_anz-1); } array_unshift($lba,$_SESSION['authid']); array_unshift($lbt,time()); $i_lb = implode('#',$lba); $i_lbt = implode('#',$lbt); db_query("UPDATE prefix_user SET last_bes = '$i_lb', last_user_time = '$i_lbt' WHERE id = $uid"); } include('user_infos.php'); $abf8 = "SELECT * FROM prefix_online WHERE uid = '".$uid."'"; $erg8 = db_query($abf8); $row8 = db_fetch_assoc($erg8); if(isset($row8['uid'])){ $online = '<img src="include/images/forum/uonline.png" alt="online" border="0"/>'; }else{ $online = '<img src="include/images/forum/uoffline.png" alt="offline" border="0" />'; } $ar = array ( 'UID' => $uid, 'NAME' => $row['name'], 'JOINED' => date('d.m.Y',$row['regist']), 'LASTAK' => date('d.m.Y - H:i',$row['llogin']), 'POSTS' => $row['posts'], 'postpday' => $postpday, 'RANG' => userrang ($row['posts'],$uid), 'AVATA' => $avatar, 'LASTUSER' => last_user($uid), 'STATUS2' => $online, 'USERTITEL' => $usertitel, 'EMAIL' => $email, 'HOMEPAGE' => $homepage, 'GESCHLECHT' => $geschlecht, 'GEBDATUM' => $gebdatum, 'ALTER' => $alter, 'WOHNORT' => $wohnort, 'FORUMTOPICS' => $row4['forumtopics'], 'NEWSTOPICS' => $row5['newstopics'], 'NEWSPOSTS' => $row6['newsposts'], 'FORUMPOSTS' => $row7['forumposts'], 'SIGNATUR' => bbcode($row['sig']), 'STAAT' => $staat, 'UID' => $uid, 'STERNZEICHEN' => $sternzeichen, 'GB_EINTRAEGE' => $gb_eintraege, 'GALLERIE_EINTRAEGE' => $gallery_eintraege, 'ICQ' => $icq, 'GAME' => $game, 'SPIELERFAHRUNG' => $spielerfahrungen, 'CLAN' => $clan, 'MAP' => $map, 'WAFFE' => $waffe, 'ESSEN' => $essen, 'TRINKEN' => $trinken, 'FILM' => $film, 'MUSIK' => $musik, 'SPORT' => $sport, 'CPU' => $cpu, 'MAINBOARD' => $mainboard, 'RAM' => $ram, 'MONITOR' => $monitor, 'GRAFIKKARTE' => $grafikkarte, 'SOUNDKARTE' => $soundkarte, 'FESTPLATTE' => $festplatte, 'I_NET_VERBINDUNG' => $i_net_verbindung, 'TASTATUR' => $tastatur, 'MAUS' => $maus, 'JAPPY' => $jappy, 'FACEBOOK' => $facebook, 'WKW' => $wkw, 'STUDIVZ' => $studivz, 'MYSPACE' => $myspace, 'YOUTUBE' => $youtube, 'AWARDS' => $awards, ); $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> <a href=index.php?user-details-'.$uid.'>Details von '.$row['name']."</a>".$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/userdetails' ); $l = profilefields_show ( $uid ); $ar['rowspan'] = 4 + substr_count($l, '<tr><td class="'); $ar['profilefields'] = $l; $tpl->set_ar_out($ar,0); $design->footer(); ?>
Es fehlt leider zwichen include('user_infos.php'); und $ar = array (
Und das fügt ihr dann da zwichen ein
$abf8 = "SELECT * FROM prefix_online WHERE uid = '".$uid."'"; $erg8 = db_query($abf8); $row8 = db_fetch_assoc($erg8); if(isset($row8['uid'])){ $online = '<img src="include/images/forum/uonline.png" alt="online" border="0"/>'; }else{ $online = '<img src="include/images/forum/uoffline.png" alt="offline" border="0" />'; }
Ich hoffe ich habe es Verständlich geschrieben
Wenn nicht nachfragen
betroffene Homepage: externer Link
Zuletzt modifiziert von Sunshine Live am 22.12.2010 - 22:34:41
Zuletzt modifiziert von Sunshine Live am 18.12.2011 - 15:53:11