* Defining the pages */ $pages = array("register"); /* * Controller routines */ $error = 0; $username = $_POST["username"]; $email = $_POST["email"]; $passwd1 = $_POST["password"]; $passwd2 = $_POST["password2"]; $already_sent = $_POST["already_sent"]; if ($already_sent == 1) { $res = UserCtl::RegisterUser(array("username" => $username, "email" => $email, "passwd1" => $passwd1, "passwd2" => $passwd2), DEFAULT_LANGUAGE); if ($res["status"] == "SUCCESS") { UserCtl::VerifyUser($res["id_user"], $res["session_id"]); $pages = array("login"); } else { $error++; $error_msg = $res["status"]; } } /* * Assignments to the engine */ $tpl->assign("content_pages", $pages); $tpl->assign("error", $error); $tpl->assign("error_msg", $error_msg); $tpl->assign("username", $username); $tpl->assign("email", $email); /*