Trwają prace techniczne...

'); } */ session_set_cookie_params(0, '/', '.foto-kurier.pl'); session_start(); ob_start(); function smarty_block_dynamic($param, $content, &$smarty, &$repeat) { static $counter = array(); if ($repeat) { if (!isset($param['name'])) return $content; $name = $param['name']; unset($param['name']); if (!isset($counter[$name])) $counter[$name] = 0; $counter[$name]++; if ($smarty->_cache_including) { $param = isset($smarty->_cache_info['cached_vars'][$name]['items'][$counter[$name]]) ? $smarty->_cache_info['cached_vars'][$name]['items'][$counter[$name]] : array(); } else { $smarty->_cache_info['cached_vars'][$name]['items'][$counter[$name]] = $param; } foreach ($param AS $k => $v) { $smarty->_tpl_vars[$k] = $v; } } return $content; } include 'config/general.php'; include $config['library_path'].'smarty/Smarty.class.php'; include $config['library_path'].'cms.class.php'; include $config['library_path'].'db.class.php'; include $config['library_path'].'facebook.php'; /* if(($_GET['url']=='front_zamowienia') && !isset($_GET['przepiecie'])) { include "index.html"; exit; }*/ $CMS = new CMS(); // wczytanie konfiguracji do obiektu $CMS->config = $config; // RG - timer do pomiaru czasu renderowania strony global $timer_render_start; global $opt_debug; $opt_debug=0; list( $usec,$sec ) = explode( " ", microtime() ); $timer_render_start = (float)$usec + (float)$sec; //echo '

render time 0: '.$GLOBALS['timer_render_start'].'

'; if(0){ // baza na monitorowanie czasu renderowania strony $user = 'opt'; $password = 'opt900100'; $database = 'opt'; mysql_connect('localhost', $user, $password); @mysql_select_db($database); // or die("Nie udało się wybrać bazy danych"); // // wyciagam PHPSESSID $sessid=$_SERVER['HTTP_COOKIE']; $sessidpos = strpos( $sessid, "PHPSESSID=" )+10; $sessid=substr( $sessid, $sessidpos, 32 ); // // ip klienta $ip1=$_SERVER['REMOTE_ADDR']; // // kto sie laczy $agent1=$_SERVER['HTTP_USER_AGENT']; // $query= "INSERT INTO `opt` ( `id` , `timestamp` , `adres` , `render`, `sessid`, `ip`, `agent` ) VALUES ( NULL , '".$sec."', '".$_SERVER['REQUEST_URI']."', '0', '".$sessid."', '".$ip1."', '".$agent1."' )"; mysql_query($query); global $timer_render_id; $timer_render_id=mysql_insert_id(); mysql_close(); } // proba polaczenia z baza $CMS->db = new DB(); $CMS->db->db_host = $CMS->config['db_host']; $CMS->db->db_user = $CMS->config['db_user']; $CMS->db->db_pass = $CMS->config['db_pass']; $CMS->db->db_name = $CMS->config['db_name']; $CMS->db->db_type = $CMS->config['db_type']; $CMS->db->connect(); // dostep do szablonow strony /* $CMS->template_dir = (isset($_GET['admin'])) ? $CMS->config['end_template_dir'] : $CMS->config['frontv2_template_dir']; $CMS->compile_dir = (isset($_GET['admin'])) ? $CMS->config['end_compile_dir'] : $CMS->config['frontv2_compile_dir']; $CMS->cache_dir = (isset($_GET['admin'])) ? $CMS->config['end_cache_dir'] : $CMS->config['frontv2_cache_dir']; */ if( isset($_GET['admin']) ){ $CMS->template_dir = $CMS->config['end_template_dir']; $CMS->compile_dir = $CMS->config['end_compile_dir']; $CMS->cache_dir = $CMS->config['end_cache_dir']; }else if( isset($_GET['madmin']) ){ $CMS->template_dir = $CMS->config['mend_template_dir']; $CMS->compile_dir = $CMS->config['mend_compile_dir']; $CMS->cache_dir = $CMS->config['mend_cache_dir']; }else{ $CMS->template_dir = $CMS->config['frontv2_template_dir']; $CMS->compile_dir = $CMS->config['frontv2_compile_dir']; $CMS->cache_dir = $CMS->config['frontv2_cache_dir']; } /* $CMS->template_dir = (isset($_GET['admin'])) ? $CMS->config['end_template_dir'] : $CMS->config['frontv2_template_dir']; $CMS->compile_dir = (isset($_GET['admin'])) ? $CMS->config['end_compile_dir'] : $CMS->config['frontv2_compile_dir']; $CMS->cache_dir = (isset($_GET['admin'])) ? $CMS->config['end_cache_dir'] : $CMS->config['frontv2_cache_dir']; */ //$CMS->compile_check = true; $cash_gallery = array('zdjecie_miesiaca','najwyzej_oceniane','kzdjecie','profil','szukane_zdjecie','ogladane','polecane','niekomentowane','nieocenione','wszystkie','ostatnie'); /* if($_GET['url']=='front_galerie' && in_array($_GET['action'],$cash_gallery)) $CMS->caching = 1; else $CMS->caching = 0; if($CMS->caching) $CMS->cache_lifetime = 1800; */ if($CMS->db->connect) { if( $_SESSION['id'] ){ $ask = "UPDATE `users` SET `last_oper` = '".time()."' WHERE `users`.`id` =".$_SESSION['id']; $CMS->db->dbQuery($ask); } // wybranie kontrolera $CMS->setController(); // wywolanie akcji kontrolera $CMS->runEngine(); } else { echo 'Brak połączenia z bazą'; } ob_end_flush(); ?>