Parašė GoN· 2007 Rugs. 23 17:09:12
#25
Kaip padaryti sitaip kad butu plz padekit :/
Jei mano draugai yra (mano_draugai) paneles index sitoks
<?php
openside("Draugai Online");
$lastseen=time()-120; // 120 sind 2 Minuten
echo"<table border='0' cellpadding='0' cellspacing='1' width='100%'>\n";
$result=dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit >=".$lastseen."");
while($data = dbarray($result)) {
$result_from=dbquery("SELECT * FROM ".$db_prefix."buddys WHERE
buddy_from = ".$userdata['user_id']." AND buddy_to = ".$data['user_id']."");
$data_from = dbarray($result_from);
$result_to=dbquery("SELECT * FROM ".$db_prefix."buddys WHERE
buddy_to = ".$userdata['user_id']." AND buddy_from = ".$data['user_id']."");
$data_to = dbarray($result_to);
if($data_to['buddy_id'] != "" AND $data_from['buddy_id'] != ""){
$bild = "<img src='".INFUSIONS."mano_draugai/images/mail.gif' border='0'>";
$datum = strftime("Zuletzt aktiv: %H:%M:%S Uhr", $data['user_lastvisit']);
echo "<tr>
<td><a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."' target='_parent'>$bild</a> <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' target='_parent' title='$datum'>".$data['user_name']."</a></td>
</tr>";
}
}
echo"</table>\n";
closeside();
?>
Redagavo GoN· 2007 Rugs. 23 18:09:52