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


PHP SessionUtils::getSessionObject方法代码示例

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


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

示例1: getCurrentProfileId

 public function getCurrentProfileId()
 {
     if (!class_exists('SessionUtils')) {
         include APP_BASE_PATH . "include.common.php";
     }
     $adminEmpId = SessionUtils::getSessionObject('admin_current_profile');
     $user = SessionUtils::getSessionObject('user');
     if (empty($adminEmpId) && !empty($user)) {
         $signInMappingField = SIGN_IN_ELEMENT_MAPPING_FIELD_NAME;
         return $user->{$signInMappingField};
     }
     return $adminEmpId;
 }
开发者ID:bravokeyl,项目名称:ems,代码行数:13,代码来源:BaseService.php

示例2: define

<?php

include "config.base.php";
include "include.common.php";
if (defined('MODULE_PATH')) {
    SessionUtils::saveSessionObject("modulePath", MODULE_PATH);
}
define('CLIENT_PATH', dirname(__FILE__));
include CLIENT_PATH . "/include.common.php";
include CLIENT_PATH . "/server.includes.inc.php";
$user = SessionUtils::getSessionObject('user');
$profileCurrent = null;
$profileSwitched = null;
$profileClass = ucfirst(SIGN_IN_ELEMENT_MAPPING_FIELD_NAME);
$profileVar = SIGN_IN_ELEMENT_MAPPING_FIELD_NAME;
if (!empty($user->{$profileVar})) {
    $profileCurrent = BaseService::getInstance()->getElement($profileClass, $user->{$profileVar}, null, true);
    if (!empty($profileCurrent)) {
        $profileCurrent = FileService::getInstance()->updateProfileImage($profileCurrent);
    }
}
if ($user->user_level == 'Admin' || $user->user_level == 'Manager') {
    $switchedEmpId = BaseService::getInstance()->getCurrentProfileId();
    if ($switchedEmpId != $user->{$profileVar} && !empty($switchedEmpId)) {
        $profileSwitched = BaseService::getInstance()->getElement($profileClass, $switchedEmpId, null, true);
        if (!empty($profileSwitched)) {
            $profileSwitched = FileService::getInstance()->updateProfileImage($profileSwitched);
        }
    }
}
$activeProfile = null;
开发者ID:bravokeyl,项目名称:ems,代码行数:31,代码来源:includes.inc.php

示例3: Copyright

but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Ice Framework. If not, see <http://www.gnu.org/licenses/>.

------------------------------------------------------------------

Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]  
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/
define('CLIENT_PATH', dirname(__FILE__));
include "config.base.php";
include "include.common.php";
$modulePath = SessionUtils::getSessionObject("modulePath");
if (!defined('MODULE_PATH')) {
    define('MODULE_PATH', $modulePath);
}
include "server.includes.inc.php";
if ($_REQUEST['a'] != "rsp" && $_REQUEST['a'] != "rpc") {
    if (empty($user)) {
        if ($_REQUEST['a'] == 'na') {
            $ret['message'] = "";
            if (empty($_REQUEST['employee'])) {
                $ret['status'] = "ERROR";
                $ret['message'] .= "Select an Employee.<br/>";
            }
            if (empty($_REQUEST['username'])) {
                $ret['status'] = "ERROR";
                $ret['message'] .= "Enter Username.<br/>";
开发者ID:jpbalderas17,项目名称:hris,代码行数:31,代码来源:service.php


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