View file forum/online.php

File size: 1.72Kb
<?php
##################################
#           online.php           #
##################################
#   Форум на MySQL               #
#Афтар : Morgan                  #
#ICQ : 530-648                   #
#Email : [email protected]           #
##################################
 require_once 'includes/start.php';
 require_once 'includes/functions.php';
 require_once 'includes/db.php';
 require_once 'includes/avt.php';
 require_once 'includes/other.php';
 require_once 'includes/head.php';

echo '</div><div class="main">
Юзеры OnLine
</div><div class="fon">';
$users_t = mysql_query('SELECT * FROM `online`');
$vsego = mysql_num_rows($users_t);
if($vsego>0)
{
$visitor = mysql_query('SELECT * FROM `online` WHERE `id_user`="0"');
$authorised = mysql_query('SELECT * FROM `online` WHERE `id_user`<>"0"');
echo 'Всего : '.$vsego.'<br />
Авторизированных : '.mysql_num_rows($authorised).'<br />
Гостей : '.mysql_num_rows($visitor).'<br />';

echo '<br />';
if(mysql_num_rows($authorised)>0)
{
echo '<b>Наши</b> : <br />';

  while($user_a = mysql_fetch_array($authorised))
  {

  echo '&raquo; <a href="user.php?id='.$user_a['id_user'].'">'.illuminate($user_a['id_user']).'</a><br />
  ';

  }

}

if(mysql_num_rows($visitor)>0)
{
echo '<b>Гости</b> : <br />';
   while($user_v = mysql_fetch_array($visitor))
   {

   echo '&raquo; IP <b>'.$user_v['ip'].'</b><br />
   ';

   }

}





}
else{echo 'Юзеров OnLine нет!<br />
';}


echo '</div><br />
';

 require_once 'includes/foot.php';
##################################
#      © Все права защищены      #
##################################
?>