本文整理匯總了PHP中CAppUI::displayMsg方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::displayMsg方法的具體用法?PHP CAppUI::displayMsg怎麽用?PHP CAppUI::displayMsg使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAppUI
的用法示例。
在下文中一共展示了CAppUI::displayMsg方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: CSejour
* @version $Revision:$
* @author SARL OpenXtrem
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
*/
CCanDo::checkAdmin();
$action = CValue::post("action", "modify");
$sejour = new CSejour();
switch ($action) {
case "modify":
while (!$sejour->load(rand(1, 5000))) {
}
// randomize libelle
$sejour->libelle = $sejour->libelle ? $sejour->libelle : "un libelle pour le mettre dans l'ordre";
$libelle = str_split($sejour->libelle);
shuffle($libelle);
$sejour->libelle = implode("", $libelle);
break;
case "create":
//$sejour->sample();
$sejour->group_id = 1;
$sejour->praticien_id = 73;
$sejour->patient_id = rand(1, 5000);
$sejour->entree_prevue = CMbDT::dateTime();
$sejour->sortie_prevue = CMbDT::dateTime("+1 day");
//$patient->updateFormFields();
break;
}
CAppUI::displayMsg($sejour->store(), "CSejour-msg-{$action}");
mbTrace($sejour);
echo CAppUI::getMsg();
CApp::rip();
示例2: foreach
<?php
/* $Id$ */
/**
* @package Mediboard
* @subpackage soins
* @version $Revision$
* @author SARL OpenXtrem
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
*/
$user = CUser::get();
$sejours = CValue::get("sejours");
foreach ($sejours as $_sejour_id) {
$observation = new CObservationMedicale();
$observation->sejour_id = $_sejour_id;
$observation->user_id = $user->_id;
$observation->degre = "info";
$observation->date = CMbDT::dateTime();
$observation->text = "Visite effectuée";
$msg = $observation->store();
CAppUI::displayMsg($msg, "CObservationMedicale-msg-create");
}
echo CAppUI::getMsg();
CApp::rip();
示例3: foreach
foreach ($evenement->loadRefsActes() as $type => $_actes) {
foreach ($_actes as $_acte) {
$actes_by_code[$_acte->code][$_acte->_id] = $_acte;
}
}
foreach ($codes as $action => $_codes) {
foreach ($_codes as $_code) {
// Ajout de l'acte a tous les évènements
if ($action == "add") {
if (!isset($actes_by_code[$_code])) {
$acte = strlen($_code) == 7 ? new CActeCsARR() : new CActeCdARR();
$acte->evenement_ssr_id = $_evenement_id;
$acte->code = $_code;
$msg = $acte->store();
CAppUI::displayMsg($msg, "{$acte->_class}-msg-create");
}
}
// Suppression de l'acte pour tous les évènements
if ($action == "rem") {
if (isset($actes_by_code[$_code])) {
foreach ($actes_by_code[$_code] as $_acte) {
$msg = $_acte->delete();
CAppUI::displayMsg($msg, "{$_acte->_class}-msg-delete");
}
}
}
}
}
}
echo CAppUI::getMsg();
CApp::rip();
示例4: CEvenementSSR
$evt_ssr = new CEvenementSSR();
$evt_ssr->sejour_id = $sejour_id;
$evt_ssr->prescription_line_element_id = $line_id;
$evt_ssr->seance_collective_id = $evenement->_id;
$evt_ssr->type_seance = $type_seance;
$msg = $evt_ssr->store();
CAppUI::displayMsg($msg, "CEvenementSSR-msg-create");
// Si une seance a ete créée, les codes cdarrs seront créés sur l'evenement de la seance
$evenement_actes_id = $evt_ssr->_id;
}
// Actes CdARR
foreach ($codes_cdarrs as $_code) {
$acte = new CActeCdARR();
$acte->code = $_code;
$acte->evenement_ssr_id = $evenement_actes_id;
$msg = $acte->store();
CAppUI::displayMsg($msg, "{$acte->_class}-msg-create");
}
// Actes CsARR
foreach ($codes_csarrs as $_code) {
$acte = new CActeCsARR();
$acte->code = $_code;
$acte->evenement_ssr_id = $evenement_actes_id;
$msg = $acte->store();
CAppUI::displayMsg($msg, "{$acte->_class}-msg-create");
}
}
}
}
echo CAppUI::getMsg();
CApp::rip();
示例5:
$evenement->annule = CValue::post("annule");
}
if ($evenement->seance_collective_id) {
$evenement->loadRefSeanceCollective();
$evenement =& $evenement->_ref_seance_collective;
}
if ($_nb_decalage_min_debut) {
$evenement->debut = CMbDT::dateTime("{$_nb_decalage_min_debut} minutes", $evenement->debut);
}
if ($_nb_decalage_heure_debut) {
$evenement->debut = CMbDT::dateTime("{$_nb_decalage_heure_debut} hours", $evenement->debut);
}
if ($_nb_decalage_jour_debut) {
$evenement->debut = CMbDT::dateTime("{$_nb_decalage_jour_debut} days", $evenement->debut);
}
if ($_nb_decalage_duree) {
$evenement->duree = $evenement->duree + $_nb_decalage_duree;
}
if ($equipement_id || $equipement_id == 'none') {
$evenement->equipement_id = $equipement_id == 'none' ? "" : $equipement_id;
}
if ($kine_id) {
$evenement->therapeute_id = $kine_id;
}
$msg = $evenement->store();
CAppUI::displayMsg($msg, "CEvenementSSR-msg-modify");
}
}
}
echo CAppUI::getMsg();
CApp::rip();
示例6: CProduct
if (isset($_POST['_code'])) {
$stock = CProductStockGroup::getFromCode($_POST['_code']);
if ($stock) {
$_POST['stock_class'] = "CProductStockGroup";
$_POST['stock_id'] = $stock->_id;
$_POST['_code'] = null;
}
}
if (isset($_POST['product_id'])) {
$product = new CProduct();
$product->load($_POST['product_id']);
if ($product->loadRefStock()->_id) {
$_POST["stock_class"] = $product->_ref_stock_group->_class;
$_POST["stock_id"] = $product->_ref_stock_group->_id;
unset($_POST['product_id']);
} else {
if (isset($_POST['manual'])) {
$stock_group = new CProductStockGroup();
$stock_group->product_id = $product->_id;
$stock_group->group_id = CProductStockGroup::getHostGroup();
$stock_group->quantity = $_POST["quantity"];
$stock_group->order_threshold_min = $_POST["quantity"];
CAppUI::displayMsg($stock_group->store(), "CProductStockGroup-msg-create");
$_POST["stock_class"] = $stock_group->_class;
$_POST["stock_id"] = $stock_group->_id;
unset($_POST['product_id']);
}
}
}
$do = new CDoObjectAddEdit('CProductDelivery');
$do->doIt();
示例7: array
$margins = array($compte_rendu->margin_top, $compte_rendu->margin_right, $compte_rendu->margin_bottom, $compte_rendu->margin_left);
$content = $compte_rendu->loadHTMLcontent($content, "", $margins, CCompteRendu::$fonts[$compte_rendu->font], $compte_rendu->size);
$file = new CFile();
$file->setObject($compte_rendu);
$file->file_name = $compte_rendu->nom . ".pdf";
$file->file_type = "application/pdf";
$file->fillFields();
$file->updateFormFields();
$file->forceDir();
$file->file_name = $compte_rendu->nom . ".pdf";
$file->author_id = CAppUI::$user->_id;
$htmltopdf = new CHtmlToPDF($compte_rendu->factory);
$htmltopdf->generatePDF($content, 0, $compte_rendu, $file);
$file->doc_size = filesize($file->_file_path);
$msg = $file->store();
CAppUI::displayMsg($msg, "CCompteRendu-msg-create");
echo CAppUI::getMsg();
// Un callback pour le stream du pdf
if ($stream) {
echo "\n<script type=\"text/javascript\">streamPDF(" . $file->_id . ")</script>";
}
// Un callback pour l'impression server side
if ($print_to_server) {
// Mise à jour de la date d'impression
$compte_rendu->date_print = "now";
if ($msg = $compte_rendu->store()) {
CAppUI::setMsg($msg, UI_MSG_ERROR);
}
echo "\n<script type=\"text/javascript\">printToServer(" . $file->_id . ")</script>";
}
CApp::rip();
示例8: foreach
$_line_element->prescription_id = $prescription_sejour->_id;
$msg = $_line_element->store();
CAppUI::displayMsg($msg, "{$_line_element->_class}-msg-create");
$original_to_new_line[$original_line_element_id] = $_line_element->_id;
}
// Duplication des evenements et des actes associés
foreach ($evenements as $_evenement) {
$actes_cdarrs = $_evenement->loadRefsActesCdARR();
$actes_csarrs = $_evenement->loadRefsActesCsARR();
$_evenement->_id = "";
$_evenement->sejour_id = $sejour_id;
$_evenement->realise = "0";
$_evenement->annule = "0";
$_evenement->prescription_line_element_id = $original_to_new_line[$_evenement->prescription_line_element_id];
$_evenement->debut = CMbDT::dateTime("+ {$nb_decalage} DAYS", $_evenement->debut);
$msg = $_evenement->store();
CAppUI::displayMsg($msg, "CEvenementSSR-msg-create");
foreach ($actes_cdarrs as $_acte) {
$_acte->_id = "";
$_acte->evenement_ssr_id = $_evenement->_id;
$msg = $_acte->store();
CAppUI::displayMsg($msg, "CActeCdARR-msg-create");
}
foreach ($actes_csarrs as $_acte) {
$_acte->_id = "";
$_acte->evenement_ssr_id = $_evenement->_id;
$msg = $_acte->store();
CAppUI::displayMsg($msg, "CActeCsARR-msg-create");
}
}
CAppUI::redirect('m=ssr&tab=vw_aed_sejour_ssr&sejour_id=' . $sejour_id);
示例9: CRHS
<?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$
*/
$sejour_ids = CValue::post("sejour_ids");
$date_monday = CValue::post("date_monday");
$all_rhs = CValue::post("all_rhs");
$where["sejour_id"] = CSQLDataSource::prepareIn($sejour_ids);
$where["date_monday"] = $all_rhs ? ">= '{$date_monday}'" : "= '{$date_monday}'";
$order = "sejour_id, date_monday";
$rhs = new CRHS();
/** @var CRHS[] $rhss */
$rhss = $rhs->loadList($where, $order);
if (count($rhss)) {
foreach ($rhss as $_rhs) {
$_rhs->facture = CValue::post("facture");
$msg = $_rhs->store();
CAppUI::displayMsg($msg, "CRHS-msg-modify");
}
} else {
CAppui::setMsg("CRHS.none", UI_MSG_WARNING);
}
echo CAppUI::getMsg();
CApp::rip();
示例10: store
/**
* @see parent::store()
*/
function store()
{
$prop_changed = $this->fieldModified("prop");
if ($msg = parent::store()) {
return $msg;
}
if ($prop_changed) {
$fields = $this->loadRefClassFields();
foreach ($fields as $_field) {
$new_prop = $this->updateFieldProp($_field->prop);
$modif = $_field->prop != $new_prop;
$_field->prop = $new_prop;
if ($msg = $_field->store()) {
continue;
}
if ($modif) {
$_field->updateTranslation();
CAppUI::displayMsg($msg, "Champ <strong>{$_field->_view}</strong> mis à jour");
}
}
}
}
示例11: CEAITransformationRule
/**
* Duplicate an transformation to another (or the same) category
*
* @category EAI
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license OXOL, see http://www.mediboard.org/public/OXOL
* @version SVN: $Id:\$
* @link http://www.mediboard.org
*/
CCanDo::checkAdmin();
$eai_transformation_rule_id = CValue::post("eai_transformation_rule_id");
$eai_transformation_ruleset_id = CValue::post("eai_transformation_ruleset_id");
$transformation_ruleset_dest_id = CValue::post("transformation_ruleset_dest_id");
$transf_rule = new CEAITransformationRule();
// On duplique toutes les règles de la catégorie
if ($eai_transformation_ruleset_id) {
$transf_rule->eai_transformation_ruleset_id = $eai_transformation_ruleset_id;
/** @var $transf_rules CEAITransformationRule[] */
$transf_rules = $transf_rule->loadMatchingList();
foreach ($transf_rules as $_transf_rule) {
$msg = $_transf_rule->duplicate($transformation_ruleset_dest_id);
CAppUI::displayMsg($msg, "CEAITransformationRule-msg-create");
}
} else {
$transf_rule->load($eai_transformation_rule_id);
$msg = $transf_rule->duplicate($transformation_ruleset_dest_id);
CAppUI::displayMsg($msg, "CEAITransformationRule-msg-create");
}
CAppUI::js(CValue::post("callback") . "()");
示例12: CSejour
<?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$
*/
$sejour_id = CValue::post("sejour_id");
$sejour = new CSejour();
$sejour->load($sejour_id);
if (!$sejour->_id) {
CAppUI::stepAjax("CMbObject-not-found", UI_MSG_ERROR, $sejour->_class, $sejour->_id);
}
$evenement = new CEvenementSSR();
$date_min = CMbDT::date($sejour->entree);
$date_max = CMbDT::date("+1 DAY", $sejour->sortie);
$where["sejour_id"] = "= '{$sejour->_id}'";
$where["debut"] = "NOT BETWEEN '{$date_min}' AND '{$date_max}'";
$evenements = $evenement->loadList($where);
foreach ($evenements as $_evenement) {
$msg = $_evenement->delete();
CAppUI::displayMsg($msg, "CEvenementSSR-msg-purge_hors_sejour");
}
echo CAppUI::getMsg();
CApp::rip();
示例13: CPatient
<?php
/* $Id $ */
/**
* @package Mediboard
* @subpackage hl7
* @version $Revision:$
* @author SARL OpenXtrem
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
*/
CCanDo::checkAdmin();
$action = CValue::post("action", "modify");
$patient = new CPatient();
switch ($action) {
case "modify":
while (!$patient->load(rand(1, 5000))) {
}
// randomize name
$nom = str_split($patient->nom);
shuffle($nom);
$patient->nom = implode("", $nom);
break;
case "create":
$patient->sample();
//$patient->updateFormFields();
break;
}
CAppUI::displayMsg($patient->store(), "CPatient-msg-{$action}");
//mbTrace($patient);
echo CAppUI::getMsg();
CApp::rip();