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


PHP CModule::getActive方法代码示例

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


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

示例1: isHandled

 /**
  * @see parent::isHandled()
  */
 static function isHandled(CMbObject $mbObject)
 {
     if (!CModule::getActive("dPhospi")) {
         return false;
     }
     return in_array($mbObject->_class, self::$handled);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:10,代码来源:CAffectationHandler.class.php

示例2: updateFormFields

 /**
  * @see parent::updateFormFields
  */
 function updateFormFields()
 {
     parent::updateFormFields();
     $this->_parent_class = "CInteropSender";
     if (CModule::getActive("hprimxml")) {
         $this->_tag_hprimxml = CHPrimXML::getObjectTag($this->group_id);
     }
     if (CModule::getActive("phast")) {
         $this->_tag_phast = CPhast::getTagPhast($this->group_id);
     }
     if (CModule::getActive("hl7")) {
         $this->_tag_hl7 = CHL7::getObjectTag($this->group_id);
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:17,代码来源:CInteropSender.class.php

示例3: doStore

 function doStore()
 {
     parent::doStore();
     if (CModule::getActive("dPprescription") && !$this->_old->_id) {
         $p_to_c = new CPrescriptionProtocoleToConcept();
         $count_p_to_c = $p_to_c->countList();
         if ($count_p_to_c > 0) {
             /** @var CExObject $ex_object */
             $ex_object = $this->_obj;
             $all_fields = $ex_object->loadRefExClass()->loadRefsAllFields();
             $bool_concept_ids = array();
             foreach ($all_fields as $_field) {
                 if (strpos($_field->prop, "bool") === 0 && $_field->concept_id && $ex_object->{$_field->name} == "1") {
                     $bool_concept_ids[] = $_field->concept_id;
                 }
             }
             $bool_concept_ids = array_unique($bool_concept_ids);
             $where = array("concept_id" => $p_to_c->getDS()->prepareIn($bool_concept_ids));
             $protocole_ids = array_values(CMbArray::pluck($p_to_c->loadList($where), "protocole_id"));
             if (count($protocole_ids)) {
                 /** @var CSejour $sejour */
                 $sejour = $ex_object->getReferenceObject("CSejour");
                 if ($sejour && $sejour->_id) {
                     $prescription = $sejour->loadRefPrescriptionSejour();
                     if (!$prescription->_id) {
                         $prescription = new CPrescription();
                         $prescription->object_id = $sejour->_id;
                         $prescription->object_class = $sejour->_class;
                         $prescription->type = "sejour";
                         if ($msg = $prescription->store()) {
                             CAppUI::setMsg($msg, UI_MSG_WARNING);
                         }
                     }
                     $ops_ids = implode("-", CMbArray::pluck($sejour->loadRefsOperations(array("annulee" => "= '0'")), "operation_id"));
                     CAppUI::callbackAjax("window.opener.ExObject.checkOpsBeforeProtocole", $protocole_ids, $prescription->_id, $sejour->_id, $ops_ids);
                 }
             }
         }
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:40,代码来源:do_ex_object_aed.php

示例4: loadNewMessages

 /**
  * Load unread messages
  *
  * @param null $user_id user to load, null = current
  *
  * @return CUserMessageDest[]
  */
 static function loadNewMessages($user_id = null)
 {
     $dests = array();
     if (CModule::getActive("messagerie")) {
         $dest = new self();
         if ($dest->_ref_module->mod_version < 0.3) {
             CAppUI::stepAjax("CModule%s-msg-pls_update_module", UI_MSG_WARNING, $dest->_ref_module->mod_name);
             return $dests;
         }
         $user = CMediusers::get($user_id);
         $where = array();
         $where["to_user_id"] = " = '{$user->_id}'";
         $where["datetime_sent"] = " IS NOT NULL";
         $where["datetime_read"] = " IS NULL";
         /** @var CUserMessageDest[] $dests */
         $dests = $dest->loadList($where);
         foreach ($dests as $_dest) {
             $_dest->loadRefFwd();
         }
     }
     return $dests;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:29,代码来源:CUserMessageDest.class.php

示例5: CMediusers

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage SSR
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCando::checkEdit();
$date = CValue::get("date", CMbDT::date());
$kine_id = CValue::getOrSession("kine_id", CAppUI::$instance->user_id);
// Chargement de la liste des utilisateurs
$user = new CMediusers();
$kines = CModule::getActive("dPprescription") ? CFunctionCategoryPrescription::getAllExecutants() : $user->loadKines();
$kine = new CMediusers();
$kine->load($kine_id);
$kine->loadRefIntervenantCdARR();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("kine", $kine);
$smarty->assign("kines", $kines);
$smarty->assign("kine_id", $kine_id);
$smarty->display("vw_kine_board.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:26,代码来源:vw_kine_board.php

示例6: CPatient

        $patient->allow_sms_notification = 1;
    }
}
// Peut etre pas besoin de verifier si on n'utilise pas VitaleVision
if ($useVitale && CAppUI::pref('LogicielLectureVitale') == 'none' && CModule::getActive("fse")) {
    $patVitale = new CPatient();
    $cv = CFseFactory::createCV();
    if ($cv) {
        $cv->getPropertiesFromVitale($patVitale, CValue::sessionAbs('administrative_data'));
        $patVitale->nullifyEmptyFields();
        $patient->extendsWith($patVitale);
        $patient->updateFormFields();
        $patient->_bind_vitale = "1";
    }
}
if ($covercard && CModule::getActive("covercard")) {
    $covercardExec = CCoverCard::process($covercard);
    if ($covercardExec->queryNumber) {
        CCoverCard::updatePatientFromCC($patient, $covercardExec);
    }
}
// Chargement du nom_fr du pays de naissance
if ($patient_id) {
    $patient->updateNomPaysInsee();
}
$group = CGroups::loadCurrent();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("patient", $patient);
$smarty->assign("useVitale", $useVitale);
$smarty->assign('nom_jeune_fille_mandatory', CAppUI::conf("dPpatients CPatient nom_jeune_fille_mandatory", $group));
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_edit_patients.php

示例7: CSearch

    $tab_favoris += $tab_favoris_user_sans_cibles + $tab_favoris_function_sans_cibles + $tab_favoris_group_sans_cibles;
}
// On effectue la recherche automatique
if (isset($tab_favoris)) {
    try {
        $search = new CSearch();
        $results = $search->searchAuto($tab_favoris, $_ref_object);
    } catch (Exception $e) {
        CAppUI::displayAjaxMsg("search-not-connected", UI_MSG_ERROR);
        mbLog($e->getMessage());
    }
}
// Récupération des rss items pour le marquage pmsi (preuves de recherche PMSI)
$rss_items = array();
$items = array();
if ($contexte == "pmsi" && CModule::getActive("atih")) {
    $rss = new CRSS();
    $rss->sejour_id = $sejour_id;
    $rss->loadMatchingObject();
    $rss_items = $rss->loadRefsSearchItems();
    foreach ($rss_items as $_items) {
        $items[] = $_items->search_class . "-" . $_items->search_id;
    }
}
$smarty = new CSmartyDP();
$smarty->assign("sejour", $_ref_object);
$smarty->assign("sejour_id", $_ref_object->_id);
$smarty->assign("results", $results);
$smarty->assign("date", $date);
$smarty->assign("types", $types);
$smarty->assign("contexte", $contexte);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_search_auto.php

示例8: array

// Chargement des boxes d'urgences
$boxes = array();
foreach (CService::loadServicesUHCD() as $service) {
    foreach ($service->_ref_chambres as $chambre) {
        foreach ($chambre->_ref_lits as $lit) {
            $boxes[$lit->_id] = $lit;
        }
    }
}
// Si admin sur le module urgences, alors modification autorisée du diagnostic
// infirmier depuis la main courante.
$module = new CModule();
$module->mod_name = "dPurgences";
$module->loadMatchingObject();
$admin_urgences = $module->canAdmin();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("boxes", $boxes);
$smarty->assign("order_col", $order_col);
$smarty->assign("order_way", $order_way);
$smarty->assign("listPrats", $listPrats);
$smarty->assign("listSejours", $listSejours);
$smarty->assign("uhcd_affichage", $uhcd_affichage);
$smarty->assign("medicalView", $medicalView);
$smarty->assign("date", $date);
$smarty->assign("date_before", $date_before);
$smarty->assign("today", CMbDT::date());
$smarty->assign("isImedsInstalled", CModule::getActive("dPImeds") && CImeds::getTagCIDC(CGroups::loadCurrent()));
$smarty->assign("admin_urgences", $admin_urgences);
$smarty->assign("type", "UHCD");
$smarty->display("inc_main_courante.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_refresh_uhcd.php

示例9: isAuthentificate

    }
    function isAuthentificate()
    {
    }
    function getResponseTime()
    {
    }
    /**
     * Get child exchanges
     *
     * @return string[] Data format classes collection
     */
    static function getAll()
    {
        $sources = CApp::getChildClasses("CExchangeSource", true);
        return array_filter($sources, function ($v) {
            $s = new $v();
            return $s->_spec->key;
        });
    }
}
if (CModule::getActive("hl7")) {
    CExchangeSource::$typeToClass["mllp"] = "CSourceMLLP";
}
if (CModule::getActive("dicom")) {
    CExchangeSource::$typeToClass["dicom"] = "CSourceDicom";
}
if (CModule::getActive("mssante")) {
    CExchangeSource::$typeToClass["mssante"] = "CSourceMSSante";
    CExchangeSource::$multi_instance[] = "CSourceMSSante";
}
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:CExchangeSource.class.php

示例10: CUser

 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 */
CCanDo::checkEdit();
$user_id = CCanDo::edit() ? CValue::getOrSession("user_id", "default") : null;
$user = CUser::get($user_id);
$prof = $user->profile_id ? CUser::get($user->profile_id) : new CUser();
if ($user_id == "default") {
    $user->_id = null;
}
$prefvalues = array("default" => CPreferences::get(null, true), "template" => $user->profile_id ? CPreferences::get($user->profile_id, true) : array(), "user" => $user->_id !== "" ? CPreferences::get($user->_id, true) : array());
// common sera toujours au debut
$prefs = array("common" => array());
// Classement par module et par permission fonctionnelle
CPreferences::loadModules(true);
foreach (CPreferences::$modules as $modname => $prefnames) {
    $module = CModule::getActive($modname);
    $canRead = $module ? CPermModule::getPermModule($module->_id, PERM_READ, $user_id) : false;
    if ($modname == "common" || $user_id == "default" || $canRead) {
        $prefs[$modname] = array();
        foreach ($prefnames as $prefname) {
            $prefs[$modname][$prefname] = array("default" => CMbArray::extract($prefvalues["default"], $prefname), "template" => CMbArray::extract($prefvalues["template"], $prefname), "user" => CMbArray::extract($prefvalues["user"], $prefname));
        }
    }
}
// Warning: user clone necessary!
// Some module index change $user global
$user_clone = $user;
// Chargement des modules
$modules = CPermModule::getVisibleModules();
foreach ($modules as $module) {
    // Module might not be present
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_functional_perms.php

示例11: COperation

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage SalleOp
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
// @todo bloc n'est pas forcément actif
global $can;
$can->read |= CModule::getActive("dPbloc")->_can->read;
$can->needsRead();
$operation_id = CValue::getOrSession("operation_id", null);
$operation = new COperation();
$operation->load($operation_id);
$operation->loadRefsAnesthPerops();
$operation->loadRefsFwd();
$operation->loadRefsActesCCAM();
foreach ($operation->_ref_actes_ccam as $keyActe => $acte) {
    $acte =& $operation->_ref_actes_ccam[$keyActe];
    $acte->loadRefsFwd();
}
if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
    $operation->guessActesAssociation();
} else {
    foreach ($operation->_ref_actes_ccam as $acte) {
        $acte->guessAssociation();
    }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:vw_partogramme.php

示例12: doStore

 /**
  * @see parent::doStore()
  */
 function doStore()
 {
     $upload = null;
     if (CValue::POST("_from_yoplet") == 1) {
         /** @var CFile $obj */
         $obj = $this->_obj;
         $array_file_name = array();
         $path = CAppUI::conf("dPfiles yoplet_upload_path");
         if (!$path) {
             $path = "tmp";
         }
         // On retire les backslashes d'escape
         $file_name = stripslashes($this->request['_file_path']);
         // Récupération du nom de l'image en partant de la fin de la chaîne
         // et en rencontrant le premier \ ou /
         preg_match('@[\\\\/]([^\\\\/]*)$@i', $file_name, $array_file_name);
         $file_name = $array_file_name[1];
         $extension = strrchr($file_name, '.');
         $_rename = $this->request['_rename'] ? $this->request['_rename'] : 'upload';
         $file_path = "{$path}/" . $this->request['_checksum'];
         $obj->file_name = $_rename == 'upload' ? $file_name : $_rename . $extension;
         $obj->_old_file_path = $this->request['_file_path'];
         $obj->doc_size = filesize($file_path);
         $obj->author_id = CAppUI::$user->_id;
         if (CModule::getActive("cda")) {
             $obj->type_doc = $this->request["type_doc"];
         }
         $obj->fillFields();
         $obj->updateFormFields();
         $obj->file_type = CMbPath::guessMimeType($file_name);
         if ($msg = $obj->store()) {
             CAppUI::setMsg($msg, UI_MSG_ERROR);
         } else {
             $obj->forceDir();
             $obj->moveFile($file_path);
         }
         return parent::doStore();
     }
     $_file_category_id = CValue::post("_file_category_id");
     $language = CValue::post("language");
     $type_doc = CValue::post("type_doc");
     $named = CValue::post("named");
     $rename = CValue::post("_rename");
     CValue::setSession("_rename", $rename);
     if (isset($_FILES["formfile"])) {
         $aFiles = array();
         $upload =& $_FILES["formfile"];
         foreach ($upload["error"] as $fileNumber => $etatFile) {
             if (!$named) {
                 $rename = $rename ? $rename . strrchr($upload["name"][$fileNumber], '.') : "";
             }
             if ($upload["name"][$fileNumber]) {
                 $aFiles[] = array("_mode" => "file", "name" => $upload["name"][$fileNumber], "type" => CMbPath::guessMimeType($upload["name"][$fileNumber]), "tmp_name" => $upload["tmp_name"][$fileNumber], "error" => $upload["error"][$fileNumber], "size" => $upload["size"][$fileNumber], "language" => $language, "type_doc" => $type_doc, "file_category_id" => $_file_category_id, "object_id" => CValue::post("object_id"), "object_class" => CValue::post("object_class"), "_rename" => $rename);
             }
         }
         // Pasted images, via Data uri
         if (!empty($_POST["formdatauri"])) {
             $data_uris = $_POST["formdatauri"];
             $data_names = $_POST["formdatauri_name"];
             foreach ($data_uris as $fileNumber => $fileContent) {
                 $parsed = $this->parseDataUri($fileContent);
                 $_name = $data_names[$fileNumber];
                 if (!$named) {
                     $ext = strrchr($_name, '.');
                     if ($ext === false) {
                         $ext = "." . substr(strrchr($parsed["mime"], '/'), 1);
                         $_name .= $ext;
                     }
                     $rename = $rename ? $rename . $ext : "";
                 }
                 $temp = tempnam(sys_get_temp_dir(), "up_");
                 file_put_contents($temp, $parsed["data"]);
                 if ($data_names[$fileNumber]) {
                     $aFiles[] = array("_mode" => "datauri", "name" => $_name, "type" => $parsed["mime"], "tmp_name" => $temp, "error" => 0, "size" => strlen($parsed["data"]), "language" => $language, "type_doc" => $type_doc, "file_category_id" => $_file_category_id, "object_id" => CValue::post("object_id"), "object_class" => CValue::post("object_class"), "_rename" => $rename);
                 }
             }
         }
         $merge_files = CValue::post("_merge_files");
         if ($merge_files) {
             $pdf = new CMbPDFMerger();
             $this->_obj = new $this->_obj->_class();
             /** @var CFile $obj */
             $obj = $this->_obj;
             $file_name = "";
             $nb_converted = 0;
             foreach ($aFiles as $key => $file) {
                 $converted = 0;
                 if ($file["error"] == UPLOAD_ERR_NO_FILE) {
                     continue;
                 }
                 if ($file["error"] != 0) {
                     CAppUI::setMsg(CAppUI::tr("CFile-msg-upload-error-" . $file["error"]), UI_MSG_ERROR);
                     continue;
                 }
                 // Si c'est un pdf, on le rajoute sans aucun traitement
                 if (substr(strrchr($file["name"], '.'), 1) == "pdf") {
                     $file_name .= substr($file["name"], 0, strpos($file["name"], '.'));
//.........这里部分代码省略.........
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:101,代码来源:CFileAddEdit.class.php

示例13: array

<?php

/**
 * $Id: vw_all_perms.php 27868 2015-04-04 16:59:04Z mytto $
 *
 * @category Admin
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision: 27868 $
 * @link     http://www.mediboard.org
 */
CCanDo::checkRead();
CView::enforceSlave();
// Liste des modules
$listModules = CModule::getActive();
// Liste des utilisateurs
$listFunctions = CGroups::loadCurrent()->loadFunctions(PERM_READ);
foreach ($listFunctions as &$curr_function) {
    $curr_function->loadRefsUsers();
}
// Matrice des droits
$perms = array(PERM_DENY => "interdit", PERM_READ => "lecture", PERM_EDIT => "ecriture");
$views = array(PERM_DENY => "caché", PERM_READ => "menu", PERM_EDIT => "administration");
$icons = array(PERM_DENY => "empty", PERM_READ => "read", PERM_EDIT => "edit");
$where = array();
$whereGeneral = array("mod_id" => "IS NULL");
$matrice = array();
foreach ($listFunctions as $curr_func) {
    foreach ($curr_func->_ref_users as $curr_user) {
        $curr_user->loadRefProfile();
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_all_perms.php

示例14: store

 /**
  * @see parent::store()
  */
 function store()
 {
     $is_new = !$this->_id;
     if ($msg = parent::store()) {
         return $msg;
     }
     if ($is_new) {
         CConfiguration::clearDataCache();
         if (CModule::getActive("dPprescription")) {
             CConfigService::emptySHM();
             CConfigMomentUnitaire::emptySHM();
         }
     }
     return null;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:18,代码来源:CGroups.class.php

示例15: loadRefModule

 /**
  * Load active module
  *
  * @param string $name Name of the module
  *
  * @return CModule
  */
 function loadRefModule($name)
 {
     return $this->_ref_module = CModule::getActive($name);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:11,代码来源:CStoredObject.class.php


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