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


PHP CValue::getOrSessionAbs方法代碼示例

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


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

示例1: CGroups

    // dP remover super hack
    if (null == ($module = CModule::getInstalled("dP{$m}"))) {
        CAppUI::redirect("m=system&a=module_missing&mod={$m}");
    }
    $m = "dP{$m}";
}
// Get current module permissions
// these can be further modified by the included action files
$can = $module->canDo();
$a = CAppUI::checkFileName(CValue::get("a", $index));
$u = CAppUI::checkFileName(CValue::get("u", ""));
$dosql = CAppUI::checkFileName(CValue::post("dosql", ""));
$class = CAppUI::checkFileName(CValue::post("@class", ""));
$tab = $a == "index" ? CValue::getOrSession("tab", $tab) : CValue::get("tab");
// set the group in use, put the user group if not allowed
$g = CValue::getOrSessionAbs("g", CAppUI::$instance->user_group);
$indexGroup = new CGroups();
if ($indexGroup->load($g) && !$indexGroup->canRead()) {
    $g = CAppUI::$instance->user_group;
    CValue::setSessionAbs("g", $g);
}
$user = CAppUI::$user;
// Check whether the password is strong enough
// If account is not a robot
if ($user->_id && !$user->isRobot() && (!($m == "admin" && $tab == "chpwd") && !($m == "admin" && $dosql == "do_chpwd_aed"))) {
    if (CAppUI::$instance->weak_password && (!CAppUI::$instance->user_remote || CAppUI::conf("admin CUser apply_all_users"))) {
        CAppUI::redirect("m=admin&tab=chpwd&forceChange=1");
    }
    // If we want to force user to periodically change password
    if (CAppUI::conf("admin CUser force_changing_password") || $user->_ref_user->force_change_password) {
        // Need to change
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:main.php

示例2: trim

<?php

/**
 * $Id$
 *
 * @category HL7
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkAdmin();
$object_class = trim(CValue::getOrSession("object_class"));
$object_id = trim(CValue::getOrSession("object_id"));
$cn_receiver_guid = trim(CValue::getOrSessionAbs("cn_receiver_guid"));
$object = null;
if ($object_class && $object_id) {
    $object = CMbObject::loadFromGuid("{$object_class}-{$object_id}");
}
$receiver = new CReceiverHL7v2();
$receiver->group_id = CGroups::loadCurrent()->_id;
$receiver->actif = "1";
$receivers = $receiver->loadMatchingList();
$object_classes = array("COperation", "CSejour");
$smarty = new CSmartyDP();
$smarty->assign("object_class", $object_class);
$smarty->assign("object_classes", $object_classes);
$smarty->assign("object_id", $object_id);
$smarty->assign("object", $object);
$smarty->assign("receivers", $receivers);
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:vw_test_hl7v2.php


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