本文整理汇总了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";
示例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");
}
示例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;
}
示例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'";
示例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);