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


PHP CService::loadListWithPerms方法代码示例

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


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

示例1: CMediusers

 * @version    $Revision: 20186 $
 */
$date = CValue::getOrSession("date");
// Chargement des praticiens
$med = new CMediusers();
$listPrat = $med->loadPraticiens(PERM_READ);
$dateEntree = CMbDT::dateTime("23:59:00", $date);
$dateSortie = CMbDT::dateTime("00:01:00", $date);
$hierEntree = CMbDT::date("- 1 day", $dateEntree);
$hierEntree = CMbDT::dateTime("23:59:00", $hierEntree);
// Chargement des services
$service = new CService();
$whereServices = array();
$whereServices["group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
$whereServices["cancelled"] = "= '0'";
$services = $service->loadListWithPerms(PERM_READ, $whereServices, "nom");
// Initialisations
$totalHospi = 0;
$totalAmbulatoire = 0;
$totalMedecin = 0;
$total_prat = array();
foreach ($listPrat as $key => $prat) {
    $totalPrat[$prat->_id]["prat"] = $prat;
    $totalPrat[$prat->_id]["hospi"] = 0;
    $totalPrat[$prat->_id]["ambu"] = 0;
    $totalPrat[$prat->_id]["total"] = 0;
}
$sejour = new CSejour();
$whereSejour = array();
$whereSejour["sejour.group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
$whereSejour["sejour.entree_reelle"] = "IS NOT NULL";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_rapport.php

示例2: getServicesList

 /**
  * Get servoces list
  *
  * @return CService[]
  */
 static function getServicesList()
 {
     $service = new CService();
     $where = array();
     if (CAppUI::conf("dPstock host_group_id")) {
         $where["group_id"] = "IS NOT NULL";
     }
     return $service->loadListWithPerms(PERM_READ, $where, "nom");
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:14,代码来源:CProductStockGroup.class.php

示例3: getServicesIdsPref

 static function getServicesIdsPref($services_ids = array())
 {
     // Détection du changement d'établissement
     $group_id = CValue::get("g");
     if (!$services_ids || $group_id) {
         $group_id = $group_id ? $group_id : CGroups::loadCurrent()->_id;
         $pref_services_ids = json_decode(CAppUI::pref("services_ids_hospi"));
         // Si la préférence existe, alors on la charge
         if (isset($pref_services_ids->{"g{$group_id}"})) {
             $services_ids = $pref_services_ids->{"g{$group_id}"};
             $services_ids = explode("|", $services_ids);
             CMbArray::removeValue("", $services_ids);
         } else {
             $service = new CService();
             $where = array();
             $where["group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
             $where["cancelled"] = "= '0'";
             $services_ids = array_keys($service->loadListWithPerms(PERM_READ, $where, "externe, nom"));
         }
     }
     if (is_array($services_ids)) {
         CMbArray::removeValue("", $services_ids);
     }
     global $m;
     $save_m = $m;
     foreach (array("dPhospi", "dPadmissions") as $_module) {
         $m = $_module;
         CValue::setSession("services_ids", $services_ids);
     }
     $m = $save_m;
     return $services_ids;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:32,代码来源:CService.class.php

示例4: array

 * @version    $Revision$
 */
CCanDo::checkRead();
$group = CGroups::loadCurrent();
$ds = CSQLDataSource::get("std");
$service_id = CValue::getOrSession("service_id", 0);
$bloc_id = CValue::getOrSession("bloc_id", 0);
$date_suivi = CValue::getOrSession("date_suivi", CMbDT::date());
$listOps = array();
// Liste des services
$service = new CService();
$where = array();
$where["group_id"] = "= '{$group->_id}'";
$where["cancelled"] = "= '0'";
$order = "nom";
$services = $service->loadListWithPerms(PERM_READ, $where, $order);
// Liste des blocs
$bloc = new CBlocOperatoire();
$where = array();
$where["group_id"] = "= '{$group->_id}'";
$order = "nom";
$blocs = $bloc->loadListWithPerms(PERM_READ, $where, $order);
// Listes des interventions
$operation = new COperation();
$ljoin = array("plagesop" => "`operations`.`plageop_id` = `plagesop`.`plageop_id`", "sallesbloc" => "`operations`.`salle_id` = `sallesbloc`.`salle_id`", "sejour" => "`operations`.`sejour_id` = `sejour`.`sejour_id`");
$where = array();
$where[] = "`plagesop`.`date` = '{$date_suivi}' OR `operations`.`date` = '{$date_suivi}'";
if ($bloc_id) {
    $where["sallesbloc.bloc_id"] = "= '{$bloc_id}'";
}
$where["operations.annulee"] = "= '0'";
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:vw_suivi_bloc.php

示例5: CService

 *	@package Mediboard
 *	@subpackage soins
 *	@version $Revision$
 *  @author SARL OpenXtrem
 *  @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html 
 */
global $m;
CCanDo::checkEdit();
$service_id = CValue::getOrSession('service_id');
$endowment_id = CValue::getOrSession('endowment_id');
// Services list
$service = new CService();
$where = array();
$where["group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
$where["cancelled"] = "= '0'";
$list_services = $service->loadListWithPerms(PERM_READ, $where);
if ($m == "dPurgences") {
    foreach ($list_services as $_id => $_service) {
        if (!$_service->urgence) {
            unset($list_services[$_id]);
        }
    }
}
if (count($list_services) == 0) {
    CAppUI::stepMessage(UI_MSG_WARNING, "Vous n'avez accès à aucun service pour effectuer des commandes");
    return;
}
// Création du template
$smarty = new CSmartyDP("modules/soins");
$smarty->assign('service_id', $service_id);
$smarty->assign('list_services', $list_services);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_stocks_service.php


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