Просмотр файла dl/system/counter.php

Размер файла: 2.31Kb
<?php
#********************************** AgS MOD DOWNLOAD CENTR SEA *************************************#
#***************************************************************************************************#
#  /||||||||||||||| *********************  /||||||||||||||| *********************  /||||||||||||||| #
# | ||||||||||||||| ********************* | ||||||||||||||| ********************* | ||||||||||||||| #
# | |||||/////||||| ********************* | |||||/////////  ********************* | |||||/////////  #
# | |||||   | ||||| ****** E-MAIL ******* | |||||           ****** WAP/WEB ****** | |||||           #
# | |||||   | ||||| *** [email protected] *** | |||||           * http://ags.h2m.ru * | ||||||||||||||| #
# | |||||   | ||||| ********************* | ||||||||||||||| ********************* | ||||||||||||||| #
# | |||||   | ||||| ********************* | |||||/////||||| ********************* |///////////||||| #
# | ||||||||||||||| ****** SKYPE ******** | |||||   | ||||| ***** MOD AUTHOR ****           | ||||| #
# | |||||////|||||| ***** agrizz15 ****** | |||||   | ||||| ***** Agris Cišs ****  /||||||||||||||| #
# | |||||   | ||||| ********************* | ||||||||||||||| ********************* | ||||||||||||||| #
# |/////    |/////  ********************* |///////////////  ********************* |///////////////  #
#***************************************************************************************************#
#********************************* MOD by AgS in 2010 @ LATVIA *************************************#


$onlines = mysql_fetch_assoc(mysql_query('SELECT * FROM `'.$MY_pre.'online` WHERE `ip` = "'.tirit($ip).'";'));
 if(empty($onlines['id'])){
 mysql_query("INSERT INTO `".$MY_pre."online` (`ip`,`time`) VALUES ( '".tirit($ip)."',".$time.");");}else{
 mysql_query('UPDATE `'.$MY_pre.'online` SET `time`='.$time.' WHERE `id` = '.$onlines['id']);}
mysql_query('DELETE FROM `'.$MY_pre.'online` WHERE '.$time.' - `time` > '.intval(360).' AND `id`<>1');
 $all_onlinen = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `'.$MY_pre.'online` WHERE `id`<>1'));
 $max_onlinen = mysql_fetch_row(mysql_query('SELECT `time` FROM `'.$MY_pre.'online` WHERE `id` = 1'));
 
 if($all_onlinen[0] > $max_onlinen[0]){
 mysql_query('UPDATE `'.$MY_pre.'online` SET `time`='.$all_onlinen[0].' WHERE `id` = 1');
 }



?>