'') session_id($_GET['session_id']); mb_internal_encoding('UTF-8'); //session_name(SESS_NAME); session_start(); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - define('SMARTY_SPL_AUTOLOAD', 1); define('ROOT_DIR', './'); define('LIB_DIR', 'lib/'); define('CLASS_DIR', 'class/'); define('CODE_DIR', 'functions/'); define('IMAGES_DIR', '_img/'); define('LIST_ELEM_LIMIT', 10); define('UPLOADED_DIR', 'uploaded/'); include('config.php'); include('smarty/msmarty.class.php'); include(ROOT_DIR.'config.db.php'); //include('./lib/funct.php'); //include(CODE_DIR.'_engine.php'); //include(CODE_DIR.'_engine_parse.php'); $intervals['includes end'] = microtime(); $pageConf = new dt('conf.php'); $pageConf -> join('parse', parse :: $functs); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - function smarty_ico($p){ return '';} $smarty = new msmarty; //$smarty -> config_dir = realpath(dirname(__FILE__).'/'); $smarty -> configLoad('config.smarty'); $smarty -> error_reporting = E_ALL ^ E_NOTICE; //$smarty -> registerPlugin('function', 'ico', 'smarty_ico'); $smarty -> setTemplateDir('templates/'); $smarty -> setCompileDir('templates_c/'); $smarty -> assign('page_endmsg', session :: get('_ENDMSG', '')); $smarty -> assign('lang_link', array('pl' => funct :: language_link('pl'), 'en' => funct :: language_link('en'))); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //$smarty -> registerPlugin('function', 'ico', 'smarty_ico'); //$smarty -> registerPlugin('function', 'pic', 'smarty_pic'); //include_once 'pics/pic.class.php'; //function smarty_pic($a){ //return pic :: img_smarty($a); //} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $supported_languages = array('pl'); $use_table = (count($_POST) > 0)? $_POST : $_GET; $lang = (array_key_exists('lang', $_GET))? $_GET['lang'] : session :: get('lang') ; if(!$lang || !in_array($lang, $supported_languages)) $lang = 'pl'; session :: set('lang', $lang); define('LANG', $lang); define('LANG_S', ($lang == 'pl')? '' : '_'.$lang ); $smarty -> assign('LANG', LANG); $smarty -> assign('LANG_S', LANG_S); if(LANG != 'pl' && LANG != 'en') include('lang_'.LANG.'.php'); else {}// include('lang_en.php'); //$smarty -> assign('lang_link', array('pl' => language_link('pl'), 'en' => language_link('en'))); unset($supported_languages, $lang, $use_table); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $html = new out; $html -> imagesUploadedDir = UPLOADED_DIR.'images/'; $html -> filesUploadedDir = UPLOADED_DIR.'files/'; $html -> imagesDir = IMAGES_DIR; $html -> parse_functions = $pageConf -> get('parse'); $c = new config($pageConf -> config); $config = $c -> get(); define('PAGE_TITLE', $config['page_title']); define('LIST_LIMIT', (integer)$config['list_limit']); define('FIRMA_NAZWA', $config['firma_name']); define('MAIL_ADMIN', $config['mail_admin']); define('SMTP_DATA', $config['smtp_data']); $smarty -> assign('CONFIG', $config); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if($config['page_off'] == 1) { if(!ereg($_SERVER['REMOTE_ADDR'], $config['page_off_ips'])) { $smarty -> assign('description', $config['page_off_description']); $smarty -> display('page_off.tpl'); die; } } $smarty -> assign('right_txt', shorttxt :: get(1)); $smarty -> assign('klient_list', klient_disp :: get_all()); if($popupStr = popup_disp :: get()) $smarty -> assign('popupStr', $popupStr); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //$smarty -> assign('footer_addr', shorttxt :: get(4)); //$smarty -> assign('topImage', graphics_disp :: top()); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - list($act, $a1, $a2) = $html -> action('a'); if($a1 == 'aktualnosci') $a1 = 'news'; if($a1 == 'galeria') $a1 = 'photogalery'; $a2 = http :: _get('b'); if($a1 == 'index' || $a1 == 'news') $smarty -> assign('news_right', news_disp :: n_index()); else $smarty -> assign('news_right', news_disp :: index()); //die; //if($fn) { //include_once($fn); if(ACTION != 'index') $smarty -> assign('pageData', pages :: get_page($html, ACTION, ID)); $pageMenu = pages :: get_menu(); $smarty -> assign('pageMenu', $pageMenu); //$smarty -> assign('topImage', graphics_disp :: top()); //$smarty -> assign('graphXml', graphic :: get_header()); try { $on = $a1.'_disp'; $a = new $on; //$a -> {'display_'.$ac}($html, $smarty); $a -> display($a2, $a1.'/', $smarty, $html); } catch(Exception $e) { print($e -> getMessage()); //header('Location: index.php'); } } //else // header('Location: index.php'); //$html -> display(); ?>