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


PHP CAppUI::getMsg方法代碼示例

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


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

示例1: testFunction

 function testFunction(&$object, $function_name, $params = array())
 {
     $str_params = implode(",", $params);
     $result = $object->{$function_name}($str_params);
     $log = "<div class=\"message\">" . get_class($object) . "::{$function_name}({$str_params}) -> {$result}</div>" . CAppUI::getMsg();
     $this->addLog($log);
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:7,代碼來源:CMbObjectTest.class.php

示例2: storeObject

/**
 * Fonction utilitaire pour la sauvegarde rapide d'un object avec génération du message
 *
 * @param CMbObject $object Objet à enregister
 *
 * @return void
 */
function storeObject($object)
{
    $title = $object->_id ? "-msg-modify" : "-msg-create";
    if ($msg = $object->store()) {
        CAppUI::setMsg($msg, UI_MSG_ERROR);
        echo CAppUI::getMsg();
        CApp::rip();
    }
    CAppUI::setMsg(CAppUI::tr(get_class($object) . $title), UI_MSG_OK);
}
開發者ID:fbone,項目名稱:mediboard4,代碼行數:17,代碼來源:do_dossier_provisoire_aed.php

示例3: redirect

/**
 * Redirect to the last page
 *
 * @return void
 */
function redirect()
{
    if (CValue::post("ajax")) {
        echo CAppUI::getMsg();
        CApp::rip();
    }
    $m = CValue::post("m");
    $tab = CValue::post("tab");
    CAppUI::redirect("m={$m}&tab={$tab}");
}
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:15,代碼來源:do_translate_aed.php

示例4: storeObject

/**
 * Fonction utilitaire pour la sauvegarde rapide d'un object avec génération du message
 *
 * @param CMbObject $object Objet à enregister
 *
 * @return void
 */
function storeObject($object)
{
    $title = $object->_id ? "-msg-modify" : "-msg-create";
    if ($msg = $object->store()) {
        CAppUI::setMsg($msg, UI_MSG_ERROR);
        echo CAppUI::getMsg();
        // Il peut y avoir un msg de retour postérieur à la création de l'objet
        // On continue donc le processus de création de la naissance
        //CApp::rip();
    }
    CAppUI::setMsg(CAppUI::tr(get_class($object) . $title), UI_MSG_OK);
}
開發者ID:fbone,項目名稱:mediboard4,代碼行數:19,代碼來源:do_create_naissance_aed.php

示例5: doRedirect

 function doRedirect($demandeSynchro = false)
 {
     if ($this->ajax) {
         if ($this->synchro) {
             $del = CValue::post("del", 0);
             $tmp_repas_id = CValue::post("_tmp_repas_id", 0);
             $msgSystem = CAppUI::getMsg();
             $smarty = new CSmartyDP("modules/dPrepas");
             $smarty->assign("del", $del);
             $smarty->assign("tmp_repas_id", $tmp_repas_id);
             $smarty->assign("demandeSynchro", $demandeSynchro);
             $smarty->assign("msgSystem", $msgSystem);
             $smarty->assign("callBack", $this->callBack);
             if ($demandeSynchro) {
                 $smarty->assign("object", $this->_old);
             }
             $smarty->display("add_del_repas_offline.tpl");
         }
         CApp::rip();
     }
     if ($this->redirect !== null) {
         CAppUI::redirect($this->redirect);
     }
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:24,代碼來源:do_repas_aed.php

示例6: CMbXPath

    if ($root_name == $format_config->_class) {
        $xpath = new CMbXPath($dom);
        $nodeList = $xpath->query("//{$root_name}/*");
        $array_configs = array();
        foreach ($nodeList as $_node) {
            $config = $xpath->getValueAttributNode($_node, "config");
            $value = $xpath->getValueAttributNode($_node, "value");
            $array_configs[$config] = $value;
        }
        if ($count = array_diff_key($array_configs, $fields)) {
            CAppUI::setMsg("Trop de données ('" . count($array_configs) . "') par rapport aux \n        champs de l'objet ('" . count($fields) . "')", UI_MSG_ERROR);
        } else {
            foreach ($array_configs as $key => $value) {
                $format_config->{$key} = $value;
                if ($msg = $format_config->store()) {
                    CAppUI::setMsg("Erreur lors de l'import de la configuration : " . $msg, UI_MSG_ERROR);
                } else {
                    CAppUI::setMsg("Configuration correctement importée");
                }
            }
        }
    } else {
        CAppUI::setMsg("La classe du fichier de configuration importé ('{$root_name}'), ne correspond pas à celle \n      de la configuration choisie ('{$format_config->_class}')", UI_MSG_ERROR);
    }
    CAppUI::callbackAjax('window.parent.uploadCallback', array("message" => CAppUI::getMsg(), "sender" => array("sender_class" => $actor->_class, "sender_id" => $actor->_id)));
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("actor_guid", $actor_guid);
$smarty->assign("format_config_guid", $format_config_guid);
$smarty->display("import_config.tpl");
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:import_config.php

示例7: array

    /*if ($_field->formula == null) {
        continue;
      } */
    $formula_token_values[$_field->name] = array("values" => $_field->getFormulaValues(), "formula" => $_field->formula, "formulaView" => utf8_encode($_field->_formula));
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("ex_object", $ex_object);
$smarty->assign("ex_object_id", $ex_object_id);
$smarty->assign("ex_class_id", $ex_class_id);
$smarty->assign("object_guid", $object_guid);
$smarty->assign("object", $object);
$smarty->assign("_element_id", $_element_id);
$smarty->assign("event_name", $event_name);
$smarty->assign("grid", $grid);
$smarty->assign("out_of_grid", $out_of_grid);
$smarty->assign("groups", $groups);
$smarty->assign("formula_token_values", $formula_token_values);
$smarty->assign("can_delete", $can_delete);
$smarty->assign("parent_view", $parent_view);
$smarty->assign("preview_mode", $preview);
$smarty->assign("ui_msg", CAppUI::getMsg());
$smarty->assign("ex_class_event", $ex_class_event);
$smarty->assign("readonly", $readonly);
$smarty->assign("print", $print);
$smarty->assign("autoprint", $autoprint);
$smarty->assign("only_filled", $only_filled);
$smarty->assign("noheader", $noheader);
$smarty->assign("form_name", $form_name);
$smarty->assign("printer_id", $printer_id);
$smarty->display("view_ex_object_form.tpl");
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:view_ex_object_form.php

示例8: unset

    unset($fields["object_id"]);
    if ($root_name == $object_config->_class) {
        $xpath = new CMbXPath($dom);
        $nodeList = $xpath->query("//{$root_name}/*");
        $array_configs = array();
        foreach ($nodeList as $_node) {
            $config = $xpath->getValueAttributNode($_node, "config");
            $value = $xpath->getValueAttributNode($_node, "value");
            $array_configs[$config] = $value;
        }
        if ($count = array_diff_key($array_configs, $fields)) {
            CAppUI::setMsg("Trop de données ('" . count($array_configs) . "') par rapport aux \n        champs de l'objet ('" . count($fields) . "')", UI_MSG_ERROR);
        } else {
            foreach ($array_configs as $key => $value) {
                $object_config->{$key} = $value;
                if ($msg = $object_config->store()) {
                    CAppUI::setMsg("Erreur lors de l'import de la configuration : " . $msg, UI_MSG_ERROR);
                } else {
                    CAppUI::setMsg("Configuration correctement importée");
                }
            }
        }
    } else {
        CAppUI::setMsg("La classe du fichier de configuration importé ('{$root_name}'), ne correspond pas à celle \n      de la configuration choisie ('{$object_config->_class}')", UI_MSG_ERROR);
    }
    CAppUI::callbackAjax('window.parent.uploadCallback', array("message" => CAppUI::getMsg(), "object_id" => $object->_id, "object_configs_guid" => $object_config->_guid));
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("object_config_guid", $object_config_guid);
$smarty->display("import_config.tpl");
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:import_config.php

示例9: array

$name = CValue::get("file_name");
$category_id = CValue::get("category_id");
$allowed = array("CFile", "CCompteRendu");
if (!in_array($file_class, $allowed)) {
    CAppUI::stepAjax("CFile-msg-not_allowed_object_to_move", UI_MSG_ERROR);
}
/** @var CFile|CCompteRendu $file */
$file = new $file_class();
$file->load($file_id);
$file->file_category_id = $category_id && $category_id != $file->file_category_id ? $category_id : $file->file_category_id;
if ($file instanceof CFile) {
    $file->file_name = $name ? $name : $file->file_name;
}
$destination = CStoredObject::loadFromGuid($destination_guid);
if ($file->object_id == $destination->_id && $file->object_class == $destination->_class) {
    CAppUI::stepAjax("CFile-msg-from_equal_to", UI_MSG_ERROR);
}
$file->setObject($destination);
// check category
$cat = new CFilesCategory();
$cat->load($file->file_category_id);
if ($cat->class && $cat->class != $destination->_class) {
    $file->file_category_id = "";
}
if ($msg = $file->store()) {
    CAppUI::setMsg($msg, UI_MSG_ERROR);
} else {
    CAppUI::setMsg("CFile-msg-moved");
}
echo CAppUI::getMsg();
開發者ID:fbone,項目名稱:mediboard4,代碼行數:30,代碼來源:do_move_file.php

示例10: store

 /**
  * @see parent::store()
  */
 function store()
 {
     if ($this instanceof CSejour || $this instanceof COperation) {
         global $can;
         $this->loadOldObject();
         $this->completeField("cloture_activite_1", "cloture_activite_4", 'codes_ccam');
         if (!$can->admin && CAppUI::conf("dPsalleOp CActeCCAM signature") && ($this->cloture_activite_1 || $this->cloture_activite_4) && $this->fieldModified("codes_ccam") && strcmp($this->codes_ccam, $this->_old->codes_ccam)) {
             $new_code = substr($this->codes_ccam, strlen($this->_old->codes_ccam) + 1);
             $code_ccam = new CDatedCodeCCAM($new_code);
             $code_ccam->getRemarques();
             $activites = $code_ccam->getActivites();
             if (isset($activites[1]) && $this->cloture_activite_1) {
                 CAppUI::setMsg("Impossible de rajouter un code : l'activité 1 est clôturée", UI_MSG_ERROR);
                 echo CAppUI::getMsg();
                 CApp::rip();
             }
             if (isset($activites[4]) && $this->cloture_activite_4) {
                 CAppUI::setMsg("Impossible de rajouter un code : l'activité 4 est clôturée", UI_MSG_ERROR);
                 echo CAppUI::getMsg();
                 CApp::rip();
             }
         }
     }
     // Standard store
     if ($msg = parent::store()) {
         return $msg;
     }
     if ($this->_delete_actes && $this->_id) {
         if ($msg = $this->deleteActes()) {
             return $msg;
         }
     }
     return null;
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:37,代碼來源:CCodable.class.php

示例11: array_map

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");
    $tplAjax->assign("performance", CApp::$performance);
    $tplAjax->assign("requestID", CValue::get("__requestID"));
    $tplAjax->display("ajax_errors.tpl");
}
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:main.php

示例12: CSejour

 */
CCanDo::checkAdmin();
$sejour = new CSejour();
$group = CGroups::loadCurrent();
// Supression de patients
$suppr = 0;
$error = 0;
$qte = CValue::get("qte", 1);
$date_min = CValue::get("date_min", CMbDT::date());
$date_min = $date_min ? $date_min : CMbDT::date();
$where = array("entree" => ">= '{$date_min} 00:00:00'", "group_id" => "= '{$group->_id}'");
$listSejours = $sejour->loadList($where, null, $qte);
foreach ($listSejours as $_sejour) {
    CAppUI::setMsg($_sejour->_view, UI_MSG_OK);
    if ($msg = $_sejour->purge()) {
        CAppUI::setMsg($msg, UI_MSG_ALERT);
        $error++;
        continue;
    }
    CAppUI::setMsg("séjour supprimé", UI_MSG_OK);
    $suppr++;
}
// Nombre de patients
$nb_sejours = $sejour->countList($where);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("resultsMsg", CAppUI::getMsg());
$smarty->assign("suppr", $suppr);
$smarty->assign("error", $error);
$smarty->assign("nb_sejours", $nb_sejours);
$smarty->display("inc_purge_sejours.tpl");
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:ajax_purge_sejours.php

示例13: COperation

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage PlanningOp
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
$copy_operation_id = CValue::post("copy_operation_id");
$date = CValue::post("date");
$salle_id = CValue::post("salle_id");
$sejour_id = CValue::post("sejour_id");
$time_operation = CValue::post("time_operation");
$operation = new COperation();
$operation->load($copy_operation_id);
$operation->_id = $operation->_time_urgence = null;
$operation->date = $date;
$operation->salle_id = $salle_id;
$operation->sejour_id = $sejour_id;
$operation->time_operation = $time_operation;
$msg = $operation->store();
CAppUI::setMsg($msg ? $msg : CAppUI::tr("COperation-msg-modify"), $msg ? UI_MSG_ERROR : UI_MSG_OK);
CAppUI::getMsg();
CApp::rip();
開發者ID:fbone,項目名稱:mediboard4,代碼行數:27,代碼來源:do_copy_operation.php

示例14: array_map

        if (!isset($line[1])) {
            continue;
        }
        $line = array_map("getValue", $line);
        $etab = new CEtabExterne();
        $etab->finess = getNum($line[0]);
        if ($etab->loadMatchingObject()) {
            continue;
        }
        $etab->siret = getNum($line[1]);
        $etab->ape = $line[2];
        $etab->nom = $line[3];
        $etab->raison_sociale = $line[3];
        $etab->adresse = "{$line['4']}\n{$line['5']}\n{$line['6']}";
        $etab->cp = $line[7];
        $etab->ville = $line[8];
        $etab->tel = getNum($line[9]);
        $etab->fax = getNum($line[10]);
        $etab->repair();
        $type = $etab->_id ? "modify" : "create";
        if ($msg = $etab->store()) {
            CAppUI::setMsg($msg, UI_MSG_WARNING);
        } else {
            CAppUI::setMsg("CEtabExterne-msg-{$type}", UI_MSG_OK);
        }
    }
    fclose($fp);
    unlink($_file);
}
CAppUI::callbackAjax('window.parent.$("systemMsg").show().insert', CAppUI::getMsg());
CApp::rip();
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:do_import_etab_externe.php

示例15: array

                    $totaux["impute"]["dates"]["{$reglement->date}"] = array("count" => 0, "total" => 0.0);
                }
                $totaux["impute"]["dates"]["{$reglement->date}"]["count"]++;
                $totaux["impute"]["dates"]["{$reglement->date}"]["total"] += $reglement->montant;
            }
            if ($facture->_du_restant_patient - $reglement->montant > 0) {
                $results[$i]["warning"][] = "Paiement partiel";
            }
            // Dry run to check references
            if ($dryrun) {
                continue;
            }
            // Creation
            $existing = $reglement->_id;
            if ($msg = $reglement->store()) {
                CAppUI::setMsg($msg, UI_MSG_ERROR);
                $results[$i]["errors"][] = $msg;
                continue;
            }
            CAppUI::setMsg($existing ? "CReglement-msg-modify" : "CReglement-msg-create", UI_MSG_OK);
        }
    }
    fclose($fp);
}
CAppUI::callbackAjax('$("systemMsg").insert', CAppUI::getMsg());
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("results", $results);
$smarty->assign("totaux", $totaux);
$smarty->assign("facture_class", $facture_class);
$smarty->display("vw_rapprochement_banc.tpl");
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:vw_rapprochement_banc.php


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