extranet/www/pages/menu.php
2010-03-03 16:56:17 +00:00

91 lines
2.9 KiB
PHP

<?php
if (isset($_REQUEST['siret'])) {
$siret = $_REQUEST['siret'];
}
if (isset($_REQUEST['idEntreprise'])) {
$idEntreprise = $_REQUEST['idEntreprise'];
}
?>
<div id="floatMenu">
<div id="logo"><img src="./img/logo_menu.gif" width="200" height="65"/></div>
<div id="Menu">
<?php
require_once 'menu/menu.php';
echo menu();
?>
</div>
<div id="icones">
<?php
//Ajout des paramètres optionnelles pour la page recherche (lors de la première recherche)
if ($page=='recherche'){
if ($_REQUEST['vue']=='list' ) $_SERVER['QUERY_STRING'] = str_replace('vue=list', 'vue=list_pre', $_SERVER['QUERY_STRING']);
}
?>
<?php
$printUrl = $_SERVER['QUERY_STRING'];
if ($page=='bilans' && isset($_REQUEST['type']) && $_REQUEST['type']!=''){
$printUrl.= '&type='.$_REQUEST['type'];
}
?>
<a href="/?<?=$printUrl;?>&sortie=prt" title="Impression" target="_blank">
<img src="./img/exporticones/printer.png" alt="Impression"/></a>&nbsp;
<?php
//Affichage des impressions seulement pour certaines pages
if ($page!='recherche' && $page!='main' && $page!='' ){
?>
<a href="./?<?=$_SERVER['QUERY_STRING'];?>&sortie=pdf" target="_blank" title="PDF"><img src="./img/exporticones/pdf.png" alt="PDF" /></a>&nbsp;
<?php
}
if ($page=='identite' || $page=='etablissements' || $page=='liens' || $page=='evenements' || $page=='dirigeants'){
?>
<a href="./exportcsv.php?<?=$_SERVER['QUERY_STRING'];?>" target="_blank" title="CSV"><img src="./img/exporticones/csv.png" alt="CSV" /></a>&nbsp;
<?php
}
if ($page=='identite' || $page=='etablissements' || $page=='liens' || $page=='evenements' || $page=='dirigeants' || $page=='annonces'){
?>
<a href="./exportxml.php?<?=$_SERVER['QUERY_STRING'];?>" target="_blank" title="XML"><img src="./img/exporticones/xml.png" alt="XML" /></a>&nbsp;
<?php
}
?>
</div>
</div>
<script type="text/javascript">
<?php
require_once 'user/user.php';
$activeMenu = array();
//Recherche
$activeMenu[] = array('recherche', 'international_recherche');
//Identite
$activeMenu[] = array('identite', 'etablissements', 'liens', 'evenements');
//Dirigeants
$activeMenu[] = array('dirigeants');
//Elements Financier
$activeMenu[] = array('synthese', 'bilans', 'ratios', 'liasse', 'bourse', 'banque');
//Elements Juridiques
$activeMenu[] = array('annonces', 'infosreg', 'competences', 'conventions', 'marques');
//Banque De France
if ( hasPerm('bdf') ) $activeMenu[] = array('bdf');
//Evaluation
$activeMenu[] = array('indiscore', 'scorescf', 'enquetec', 'rsynthese', 'rsynthesemin');
//Pieces officielles
$activeMenu[] = array('pieces', 'kbis', 'greffes');
//Options
$activeMenu[] = array('moncompte', 'surveillance', 'portefeuille', 'greffescmd', 'administration', 'stats', 'survliste');
?>
$(document).ready(function()
{
<?php
$menuIndex = 0;
foreach($activeMenu as $key => $pages)
{
if( in_array($page, $pages)) { $menuIndex = $key; break; }
}
if($menuIndex==0){?> $('#Menu').accordion(); <?php }
else{?> $('#Menu').accordion('activate', <?=$menuIndex?>); <?php }
?>
});
</script>