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


PHP CMediusers::loadBackRefs方法代码示例

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


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

示例1: CMediusers

if (!$mediuser->isPraticien()) {
    $mediuser = new CMediusers();
}
$function_id = CValue::getOrSession("function_id");
$type = CValue::getOrSession("type", "interv");
$page = CValue::get("page");
$sejour_type = CValue::get("sejour_type");
$step = 30;
$protocole = new CProtocole();
$where = array();
$chir = new CMediusers();
$chir->load($chir_id);
if ($chir->_id) {
    $chir->loadRefFunction();
    $functions = array($chir->function_id);
    $chir->loadBackRefs("secondary_functions");
    foreach ($chir->_back["secondary_functions"] as $curr_sec_func) {
        $functions[] = $curr_sec_func->function_id;
    }
    $list_functions = implode(",", $functions);
    $where[] = "protocole.chir_id = '{$chir->_id}' OR protocole.function_id IN ({$list_functions})";
} else {
    $where["function_id"] = " = '{$function_id}'";
}
$where["for_sejour"] = $type == 'interv' ? "= '0'" : "= '1'";
if ($sejour_type) {
    $where["type"] = "= '{$sejour_type}'";
}
$order = "libelle_sejour, libelle, codes_ccam";
$list_protocoles = $protocole->loadListWithPerms(PERM_READ, $where, $order, "{$page[$type]},{$step}");
$systeme_materiel_expert = CAppUI::conf("dPbloc CPlageOp systeme_materiel") == "expert";
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:httpreq_vw_list_protocoles.php

示例2: COUNT

    $smarty->assign("date", $date);
    $smarty->assign("listPrat", $listPrat);
    $smarty->assign("listInterv", $listInterv);
    $smarty->assign("services", $services);
    $smarty->assign("selPrat", $selPrat);
    $smarty->assign("canceled", $canceled);
    $smarty->assign("sans_anesth", $sans_anesth);
    $smarty->assign("count_ops", $count_ops);
    $smarty->display("vw_idx_visite_anesth.tpl");
} else {
    // Selection des plages du praticien et de celles de sa spécialité
    $praticien_id = null;
    $function_ids = null;
    if ($selPraticien->isPraticien()) {
        $praticien_id = $selPraticien->user_id;
        $function_ids = CMbArray::pluck($selPraticien->loadBackRefs("secondary_functions"), "function_id");
        $function_ids[] = $selPraticien->function_id;
    }
    // Planning du mois
    $month_min = CMbDT::format($date, "%Y-%m-01");
    $month_max = CMbDT::format($date, "%Y-%m-31");
    $sql = "SELECT plagesop.*, plagesop.date AS opdate,\r\n        SEC_TO_TIME(SUM(TIME_TO_SEC(operations.temp_operation))) AS duree,\r\n        COUNT(operations.operation_id) AS total,\r\n        SUM(operations.rank_voulu > 0) AS planned_by_chir,\r\n        COUNT(IF(operations.rank > 0, NULLIF(operations.rank, operations.rank_voulu), NULL)) AS order_validated,\r\n        functions_mediboard.text AS nom_function, functions_mediboard.color as color_function\r\n      FROM plagesop\r\n      LEFT JOIN operations\r\n        ON plagesop.plageop_id = operations.plageop_id\r\n          AND operations.annulee = '0'\r\n          AND operations.chir_id = '{$praticien_id}'\r\n      LEFT JOIN functions_mediboard\r\n        ON functions_mediboard.function_id = plagesop.spec_id\r\n      WHERE (plagesop.chir_id = '{$praticien_id}' OR plagesop.spec_id " . CSQLDataSource::prepareIn($function_ids) . ")\r\n        AND plagesop.date BETWEEN '{$month_min}' AND '{$month_max}'\r\n      GROUP BY plagesop.plageop_id\r\n      ORDER BY plagesop.date, plagesop.debut, plagesop.plageop_id";
    $listPlages = array();
    if ($praticien_id) {
        $listPlages = $ds->loadList($sql);
    }
    // Urgences du mois
    $sql = "SELECT operations.*, operations.date AS opdate,\r\n        SEC_TO_TIME(SUM(TIME_TO_SEC(operations.temp_operation))) AS duree,\r\n        COUNT(operations.operation_id) AS total\r\n      FROM operations\r\n      WHERE operations.annulee = '0'\r\n        AND operations.chir_id = '{$praticien_id}'\r\n        AND operations.plageop_id IS NULL\r\n        AND operations.date BETWEEN '{$month_min}' AND '{$month_max}'\r\n      GROUP BY operations.date\r\n      ORDER BY operations.date";
    $listUrgences = array();
    if ($praticien_id) {
        $listUrgences = $ds->loadList($sql);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_idx_planning.php

示例3: foreach

    $function->load($filter->_specialite);
    $function->loadBackRefs("users");
    $function->loadBackRefs("secondary_functions");
    $functions[$function->_id] = $function;
    $praticiens = $function->_back["users"];
    /** @var CSecondaryFunction $sec_func */
    foreach ($function->_back["secondary_functions"] as $sec_func) {
        if (!isset($praticiens[$sec_func->user_id])) {
            $sec_func->loadRefUser();
            $praticiens[$sec_func->user_id] = $sec_func->_ref_user;
        }
    }
} elseif ($filter->_prat_id) {
    // Filtre sur le chir : le chir et ses specs primaires et secondaires
    $praticien->loadRefFunction();
    $praticien->loadBackRefs("secondary_functions");
    $praticiens[$praticien->_id] = $praticien;
    $functions[$praticien->function_id] = $praticien->_ref_function;
    /** @var CSecondaryFunction $sec_func */
    foreach ($praticien->_back["secondary_functions"] as $sec_func) {
        if (!isset($functions[$sec_func->function_id])) {
            $sec_func->loadRefFunction();
            $functions[$sec_func->function_id] = $sec_func->_ref_function;
        }
    }
}
// Liste des praticiens et fonctions à charger
$wherePlagesop[] = "plagesop.chir_id " . CSQLDataSource::prepareIn(array_keys($praticiens)) . " OR plagesop.spec_id " . CSQLDataSource::prepareIn(array_keys($functions));
$whereOperations["operations.chir_id"] = CSQLDataSource::prepareIn(array_keys($praticiens));
// En fonction de la salle
$salle = new CSalle();
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:view_planning.php

示例4:

    $duree_occupation = $_occupation["total"];
    $color = "#fff";
    if ($duree_occupation < $config["faible"]) {
        $color = "#8f8";
    }
    if ($duree_occupation > $config["eleve"]) {
        $color = "#f88";
    }
    if ($duree_occupation >= $config["faible"] && $duree_occupation <= $config["eleve"]) {
        $color = "#ff4";
    }
    $planning->addDayLabel($_occupation["date"], $_occupation["total"] . " mn", null, $color);
}
// Congés du personnel
/** @var CPlageConge $_plage */
foreach ($kine->loadBackRefs("plages_conge") as $_plage) {
    $planning->addUnavailability($_plage->date_debut, $_plage->date_fin);
}
// Activité du compte
if ($kine->deb_activite) {
    $deb = CMbDT::date("-1 DAY", $kine->deb_activite);
    $planning->addUnavailability(CMbDT::date("-1 WEEK", $deb), $deb);
}
if ($kine->fin_activite) {
    $fin = CMbDT::date("+1 DAY", $kine->fin_activite);
    $planning->addUnavailability($fin, CMbDT::date("+1 WEEK", $fin));
}
// Heure courante
$planning->showNow();
$planning->rearrange(true);
// Création du template
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_planning_technicien.php

示例5: CMediusers

 * @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();
$user = new CMediusers();
$user_id = CValue::get("user_id");
$function_id = CValue::get("function_id");
// current user, if no user & no function
if (!$user_id && !$function_id) {
    $user_id = CMediusers::get()->_id;
}
$user->load($user_id);
$user->_ref_drawing_cat = $user->loadBackRefs('drawing_category_user');
/** @var CDrawingCategory $_cat */
foreach ($user->_ref_drawing_cat as $_cat) {
    $_cat->loadRefsFiles();
}
// function
$functions = array();
if (!$function_id && $user->_id) {
    $function_id = $user->function_id;
    $functions = $user->loadRefsSecondaryFunctions();
}
$function = new CFunctions();
$function->load($function_id);
$functions[$function->_id] = $function;
foreach ($functions as $_function) {
    $_function->_ref_drawing_cat = $_function->loadBackRefs('drawing_category_function');
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_list_ressources.php


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