Viewing file: index.php (2.41 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? error_reporting(E_ALL); global $ulang, $ULANG, $alang, $ALANG; global $_LANG_ID, $ULANG, $ulang; $_LANG_ID = array ('ukr', 'rus', 'eng' ); header("Content-type: text/html; charset: utf-8"); include("core5.php"); $time_start = gettimeofday(); $smarty = new Smarty(); $smarty->template_dir = "user/templates/"; $smarty->compile_dir = "tmp/_compile_user/"; $smarty->cache_dir = "tmp/_cache_user/"; $smarty->assign('ULANG', $ULANG); $smarty->assign('ulang', $ulang);
include "user/config.php"; if (count($AMCMS_Config) > 0) foreach($AMCMS_Config as $key => $value) $smarty->assign($key, $value); foreach($Modules as $key => $value) { if ($value->UserMode && isset($_REQUEST['mod']) && $_REQUEST['mod'] == $value->ClassName) { $result = $value->User(); if (isset($result) && $result != null) { // $AMCMS_PageHtml = str_replace("\"/data/files","\"/data/files/old", Window($result, 'page')); $AMCMS_PageHtml = Window($result, 'page'); if (count($result['GlobalParams']) > 0) foreach($result['GlobalParams'] as $key => $value) $smarty->assign($key, $value); } } } $Panels = array(); foreach($Modules as $key => $value) { if ($value->PanelMode) { // $time_start = gettimeofday(); $result = $value->Panel(); // $time_end = gettimeofday(); // $time_total = (float)($time_end['sec'] - $time_start['sec']) + ((float)($time_end['usec'] - $time_start['usec'])/1000000); // echo $value->ClassName." -> ".$time_total."<br />"; if (isset($result) && $result != null) foreach($result as $key => $value) { // $Panels[$key] = str_replace("\"/data/files","\"http://zt-rada.gov.ua/data/files",Window($value, 'panel')); $Panels[$key] = Window($value, 'panel'); } } } $smarty->assign("Panels", $Panels); $smarty->assign('page', $AMCMS_PageHtml); $smarty->assign('Modules', $Modules); $time_end = gettimeofday(); $time_total = (float)($time_end['sec'] - $time_start['sec']) + ((float)($time_end['usec'] - $time_start['usec'])/1000000); $smarty->assign('GenerationTime', $time_total); if ($_SESSION['avtomat'] == "off") $smarty->display('index.tpl'); elseif ($_SESSION['avtomat'] == "on") $smarty->display('index-avtomat.tpl'); elseif ($_SESSION['avtomat'] == "site") $smarty->display('index-avtomat-site.tpl'); else $smarty->display('index.tpl');
mysql_close($conn); ?>
|