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


PHP isLogged函数代码示例

本文整理汇总了PHP中isLogged函数的典型用法代码示例。如果您正苦于以下问题:PHP isLogged函数的具体用法?PHP isLogged怎么用?PHP isLogged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: before

	function before()
	{
		$ci = &get_instance();
		if (!property_exists (&$ci, "noRender") && isLogged()) {
			$ci->smarty->setPartial('content', 'area');
		}
	}
开发者ID:neutrum,项目名称:Hoppallaaa,代码行数:7,代码来源:Render_content.php

示例2: actionAuth

 function actionAuth()
 {
     $oRequest = OAuth2\Request::createFromGlobals();
     $oResponse = new OAuth2\Response();
     // validate the authorize request
     if (!$this->_oServer->validateAuthorizeRequest($oRequest, $oResponse)) {
         require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
         $o = json_decode($oResponse->getResponseBody());
         $this->_oTemplate->getPage(false, MsgBox($o->error_description));
     }
     if (!isLogged()) {
         require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
         $sForceRelocate = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'auth/?client_id=' . bx_get('client_id') . '&response_type=' . bx_get('response_type') . '&state=' . bx_get('state') . '&redirect_uri=' . bx_get('redirect_uri');
         bx_login_form(false, false, $sForceRelocate);
         return;
     }
     $aProfiles = BxDolAccount::getInstance()->getProfiles();
     if (!($iProfileId = $this->_oDb->getSavedProfile($aProfiles)) && empty($_POST)) {
         $oPage = BxDolPage::getObjectInstanceByURI('oauth-authorization');
         $this->_oTemplate->getPage(false, $oPage->getCode());
         return;
     }
     if (!$iProfileId) {
         $iProfileId = bx_get('profile_id');
     }
     $this->_oServer->handleAuthorizeRequest($oRequest, $oResponse, (bool) $iProfileId, $iProfileId);
     $oResponse->send();
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:28,代码来源:BxOAuthModule.php

示例3: genSiteServiceMenu

 function genSiteServiceMenu()
 {
     $bLogged = isLogged();
     $aMenuItem = array();
     $sMenuPopupId = '';
     $sMenuPopupContent = '';
     if ($bLogged) {
         bx_import('BxTemplMenuService');
         $oMenu = new BxTemplMenuService();
         if ($oMenu->aMenuInfo['memberID'] != 0) {
             $aProfile = getProfileInfo($oMenu->aMenuInfo['memberID']);
         }
         $sThumbSetting = getParam('sys_member_info_thumb_icon');
         bx_import('BxDolMemberInfo');
         $o = BxDolMemberInfo::getObjectInstance($sThumbSetting);
         $sThumbUrl = $o ? $o->get($aProfile) : '';
         $o = BxDolMemberInfo::getObjectInstance($sThumbSetting . '_2x');
         $sThumbTwiceUrl = $o ? $o->get($aProfile) : '';
         if (!$sThumbTwiceUrl) {
             $sThumbTwiceUrl = $sThumbUrl;
         }
         $bThumb = !empty($sThumbUrl);
         $aMenuItem = array('bx_if:show_fu_thumb_image' => array('condition' => $bThumb, 'content' => array('image' => $sThumbUrl, 'image_2x' => $sThumbTwiceUrl)), 'bx_if:show_fu_thumb_icon' => array('condition' => !$bThumb, 'content' => array()), 'thumbnail' => get_member_icon($oMenu->aMenuInfo['memberID']), 'title' => getNickName($oMenu->aMenuInfo['memberID']));
         $sMenuPopupId = 'sys-service-menu-' . time();
         $sMenuPopupContent = $this->transBox($oMenu->getCode());
     }
     return $GLOBALS['oSysTemplate']->parseHtmlByName('extra_service_menu_wrapper.html', array('bx_if:show_for_visitor' => array('condition' => !$bLogged, 'content' => array()), 'bx_if:show_for_user' => array('condition' => $bLogged, 'content' => $aMenuItem), 'menu_popup_id' => $sMenuPopupId, 'menu_popup_content' => $sMenuPopupContent));
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:28,代码来源:BxTemplFunctions.php

示例4: __construct

 function __construct()
 {
     parent::__construct();
     $this->is_admin_protected = TRUE;
     isLogged();
     $this->load->model('user/usermodel');
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:7,代码来源:type.php

示例5: index

	function index()
	{
		if (!isLogged())
		{
		    	redirect('/admin/login');
		}
	} 
开发者ID:neutrum,项目名称:Hoppallaaa,代码行数:7,代码来源:entry.php

示例6: serviceHelpdeskCode

    function serviceHelpdeskCode()
    {
        $sChatUrl = getParam('bx_chat_plus_url');
        if (!getParam('bx_chat_plus_helpdesk') || !$sChatUrl) {
            return '';
        }
        if (getParam('bx_chat_plus_helpdesk_guest_only') && isLogged()) {
            return '';
        }
        $aUrl = parse_url($sChatUrl);
        $sChatUrl = $aUrl['scheme'] . '://' . $aUrl['host'] . ($aUrl['port'] ? ':' . $aUrl['port'] : '');
        return <<<EOS

<!-- Start of Helpdesk Livechat Script -->
<script type="text/javascript">
(function(w, d, s, u) {
\tw.RocketChat = function(c) { w.RocketChat._.push(c) }; w.RocketChat._ = []; w.RocketChat.url = u;
\tvar h = d.getElementsByTagName(s)[0], j = d.createElement(s);
\tj.async = true; j.src = '{$sChatUrl}/packages/rocketchat_livechat/assets/rocket-livechat.js';
\th.parentNode.insertBefore(j, h);
})(window, document, 'script', '{$sChatUrl}/livechat');
</script>
<!-- End of Helpdesk Livechat Script -->

EOS;
    }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:26,代码来源:BxChatPlusModule.php

示例7: serviceLoginForm

 public function serviceLoginForm($sParams = '', $sForceRelocate = '')
 {
     if (isLogged()) {
         return false;
     }
     // get all auth types
     $aAuthTypes = BxDolDb::getInstance()->fromCache('sys_objects_auths', 'getAll', 'SELECT * FROM `sys_objects_auths`');
     // define additional auth types
     if ($aAuthTypes) {
         $aAddInputEl[''] = _t('_Basic');
         // procces all additional menu's items
         foreach ($aAuthTypes as $iKey => $aItems) {
             $aAddInputEl[$aItems['Link']] = _t($aItems['Title']);
         }
         $aAuthTypes = array('type' => 'select', 'caption' => _t('_Auth type'), 'values' => $aAddInputEl, 'value' => '', 'attrs' => array('onchange' => 'if (this.value) { location.href = "' . BX_DOL_URL_ROOT . '" + this.value }'));
     } else {
         $aAuthTypes = array('type' => 'hidden');
     }
     $oForm = BxDolForm::getObjectInstance('sys_login', 'sys_login');
     $sCustomHtmlBefore = '';
     $sCustomHtmlAfter = '';
     bx_alert('profile', 'show_login_form', 0, 0, array('oForm' => $oForm, 'sParams' => &$sParams, 'sCustomHtmlBefore' => &$sCustomHtmlBefore, 'sCustomHtmlAfter' => &$sCustomHtmlAfter, 'aAuthTypes' => &$aAuthTypes));
     if ($sForceRelocate && 0 === mb_stripos($sForceRelocate, BX_DOL_URL_ROOT)) {
         $oForm->aInputs['relocate']['value'] = $sForceRelocate;
     } elseif ('homepage' == $sForceRelocate) {
         $oForm->aInputs['relocate']['value'] = BX_DOL_URL_ROOT;
     }
     $sFormCode = $oForm->getCode();
     $sJoinText = '';
     if (strpos($sParams, 'no_join_text') === false) {
         $sJoinText = '<hr class="bx-def-hr bx-def-margin-sec-topbottom" /><div>' . _t('_sys_txt_login_description', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account')) . '</div>';
     }
     BxDolTemplate::getInstance()->addJs(array('jquery.form.min.js'));
     return $sCustomHtmlBefore . $sFormCode . $sCustomHtmlAfter . $sJoinText;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:35,代码来源:BxBaseServiceLogin.php

示例8: genSiteServiceMenu

 function genSiteServiceMenu()
 {
     $bLogged = isLogged();
     $aMenuItem = array();
     $sMenuPopupId = '';
     $sMenuPopupContent = '';
     $bShowVisitor = false;
     bx_import('BxTemplMenuService');
     $oMenu = new BxTemplMenuService();
     if ($bLogged) {
         $aProfile = getProfileInfo($oMenu->aMenuInfo['memberID']);
         $sThumbSetting = getParam('sys_member_info_thumb_icon');
         bx_import('BxDolMemberInfo');
         $o = BxDolMemberInfo::getObjectInstance($sThumbSetting);
         $sThumbUrl = $o ? $o->get($aProfile) : '';
         $bThumb = !empty($sThumbUrl);
         $o = BxDolMemberInfo::getObjectInstance($sThumbSetting . '_2x');
         $sThumbTwiceUrl = $o ? $o->get($aProfile) : '';
         if (!$sThumbTwiceUrl) {
             $sThumbTwiceUrl = $sThumbUrl;
         }
         $aMenuItem = array('bx_if:show_fu_thumb_image' => array('condition' => $bThumb, 'content' => array('image' => $sThumbUrl, 'image_2x' => $sThumbTwiceUrl)), 'bx_if:show_fu_thumb_icon' => array('condition' => !$bThumb, 'content' => array()), 'title' => getNickName($oMenu->aMenuInfo['memberID']));
         $sMenuPopupId = 'sys-service-menu-' . time();
         $sMenuPopupContent = $this->transBox($oMenu->getCode());
     } else {
         $aItems = $oMenu->getItemsArray();
         if (!empty($aItems)) {
             $bShowVisitor = true;
             $bLoginOnly = $aItems[0]['name'] == 'LoginOnly';
             $aMenuItem = array('caption' => $bLoginOnly ? $aItems[0]['caption'] : _t('_sys_sm_join_or_login'), 'icon' => $bLoginOnly ? $aItems[0]['icon'] : 'user', 'script' => $aItems[0]['script'], 'bx_if:show_fu_thumb_image' => array('condition' => false, 'content' => array()), 'bx_if:show_fu_thumb_icon' => array('condition' => false, 'content' => array()), 'title' => '');
         }
     }
     return $GLOBALS['oSysTemplate']->parseHtmlByName('extra_service_menu_wrapper.html', array('bx_if:show_for_visitor' => array('condition' => !$bLogged && $bShowVisitor, 'content' => $aMenuItem), 'bx_if:show_for_user' => array('condition' => $bLogged, 'content' => $aMenuItem), 'menu_popup_id' => $sMenuPopupId, 'menu_popup_content' => $sMenuPopupContent));
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:34,代码来源:BxTemplFunctions.php

示例9: comment_delete

function comment_delete()
{
    $data = array();
    // kiểm tra login
    if (!isLogged()) {
        redirect('/blogtaolao_MVC_/index.php?c=auth&m=login');
    }
    $aut = $_SESSION['logged']['aut'];
    if ($aut != "admin") {
        redirect('/blogtaolao_MVC_/index.php?c=auth&m=login');
    }
    // bắt dữ id bài viết cần chỉnh sửa
    $Currentcomment = empty($_GET['id']) ? null : strtolower($_GET['id']);
    // kiểm tra xem bài viết có tồn tại không!
    if (!model('comment')->check_true($Currentcomment, 'id')) {
        $msg = "Comment không tồn tại !!!";
        abort($msg);
    }
    if (model('comment')->delete($Currentcomment) >= 1) {
        $msg = "Xóa comment thành công!!!";
        abort($msg);
    } else {
        $msg = "Không thể xóa comment !!!";
        abort($msg);
    }
}
开发者ID:nguyenquang2302,项目名称:BlogTaoLao,代码行数:26,代码来源:comment.php

示例10: isAllowed

function isAllowed()
{
    if (!isLogged()) {
        setFlash("Veuillez vous connecter pour pouvoir effectuer cette action.", "danger");
        redirect('index.php');
    }
}
开发者ID:Reval63,项目名称:projet_photo,代码行数:7,代码来源:tests.php

示例11: checkPermission

function checkPermission($permissionNeeded)
{
    if (!isLogged()) {
        //Si necesito permisos y no estoy loggeado
        if ($permissionNeeded > 0) {
            header("Location: accessDenied.php");
            exit;
        }
    } else {
        //si estoy banneado
        if ($_SESSION["permission"] == 2) {
            //&& $permissionNeeded!= 2
            //redirigir a página de banneados
            header("Location: banned.php");
            exit;
        }
        //si necesito permisos de administrador pero no lo soy
        if ($permissionNeeded == 3 && $_SESSION["permission"] < 3) {
            //acceso denegado
            header("Location: accessDenied.php");
            exit;
        }
    }
    //si llegué acá es porque tengo permisos
}
开发者ID:subaradesu,项目名称:AjedrezFCFM,代码行数:25,代码来源:utils.php

示例12: blog_delete

function blog_delete()
{
    $currentUser = isLogged();
    if ($currentUser && model('entry')->delete($_GET['entry'])) {
        redirect('/index.php?c=blog&m=list');
    }
}
开发者ID:huynhtrucquyen0812,项目名称:EntryBlog,代码行数:7,代码来源:blog.php

示例13: __construct

 public function __construct($aObject, $oTemplate = false)
 {
     parent::__construct($aObject, $oTemplate);
     $CNF = $this->_oModule->_oConfig->CNF;
     $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
     $iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
     if ($iProfileId) {
         $this->_oProfile = BxDolProfile::getInstance($iProfileId);
     }
     if (!$this->_oProfile && $iContentId) {
         $this->_oProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $this->MODULE);
     }
     if ($this->_oProfile) {
         $this->_aProfileInfo = $this->_oProfile->getInfo();
         $this->_aContentInfo = $this->_oModule->_oDb->getContentInfoById($this->_aProfileInfo['content_id']);
         $this->addMarkers($this->_aProfileInfo);
         $this->addMarkers(array('profile_id' => $this->_oProfile->id()));
         if (isLogged()) {
             $oConn = BxDolConnection::getObjectInstance('sys_profiles_friends');
             if ($oConn->isConnectedNotMutual(bx_get_logged_profile_id(), $this->_oProfile->id())) {
                 $this->addMarkers(array('title_add_friend' => _t($CNF['T']['menu_item_title_befriend_sent']), 'title_remove_friend' => _t($CNF['T']['menu_item_title_unfriend_cancel_request'])));
             } elseif ($oConn->isConnectedNotMutual($this->_oProfile->id(), bx_get_logged_profile_id())) {
                 $this->addMarkers(array('title_add_friend' => _t($CNF['T']['menu_item_title_befriend_confirm']), 'title_remove_friend' => _t($CNF['T']['menu_item_title_unfriend_reject_request'])));
             } else {
                 $this->addMarkers(array('title_add_friend' => _t($CNF['T']['menu_item_title_befriend']), 'title_remove_friend' => _t($CNF['T']['menu_item_title_unfriend'])));
             }
         }
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:29,代码来源:BxBaseModProfileMenuView.php

示例14: serviceLoginForm

 public function serviceLoginForm($sParams = '', $sForceRelocate = '')
 {
     if (isLogged()) {
         return false;
     }
     // get all auth types
     $aAuthTypes = BxDolDb::getInstance()->fromCache('sys_objects_auths', 'getAll', 'SELECT * FROM `sys_objects_auths`');
     $oForm = BxDolForm::getObjectInstance('sys_login', 'sys_login');
     $sCustomHtmlBefore = '';
     $sCustomHtmlAfter = '';
     bx_alert('profile', 'show_login_form', 0, 0, array('oForm' => $oForm, 'sParams' => &$sParams, 'sCustomHtmlBefore' => &$sCustomHtmlBefore, 'sCustomHtmlAfter' => &$sCustomHtmlAfter, 'aAuthTypes' => &$aAuthTypes));
     if ($sForceRelocate && 0 === mb_stripos($sForceRelocate, BX_DOL_URL_ROOT)) {
         $oForm->aInputs['relocate']['value'] = $sForceRelocate;
     } elseif ('homepage' == $sForceRelocate) {
         $oForm->aInputs['relocate']['value'] = BX_DOL_URL_ROOT;
     }
     $sFormCode = $oForm->getCode();
     $sJoinText = '';
     if (strpos($sParams, 'no_join_text') === false) {
         $sJoinText = '<hr class="bx-def-hr bx-def-margin-sec-topbottom" /><div class="bx-def-font-align-center">' . _t('_sys_txt_login_description', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account')) . '</div>';
     }
     BxDolTemplate::getInstance()->addJs(array('jquery.form.min.js'));
     $sAuth = $this->serviceMemberAuthCode($aAuthTypes);
     return $sCustomHtmlBefore . $sAuth . $sFormCode . $sCustomHtmlAfter . $sJoinText;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:25,代码来源:BxBaseServiceLogin.php

示例15: addComment

 public function addComment($postData, $id)
 {
     $postData['blogs_id'] = $id;
     $postData['comment_day'] = date("Y-m-d H:i:s");
     $logged = isLogged();
     $postData['name'] = $logged['name'];
     return db_insert('comments', $postData);
 }
开发者ID:nguyenlevietphi,项目名称:MyBlog,代码行数:8,代码来源:blog.php


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