コード例 #1
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Hospi
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
$object_class = CValue::get("object_class");
$object_id = CValue::get("object_id");
$unique_id = CValue::get("unique_id");
$custom_function = CValue::get("custom_function");
$modele_etiquette = new CModeleEtiquette();
$modele_etiquette->object_class = $object_class;
$modele_etiquette->group_id = CGroups::loadCurrent()->_id;
$modeles_etiquettes = $modele_etiquette->loadMatchingList();
$smarty = new CSmartyDP();
$smarty->assign("modeles_etiquettes", $modeles_etiquettes);
$smarty->assign("object_class", $object_class);
$smarty->assign("object_id", $object_id);
$smarty->assign("unique_id", $unique_id);
$smarty->assign("custom_function", $custom_function);
$smarty->display("inc_choose_modele_etiquette.tpl");
コード例 #2
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Hospi
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkEdit();
$filter_class = CValue::getOrSession("filter_class");
$modele_etiquette_id = CValue::getOrSession("modele_etiquette_id");
// Récupération de la liste suivant l'object_class
$modele_etiquette = new CModeleEtiquette();
$modele_etiquette->group_id = CGroups::loadCurrent()->_id;
if ($filter_class != "all") {
    $modele_etiquette->object_class = $filter_class;
}
$liste_modele_etiquette = $modele_etiquette->loadMatchingList("nom");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("filter_class", $filter_class);
$smarty->assign("modele_etiquette_id", $modele_etiquette_id);
$smarty->assign("liste_modele_etiquette", $liste_modele_etiquette);
$smarty->display("inc_list_modele_etiquette.tpl");