當前位置: 首頁>>代碼示例>>PHP>>正文


PHP IPSText::md5clean方法代碼示例

本文整理匯總了PHP中IPSText::md5clean方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSText::md5clean方法的具體用法?PHP IPSText::md5clean怎麽用?PHP IPSText::md5clean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在IPSText的用法示例。


在下文中一共展示了IPSText::md5clean方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Authorize
  *
  * @access	public
  * @return	void
  */
 public function __construct()
 {
     /* Make object */
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     //--------------------------------------------
     // Got a cookie wookey?
     //--------------------------------------------
     $_adsess = ipsRegistry::$request['adsess'];
     $_time_out_mins = defined('IPB_ACP_SESSION_TIME_OUT') ? IPB_ACP_SESSION_TIME_OUT : 60;
     //-----------------------------------------
     // If the cookie doesn't match URL... use URL?
     //-----------------------------------------
     if ($_adsess) {
         $this->session_type = 'url';
         ipsRegistry::$request['adsess'] = $_adsess;
     }
     //--------------------------------------------
     // Continue...
     //--------------------------------------------
     if (!ipsRegistry::$request['adsess']) {
         //--------------------------------------------
         // No URL adsess found, lets log in.
         //--------------------------------------------
         return $this->_response(0, '');
     } else {
         //--------------------------------------------
         // We have a URL adsess, lets verify...
         //--------------------------------------------
         $this->DB->build(array('select' => '*', 'from' => 'core_sys_cp_sessions', 'where' => "session_id='" . IPSText::md5clean(ipsRegistry::$request['adsess']) . "'"));
         $this->DB->execute();
         $session_data = $this->DB->fetch();
         $_tab_data = unserialize($session_data['session_app_data']);
         $_tab_data = is_array($_tab_data) ? $_tab_data : array();
         if ($session_data['session_id'] == "") {
             //--------------------------------------------
             // Fail-safe, no DB record found, lets log in..
             //--------------------------------------------
             return $this->_response(0, '');
         } else {
             if ($session_data['session_member_id'] == "") {
                 //--------------------------------------------
                 // No member ID is stored, log in!
                 //--------------------------------------------
                 return $this->_response(0, 'session_nomemberid');
             } else {
                 //--------------------------------------------
                 // Key is good, check the member details
                 //--------------------------------------------
                 $this->DB->build(array('select' => 'm.*', 'from' => array('members' => 'm'), 'where' => "member_id=" . intval($session_data['session_member_id']), 'add_join' => array(0 => array('select' => 'g.*', 'from' => array('groups' => 'g'), 'where' => 'm.member_group_id=g.g_id', 'type' => 'left'), 1 => array('select' => 's.*', 'from' => array('core_sys_login' => 's'), 'where' => 's.sys_login_id = m.member_id', 'type' => 'left'))));
                 $this->DB->execute();
                 self::$data_store = $this->DB->fetch();
                 self::$data_store = self::instance()->setUpSecondaryGroups(self::$data_store);
                 //--------------------------------------------
                 // Get perms
                 //--------------------------------------------
                 if (self::$data_store['member_id'] == "") {
                     //--------------------------------------------
                     // Ut-oh, no such member, log in!
                     //--------------------------------------------
                     return $this->_response(0, 'session_invalidmid');
                 } else {
                     //--------------------------------------------
                     // Member found, check passy
                     //--------------------------------------------
                     //if ( $session_data['session_member_login_key'] != self::$data_store['member_login_key'] )
                     //{
                     //	//--------------------------------------------
                     //	// Passys don't match..
                     //	//--------------------------------------------
                     //
                     //	return $this->_response( 0, 'Session member password mismatch' );
                     //}
                     //else
                     //{
                     //--------------------------------------------
                     // Do we have admin access?
                     //--------------------------------------------
                     if (self::$data_store['g_access_cp'] != 1) {
                         return $this->_response(0, 'session_noaccess');
                     } else {
                         $this->_validated = TRUE;
                     }
                     //}
                 }
             }
         }
     }
     //--------------------------------------------
     // If we're here, we're valid...
     //--------------------------------------------
     if ($this->_validated === TRUE) {
//.........這裏部分代碼省略.........
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:101,代碼來源:adminSessions.php


注:本文中的IPSText::md5clean方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。