"; //echo $url.$LANG."
"; //echo $crc."
"; include ($cache_dir.$crc); exit(); } //$caching=false; //if(($crc!=="6666cd76f96956469e7be39d750cc7d9")&&($crc!=="2dc1b47ef58edd8c6ac352bd534c2a02")&&($crc!=="47a986f52037218f38995077cd01c5d5")&&($crc!=="0c46b57cad157a9743508fbf7af1d376")&&($crc!=="1135129a2904e1d5aa59ab6a70c1493d"))//($cacheinfo['structure_id']!=='6')&&($cacheinfo['structure_id']!=='7')&&($cacheinfo['structure_id']!=='4')&&($cacheinfo['structure_id']!=='82')) //{ $caching = true; ob_start (); //} $cacheinfo = array(); $page_num = 2; $main_tpl='index'; require_once $root.'main.php'; //echo 1; $CONFIG['DefaulModule']='index'; if(!empty($_GET['module'])) { $_SESSION[$key.'module'] = $_GET['module']; $module = $_SESSION[$key.'module']; } else { if(isset($_SESSION[$key.'module'])) { $module = $_SESSION[$key.'module']; } else { $module = $CONFIG['DefaulModule']; } } //echo $module.".tpl"; $cacheinfo['module'] = $module; // --------------------------------------------------------------------------------------------------------| if($module !='structure') $_SESSION[$key.'structure_id'] = 0; if(isset($_GET['structure_id'])) { $_SESSION[$key.'structure_id'] = $_GET['structure_id']; } $structure_sub_id = ''; $structure_id = ''; if(isset($_GET['structure_sub_id'])) { $structure_id = $_SESSION[$key.'structure_id']; $structure_sub_id = $_GET['structure_sub_id']; } else { $structure_id = $_SESSION[$key.'structure_id']; } $cacheinfo['structure_id'] = $structure_id; $cacheinfo['structure_sub_id'] = $structure_sub_id; //if(isset($_GET['page'])) $_SESSION[$key.$module.'_page'] = $_GET['page']; else $_GET['page']=$_SESSION[$key.$module.'_page']; if(isset($_GET['page'])) $page = $_GET['page']; else $page = 1; $start_num = $page_num * $page; if($_SESSION[$key.'flag'] & $module !='form' & $module !='form2' & $module !='form3' & $module !='form4' & $module !='form5' & $module !='form6' & $module !='form7' ) { $_SESSION[$key.'flag'] = 0; $CONTENT['message'] = "alert('".$db_object->getOne('SELECT content_val FROM '.$prefix."content WHERE content_key='form_warning_txt' AND content_lang_id='$LANG'")."')"; } $cacheinfo['page'] = $page; $cacheinfo['start_num'] = $start_num; if(1) { // Authorization /*list($username_c, $password_c) = explode(":",base64_decode($_COOKIE[$key.'Login'])); if($username_c != "" && $password_c != "") { $id = $db_object->getOne("SELECT user_id FROM ".$prefix."users WHERE user_login = '$username_c' AND user_password='$password_c'"); if($id) { $_SESSION[$key.'user_id'] = $id; $_SESSION[$key.'user_login'] = $username_c; } }*/ if(isset($_POST['password']) & isset($_POST['login'])) { $login = $_POST['login']; $password = md5($_POST['password']); $arr = $db_object->getRow("SELECT * FROM ".$prefix."users WHERE user_login='$login' AND user_password='$password'"); if($arr['user_id'] > 0) { $_SESSION[$key.'user_id'] = $arr['user_id']; $_SESSION[$key.'user_login'] = $login; header("Location: {$_SERVER['HTTP_REFERER']}"); /*$hash = base64_encode($login.":".$password); if($_POST['autologin'] == "true" | 0) // Auto Login { setcookie($key."Login", $hash, time()+60*60*24*30); if(isset($_GET['module'])) { header("Location: ?module=".$_GET['module']); } else { header("Location: ?module=".$CONFIG['DefaultModule']); } }*/ } else { $CONTENT['message'] = "alert('".$db_object->getOne('SELECT content_val FROM '.$prefix."content WHERE content_key='login_error_txt' AND content_lang_id='$LANG'")."');"; } } /*if ($module == "logout") { setcookie($key."Login"); $_SESSION[$key.'user_id'] = 0; $_SESSION[$key.'user_login'] = ""; header("Location: ?module=".$CONFIG['DefaultModule']); }*/ if(!isset($_SESSION[$key.'user_id'])) { $_SESSION[$key.'user_id']=0; } // End Authorization } if(!empty($_GET['go'])) { header('Location: index.php?module='.$_GET['go']); exit(); } //print_r($cacheinfo); /****************************************** | Modules | ������ ����������� �������. ******************************************/ /*if(file_exists($CONFIG['ModulesFolder'].'/'.$CONFIG['ModulesPrefix'].$module.'.tpl')) { // ������� ���������� �������� ������. � ����� ������� echo $CONFIG['ModulesFolder'].'/'.$CONFIG['ModulesPrefix'].$module.'.tpl'; } else { // ���������� ����������� ��������. � ����� ���������� echo $CONFIG['ModulesFolder'].'/'.$CONFIG['DefaultModuleTPL'].'.tpl'; }*/ if(file_exists($CONFIG['ModulesFolder'].'/'.$CONFIG['ModulesPrefix'].$module.'.tpl')) { // ������� ���������� �������� ������. � ����� ������� //echo $CONFIG['ModulesFolder'].'/'.$CONFIG['ModulesPrefix'].$module.'.tpl'; $tpl_object->SetTemplateData('module', $CONFIG['ModulesFolder'], $CONFIG['ModulesPrefix'].$module); } else { // ���������� ����������� ��������. � ����� ���������� //echo $CONFIG['DefaultModuleTPL']; $tpl_object->SetTemplateData('module', $CONFIG['ModulesFolder'], $CONFIG['DefaultModuleTPL']); } // ��������� ������� � ���� �������� ��� ������ ������ $_TEMP = $db_object->getAll('SELECT * FROM '.$prefix."content WHERE content_lang_id='$LANG'"); //$_TEMP = $db_object->getAll('SELECT * FROM '.$prefix."content WHERE (content_module='$MODULE' OR content_module='all') AND content_lang_id='$LANG'"); if(!empty($_TEMP)) { foreach ($_TEMP AS $_VAR) { $CONTENT['module'][$_VAR['content_key']] = $_VAR['content_val']; } } if(!isset($_GET['print'])) { unset($CONTENT['module']['standart_version_txt']); } $CONTENT['module']['title'] = $db_object->getOne("SELECT structure_title FROM ".$prefix.'structure'." WHERE structure_active='checked' AND structure_module='$module' AND structure_lang_id='$LANG'"); $CONTENT['title'] = $db_object->getRow("SELECT structure_name, structure_id FROM ".$prefix.'structure'." WHERE structure_active='checked' AND structure_menu='checked' AND structure_parent_id='0' AND (structure_lang_id='$LANG' OR structure_lang_id='0') AND (structure_id='$structure_id' OR structure_module='$module')"); include $CONFIG['ModulesFolder'].'/'.$CONFIG['ModulesPrefix'].$module.'.php'; if(!empty($ModuleContent)) { foreach ($ModuleContent AS $_KEY=>$_VAR) { $CONTENT['module'][$_KEY] = $_VAR; } } /****************************************** | Blocks | ���������� �����. ******************************************/ $BlocksDir = @dir($CONFIG['BlocksFolder']); if($BlocksDir) { while (false !== ($BlockFile = $BlocksDir->read())) { if($BlockFile <> "." & $BlockFile <> ".." & strpos($BlockFile,'.tpl')>0) { $BlockName = str_replace('.tpl','',$BlockFile); $BlockName = str_replace($CONFIG['BlocksPrefix'],'',$BlockName); //echo $BlockName.' '; // ����������� ������������ �����. ��������� ���� �� ����������� ���� � ������ ����� � ����� � �������. if(file_exists($CONFIG['BlocksFolder'].'/'.$BlockFile)) { //���������� ����������� ���� � ������ ����� �� ����� ������. $tpl_object->SetTemplateData($BlockName, $CONFIG['BlocksFolder'], $CONFIG['BlocksPrefix'].$BlockName); } else { //���������� ����������� ���� �� ��������� �� ����� ��� ����������. $tpl_object->SetTemplateData($BlockName, $CONFIG['BlocksFolder'], $CONFIG['DefaultBlockTPL']); } //$_TEMP = $db_object->getAll('SELECT * FROM '.$prefix."content WHERE content_lang_id='$LANG'"); if(!empty($_TEMP)) { foreach ($_TEMP AS $_VAR) { $CONTENT[$BlockName][$_VAR['content_key']] = $_VAR['content_val']; } } if(!isset($_GET['print'])) { unset($CONTENT[$BlockName]['standart_version_txt']); } if(file_exists($CONFIG['BlocksFolder'].'/'.$CONFIG['BlocksPrefix'].$BlockName.'.php')) { // ���� ����� ��������� ����� $BlockContent; include $CONFIG['BlocksFolder'].'/'.$CONFIG['BlocksPrefix'].$BlockName.'.php'; if(!empty($BlockContent)) { foreach ($BlockContent AS $_KEY=>$_VAR) { $CONTENT[$BlockName][$_KEY] = $_VAR; } } } else { $CONTENT[$BlockName][0] = ''; } $CONTENT[$BlockName]['title'] = $db_object->getOne("SELECT structure_name FROM ".$prefix.'structure'." WHERE structure_active='checked' AND structure_module='$BlockName' AND structure_lang_id='$LANG'"); } } } if($module=='sendmail') $main_tpl='index_free'; //echo $main_tpl; //print_r($CONTENT); if($_GET['print']==1) { //$pos = strpos($_SERVER['REQUEST_URI'], '&print=1'); //$CONTENT['module']['link_here'] = 'http://'.$_SERVER['HTTP_HOST'].substr($_SERVER['REQUEST_URI'], 0, $pos); $PageBody = $tpl_object->TemplateParse($CONTENT, 'printversion'); $PageBody = str_replace('','',$PageBody); $PageBody = str_replace('class="main_text"','class="main_text" id="main_text_id"',$PageBody); $PageBody = str_replace('td class="sub_text"','td class="sub_text" id="main_text_id"',$PageBody); $PageBody = str_replace('class="sub_text"','',$PageBody); $PageBody = str_replace('\"','"',$PageBody); } else { $PageBody = $tpl_object->TemplateParse($CONTENT, $main_tpl); $PageBody = str_replace('\"','"',$PageBody); } echo $PageBody; if($caching){ $cache = ob_get_contents(); ob_end_clean (); //echo "not cache"; //echo $crc."
"; echo $cache; $fp = @fopen ($cache_dir.$crc, "w"); @fwrite ($fp, $cache); @fclose ($fp); } ?>