本文整理汇总了PHP中Redirect::firstPage方法的典型用法代码示例。如果您正苦于以下问题:PHP Redirect::firstPage方法的具体用法?PHP Redirect::firstPage怎么用?PHP Redirect::firstPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Redirect
的用法示例。
在下文中一共展示了Redirect::firstPage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process_login
function process_login()
{
$username = addslashes($_POST["admin_email"]);
$password = addslashes($_POST["admin_password"]);
$rememberme = isset($_POST["rememberme"]) ? 1 : 0;
if ($password == "") {
$password = "emptynoGakMkgAda yang pakai718";
}
$row = array("admin_email" => $username, "admin_password" => $password, "rememberme" => $rememberme);
/*if ($this->ldapLogin($username, $password)) {
$row["admin_ldap"] = 1;
}*/
//login pakai row credential
Auth::login($row);
//kalau sukses
if (Auth::isLogged()) {
//load school setting
// $ss = new Schoolsetting();
// $ss->loadToSession();
//redirect
//Account::setRedirection ();
Hook::processHook($this->login_hook);
Redirect::firstPage();
} else {
Redirect::loginFailed();
}
}
示例2: cekDanLoginin
public static function cekDanLoginin($msg)
{
if (!self::isLogged()) {
global $params;
if ($params[1] != "logout") {
self::indexCheckRemember();
}
Redirect::index($msg);
} else {
Redirect::firstPage();
}
return 0;
}
示例3: process_login_fb
public function process_login_fb()
{
$email = $_SESSION['sementara']['admin_email'];
$fbid = $_SESSION['sementara']['admin_fb_id'];
if ($fbid == "" || $email == "") {
Redirect::loginFailed();
}
$arr = $this->getWhere("admin_email = '{$email}' AND admin_fb_id='{$fbid}' AND admin_aktiv = 1 ");
if (count($arr) > 0) {
//load by login ID
$obj = $arr[0];
$row = toRow($obj);
$this->fill($row);
if (isset($this->admin_id)) {
$_SESSION["admin_session"] = 1;
$_SESSION["account"] = $obj;
//Update setlastlogin
self::setLastUpdate($_SESSION["account"]->admin_id);
//lanjut
//loading metadata
$meta = new AccountMeta();
$meta->getMeta($this->admin_id);
//now loading roles
$this->loadRole();
//set cookie
Auth::setCookie($this->rememberme, $this->admin_id, $this->admin_email, $this->admin_password);
//kalau sukses
if (Auth::isLogged()) {
//load school setting
// $ss = new Schoolsetting();
// $ss->loadToSession();
//redirect
//Account::setRedirection ();
$acl = new AccountLogin();
Hook::processHook($acl->login_hook);
//login hook doesnt seem to work =>bypass
$qp = new QuizPoints();
$qp->getPoints();
$qp->saveUnsaved();
Redirect::firstPage();
} else {
Redirect::loginFailed();
}
} else {
return 0;
}
}
}
示例4: setRedirection
public static function setRedirection()
{
/*$account = $_SESSION['account'];
switch ($_SESSION['account']->admin_role) {
case "admin":
//loadData
$accountRole = new Admin();
$accountRole->getByAccountID($account->admin_id);
break;
case "supervisor":
$accountRole = new Supervisor();
$accountRole->getByAccountID($account->admin_id);
break;
case "tatausaha":
$accountRole = new Tatausaha();
$accountRole->getByAccountID($account->admin_id);
break;
case "guru":
$accountRole = new Guru();
$accountRole->getByAccountID($account->admin_id);
break;
default:
$accountRole = new Murid();
$accountRole->getByAccountID($account->admin_id);
}
//fill the data of the Role
$accountRole->fill(toRow($account));
//$account->admin_role;
$_SESSION['account'] = $accountRole;*/
//setRedirection
Redirect::firstPage();
}