Example #1
0
// la variable $caller, passée par l'URL, contient le nom du form appelant
$base_url = "category.php?caller={$caller}&p1={$p1}&p2={$p2}&perso_id={$perso_id}&no_display={$no_display}&bt_ajouter={$bt_ajouter}&dyn={$dyn}&keep_tilde={$keep_tilde}&parent=&callback=" . $callback . "&infield=" . $infield . "&max_field=" . $max_field . "&field_id=" . $field_id . "&field_name_id=" . $field_name_id . "&add_field=" . $add_field . "&id_thes_unique={$id_thes_unique}&autoindex_class=autoindex_record";
require_once "{$base_path}/selectors/templates/category.tpl.php";
require_once "{$base_path}/selectors/category_autoindex.inc.php";
print $sel_header;
if ($id_thes_unique > 0) {
    $id_thes = $id_thes_unique;
} else {
    //recuperation du thesaurus session en fonction du caller
    switch ($caller) {
        case 'notice':
            if (!$id_thes) {
                $id_thes = thesaurus::getNoticeSessionThesaurusId();
            }
            if (!$perso_id) {
                thesaurus::setNoticeSessionThesaurusId($id_thes);
            }
            break;
        case 'categ_form':
            if (!$id_thes) {
                $id_thes = thesaurus::getSessionThesaurusId();
            }
            if ($dyn != 2) {
                thesaurus::setSessionThesaurusId($id_thes);
            }
            break;
        default:
            if (!$id_thes) {
                $id_thes = thesaurus::getSessionThesaurusId();
            }
            thesaurus::setSessionThesaurusId($id_thes);