config = $config; // 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->db_port = $CMS->config['db_port']; $CMS->db->connect(); // dostep do szablonow strony $CMS->template_dir = (isset($_GET['admin'])) ? $CMS->config['end_template_dir'] : $CMS->config['front_template_dir']; $CMS->compile_dir = (isset($_GET['admin'])) ? $CMS->config['end_compile_dir'] : $CMS->config['front_compile_dir']; if($CMS->db->connect) { // wybranie kontrolera $CMS->setController(); // wywolanie akcji kontrolera $CMS->runEngine(); } else { echo 'Brak po��czenia z baz�'; } ob_end_flush(); unset($_SESSION['mess']); unset($_SESSION['mess_type']); ?>