示例#1
0
header('Content-Type: text/html; charset=UTF-8');
//echo "<h1>", date("H:i:s"), "</h1>";
// цепляем все функции
require "main.php";
//var_dump(mysql::query('UPDATE  bikes SET  front_page_time =  "2012-10-13" WHERE id =965')); die;
if (DEBUG_SITE == 1) {
    // время выполнения скрипта
    require_once 'plagin/Benchmark/Profiler.php';
    global $profiler;
    $profiler = new Benchmark_Profiler(TRUE);
    $profiler->start();
    // время
    $profiler->enterSection('head');
}
// выводим заголовки
echo head1();
if (DEBUG_SITE == 1) {
    // время
    $profiler->leaveSection('head');
}
unset($_SESSION['GLOBAL_MESSAGE']);
if (!isset($_SESSION['currency'])) {
    $_SESSION['currency'] = SHOW_CURRENCY;
}
if (!isset($_GET['action'])) {
    $_GET['action'] = "index";
}
// echo('<pre>');
// print_r($_GET);
// print_r($_SERVER);
// проверяем на КЕШ
示例#2
0
  }
  
} 
*/
if (DEBUG_SITE == 1) {
    // время
    $profiler->enterSection('echo');
}
// создаем КЕШ сайта
if (USE_KEH == 1) {
    create_keh($_str);
}
$str = mysql::query("SELECT * FROM content WHERE status=1 ORDER BY sort", 0);
$music = prizvanie::get_music();
// генерим статику
$_statik = array('TITLE' => mysql::query_findpole('select title_' . $_GET['lang'] . ' from ceo where action="site"', 'title_' . $_GET['lang']), 'KEYWORDS' => mysql::query_findpole('select keywords_' . $_GET['lang'] . ' from ceo where action="site"', 'keywords_' . $_GET['lang']), 'DESCRIPTION' => mysql::query_findpole('select description_' . $_GET['lang'] . ' from ceo where action="site"', 'description_' . $_GET['lang']), 'HEAD' => head1(), 'facebook' => mysql::query_findpole("SELECT zna FROM config WHERE id=1003", 'zna'), 'google' => mysql::query_findpole("SELECT zna FROM config WHERE id=1004", 'zna'), 'youtube' => mysql::query_findpole("SELECT zna FROM config WHERE id=1005", 'zna'), 'skype' => mysql::query_findpole("SELECT zna FROM config WHERE id=1012", 'zna'));
echo system::show_tpl(array('str' => $str, 'statik' => $_statik, 'music' => $music), 'index_full.php');
// *******************************************************
if (DEBUG_SITE == 1) {
    // время
    $profiler->leaveSection('echo');
}
// вывод/невывод дебаггера
if (DEBUG_SITE == 1) {
    echo '<div id="debug" style="float: left; width: 100%; border: solid red 0px; background: #C0C0C0; ">';
    // время
    $profiler->stop();
    $profiler->display();
    // дебагер
    debug();
    echo "</div>";