<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: term_show.php,v 1.5.20.1 2025/07/01 12:29:29 dgoron Exp $

$base_path="../../..";                            
$base_auth = ""; 

require_once ("$base_path/includes/init.inc.php");

global $class_path, $javascript_path;
global $id_empr, $groupID, $unq, $id_thes, $term;

require_once("$class_path/term_show.class.php"); 
require_once ("$javascript_path/misc.inc.php");

$id_empr = intval($id_empr);
$groupID = intval($groupID);

//Récupération des paramètres du formulaire appellant
$base_query = "id_empr=$id_empr&groupID=$groupID&unq=$unq&history=".rawurlencode(stripslashes($term))."&history_thes=".rawurlencode(stripslashes($id_thes));

echo $jscript_term;

function parent_link($categ_id,$categ_see) {
	global $base_path;
	global $thesaurus_categories_show_empty_categ;
	global $id_empr,$groupID,$unq;
	
	if ($categ_see) $categ=$categ_see; else $categ=$categ_id;
	$tcateg =  new category($categ);
	if ($thesaurus_categories_show_empty_categ) 
		$visible=true;
	else
		$visible=false;
		
	if ($tcateg->has_notices()) {
		$link="<a href='".$base_path."/circ.php?categ=resa_planning&resa_action=search_resa&mode=1&aut_id=$categ&etat=aut_search&aut_type=categ&id_empr=$id_empr&groupID=$groupID&mode=1&unq=$unq' target=_top><img src='".get_url_icon('search.gif')."' border=0 align='absmiddle'></a>";
		$visible=true;	
	}
	$r=array("VISIBLE"=>$visible,"LINK"=>$link);
	return $r;
}

$ts=new term_show(stripslashes($term),"term_show.php",$base_query,"parent_link", 0, $id_thes);
echo $ts->show_notice();