Example #1
0
function inc_selectionner_dist($sel, $idom = "", $exclus = 0, $aff_racine = false, $recur = true, $do = 'aff')
{
    if ($recur) {
        $recur = mini_hier($sel);
    } else {
        $sel = 0;
    }
    if ($aff_racine) {
        $info = generer_url_ecrire('informer', "type=rubrique&rac={$idom}&do={$do}&id=");
        $idom3 = $idom . "_selection";
        $onClick = "jQuery(this).parent().addClass('on');jQuery('#choix_parent_principal .on').removeClass('on'); aff_selection(0, '{$idom3}', '{$info}', event);return false;";
        $ondbClick = strtr(str_replace("'", "’", str_replace('"', """, textebrut(_T('info_racine_site')))), "\n\r", "  ");
        $js_func = $do . '_selection_titre';
        $ondbClick = "{$js_func}('{$ondbClick}',0,'selection_rubrique','id_parent');";
        $aff_racine = "<div class='petite-racine item'>" . "<a href='#'" . "onclick=\"" . $onClick . "\"\nondbclick=\"" . $ondbClick . $onClick . "\">" . _T("info_racine_site") . "</a></div>";
    }
    $url_init = generer_url_ecrire('plonger', "rac={$idom}&exclus={$exclus}&id=0&col=1&do={$do}");
    $plonger = charger_fonction('plonger', 'inc');
    $plonger_r = $plonger($sel, $idom, $recur, 1, $exclus, $do);
    // url completee par la fonction JS onkeypress_rechercher
    $url = generer_url_ecrire('rechercher', "exclus={$exclus}&rac={$idom}&do={$do}&type=");
    return construire_selectionner_hierarchie($idom, $plonger_r, $aff_racine, $url, 'id_parent', $url_init);
}
Example #2
0
function inc_selectionner_dist ($sel, $idom="", $exclus=0, $aff_racine=false, $recur=true, $do='aff') {

	if ($recur) $recur = mini_hier($sel); else $sel = 0;

	if ($aff_racine) {
		$info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id=");
		$idom3 = $idom . "_selection";

		$onClick = " aff_selection(0, '$idom3', '$info', event);";

		$ondbClick = strtr(str_replace("'", "&#8217;",
				str_replace('"', "&#34;",
					textebrut(_T('info_racine_site')))),
				"\n\r", "  ");

		$js_func = $do . '_selection_titre';
		$ondbClick = "$js_func('$ondbClick',0,'selection_rubrique','id_parent');";

		$aff_racine = "<div class='arial11 petite-racine'\nonclick=\""
		. $onClick
		. "\"\nondbclick=\""
		. $ondbClick
		. $onClick
		. "\">\n<div class='highlight off'>"
		. _T("info_racine_site")
		. "</div></div>";
	} else $onClick = '';

	$url_init = generer_url_ecrire('plonger',"rac=$idom&exclus=$exclus&id=0&col=1&do=$do");

	$plonger = charger_fonction('plonger', 'inc');
	$plonger_r = $plonger($sel, $idom, $recur, 1, $exclus, $do);

	// url completee par la fonction JS onkeypress_rechercher
	$url = generer_url_ecrire('rechercher', "exclus=$exclus&rac=$idom&do=$do&type=");
	return construire_selectionner_hierarchie($idom, $plonger_r, $aff_racine, $url, 'id_parent', $url_init);
}