Ejemplo n.º 1
0
<?php

/** $Id: ajax_do_moves.php 19326 2013-05-28 14:01:35Z mytto $ */
/**
 * @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);
Ejemplo n.º 2
0
<?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");
Ejemplo n.º 3
0
<?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();
$marked = array("0", "1");
$types = CMouvFactory::getTypes();
$report = array();
foreach ($types as $_type) {
    // Oldest mouvement
    $mouv = CMouvFactory::create($_type);
    $mouv->loadOldest();
    $report[$_type]["triggers"]["oldest"] = $mouv;
    // Latest mouvement
    $mouv = CMouvFactory::create($_type);
    $mouv->loadLatest();
    $report[$_type]["triggers"]["latest"] = $mouv;
    // Marked and unmarked counts
    foreach ($marked as $_marked) {
        $count = $mouv->count($_marked);
        $report[$_type]["triggers"]["marked"][$_marked] = $count;
    }
    // Available
    $report[$_type]["triggers"]["available"] = $mouv->countAvailable();
    // Marks