$session->cronCheck = 0; $session->language = 'en'; $session->theme = 'light'; $session->lastpage = '/'; $session->admin = false; $session->translate = true; router::refresh(); } // connect to localhost:3306/root mysql::$models = root . 'models/'; mysql::connect('adm78', 'csodb'); // check cron but block spam if ($debug || $session->cronCheck < time() - 3) { cron::$crondir = root . 'cron/'; cron::$maxRuns = 16; cron::checkAll(); $session->cronCheck = time(); } // url routing router::$views = root . 'views/'; router::$index = 'index'; router::$error = '404'; $uri = $_SERVER['REQUEST_URI']; $page = router::path($uri); // auto-html template $tpl = new template(); $tpl->url = $_SERVER['REQUEST_URI']; $css = ['/style/main.css', '/style/' . $session->theme . '.css']; $js = ['http://code.jquery.com/jquery-1.10.2.min.js']; $favicon = '/style/favicon.ico'; // translate with vars