Вход Регистрация
Файл: pages/rewrite_mes.php
Строк: 52
<?php # Created by Up
include_once '../sistem/start.php';
include_once 
$config['OTS'].'sistem/config.php';
//include_once $config['OTS'].'sistem/function.php';
include_once $config['OTS'].'sistem/db.php';
//include_once $config['OTS'].'sistem/users.php';

function d_nedelja($q)
 {
    if(
$q=='Mon')
        
$q='Понедельник';
     else
        if(
$q=='Tue')
            
$q='Вторник';
         else
            if(
$q=='Wed')
                
$q='Среда';
             else
                if(
$q=='Thu')
                    
$q='Четверг';
                 else
                    if(
$q=='Fri')
                        
$q='Пятница';
                     else
                        if(
$q=='Sat')
                            
$q='Суббота';
                         else
                            
$q='Воскресенье';
    return 
$q;
 }

function 
date_stat($w)
 {
    global 
$KjNJKHc;
    
$w=explode('.',date('m.Y',$w));
    if(
$KjNJKHc!=$w)
     {
        
$KjNJKHc=$w;
        
$q=round($w[0]);
        if(
$q==1)
            
$q='Январь';
         else
            if(
$q==2)
                
$q='Февраль';
             else
                if(
$q==3)
                    
$q='Март';
                 else
                    if(
$q==4)
                        
$q='Апрель';
                     else
                        if(
$q==5)
                            
$q='Май';
                         else
                            if(
$q==6)
                                
$q='Июнь';
                             else
                                if(
$q==7)
                                    
$q='Июль';
                                 else
                                    if(
$q==8)
                                        
$q='Август';
                                     else
                                        if(
$q==9)
                                            
$q='Сентябрь';
                                         else
                                            if(
$q==10)
                                                
$q='Октябрь';
                                             else
                                                if(
$q==11)
                                                    
$q='Ноябрь';
                                                 else
                                                    
$q='Декабрь';
        return 
$q.' '.$w[1];
     }
return 
false;
 }


if(isset(
$_GET['id']))
 {
    
$id=(int)abs($_GET['id']);
    if(
mysql_num_rows($sql=mysql_query('SELECT * FROM `site` where `id`=''.$id.'' LIMIT 1;'))>=1)
     {
        
$arr=mysql_fetch_assoc($sql);
        
$config['TITLE']='Статистика за месяц '.$arr['name'];
        
$config['description']=$arr['opisanie'];
        include_once 
$config['OTS'].'sistem/head.php';
        
$sql=mysql_query('SELECT * FROM `history` WHERE `for`=''.$id.'' ORDER BY `time` DESC LIMIT 0,30;');
        if(
mysql_num_rows($sql)>=1)
         {
            while(
$arr=mysql_fetch_assoc($sql))
             {
                
$true=date_stat($arr['time']);
                print (
$true!=false?'<span class="link">'.$true.'</span><br />':'').'<small>'.d_nedelja(date('D',$arr['time'])).' '.date('d',$arr['time']).'</small><br /><div class="func">Хостов: <b>'.$arr['host'].'</b><br />Хитов: <b>'.$arr['hit'].'</b><br /></div>';
             }
         }
         else
             print 
'Еще нету статистики за месяц!<br />';
        print 
'<a href="index.php">Страница сайта</a><br />';
        include_once 
$config['OTS'].'sistem/foot.php';
     }
 }
#else
     
{
        
header('location: ../?act=error&error=404');
        exit;
     }
?>
Онлайн: 1
Реклама