Вход Регистрация
Файл: online.php
Строк: 20
<?php



include'inc/conf.php';
session_start();
$sql mysql_query("SELECT * FROM `users` WHERE `id` = '".$_SESSION['id']."' ");
$row mysql_fetch_array($sql);

$pass htmlspecialchars(stripslashes($_SESSION['pass']));
$id htmlspecialchars(stripslashes($_SESSION['id']));
$gethtmlspecialchars(stripslashes($_GET['go']));
$ids htmlspecialchars(stripslashes($_GET['id']));


if (
$id == $row['id'] and md5($pass)==$row['pass']){
$title='Кто Онлайн';
include
'inc/up.php';
////////////////////////////////////////////////////////////////
$time=time()-1800;

$q mysql_query("SELECT `id`,`login` FROM `users` WHERE `lastdate` >= '".$time."' ORDER BY `lastdate`");

$query "SELECT COUNT(*) FROM `users` WHERE `lastdate` >= '".$time."'";
$res mysql_query($query);
$count_records mysql_fetch_row($res);
$count $count_records[0];

echo
'<div class="rek">Всего в игре: <strong>'.$count.'</strong></div>';

while(
$user=mysql_fetch_assoc($q)){

echo
'<div class="post"><img class="ico" src="img/pics/pirat.png" alt=""><a href="info.php?ids='.$user['id'].'">'.$user['login'].'</a></div>';


}







}
include
'inc/foot.php';

?>
Онлайн: 1
Реклама