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


PHP IEM::requestGetCookie方法代码示例

本文整理汇总了PHP中IEM::requestGetCookie方法的典型用法代码示例。如果您正苦于以下问题:PHP IEM::requestGetCookie方法的具体用法?PHP IEM::requestGetCookie怎么用?PHP IEM::requestGetCookie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IEM的用法示例。


在下文中一共展示了IEM::requestGetCookie方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: User_API

         // Get user
         $tempUser = new User_API();
         $tempUser->Load(intval($tempCookie['user']));
         // Check if the user is a valid user
         if (!isset($tempUser->settings['LoginCheck']) || !$tempUser->userid || !$tempUser->Status()) {
             break;
         }
         // Check whether or not the random number matches
         if (!$tempUser->settings['LoginCheck'] == $tempCookie['rand']) {
             break;
         }
         // The cookie is valid! Update session accordingly
         IEM::userLogin($tempUser->userid);
         $tempValid = true;
         // Check if we have login preferences
         $tempLoginPref = IEM::requestGetCookie('IEM_LoginPreference', array());
         if (is_array($tempLoginPref) && isset($tempLoginPref['takemeto'])) {
             header('Location: ' . SENDSTUDIO_APPLICATION_URL . '/admin/' . $tempLoginPref['takemeto']);
         }
         break;
     }
     if (!$tempValid) {
         $page = 'login';
     }
     unset($tempValid);
     unset($tempCookie);
     unset($tempUser);
 } else {
     $tempUser = GetUser();
     if (!$tempUser->Find($tempUser->username)) {
         $page = 'login';
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:init.php

示例2: ShowLoginForm

	/**
	* ShowLoginForm
	* This shows the login form.
	* If there is a template to use in the data/templates folder it will use that as the login form.
	* Otherwise it uses the default one below. If you pass in a message it will show that message above the login form.
	*
	* @param String $template Uses the template passed in for the message (eg success / error).
	* @param String $msg Prints the message passed in above the login form (eg unsuccessful attempt).
	*
	* @see FetchTemplate
	* @see PrintHeader
	* @see PrintFooter
	*
	* @return Void Doesn't return anything, just prints the login form.
	*/
	function ShowLoginForm($template=false, $msg=false)
	{
		if (!IEM::getCurrentUser()) {
			$this->GlobalAreas['InfoTips'] = '';
		}

		$this->PrintHeader(true);

		$GLOBALS['Message'] = GetLang('Help_Login');

		if ($template && $msg) {
			switch ($template) {
				case 'login_error':
					$GLOBALS['Error'] = $msg;
				break;
				case 'login_success':
					$this->GlobalAreas['Success'] = $msg;
				break;
			}
			$GLOBALS['Message'] = $this->ParseTemplate($template,true);
		}

		$username = IEM::requestGetPOST('ss_username', false);
		if ($username) {
			$GLOBALS['ss_username'] = htmlspecialchars($username, ENT_QUOTES, SENDSTUDIO_CHARSET);
 		}

		$GLOBALS['ss_takemeto'] = 'index.php';
		$loginPreference = IEM::requestGetCookie('IEM_LoginPreference', array());
		if (is_array($loginPreference) && isset($loginPreference['takemeto'])) {
			$GLOBALS['ss_takemeto'] = $loginPreference['takemeto'];
		}

		$this->GlobalAreas['SubmitAction'] = 'Login';

		$this->ParseTemplate('login');

		$this->PrintFooter(true);
	}
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:54,代码来源:login.php


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