当前位置: 首页>>代码示例>>PHP>>正文


PHP Redirect::firstPage方法代码示例

本文整理汇总了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();
     }
 }
开发者ID:CapsuleCorpIndonesia,项目名称:biji_katak,代码行数:27,代码来源:AccountLogin.php

示例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;
 }
开发者ID:CapsuleCorpIndonesia,项目名称:biji_katak,代码行数:13,代码来源:Auth.php

示例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;
         }
     }
 }
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:48,代码来源:SiteMember.php

示例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();
 }
开发者ID:CapsuleCorpIndonesia,项目名称:es-teler-baru-suka,代码行数:35,代码来源:Account.php


注:本文中的Redirect::firstPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。