<?php /* $Id$ */ /** * @package Mediboard * @subpackage sante400 * @version $Revision$ * @author SARL OpenXtrem * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html */ CCanDo::checkAdmin(); // Création du template $smarty = new CSmartyDP(); $smarty->assign("types", CMouvFactory::getTypes()); $smarty->assign("modes", array_keys(CMouvFactory::$modes)); $smarty->display("configure.tpl");
<?php /* $Id: view_identifiants.php 6141 2009-04-21 14:19:23Z phenxdesign $ */ /** * @package Mediboard * @subpackage sante400 * @version $Revision: 6141 $ * @author SARL OpenXtrem * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html */ CCanDo::checkRead(); $trigger_classes = CMouvFactory::getClasses(); // Selected mark $mark = new CTriggerMark(); $mark->load(CValue::getOrSession("mark_id")); // filtered marks $filter = new CTriggerMark(); $where = array(); if ($filter->trigger_class = CValue::getOrSession("trigger_class")) { $where["trigger_class"] = "= '{$filter->trigger_class}'"; } if ($filter->trigger_number = CValue::getOrSession("trigger_number")) { $where["trigger_number"] = "= '{$filter->trigger_number}'"; } if ($filter->mark = CValue::getOrSession("mark")) { $where["mark"] = "= '{$filter->mark}'"; } if ("" !== ($filter->done = CValue::getOrSession("done", ""))) { $where["done"] = "= '{$filter->done}'"; } $count = $filter->countList($where);
/** * @package Mediboard * @subpackage sante400 * @version $Revision: 19326 $ * @author SARL OpenXtrem * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html */ CCanDo::checkAdmin(); $marked = CValue::get("marked"); $action = CValue::get("action"); $type = CValue::get("type"); $types = $type == "all" ? CMouvFactory::getTypes() : array($type); $marked = CValue::get("marked"); $marked = $marked == "all" ? array("0", "1") : array($marked); foreach ($types as $_type) { $mouv = CMouvFactory::create($_type); if ($action == "count") { $mouv->loadLatest(); CAppUI::stepAjax("Latest available trigger for type '%s' is '%s' dating '%s'", UI_MSG_OK, $_type, $mouv->rec, $mouv->when); foreach ($marked as $_marked) { $count = $mouv->count($_marked); CAppUI::stepAjax("%s - %s : %s disponibles ", UI_MSG_OK, CAppUI::tr("CMouvement400-type-{$_type}"), CAppUI::tr("CMouvement400-marked-{$_marked}"), $count); } } if ($action == "obsolete") { $mouv->loadOldest(); CAppUI::stepAjax("Oldest available trigger for type '%s' is '%s' dating '%s'", UI_MSG_OK, $_type, $mouv->rec, $mouv->when); $count = $mouv->count(true, $mouv->rec); CAppUI::stepAjax("Counting '%s' obsolete marked triggers", $count ? UI_MSG_WARNING : UI_MSG_OK, $count); $max = 1000; $count = $mouv->markObsoleteTriggers($mouv->rec, $max);
} $marked = CValue::getOrSession("marked", "1"); $max = CValue::get("max", CAppUI::conf("sante400 nb_rows")); // Load mouvements $class = CValue::get("class"); $type = CValue::getOrSession("type"); $mouvs = array(); $count = 0; $procs = 0; if (!in_array($type, $types)) { $type = null; } // Mouvement type (or class) provided if ($type || $class) { // Mouvement construction by factory $mouv = $class ? new $class() : CMouvFactory::create($type); if (!$mouv) { CAppUI::stepMessage(UI_MSG_ERROR, "CMouvFactory-error-noclass", CValue::first($type, $class)); return; } // Initialisation d'un fichier de verrou $class = $mouv->class; $lock = new CMbLock("synchro_sante400/{$class}"); // Mouvements counting $count = $mouv->count($marked); // Mouvements loading /** @var CMouvement400[] $mouvs */ $mouvs = array(); if ($rec = CValue::get("rec")) { try { $mouv->load($rec);