Commit | Line | Data |
---|---|---|
bc13d5d6 H |
1 | <?php |
2 | ||
3 | if ($action=='forum') { | |
4 | $set=$kyberia->query("select * from session where user_action='forum' and user_action_id='$node_id' and user_mode!='invisible' group by user_name"); | |
5 | echo "<table align='center'><tr>"; | |
6 | while ($set->next()) { | |
7 | echo "<td><a href='?action=userinfo&node_id=",$set->getString('user_id'),"'><img width='50' height='50' src='/images/users/".strtolower($set->getString('user_name')).".gif' border='0' alt='",$set->getString('user_name'),"'></a></td>"; | |
8 | ||
9 | ||
10 | } | |
11 | ||
12 | echo "</tr></table>"; | |
13 | } | |
14 | ||
15 | else { | |
16 | include ("count.inc"); | |
17 | ||
18 | $set=$kyberia->query("select (time_to_sec(NOW())-time_to_sec(user_idle)) as idle,session.* from session group by session.user_id order by session.user_name"); | |
19 | ||
20 | // jay is the beeest, fooking good, i love the woooorld | |
21 | ||
22 | //prevedie udaje do arrays, aby sa dali viac krat pouzit | |
23 | while ($set->next()) { | |
24 | $active_array_name[]=$set->getString('user_name'); | |
25 | $active_array_user[]=$set->getString('user_id'); | |
26 | $active_array_idle[]=$set->getString('idle'); | |
27 | } | |
28 | ||
29 | echo "<div class='active_users'>"; | |
30 | echo "<table cellspacing='0' cellpadding='0'><tr><td>"; | |
31 | echo "~~~ friends ~~~<br><br>"; | |
32 | echo "</td></tr><tr><td>"; | |
33 | ||
34 | //toto je prva cast, kde sa vypisuju friendi | |
35 | for ($i=0;$i<count($active_array_user);$i++){ | |
36 | $active_user=$active_array_user[$i]; | |
37 | $active_name=$active_array_name[$i]; | |
38 | $active_idle=$active_array_idle[$i]; | |
39 | // ikonky | |
40 | if ($user_active_icons == 'yes') { | |
41 | if ($friend_array[$active_user]){ | |
42 | echo "<div class='active_user'><div class='active_user_img'>"; | |
43 | echo "<a href='?action=userinfo&node_id=",$active_user,"'><img width='50' height='50' src='/images/users/".strtolower($active_name).".gif' border='0' alt='".$active_name."' title='".$active_name."'></a></div>"; | |
44 | echo "</div>"; | |
45 | }else{ | |
46 | } | |
47 | } | |
48 | // iba nicky | |
49 | else { | |
50 | if ($friend_array[$active_user]){ | |
51 | echo "</td></tr><tr><td>"; | |
52 | echo "<a href='?action=userinfo&node_id=",$active_user,"'><b>".$active_name."</b> "; | |
53 | $time=$active_idle; | |
54 | if ($time<0) $time+=(60*1440); | |
55 | // echo floor($time/60),":",($time%60); | |
56 | ||
57 | echo "</a>"; | |
58 | echo "</td></tr><tr><td>"; | |
59 | }else{ | |
60 | } | |
61 | } | |
62 | } | |
63 | echo "</td></tr><tr><td>"; | |
64 | echo "<br>~~~ friends ~~~<br><br><br>"; | |
65 | echo "</td></tr><tr><td>"; | |
66 | ||
67 | //a tu je ostatok activov | |
68 | for ($i=0;$i<count($active_array_user);$i++){ | |
69 | $active_user=$active_array_user[$i]; | |
70 | $active_name=$active_array_name[$i]; | |
71 | $active_idle=$active_array_idle[$i]; | |
72 | // ikonky | |
73 | if ($user_active_icons == 'yes') { | |
74 | if ($friend_array[$active_user]){ | |
75 | }else{ | |
76 | echo "<div class='active_user'><div class='active_user_img'>"; | |
77 | echo "<a href='?action=userinfo&node_id=",$active_user,"'><img width='50' height='50' src='/images/users/".strtolower($active_name).".gif' border='0' alt='".$active_name."' title='".$active_name."'></a></div>"; | |
78 | echo "</div>"; | |
79 | } | |
80 | } | |
81 | // iba nicky | |
82 | else { | |
83 | if ($friend_array[$active_user]){ | |
84 | }else{ | |
85 | echo "</td></tr><tr><td>"; | |
86 | echo "<a href='?action=userinfo&node_id=",$active_user,"'>".$active_name." "; | |
87 | $time=$active_idle; | |
88 | if ($time<0) $time+=(60*1440); | |
89 | // echo floor($time/60),":",($time%60); | |
90 | ||
91 | echo "</a>"; | |
92 | echo "</td></tr><tr><td>"; | |
93 | } | |
94 | } | |
95 | } | |
96 | echo "</td></tr></table>"; | |
97 | ||
98 | ||
99 | ||
100 | ||
101 | echo "</div>"; | |
102 | } |