Witam niedawno nabyłem skrypt statusy użytkowników
(każdy użytkownik ma możliwość ustawienia własnego statusu)
i teraz mam problem chciałem zmodyfikować kod "last seen user panel"
tak aby przy najechaniu na użytkownika pojawiał się dymek z opisem
ten kod działa ale nie wyświetlają się nazwy użytkowników.
Moje pytanie: Jak to naprawić tak aby działało poprawnie?
www.nfusion.pl<-- przykład takiego panelu
openos('Ostatnio siedzieli:');
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'>
<tr><td>";
echo "\n";
$result=dbquery("SELECT * FROM ep_users ORDER BY user_lastvisit DESC LIMIT 0,11");
if(dbrows($result)!=0){
while($data=dbarray($result)){
$lastseen=time()-$data['user_lastvisit'];
$iW=sprintf("%2d",floor($lastseen/604800));
$iD=sprintf("%2d",floor($lastseen/(60*60*24)));
$iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
$iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
$iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
if($lastseen<60){
$lastseen="<font color='#CCCCCC'><b>na stronie</b></font>";
}elseif($lastseen<360){
$lastseen="<font color='#BBBBBB'><b>odchodzi</b></font>";
}elseif($iW>0){
if($iW==1) $Text="".$locale['XXX_007']."";
elseif($iW==2 || $iW==3 || $iW==4) $Text="".$locale['XXX_011']."";
else $Text="".$locale['XXX_008']."";
$lastseen="$iW $Text";
}elseif($iD>0){
if($iD==1) $Text="".$locale['XXX_009']."";
else $Text="".$locale['lukaszXXX_010']."";
$lastseen="$iD $Text";
}else{
$lastseen="$iH:$iM:$iS";
}
if (!isset($start)) $start="";
$stats = dbarray(dbquery("SELECT * FROM ".$db_prefix."user_status"));
echo "<table width='100%' cellpadding='0' cellspacing='0' align='center'><tr><td class='small'>
<a title='".$statdata['stats']."' href='".BASEDIR."profile.php?lookup=$data[user_id]'
onmouseover=\"gpe('$start<center><b>° ".$locale['XXX_017']." °</b></center><hr><b>".$locale['XXX_003']."</b>: ".$data['user_prefix'].$data['user_name']."
</a><br><b>".$locale['XXX_004']."</b>: ".$data['user_location']."<br><b>".$locale['XXX_005']."</b>:".$data['user_msn']."<br>";$statdata = dbarray(dbquery("SELECT stats FROM ".$db_prefix."user_status WHERE user_id=$data[user_id]"));
echo $data['user_prefix'].$data['user_name']."</a></b></a></td><td align=\"right\" class='small'>".$lastseen."</td></tr></table>";
}
}
if ($settings['maintenance'] != "1") {
$cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'");
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user=".$cond."");
if (dbrows($result) != 0) {
$result = dbquery("UPDATE ".$db_prefix."online SET online_lastactive='".time()."' WHERE online_user=".$cond."");
} else {
$name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0");
$result = dbquery("INSERT INTO ".$db_prefix."online (online_user, online_ip, online_lastactive) VALUES ('$name', '".USER_IP."', '".time()."')");
}
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60)."");
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0'");
echo "<table width='100%' cellpadding='0' cellspacing='0' align='center'><tr><td class='small'> <b><span style=\"color: #C0C0C0\">".$locale['011']."</span></td><td align=\"right\" class='small'>".dbrows($result)."</b></td></tr></table>\n";
$result = dbquery(
"SELECT ton.*, user_id,user_name,user_color,user_prefix FROM ep_online ton
LEFT JOIN ep_users tu ON ton.online_user=tu.user_id
WHERE online_user!='0'"
);
} else {
echo $locale['013']."<br>\n";
}
echo "</td></tr></table>";
$stats = dbarray(dbquery("SELECT * FROM ".$db_prefix."user_status WHERE user_id=".$userdata['user_id'].""));
$user_status = $stats['stats'] != "" ? $stats['stats'] : "Status...";
echo "<br /><br />
<form name='user_status' method='post' action='".INFUSIONS."user_status/proccess.php'>
<input name='user_status' type='textbox' maxlength='200' size='18' value='".$user_status."' class='textbox'>
<input type='submit' value='ok' name='submit' class='button'></form>";
$statdata = dbarray(dbquery("SELECT stats FROM ".$db_prefix."user_status"));
echo ($statdata['stats'] ? $statdata['stats'] : $locale['u048'])."</td>\n</tr>\n";
closeos();
require_once "side_right.php";
require_once "footer.php";
Kliknij i zaczekaj na załadowanie kodu ...
Proszę o przeniesienie posta - pomyłka
PW od moderatora:
- Przeniesienie tematu - Pieka 22.11 - 12:55
Edytowane przez Pieka dnia 22.11.2008 12:56:49
|