當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CAppUI::pref方法代碼示例

本文整理匯總了PHP中CAppUI::pref方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::pref方法的具體用法?PHP CAppUI::pref怎麽用?PHP CAppUI::pref使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CAppUI的用法示例。


在下文中一共展示了CAppUI::pref方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: loadFile

 /**
  * Links a shortcut icon (aka "favicon")
  * Only to be called while in the HTML header
  *
  * @param string $file The path to the favicon file
  * @param string $type The favicon mime type
  *
  * @return string An HTML tag to load the favicon
  */
 static function loadFile($file, $type = "image/ico")
 {
     if (CAppUI::pref("moduleFavicon")) {
         global $m;
         $file = "./modules/{$m}/images/icon.png";
         return self::getTag("link", array("type" => "image/png", "rel" => "shortcut icon", "href" => "{$file}?" . self::getBuild()));
     }
     return self::getTag("link", array("type" => $type, "rel" => "shortcut icon", "href" => "{$file}?" . self::getBuild()));
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:18,代碼來源:CFaviconLoader.class.php

示例2: setUserDefinedLifetime

 /**
  * Sets user defined session life time
  *
  * @return void
  */
 static function setUserDefinedLifetime()
 {
     // Update session lifetime
     $pref = intval(CAppUI::pref("sessionLifetime")) * 60;
     // If default pref, we use the PHP default value
     $session_gc_maxlifetime = self::getPhpSessionLifeTime();
     $session_lifetime = $session_gc_maxlifetime;
     if ($pref && $pref <= $session_gc_maxlifetime) {
         $session_lifetime = $pref;
     }
     self::updateLifetime($session_lifetime);
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:17,代碼來源:CSessionHandler.class.php

示例3: tr

 /**
  * @param integer $field_id
  *
  * @return CExClassFieldTranslation
  */
 static function tr($field_id)
 {
     static $cache = array();
     $lang = CAppUI::pref("LOCALE");
     if (isset($cache[$lang][$field_id])) {
         return $cache[$lang][$field_id];
     }
     $trans = new self();
     $trans->lang = $lang;
     $trans->ex_class_field_id = $field_id;
     if ($trans->loadMatchingObject()) {
         $cache[$lang][$field_id] = $trans;
     }
     return $trans;
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:20,代碼來源:CExClassFieldTranslation.class.php

示例4: loadRefEnumTranslations

 /**
  * Load enum translations
  *
  * @return CExClassFieldEnumTranslation[]
  */
 function loadRefEnumTranslations()
 {
     $trans = new CExClassFieldEnumTranslation();
     $trans->lang = CAppUI::pref("LOCALE");
     $trans->ex_class_field_id = $this->_id;
     return $trans->loadMatchingList();
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:12,代碼來源:CExClassField.class.php

示例5: CCSVFile

<?php

/**
 * $Id$
 *  
 * @category DPpatients
 * @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
 */
if (!CAppUI::pref("allowed_modify_identity_status")) {
    CAppUI::redirect("m=system&a=access_denied");
}
$number_day = CValue::getOrSession("_number_day", 8);
$number_day = $number_day ?: 8;
$now = CValue::getOrSession("_date_end", CMbDT::date());
$before = CMbDT::date("-{$number_day} DAY", $now);
$csv = new CCSVFile();
$line = array("Date", CAppUI::tr("CPatient.status.PROV"), CAppUI::tr("CPatient.status.DPOT"), CAppUI::tr("CPatient.status.ANOM"), CAppUI::tr("CPatient.status.CACH"), CAppUI::tr("CPatient.status.VALI"));
$csv->writeLine($line);
$results = CPatientStateTools::getPatientStateByDate($before, $now);
$values = array();
for ($i = $number_day; $i >= 0; $i--) {
    $values[CMbDT::date("-{$i} DAY", $now)] = array("PROV" => 0, "DPOT" => 0, "ANOM" => 0, "CACH" => 0, "VALI" => 0);
}
foreach ($results as $_result) {
    $values[$_result["date"]][$_result["state"]] = $_result["total"];
}
foreach ($values as $_date => $_value) {
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:ajax_export_stats_patient_state.php

示例6: sprintf

}
if (!$patient_id) {
    $patient->nom = $name;
    $patient->prenom = $firstName;
    $patient->assure_nom = $name;
    $patient->assure_prenom = $firstName;
    $patient->unescapeValues();
    if ($naissance_day && $naissance_month && $naissance_year) {
        $patient->naissance = sprintf('%04d-%02d-%02d', $naissance_year, $naissance_month, $naissance_day);
    }
    if (CAppUI::conf("dPpatients CPatient default_value_allow_sms", CGroups::loadCurrent())) {
        $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);
    }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:vw_edit_patients.php

示例7: trim

    CValue::setSession("selClass", null);
    CValue::setSession("selKey", null);
} else {
    $patient->load($patient_id);
}
$patient_nom = trim(CValue::getOrSession("nom"));
$patient_prenom = trim(CValue::getOrSession("prenom"));
$patient_ville = CValue::get("ville");
$patient_cp = CValue::get("cp");
$patient_day = CValue::getOrSession("Date_Day");
$patient_month = CValue::getOrSession("Date_Month");
$patient_year = CValue::getOrSession("Date_Year");
$patient_naissance = "{$patient_year}-{$patient_month}-{$patient_day}";
$patient_ipp = CValue::get("patient_ipp");
$patient_nda = CValue::get("patient_nda");
$useVitale = CValue::get("useVitale", CModule::getActive("fse") && CAppUI::pref('LogicielLectureVitale') != 'none' ? 1 : 0);
$prat_id = CValue::get("prat_id");
$patient_sexe = CValue::get("sexe");
$useCovercard = CValue::get("usecovercard", CModule::getActive("fse") && CModule::getActive("covercard") ? 1 : 0);
$patient_nom_search = null;
$patient_prenom_search = null;
// Save history
$params = array("new" => $new, "patient_id" => $patient_id, "nom" => $patient_nom, "prenom" => $patient_prenom, "ville" => $patient_ville, "cp" => $patient_cp, "Date_Day" => $patient_day, "Date_Month" => $patient_month, "Date_Year" => $patient_year, "patient_ipp" => $patient_ipp, "patient_nda" => $patient_nda, "prat_id" => $prat_id, "sexe" => $patient_sexe);
CViewHistory::save($patient, CViewHistory::TYPE_SEARCH, $params);
$patVitale = new CPatient();
// Liste des praticiens
$prats = $mediuser->loadPraticiens();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("dPsanteInstalled", CModule::getInstalled("dPsante400"));
$smarty->assign("nom", $patient_nom);
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:vw_idx_patients.php

示例8: CSejour

// Selection de la date
$date = CValue::getOrSession("date", CMbDT::date());
$date_tolerance = CAppUI::conf("dPurgences date_tolerance");
$date_before = CMbDT::date("-{$date_tolerance} DAY", $date);
$date_after = CMbDT::date("+1 DAY", $date);
// L'utilisateur doit-il voir les informations médicales
$user = CMediusers::get();
$medicalView = $user->isMedical();
$group = CGroups::loadCurrent();
$listPrats = $user->loadPraticiens(PERM_READ, $group->service_urgences_id);
$sejour = new CSejour();
$where = array();
$ljoin["rpu"] = "sejour.sejour_id = rpu.sejour_id";
$ljoin["patients"] = "sejour.patient_id = patients.patient_id";
$where[] = "sejour.entree BETWEEN '{$date}' AND '{$date_after}' \n  OR (sejour.sortie_reelle IS NULL AND sejour.entree BETWEEN '{$date_before}' AND '{$date_after}' AND sejour.annule = '0')";
$where[] = CAppUI::pref("showMissingRPU") ? "sejour.type = 'comp' OR rpu.rpu_id IS NOT NULL" : "rpu.rpu_id IS NOT NULL";
$where["sejour.group_id"] = "= '{$group->_id}'";
$where["sejour.UHCD"] = "= '1'";
if ($uhcd_affichage == "prendre_en_charge") {
    $ljoin["consultation"] = "consultation.sejour_id = sejour.sejour_id";
    $where["consultation.consultation_id"] = "IS NULL";
}
if ($uhcd_affichage == "presents") {
    $where["sejour.sortie_reelle"] = "IS NULL";
    $where["sejour.annule"] = " = '0'";
    if (CAppUI::conf("dPurgences create_sejour_hospit")) {
        $where["rpu.mutation_sejour_id"] = "IS NULL";
    }
}
if ($uhcd_affichage == "annule") {
    $where["sejour.sortie_reelle"] = "IS NOT NULL";
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:ajax_refresh_uhcd.php

示例9:

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Cabinet
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
$module = CModule::getInstalled(basename(dirname(__FILE__)));
if (CAppUI::pref("new_semainier") == "1") {
    $module->registerTab("vw_planning_new", TAB_READ);
    $module->registerTab("vw_journee_new", TAB_READ);
} else {
    $module->registerTab("vw_planning", TAB_READ);
    $module->registerTab("vw_journee", TAB_READ);
}
$module->registerTab("edit_planning", TAB_READ);
$module->registerTab("edit_consultation", TAB_EDIT);
//$module->registerTab("vw_dossier"                , TAB_EDIT);
$module->registerTab("form_print_plages", TAB_READ);
$module->registerTab("vw_compta", TAB_EDIT);
$module->registerTab("vw_factures", TAB_ADMIN);
$module->registerTab("vw_edit_tarifs", TAB_EDIT);
$module->registerTab("vw_categories", TAB_EDIT);
$module->registerTab("vw_banques", TAB_ADMIN);
$module->registerTab("vw_stats", TAB_ADMIN);
if (CModule::getActive("fse")) {
    $module->registerTab("vw_fse", TAB_READ);
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:index.php

示例10: attachFiles

 /**
  * create the CFiles attached to the mail
  *
  * @param CMailAttachments[] $attachList The list of CMailAttachment
  * @param CPop               $popClient  the CPop client
  *
  * @return void
  */
 function attachFiles($attachList, $popClient)
 {
     //size limit
     $size_required = CAppUI::pref("getAttachmentOnUpdate");
     if ($size_required == "") {
         $size_required = 0;
     }
     foreach ($attachList as $_attch) {
         $_attch->mail_id = $this->_id;
         $_attch->loadMatchingObject();
         if (!$_attch->_id) {
             $_attch->store();
         }
         //si preference taille ok OU que la piece jointe est incluse au texte => CFile
         if ($_attch->bytes <= $size_required || $_attch->disposition == "INLINE") {
             $file = new CFile();
             $file->setObject($_attch);
             $file->author_id = CAppUI::$user->_id;
             if (!$file->loadMatchingObject()) {
                 $file_pop = $popClient->decodeMail($_attch->encoding, $popClient->openPart($this->uid, $_attch->getpartDL()));
                 $file->file_name = $_attch->name;
                 //apicrypt attachment
                 if (strpos($_attch->name, ".apz") !== false) {
                     $file_pop = CApicrypt::uncryptAttachment($popClient->source->object_id, $file_pop);
                 }
                 //file type detection
                 $first = is_array($file_pop) ? reset($file_pop) : $file_pop;
                 $mime = $this->extensionDetection($first);
                 //file name
                 $infos = pathinfo($_attch->name);
                 $extension = $infos['extension'];
                 $mime_extension = strtolower(end(explode("/", $mime)));
                 if (strtolower($extension) != $mime_extension) {
                     $file->file_name = $infos['filename'] . "." . $mime_extension;
                 }
                 $file->file_type = $mime ? $mime : $_attch->getType($_attch->type, $_attch->subtype);
                 $file->fillFields();
                 $file->updateFormFields();
                 $file->putContent($file_pop);
                 $file->store();
             }
         }
     }
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:52,代碼來源:CUserMail.class.php

示例11: CSmartyDP

            $elt->consultation = 1;
            if ($elt->countMatchingList()) {
                $display_elt = true;
            }
        }
    }
}
$consult->loadPosition();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("listCat", $listCat);
$smarty->assign("categories", $categories);
$smarty->assign("plageConsult", $plageConsult);
$smarty->assign("consult", $consult);
$smarty->assign("following_consultations", $following_consultations);
$smarty->assign("today_ref_multiple", CAppUI::pref("today_ref_consult_multiple"));
$smarty->assign("chir", $chir);
$smarty->assign("_functions", $_functions);
$smarty->assign("pat", $pat);
$smarty->assign("listPraticiens", $listPraticiens);
$smarty->assign("listFunctions", $listFunctions);
$smarty->assign("correspondantsMedicaux", $correspondantsMedicaux);
$smarty->assign("medecin_adresse_par", $medecin_adresse_par);
$smarty->assign("today", $today);
$smarty->assign("date_planning", $date_planning);
$smarty->assign("_function_id", $_function_id);
$smarty->assign("line_element_id", $line_element_id);
$smarty->assign("nb_plages", $nb_plages);
$smarty->assign("dialog", $dialog);
$smarty->assign("modal", $modal);
$smarty->assign("callback", $callback);
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:edit_planning.php

示例12: array_map

if ($query_report) {
    CSQLDataSource::$report = false;
    CSQLDataSource::displayReport();
}
CApp::$chrono->stop();
CApp::preparePerformance();
// Unlocalized strings
if (!$suppressHeaders || $ajax) {
    CAppUI::$unlocalized = array_map("utf8_encode", CAppUI::$unlocalized);
    $unloc = new CSmartyDP("modules/system");
    $unloc->display("inc_unlocalized_strings.tpl");
}
// Inclusion du footer
if (!$suppressHeaders) {
    //$address = get_remote_address();
    if ($infosystem = CAppUI::pref("INFOSYSTEM")) {
        $latest_cache_key = "{$user->_guid}-latest_cache";
        $latest_cache = array("meta" => array("module" => $m, "action" => $action, "user" => $user->_view), "totals" => Cache::$totals, "hits" => Cache::$hits);
        SHM::put($latest_cache_key, $latest_cache, true);
    }
    $tplFooter = new CSmartyDP("style/{$uistyle}");
    $tplFooter->assign("offline", false);
    $tplFooter->assign("performance", CApp::$performance);
    $tplFooter->assign("infosystem", $infosystem);
    $tplFooter->assign("errorMessage", CAppUI::getMsg());
    $tplFooter->assign("navigatory_history", CViewHistory::getHistory());
    $tplFooter->display("footer.tpl");
}
// Ajax performance
if ($ajax) {
    $tplAjax = new CSmartyDP("modules/system");
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:main.php

示例13: sort

                 $list[$value["favoris_code"]] = $code;
             }
         }
         sort($list);
     }
     /**
      *  Statistiques
      */
     if ($mode == "stats") {
         // Appel de la fonction listant les codes les plus utilisés pour un praticien
         $actes = new CActeCCAM();
         $codes = $actes->getFavoris($_user_id, $object_class);
         foreach ($codes as $key => $value) {
             // Attention à bien cloner le code CCAM car on rajoute une champ à la volée
             $code = CDatedCodeCCAM::get($value["code_acte"]);
             if (CAppUI::pref('actes_comp_supp_favoris', 0) || !CAppUI::pref('actes_comp_supp_favoris', 0) && !in_array($code->chapitres[0]['db'], array('18.', '19.'))) {
                 $code->occ = $value["nb_acte"];
                 $list[$value["code_acte"]] = $code;
             }
         }
         if ($order == "alpha") {
             sort($list);
         }
     }
 }
 if ($type == "cim10") {
     /**
      * Favoris
      */
     if ($mode == "favoris") {
         $sql = "select favoris_code\r\n          from cim10favoris\r\n          where favoris_user = '{$_user_id}'\r\n          order by favoris_code";
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:code_selector_ex.php

示例14: CDoObjectAddEdit

<?php

/**
 * $Id: do_traitement_aed.php 19219 2013-05-21 12:26:07Z 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: 19219 $
 */
$autoadd_default = CAppUI::pref("AUTOADDSIGN", true);
$del = $_POST["del"];
// Sejour
// si on a un sejour et que l'option d'ajout automatique est activée
if (isset($_POST["_sejour_id"]) && $autoadd_default && $_POST["_sejour_id"] != "") {
    $doSejour = new CDoObjectAddEdit("CTraitement", "traitement_id");
    // Ajout de l'antecedent dans le sejour
    $_POST["dossier_medical_id"] = CDossierMedical::dossierMedicalId($_POST["_sejour_id"], "CSejour");
    $doSejour->redirectStore = null;
    $doSejour->redirect = null;
    $doSejour->doIt();
}
$_POST["del"] = $del;
// Patient
$doPatient = new CDoObjectAddEdit("CTraitement", "traitement_id");
if ($_POST["del"] != 1 && isset($_POST["_patient_id"])) {
    $_POST["dossier_medical_id"] = CDossierMedical::dossierMedicalId($_POST["_patient_id"], "CPatient");
}
$_POST["ajax"] = 1;
$doPatient->doIt();
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:do_traitement_aed.php

示例15: array

$where = array();
if ($chir_id) {
    $chir = new CMediusers();
    $chir->load($chir_id);
    $chir->loadRefFunction();
    $functions_ids = array($chir->function_id);
    $chir->loadBackRefs("secondary_functions");
    if (count($chir->_back["secondary_functions"])) {
        $functions_ids = array_merge($functions_ids, CMbArray::pluck($chir->_back["secondary_functions"], "function_id"));
    }
    $where[] = "(protocole.chir_id = '{$chir->_id}' OR protocole.function_id " . CSQLDataSource::prepareIn($functions_ids) . ")";
} elseif ($function_id) {
    $where["protocole.function_id"] = "= '{$function_id}'";
} else {
    $curr_user = CMediusers::get();
    $use_edit = CAppUI::pref("useEditAutocompleteUsers");
    $prats = $curr_user->loadPraticiens($use_edit ? PERM_EDIT : PERM_READ);
    $fncs = $curr_user->loadFonctions($use_edit ? PERM_EDIT : PERM_READ);
    $where[] = "(protocole.chir_id " . CSQLDataSource::prepareIn(CMbArray::pluck($prats, "user_id")) . " OR protocole.function_id " . CSQLDataSource::prepareIn(array_keys($fncs)) . ")";
}
if ($for_sejour !== null) {
    $where["for_sejour"] = "= '{$for_sejour}'";
}
if ($keywords == "") {
    $keywords = "%";
}
$order = "libelle, libelle_sejour, codes_ccam";
/** @var CProtocole[] $matches */
$matches = $object->getAutocompleteListWithPerms(PERM_READ, $keywords, $where, $limit, null, $order);
if (CAppUI::conf("dPbloc CPlageOp systeme_materiel")) {
    foreach ($matches as $protocole) {
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:ajax_protocoles_autocomplete.php


注:本文中的CAppUI::pref方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。