本文整理汇总了PHP中CCanDo::checkAdmin方法的典型用法代码示例。如果您正苦于以下问题:PHP CCanDo::checkAdmin方法的具体用法?PHP CCanDo::checkAdmin怎么用?PHP CCanDo::checkAdmin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCanDo
的用法示例。
在下文中一共展示了CCanDo::checkAdmin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CSupervisionInstantData
<?php
/**
* $Id: ajax_edit_supervision_instant_data.php 26001 2014-11-24 15:22:57Z phenxdesign $
*
* @package Mediboard
* @subpackage Patients
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 26001 $
*/
CCanDo::checkAdmin();
$supervision_instant_data_id = CValue::getOrSession("supervision_instant_data_id");
$instant_data = new CSupervisionInstantData();
$instant_data->load($supervision_instant_data_id);
$instant_data->loadRefsNotes();
if (!$instant_data->_id) {
$instant_data->size = 11;
}
$smarty = new CSmartyDP();
$smarty->assign("instant_data", $instant_data);
$smarty->display("inc_edit_supervision_instant_data.tpl");
示例2: COperation
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage PlanningOp
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
$user = CMediusers::get();
// Si ni praticien ni admin, redirect
if (!$user->isPraticien() && CCanDo::checkAdmin()) {
CAppUI::redirect();
}
// Gestion des bouton radio des dates
$now = CMbDT::date();
$week_deb = CMbDT::date("last sunday", $now);
$week_fin = CMbDT::date("next sunday", $week_deb);
$week_deb = CMbDT::date("+1 day", $week_deb);
$rectif = CMbDT::transform("+0 DAY", $now, "%d") - 1;
$month_deb = CMbDT::date("-{$rectif} DAYS", $now);
$month_fin = CMbDT::date("+1 month", $month_deb);
$month_fin = CMbDT::date("-1 day", $month_fin);
// Chargement du filter permettant de faire la recherche
$filter = new COperation();
$filter->_date_min = $now;
$filter->_date_max = $now;
// Chargement de la liste de tous les praticiens
$praticien = new CMediusers();