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


PHP CValue::read方法代码示例

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


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

示例1: checkProtection

 /**
  * Check anti-CSRF protection
  */
 static function checkProtection()
 {
     if (!CAppUI::conf("csrf_protection") || strtoupper($_SERVER['REQUEST_METHOD']) != 'POST') {
         return;
     }
     if (!isset($_POST["csrf"])) {
         CAppUI::setMsg("CCSRF-no_token", UI_MSG_ERROR);
         return;
     }
     if (array_key_exists($_POST['csrf'], $_SESSION["tokens"])) {
         $token = $_SESSION['tokens'][$_POST['csrf']];
         if ($token["lifetime"] >= time()) {
             foreach ($token["fields"] as $_field => $_value) {
                 if (CValue::read($_POST, $_field) != $_value) {
                     CAppUI::setMsg("CCSRF-form_corrupted", UI_MSG_ERROR);
                     unset($_SESSION['tokens'][$_POST['csrf']]);
                     return;
                 }
             }
             //mbTrace("Le jeton est accepté !");
             unset($_SESSION['tokens'][$_POST['csrf']]);
         } else {
             CAppUI::setMsg("CCSRF-token_outdated", UI_MSG_ERROR);
             unset($_SESSION['tokens'][$_POST['csrf']]);
         }
         return;
     }
     CAppUI::setMsg("CCSRF-token_does_not_exist", UI_MSG_ERROR);
     return;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:33,代码来源:CCSRF.class.php

示例2: getHtmlValue

 /**
  * @see parent::getHtmlValue()
  */
 function getHtmlValue($object, $smarty = null, $params = array())
 {
     $value = $object->{$this->fieldName};
     // Empty value: no paragraph
     if (!$value) {
         return "";
     }
     // Truncate case: no breakers but inline bullets instead
     if ($truncate = CValue::read($params, "truncate")) {
         $value = CMbString::truncate($value, $truncate === true ? null : $truncate);
         $value = CMbString::nl2bull($value);
         return CMbString::htmlSpecialChars($value);
     }
     // Markdown case: full delegation
     if ($this->markdown) {
         // In order to prevent from double escaping
         $content = CMbString::markdown(html_entity_decode($value));
         return "<div class='markdown'>{$content}</div>";
     }
     // Standard case: breakers and paragraph enhancers
     $text = "";
     $value = str_replace(array("\r\n", "\r"), "\n", $value);
     $paragraphs = preg_split("/\n{2,}/", $value);
     foreach ($paragraphs as $_paragraph) {
         if (!empty($_paragraph)) {
             $_paragraph = nl2br(CMbString::htmlSpecialChars($_paragraph));
             $text .= "<p>{$_paragraph}</p>";
         }
     }
     return $text;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:34,代码来源:CTextSpec.class.php

示例3: toMB

 function toMB($value, CHL7v2Field $field)
 {
     $parsed = $this->parseHL7($value, $field);
     // empty value
     if ($parsed === "") {
         return "";
     }
     // invalid value
     if ($parsed === false) {
         return;
     }
     return CValue::read($parsed, "hour", "00") . ":" . CValue::read($parsed, "minute", "00") . ":" . CValue::read($parsed, "second", "00");
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:13,代码来源:CHL7v2DataTypeTime.class.php

示例4: toHL7

 function toHL7($value, CHL7v2Field $field)
 {
     $parsed = $this->parseMB($value, $field);
     // empty value
     if ($parsed === "") {
         return "";
     }
     // invalid value
     if ($parsed === false) {
         return;
     }
     return CValue::read($parsed, "year") . (CValue::read($parsed, "month") === "00" ? "" : CValue::read($parsed, "month")) . (CValue::read($parsed, "day") === "00" ? "" : CValue::read($parsed, "day")) . CValue::read($parsed, "hour") . CValue::read($parsed, "minute") . CValue::read($parsed, "second");
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:13,代码来源:CHL7v2DataTypeDateTime.class.php

示例5: toMB

 function toMB($value, CHL7v2Field $field)
 {
     $parsed = $this->parseHL7($value, $field);
     // empty value
     if ($parsed === "") {
         return "";
     }
     // invalid value
     if ($parsed === false) {
         return;
     }
     return CValue::read($parsed, "year") . "-" . CValue::read($parsed, "month", "00") . "-" . CValue::read($parsed, "day", "00");
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:13,代码来源:CHL7v2DataTypeDate.class.php

示例6: changeCheckListCategories

 /**
  * Changes check list categories
  *
  * @param array $category_changes Categories changes
  *
  * @return void
  */
 private function changeCheckListCategories($category_changes)
 {
     // reverse because of the title changes
     $category_changes = array_reverse($category_changes);
     // Category changes
     foreach ($category_changes as $_change) {
         $cat_class = $_change[0];
         $cat_type = $_change[1];
         $cat_title = $_change[2];
         $cat_new_title = addslashes($_change[3]);
         $cat_new_desc = addslashes(CValue::read($_change, 4, null));
         $query = "UPDATE `daily_check_item_category` SET\r\n        `daily_check_item_category`.`title` = '{$cat_new_title}' ";
         if (isset($cat_new_desc)) {
             $query .= ", `daily_check_item_category`.`desc` = '{$cat_new_desc}' ";
         }
         $query .= "WHERE\r\n        `daily_check_item_category`.`target_class` = '{$cat_class}' AND\r\n        `daily_check_item_category`.`type` = '{$cat_type}' AND\r\n        `daily_check_item_category`.`title` = '{$cat_title}'";
         $this->addQuery($query);
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:26,代码来源:setup.php

示例7: handle

 /**
  * Handle link/unlink patients message
  *
  * @param CHL7Acknowledgment $ack     Acknowledgment
  * @param CPatient           $patient Person
  * @param array              $data    Data
  *
  * @return string|void
  */
 function handle(CHL7Acknowledgment $ack, CPatient $patient, $data)
 {
     $exchange_hl7v2 = $this->_ref_exchange_hl7v2;
     $sender = $exchange_hl7v2->_ref_sender;
     $sender->loadConfigValues();
     $this->_ref_sender = $sender;
     if (count($data["PID"]) != 2) {
         return $exchange_hl7v2->setAckAR($ack, "E500", null, $patient);
     }
     foreach ($data["PID"] as $_PID) {
         $patientPI = CValue::read($_PID['personIdentifiers'], "PI");
         // Acquittement d'erreur : identifiants PI non fournis
         if (!$patientPI) {
             return $exchange_hl7v2->setAckAR($ack, "E100", null, $patient);
         }
     }
     $patient_1_PI = CValue::read($data["PID"][0]['personIdentifiers'], "PI");
     $patient_2_PI = CValue::read($data["PID"][1]['personIdentifiers'], "PI");
     $patient_1 = new CPatient();
     $patient_1->_IPP = $patient_1_PI;
     $patient_1->loadFromIPP($sender->group_id);
     // PI non connu (non fourni ou non retrouvé)
     if (!$patient_1->_id) {
         return $exchange_hl7v2->setAckAR($ack, "E501", null, $patient_1);
     }
     $patient_2 = new CPatient();
     $patient_2->_IPP = $patient_2_PI;
     $patient_2->loadFromIPP($sender->group_id);
     // PI non connu (non fourni ou non retrouvé)
     if (!$patient_2->_id) {
         return $exchange_hl7v2->setAckAR($ack, "E501", null, $patient_2);
     }
     $function_handle = "handle{$exchange_hl7v2->code}";
     if (!method_exists($this, $function_handle)) {
         return $exchange_hl7v2->setAckAR($ack, "E006", null, $patient);
     }
     return $this->{$function_handle}($ack, $patient_1, $patient_2, $data);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:47,代码来源:CHL7v2LinkUnlink.class.php

示例8: getAssure

 /**
  * Récupération de l'assuré
  *
  * @param DOMNode  $node      Node
  * @param CPatient $mbPatient Patient
  *
  * @return CPatient
  */
 static function getAssure(DOMNode $node, CPatient $mbPatient)
 {
     $xpath = new CHPrimXPath($node->ownerDocument);
     $immatriculation = $xpath->queryTextNode("hprim:immatriculation", $node);
     $mbPatient->matricule = $immatriculation;
     $mbPatient->assure_matricule = $immatriculation;
     $personne = $xpath->queryUniqueNode("hprim:personne", $node);
     if (!$personne) {
         return $mbPatient;
     }
     $sexe = $xpath->queryAttributNode("hprim:personne", $node, "sexe");
     $sexeConversion = array("M" => "m", "F" => "f");
     $mbPatient->assure_sexe = $sexeConversion[$sexe];
     $mbPatient->assure_nom = $xpath->queryTextNode("hprim:nomUsuel", $personne);
     $prenoms = $xpath->getMultipleTextNodes("hprim:prenoms/*", $personne);
     $mbPatient->assure_prenom = CMbArray::get($prenoms, 0);
     $mbPatient->assure_prenom_2 = CMbArray::get($prenoms, 1);
     $mbPatient->assure_prenom_3 = CMbArray::get($prenoms, 2);
     $mbPatient->assure_naissance = $xpath->queryTextNode("hprim:naissance", $personne);
     $elementDateNaissance = $xpath->queryUniqueNode("hprim:dateNaissance", $personne);
     $mbPatient->assure_naissance = $xpath->queryTextNode("hprim:date", $elementDateNaissance);
     $mbPatient->rang_beneficiaire = $xpath->queryTextNode("hprim:lienAssure", $node);
     $mbPatient->qual_beneficiaire = CValue::read(CPatient::$rangToQualBenef, $mbPatient->rang_beneficiaire);
     return $mbPatient;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:33,代码来源:CHPrimXMLEvenementsPatients.class.php

示例9: getHL7Code

 /**
  * Get HL7 error code
  *
  * @return mixed
  */
 function getHL7Code()
 {
     return CValue::read(self::$errorMap, $this->code, 207);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:9,代码来源:CHL7v2Error.class.php

示例10: getForObject

 /**
  * Get events for an object
  *
  * @param CMbObject|string $object                     Object or GUID
  * @param string           $event_name                 Event name
  * @param string           $type                       Type: required, disabled or conditional
  * @param array            $exclude_ex_class_event_ids List of class events' ids
  *
  * @return CExClassEvent[]
  */
 static function getForObject($object, $event_name, $type = "required", $exclude_ex_class_event_ids = array())
 {
     static $events_cache = array();
     if (is_string($object)) {
         $object = CMbObject::loadFromGuid($object);
     }
     if ($type == "required" && !CValue::read($object->_spec->events[$event_name], "auto", false)) {
         return array();
     }
     $ex_class_event = new self();
     $group_id = CGroups::loadCurrent()->_id;
     $ds = $ex_class_event->_spec->ds;
     $key = "{$object->_class}/{$event_name}/{$group_id}/{$type}";
     if (isset($events_cache[$key])) {
         $ex_class_events = $events_cache[$key];
     } else {
         $where = array("ex_class_event.host_class" => $ds->prepare("=%", $object->_class), "ex_class_event.event_name" => $ds->prepare("=%", $event_name), "ex_class_event.disabled" => $ds->prepare("=%", 0), "ex_class.conditional" => $ds->prepare("=%", 0), $ds->prepare("ex_class.group_id = % OR group_id IS NULL", $group_id));
         $ljoin = array("ex_class" => "ex_class.ex_class_id = ex_class_event.ex_class_id");
         switch ($type) {
             case "disabled":
                 $where["ex_class_event.disabled"] = 1;
                 break;
             case "conditional":
                 $where["ex_class.conditional"] = 1;
                 break;
         }
         /** @var CExClassEvent[] $ex_class_events */
         $ex_class_events = $ex_class_event->loadList($where, null, null, null, $ljoin);
         $events_cache[$key] = $ex_class_events;
     }
     foreach ($ex_class_events as $_id => $_ex_class_event) {
         if (isset($exclude_ex_class_event_ids[$_id]) || !$_ex_class_event->checkConstraints($object)) {
             unset($ex_class_events[$_id]);
         } else {
             $_ex_class_event->_host_object = $object;
         }
     }
     return $ex_class_events;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:49,代码来源:CExClassEvent.class.php

示例11: onAfterInstanciation

 /**
  * @see parent::onAfterInstanciation()
  */
 function onAfterInstanciation()
 {
     $_ex_class_id = CValue::read($this->request, "_ex_class_id");
     $this->_obj->setExClass($_ex_class_id);
     $this->_old->setExClass($_ex_class_id);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:9,代码来源:do_ex_object_aed.php

示例12: fillOtherIdentifiers

 /**
  * Fill other identifiers
  *
  * @param array         &$identifiers Identifiers
  * @param CPatient      $patient      Person
  * @param CInteropActor $actor        Interop actor
  *
  * @return null
  */
 function fillOtherIdentifiers(&$identifiers, CPatient $patient, CInteropActor $actor = null)
 {
     if (CValue::read($actor->_configs, "send_own_identifier")) {
         $identifiers[] = array($patient->_id, null, null, $this->getAssigningAuthority("mediboard"), "RI");
     }
     if (!CValue::read($actor->_configs, "send_self_identifier")) {
         return;
     }
     if (!($idex_actor = $actor->getIdex($patient)->id400)) {
         return;
     }
     $identifiers[] = array($idex_actor, null, null, $this->getAssigningAuthority("actor", null, $actor));
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:CHL7v2SegmentPID_RESP.class.php

示例13: array

    }
}
// Get the user's style
$uistyle = CAppUI::pref("UISTYLE");
if (!file_exists("style/{$uistyle}/templates/header.tpl")) {
    $uistyle = "mediboard";
}
CJSLoader::$files = array(CJSLoader::getLocaleFile(), "includes/javascript/usertiming.js", "includes/javascript/performance.js", "includes/javascript/printf.js", "includes/javascript/stacktrace.js", "lib/scriptaculous/lib/prototype.js", "lib/scriptaculous/src/scriptaculous.js", "includes/javascript/console.js", "lib/scriptaculous/src/builder.js", "lib/scriptaculous/src/effects.js", "lib/scriptaculous/src/dragdrop.js", "lib/scriptaculous/src/controls.js", "lib/scriptaculous/src/slider.js", "lib/scriptaculous/src/sound.js", "includes/javascript/prototypex.js", "includes/javascript/date.js", "lib/datepicker/datepicker.js", "lib/datepicker/datepicker-locale-fr_FR.js", "lib/livepipe/livepipe.js", "lib/livepipe/tabs.js", "lib/livepipe/window.js", "includes/javascript/treeview.js", "lib/flotr/flotr.js", "lib/flotr/lib/canvastext.js", "lib/jsExpressionEval/parser.js", "lib/store.js/store.js", "includes/javascript/common.js", "includes/javascript/functions.js", "includes/javascript/tooltip.js", "includes/javascript/controls.js", "includes/javascript/cookies.js", "includes/javascript/url.js", "includes/javascript/forms.js", "includes/javascript/checkForms.js", "includes/javascript/aideSaisie.js", "includes/javascript/exObject.js", "includes/javascript/tag.js", "includes/javascript/mbObject.js", "includes/javascript/bowser.min.js", "includes/javascript/configuration.js", "includes/javascript/plugin.js", "includes/javascript/xdr.js", "includes/javascript/usermessage.js", "includes/javascript/jscolor.js", "lib/requirejs/require.js", "lib/flot/jquery.min.js", "includes/javascript/no_conflicts.js", "lib/flot/jquery.flot.min.js", "lib/flot/jquery.flot.JUMlib.js", "lib/flot/jquery.flot.mouse.js", "lib/flot/jquery.flot.symbol.min.js", "lib/flot/jquery.flot.crosshair.min.js", "lib/flot/jquery.flot.resize.min.js", "lib/flot/jquery.flot.stack.min.js", "lib/flot/jquery.flot.bandwidth.js", "lib/flot/jquery.flot.gantt.js", "lib/flot/jquery.flot.time.min.js", "lib/flot/jquery.flot.pie.min.js");
$support = "modules/support/javascript/support.js";
if (file_exists($support) && CModule::getActive("support")) {
    CJSLoader::$files[] = $support;
}
$applicationVersion = CApp::getReleaseInfo();
// Check if we are logged in
if (!CAppUI::$instance->user_id) {
    $redirect = CValue::get("logout") ? "" : CValue::read($_SERVER, "QUERY_STRING");
    $_SESSION["locked"] = null;
    // HTTP 403 Forbidden header when RAW response expected
    if ($suppressHeaders && !$ajax) {
        header("HTTP/1.0 403 Forbidden");
        CApp::rip();
    }
    // Ajax login alert
    if ($ajax) {
        $tplAjax = new CSmartyDP("modules/system");
        $tplAjax->assign("performance", CApp::$performance);
        $tplAjax->display("ajax_errors.tpl");
    } else {
        $tplLogin = new CSmartyDP("style/{$uistyle}");
        $tplLogin->assign("localeInfo", $locale_info);
        // Favicon
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:main.php

示例14: handle

 /**
  * Handle event
  *
  * @param CHL7Acknowledgment $ack        Acknowledgement
  * @param CPatient           $newPatient Person
  * @param array              $data       Nodes data
  *
  * @return null|string
  */
 function handle(CHL7Acknowledgment $ack, CPatient $newPatient, $data)
 {
     // Traitement du message des erreurs
     $comment = $warning = "";
     $exchange_hl7v2 = $this->_ref_exchange_hl7v2;
     $exchange_hl7v2->_ref_sender->loadConfigValues();
     $sender = $exchange_hl7v2->_ref_sender;
     foreach ($data["merge"] as $_data_merge) {
         $data = $_data_merge;
         $mbPatient = new CPatient();
         $mbPatientElimine = new CPatient();
         $patientPI = CValue::read($data['personIdentifiers'], "PI");
         $patientRI = CValue::read($data['personIdentifiers'], "RI");
         $patientEliminePI = CValue::read($data['personElimineIdentifiers'], "PI");
         $patientElimineRI = CValue::read($data['personElimineIdentifiers'], "RI");
         // Acquittement d'erreur : identifiants RI et PI non fournis
         if (!$patientRI && !$patientPI || !$patientElimineRI && !$patientEliminePI) {
             return $exchange_hl7v2->setAckAR($ack, "E100", null, $newPatient);
         }
         $idexPatient = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $patientPI);
         if ($mbPatient->load($patientRI)) {
             if ($idexPatient->object_id && $mbPatient->_id != $idexPatient->object_id) {
                 $comment = "L'identifiant source fait référence au patient : {$idexPatient->object_id}";
                 $comment .= " et l'identifiant cible au patient : {$mbPatient->_id}.";
                 return $exchange_hl7v2->setAckAR($ack, "E130", $comment, $newPatient);
             }
         }
         if (!$mbPatient->_id) {
             $mbPatient->load($idexPatient->object_id);
         }
         $idexPatientElimine = CIdSante400::getMatch("CPatient", $sender->_tag_patient, $patientEliminePI);
         if ($mbPatientElimine->load($patientElimineRI)) {
             if ($idexPatientElimine->object_id && $mbPatientElimine->_id != $idexPatientElimine->object_id) {
                 $comment = "L'identifiant source fait référence au patient : {$idexPatientElimine->object_id}";
                 $comment .= "et l'identifiant cible au patient : {$mbPatientElimine->_id}.";
                 return $exchange_hl7v2->setAckAR($ack, "E131", $comment, $newPatient);
             }
         }
         if (!$mbPatientElimine->_id) {
             $mbPatientElimine->load($idexPatientElimine->object_id);
         }
         if (!$mbPatient->_id || !$mbPatientElimine->_id) {
             $comment = !$mbPatient->_id ? "Le patient {$mbPatient->_id} est inconnu dans Mediboard." : "Le patient {$mbPatientElimine->_id} est inconnu dans Mediboard.";
             return $exchange_hl7v2->setAckAR($ack, "E120", $comment, $newPatient);
         }
         // Passage en trash de l'IPP du patient a éliminer
         $newPatient->trashIPP($idexPatientElimine);
         if ($mbPatient->_id == $mbPatientElimine->_id) {
             return $exchange_hl7v2->setAckAA($ack, "I104", null, $newPatient);
         }
         $patientsElimine_array = array($mbPatientElimine);
         $first_patient_id = $mbPatient->_id;
         $checkMerge = $mbPatient->checkMerge($patientsElimine_array);
         // Erreur sur le check du merge
         if ($checkMerge) {
             $comment = "La fusion de ces deux patients n'est pas possible à cause des problèmes suivants : {$checkMerge}";
             return $exchange_hl7v2->setAckAR($ack, "E121", $comment, $newPatient);
         }
         $mbPatientElimine_id = $mbPatientElimine->_id;
         /** @todo mergePlainFields resets the _id */
         $mbPatient->_id = $first_patient_id;
         // Notifier les autres destinataires
         $mbPatient->_eai_sender_guid = $sender->_guid;
         $mbPatient->_merging = CMbArray::pluck($patientsElimine_array, "_id");
         if ($msg = $mbPatient->merge($patientsElimine_array)) {
             return $exchange_hl7v2->setAckAR($ack, "E103", $msg, $mbPatient);
         }
         $mbPatient->_mbPatientElimine_id = $mbPatientElimine_id;
         $comment = CEAIPatient::getComment($mbPatient, $mbPatientElimine);
     }
     return $exchange_hl7v2->setAckAA($ack, "I103", $comment, $mbPatient);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:81,代码来源:CHL7v2MergePersons.class.php

示例15: array

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage developpement
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkRead();
$locales = CAppUI::flattenCachedLocales(CAppUI::$lang);
$tabs = array();
foreach ($modules = CModule::getInstalled() as $module) {
    CAppUI::requireModuleFile($module->mod_name, "index");
    if (is_array($module->_tabs)) {
        foreach ($module->_tabs as $tab) {
            $tabs[$tab]["name"] = "mod-{$module->mod_name}-tab-{$tab}";
            $tabs[$tab]["locale"] = CValue::read($locales, $tabs[$tab]["name"]);
        }
    }
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("module", $modules);
$smarty->assign("tabs", $tabs);
$smarty->display("mnt_module_actions.tpl");
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:28,代码来源:mnt_module_actions.php


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