Ejemplo n.º 1
0
CCanDo::checkRead();
$lang = CValue::getOrSession("lang", CCodeCIM10::LANG_FR);
$code = CValue::getOrSession("code", "");
$keys = CValue::getOrSession("keys", "");
$level1 = CValue::getOrSession("level1", "");
$level2 = CValue::getOrSession("level2", "");
if (CValue::session("code") || CValue::session("keys")) {
    $level1 = "";
    CValue::setSession("level1");
}
if (!$level1) {
    $level2 = "";
    CValue::setSession("level2");
}
$cim10 = new CCodeCIM10();
$listLevel1 = $cim10->getSommaire($lang);
$listLevel2 = array();
$master = array();
$keys = trim($keys);
$code = trim($code);
if ($code || $keys) {
    $master = $cim10->findCodes($code, $keys, $lang);
} elseif ($level2) {
    $listLevel2 = $cim10->getSubCodes($level1, $lang);
    $master = $cim10->getSubCodes($level2, $lang);
} elseif ($level1) {
    $listLevel2 = $cim10->getSubCodes($level1, $lang);
    $master = $listLevel2;
}
$numresults = count($master);
// Création du template
Ejemplo n.º 2
0
<?php

/**
 * dPcim10
 *
 * @category Cim10
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  SVN: $Id:$
 * @link     http://www.mediboard.org
 */
CCanDo::checkRead();
$lang = CValue::getOrSession("lang", CCodeCIM10::LANG_FR);
$cim10 = new CCodeCIM10();
$chapter = $cim10->getSommaire($lang);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("lang", $lang);
$smarty->assign("cim10", $cim10);
$smarty->assign("chapter", $chapter);
$smarty->display("vw_idx_chapter.tpl");