<?php /** * $Id: vw_edit_typeanesth.php 24175 2014-07-28 09:17:55Z aurelie17 $ * * @package Mediboard * @subpackage PlanningOp * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision: 24175 $ */ CCanDo::checkAdmin(); $show_inactive = CValue::getOrSession("inactive", 0); // Liste des Type d'anesthésie $type_anesth = new CTypeAnesth(); $where = array("actif" => $show_inactive ? " IN ('0','1')" : " = '1' "); /** @var CTypeAnesth[] $types_anesth */ $types_anesth = $type_anesth->loadList($where, "name"); foreach ($types_anesth as &$_type_anesth) { $_type_anesth->countOperations(); $_type_anesth->loadRefGroup(); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("types_anesth", $types_anesth); $smarty->assign("show_inactive", $show_inactive); $smarty->display("vw_edit_typeanesth.tpl");
<?php /** * $Id:$ * * @package Mediboard * @subpackage PlanningOp * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision:$ */ CCanDo::checkEdit(); $type_anesth_id = CValue::get("type_anesth"); $type_anesth = new CTypeAnesth(); $type_anesth->load($type_anesth_id); if (!$type_anesth->_id) { $type_anesth->group_id = CGroups::loadCurrent()->_id; } // Récupération des groups $groups = CGroups::loadGroups(PERM_EDIT); //smarty $smarty = new CSmartyDP(); $smarty->assign("type_anesth", $type_anesth); $smarty->assign("groups", $groups); $smarty->display("vw_form_typeanesth.tpl");