Пример #1
0
<?php

/**
 * $Id: ajax_edit_libelle.php 4924 2013-12-09 10:47:53Z flavien $
 *
 * @package    Mediboard
 * @subpackage mvsante
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    OXOL, see http://www.mediboard.org/public/OXOL
 * @version    $Revision: 4924 $
 */
CCanDo::checkEdit();
$libelle_id = CValue::get("libelle_id");
$libelle = new CLibelleOp();
$libelle->load($libelle_id);
if (!$libelle->_id) {
    $libelle->group_id = CGroups::loadCurrent()->_id;
}
// Creation du template
$smarty = new CSmartyDP();
$smarty->assign("libelle", $libelle);
$smarty->display("vw_edit_libelle.tpl");
Пример #2
0
<?php

/**
 * $Id$
 *  
 * @category dPplanningOp
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkEdit();
$page = CValue::get("page", "0");
$nom = CValue::get("nom");
$where = array();
$where["group_id"] = " = '" . CGroups::loadCurrent()->_id . "'";
if ($nom) {
    $where["nom"] = " LIKE '%{$nom}%'";
}
$libelle = new CLibelleOp();
$total_libs = $libelle->countList($where);
$libelles = $libelle->loadGroupList($where, "nom", "{$page}, 50");
$smarty = new CSmartyDP();
$smarty->assign('libelles', $libelles);
$smarty->assign("nom", $nom);
$smarty->assign("page", $page);
$smarty->assign("total_libs", $total_libs);
$smarty->display("inc_search_libelle.tpl");
Пример #3
0
 $line = array_map("trim", $line);
 $line = array_map("addslashes", $line);
 $results[$i]["statut"] = CMbArray::get($line, 0);
 $results[$i]["nom"] = CMbArray::get($line, 1);
 $results[$i]["date_debut"] = CMbArray::get($line, 2);
 $results[$i]["date_fin"] = CMbArray::get($line, 3);
 $results[$i]["services"] = CMbArray::get($line, 4);
 $results[$i]["mots_cles"] = CMbArray::get($line, 5);
 $results[$i]["numero"] = CMbArray::get($line, 6);
 $results[$i]["version"] = CMbArray::get($line, 7);
 $results[$i]["errors"] = array();
 if (!$results[$i]["nom"]) {
     $results[$i]["errors"][] = "Nom du libellé pas défini";
 } else {
     // Libellé
     $libelle = new CLibelleOp();
     if ($results[$i]["statut"] == "Validé") {
         $results[$i]["statut"] = "valide";
     }
     if ($results[$i]["date_debut"]) {
         $results[$i]["date_debut"] = CMbDT::dateTime($results[$i]["date_debut"]);
     }
     if ($results[$i]["date_fin"]) {
         $results[$i]["date_fin"] = CMbDT::dateTime($results[$i]["date_fin"]);
     }
     $libelle->group_id = CGroups::loadCurrent()->_id;
     $libelle->statut = $results[$i]["statut"];
     $libelle->nom = $results[$i]["nom"];
     $libelle->date_debut = $results[$i]["date_debut"];
     $libelle->date_fin = $results[$i]["date_fin"];
     $libelle->services = $results[$i]["services"];