Файл: core/core.php
Строк: 47
<?php
defined('_CMEX_') or die('Error. You don`t have permision to access.');
session_name('sid');
session_start();
define('MT', microtime(1));
define('COPY', '© CMEX');
define('ADMIN', '111111');
define('DBhost', 'localhost');
define('DBuser', 'root');
define('DBpass', '');
define('DBname', 'mysql');
mysql_connect(DBhost, DBuser, DBpass) or die('Database does not exist...');
mysql_select_db(DBname) or die('Lost connection to SQL database...');
mysql_unbuffered_query('SET charset utf8');
mysql_unbuffered_query('SET names utf8');
mysql_unbuffered_query('SET character_set_client="utf8"');
mysql_unbuffered_query('SET character_set_connection="utf8"');
ini_set('error_reporting', 7);
ini_set('magic_quotes_gpc', 0);
ini_set('magic_quotes_runtime', 0);
ini_set('session.use_cookies', 1);
ini_set('arg_separator.output', '&');
ini_set('mysql.trace_mode', 'off');
require 'Filter.class.php';
$Filter = new Filter;
require 'Show.class.php';
$Show = new Show;
require 'Navigator.class.php';
function show_time($times=NULL) {
$time = time();
$today = date("j M Y", $time);
$yesterday = date("j M Y", strtotime("-1 day"));
$timesp=date("j M Y в H:i", $times);
$timesp = str_replace($today, 'Сегодня', $timesp);
$timesp = str_replace($yesterday, 'Вчера', $timesp);
$timesp = strtr($timesp, array ("Jan" => "Янв","Feb" => "Фев","Mar" => "Марта","May" => "Мая","Apr" => "Апр","Jun" => "Июня","Jul" => "Июля","Aug" => "Авг","Sep" => "Сент","Oct" => "Окт","Nov" => "Ноября","Dec" => "Дек",));
return $timesp;
}
?>