$sql->bindParam(':username', $_POST['inUsername']); $sql->execute(); $result = $sql->fetch(); $crypto = new runtime_hash(); $crypto->SetPassword($_POST['inPassword']); $crypto->SetSalt($result['ac_passsalt_vc']); $secure_password = $crypto->CryptParts($crypto->Crypt())->Hash; if (!ctrl_auth::Authenticate($_POST['inUsername'], $secure_password, $rememberdetails, false, $inSessionSecuirty)) { header("location: ./?invalidlogin"); exit; } } if (isset($_COOKIE['zUser'])) { if (isset($_COOKIE['zSec'])) { if ($_COOKIE['zSec'] == false) { $secure = false; } else { $secure = true; } } else { $secure = true; } ctrl_auth::Authenticate($_COOKIE['zUser'], $_COOKIE['zPass'], false, true, $secure); } if (!isset($_SESSION['zpuid'])) { ctrl_auth::RequireUser(); } runtime_hook::Execute('OnBeforeControllerInit'); $controller->Init(); ui_templateparser::Generate("etc/styles/" . ui_template::GetUserTemplate());
/** * Loads in the template content and parses it to compute the place holder content. * @author Bobby Allen (ballen@bobbyallen.me) * @param string $template_path The full path to the system template (or user template). * @return sting The processed template HTML. */ static function Generate($template_path) { self::setLocation(); $template_raw = file_get_contents($template_path . "/master.ztml"); $template_code = ui_templateparser::allowBr(ui_templateparser::CompileFunctions($template_raw)); ui_templateparser::clearOldCache(); return ui_templateparser::runPHP($template_code); }