<?php

$format = <<< FORMAT
	<li class="#static_class #static_status" id="#static_id" >
		<a href="#static_url" title="#static_name">#static_name</a>
	</li>\n
FORMAT;

if(!empty($plxShow->plxMotor->aStats)) {
	echo <<< LIST_START
<ul class="celkivabien" id="gennepa">\n
LIST_START;

	foreach($plxShow->plxMotor->aStats as $statId=>$params) {
		if(!empty($params['active']) AND $params['menu'] != 'oui') { # La page  est bien active et dispo ds le menu
			if($params['url'][0]=='?') # url interne commen├žant par ?
				$url = $plxShow->plxMotor->urlRewrite($params['url']);
			elseif(plxUtils::checstatIdSite($params['url'],false)) # url externe en http ou autre
				$url = $params['url'];
			else # url page statique
				$url = $plxShow->plxMotor->urlRewrite('?static'.intval($statId).'/'.$params['url']);
			$replaces = array(
				'#static_id'		=> 'static-'.intval($statId),
				'#static_class'		=> 'static',
				'#static_url'		=> $url,
				'#static_name'		=> plxUtils::strCheck($params['name']),
				'#static_status'	=> ($plxShow->staticId()==intval($statId)) ? 'active' : 'noactive')
			);
			echo str_replace(array_keys($replaces), array_values($replaces), $format);
		}
	}

	echo <<< LIST_END
</ul>
LIST_END;
} else {
?>
<p>
	Nous ne cachons aucune page statique
</p
<?php
}
?>