2018-01-28 16:40:49 +00:00
< ? php
2018-02-15 20:58:37 +00:00
if ( $_SESSION [ 'uid' ] == null ) header ( " Location: index.php " );
2018-01-28 16:40:49 +00:00
session_start ();
2018-02-15 20:58:37 +00:00
include_once " config.php " ;
2018-01-28 16:40:49 +00:00
2018-02-15 20:58:37 +00:00
function showpals (){
$timer = time () - 60 ;
$data = db :: c () -> query ( 'SELECT `login`,`status`,`align`,`room`,(select `id` from `online` WHERE `date` >= ?i AND `id` = users.`id`) AS `online` FROM `users` WHERE `align` = 1 ORDER BY `login` ASC' , $timer ) -> fetch_assoc ();
while ( $data ) {
if ( ! empty ( $data [ 'online' ])) {
echo '<A HREF="javascript:top.AddToPrivate(\'' , $data [ 'login' ], '\', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A>' ;
echo $data [ 'align' ] . $data [ 'login' ] . " — " . $data [ 'status' ] . " — <em> " . $data [ 'room' ] . " </em><br> " ;
} else {
echo '<img src="i/lock1.gif" width=20 height=15>' ;
echo $data [ 'align' ] . $data [ 'login' ] . " — " . $data [ 'status' ] . " — <small><em>персонаж не в клубе</em></small><br> " ;
}
}
}
?>
<! doctype html >
< html >
< head >
< link rel = stylesheet href = " css/main.css " >
< meta charset = " utf-8 " >
</ head >
< body >
2018-01-28 16:40:49 +00:00
< div style = " text-align: right; width: 95%; " >< button onclick = " location.href='main.php'; " > Вернуться </ button ></ div >
< div style = " width: 600px; margin: 0 auto; " >
< h3 >< A HREF = " javascript:top.AddToPrivate('pal', top.CtrlPress) " target = refreshed >< img src = " i/lock.gif " width = 20 height = 15 ></ A > Паладины </ h3 >
2018-02-15 20:58:37 +00:00
< ? php showpals () ?>
2018-01-28 16:40:49 +00:00
</ div >
</ body >
</ html >