$pages = array("login"); /* * Controller routines */ $error = 0; $username = $_POST["username"]; $password = $_POST["password"]; $res = UserCtl::Login(SessionCtl::GetSession(), $username, $password); if ($res["status"] == "FAILURE") { $error++; } if ($res["status"] == "SUCCESS") { $res = UserCtl::GetUserData(SessionCtl::GetSession()); $username = $res["username"]; setcookie('username', $username); $userdata = UserCtl::GetUserData(SessionCtl::GetSession()); $pages = array("userdata_details"); } /* * Assignments to the engine */ $tpl->assign("content_pages", $pages); $tpl->assign("error", $error); $tpl->assign("username", $_COOKIE['username']); $tpl->assign("userdata", $userdata); /* * Output of the page */ $tpl->draw("header"); $tpl->draw("body"); $tpl->draw("menu");
} if ($city == "") { $error["city"] = "has-error"; } if ($state == "") { $error["state"] = "has-error"; } if ($country == "") { $error["country"] = "has-error"; } if (count($error) != 0) { $error_count++; $pages = array("userdata_details"); } else { $args = array("companyname" => $userdata["company"], "department" => $userdata["department"], "salutation" => $userdata["salutation"], "firstname" => $userdata["firstname"], "lastname" => $userdata["lastname"], "street" => $userdata["street"], "number" => $userdata["number"], "zip" => $userdata["zip"], "state" => $userdata["state"], "city" => $userdata["city"], "country" => $userdata["country"], "email" => $userdata["email"]); UserCtl::SetUserData(SessionCtl::GetSession(), $args); $payment_methods = PaymentCtl::GetPaymentMethods(); } /* * Assignments to the engine */ $tpl->assign("content_pages", $pages); $tpl->assign("error", $error); $tpl->assign("error_count", $error_count); $tpl->assign("payment_methods", $payment_methods); $tpl->assign("userdata", $userdata); /* * Output of the page */ $tpl->draw("header"); $tpl->draw("body");
/* * Page definition * @kaveh raji <*****@*****.**> */ /* * Init routine */ include "inc/init.inc.php"; /* * Defining the pages */ $pages = array("logout"); /* * Controller routines */ UserCtl::Logout(SessionCtl::GetSession()); setcookie('username', ""); $tpl->assign("username", $_COOKIE['username']); /* * Assignments to the engine */ $tpl->assign("content_pages", $pages); /* * Output of the page */ $tpl->draw("header"); $tpl->draw("body"); $tpl->draw("menu"); $tpl->draw("head"); $tpl->draw("content"); $tpl->draw("footer");
/* * Page definition * @kaveh raji <*****@*****.**> */ /* * Init routine */ include "inc/init.inc.php"; /* * Defining the pages */ $pages = array("login_profile"); /* * Controller routines */ $res = UserCtl::GetUserOrders(SessionCtl::GetSession()); $pages = array("profile"); /* * Assignments to the engine */ $tpl->assign("content_pages", $pages); $tpl->assign("res", $res); $tpl->assign("error", $error); /* * Output of the page */ $tpl->draw("header"); $tpl->draw("body"); $tpl->draw("menu"); $tpl->draw("head"); $tpl->draw("content");
$userdata["street"] = $street; $userdata["number"] = $number; $userdata["zip"] = $zip; $userdata["city"] = $city; $userdata["state"] = $state; $userdata["country"] = $country; $userdata["notes"] = $notes; $userdata["email"] = $email; $args = array("companyname" => $userdata["company"], "department" => $userdata["department"], "salutation" => $userdata["salutation"], "firstname" => $userdata["firstname"], "lastname" => $userdata["lastname"], "street" => $userdata["street"], "number" => $userdata["number"], "zip" => $userdata["zip"], "state" => $userdata["state"], "city" => $userdata["city"], "country" => $userdata["country"], "email" => $userdata["email"]); $userdata = UserCtl::SetUserData(SessionCtl::GetSession(), $args); if ($userdata["status"] != "SUCCESS") { $error_count = 1; $error = $userdata["status"]; } } $res = UserCtl::GetUserData(SessionCtl::GetSession()); /* * Assignments to the engine */ $tpl->assign("content_pages", $pages); $tpl->assign("userdata", $res); $tpl->assign("error", $error); $tpl->assign("error_count", $error_count); $tpl->assign("already_sent", $already_sent); /* * Output of the page */ $tpl->draw("header"); $tpl->draw("body"); $tpl->draw("menu"); $tpl->draw("head");
*/ include "inc/init.inc.php"; /* * Defining the pages */ $pages = array("profile_password"); /* * Controller routines */ $already_sent = $_POST["already_sent"]; $error_count = 0; if ($already_sent == 1) { $passwd1 = $_POST["passwd1"]; $passwd2 = $_POST["passwd2"]; $passwd3 = $_POST["passwd3"]; $res = UserCtl::SetUserPassword(SessionCtl::GetSession(), $passwd1, $passwd2, $passwd3); if ($res["status"] != "SUCCESS") { $error = $res["status"]; $error_count++; } } /* * Assignments to the engine */ $tpl->assign("content_pages", $pages); $tpl->assign("userdata", $res); $tpl->assign("error", $error); $tpl->assign("error_count", $error_count); $tpl->assign("already_sent", $already_sent); /* * Output of the page
* 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); /*