extranet/www/index.php

371 lines
12 KiB
PHP
Raw Normal View History

2010-03-25 13:44:32 +00:00
<?php
2009-03-24 08:10:48 +00:00
/**
* @file
* Cette page sert toutes les requêtes du site
2009-03-24 08:10:48 +00:00
*
*/
2009-03-05 08:31:21 +00:00
2009-07-20 16:17:33 +00:00
require_once 'index.fct.php';
require_once 'fwk.php';
require_once 'default/_includes/mysql.php';
2010-04-12 12:47:54 +00:00
require_once 'index_auth.php';
if (!isset($_REQUEST['page'])) {
$page = 'main';
} else {
$page = $_REQUEST['page'];
}
if (!isset($_REQUEST['sortie'])) {
$sortie = '';
} else {
$sortie = $_REQUEST['sortie'];
}
if ($sortie == 'pdf') {
require_once 'print/print.php';
print_capture();
}
//Chargement du contenu
switch ($page)
{
case 'referer':
$O2 = $client->setLog('redirection_'.$_REQUEST['part'],
$_REQUEST['siret']);
header('Location: '.$_REQUEST['url']);
die();
break;
case 'international_recherche':
$title = 'Recherche International';
$page2 = 'international_recherche.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'international_identite':
$title = 'Identité - International';
$page2 = 'international_identite.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'international_enquete':
$title = 'Enquête - International';
$page2 = 'international_enquete.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'international_enquetet':
$title = 'Demande Enquête Terrain - International';
$page2 = 'international_enquetet.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'recherche':
if ($_REQUEST['vue'] == 'list' &&
($_POST['formR']['type'] == 'ent' ||
$_POST['formR']['type'] == 'dir')) {
$_SESSION['list_pre'] =
gzcompress(serialize($_POST['formR']), 9);
}
$title = 'Recherche';
$page2 = 'recherche.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'moncompte':
if (isset($_REQUEST['frmOptions'])) {
$tabOptions = $_REQUEST['frmOptions'];
}
if (isset($tabOptions['rech_nbrep'])) {
$_SESSION['tabInfo']['nbReponses'] = $tabOptions['rech_nbrep'];
}
if (isset($tabOptions['mode_edition'])) {
$_SESSION['tabInfo']['mode_edition'] = 1;
}
if (isset($tabOptions['pref'])) {
$_SESSION['tabInfo']['pref'] = implode(' ', $tabOptions['pref']);
}
if (isset($tabOptions['droits'])) {
$_SESSION['tabInfo']['droits'] = implode(' ', $tabOptions['droits']);
}
if (isset($tabOptions['formatMail'])) {
$_SESSION['tabInfo']['formatMail'] = $tabOptions['formatMail'];
}
$title = 'Profil utilisateur';
$page2 = 'moncompte.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'administration':
$title = 'Administration des utilisateurs';
$page2 = 'administration.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'administration_client':
$title = 'Gestion des clients';
$page2 = 'administration_client.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'greffescmd':
$title = 'Gestion des commandes INFOGREFFE';
$page2 = 'greffescmd.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'greffescmd_courrier':
$title = 'Gestion des commandes Greffes par courrier';
$page2 = 'greffescmd_courrier.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'international_commandes':
$title = 'Commandes - International';
$page2 = 'international_commandes.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'stats':
$title = 'Statistiques';
$page2 = 'stats.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'identite':
require_once 'identite/header.php';
$title = titreAvecSiren('Identit&eacute;');
$page2 = 'identite.php';
$profilPage = hasProfil($page);
2010-03-25 13:44:32 +00:00
if ($profilPage !== false &&
isset($_REQUEST['profil']) && $_REQUEST['profil'] == 1) {
$page2 = $profilPage;
}
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'identite_procol';
require_once 'identite/header.php';
$title = titreAvecSiren('Fiche procédure collective');
$page2 = 'identite_procol.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'evenements':
$title = titreAvecSiren('Ev&egrave;nements');
$page2 = 'evenements.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'saisie':
2010-03-12 09:41:59 +00:00
$title = titreAvecSiren('Saisie/Edition');
$page2='saisie.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'etablissements':
2010-03-12 09:41:59 +00:00
$title = titreAvecSiren('Liste des &eacute;tablissements');
$page2 = 'etablissements.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'carte':
require_once './pages/carte.php';
break;
case 'liens':
$title = titreAvecSiren('Liens');
$page2 = 'liens.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'dirigeants':
$title = titreAvecSiren('Dirigeants');
$page2 = 'dirigeants.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'annonces':
require_once 'index_annonces.php';
break;
case 'infosreg':
$title = titreAvecSiren('Informations r&eacute;glement&eacute;es');
$page2 = 'infosreg.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'bourse':
$title = titreAvecSiren('Informations boursi&egrave;res');
$page2 = 'bourse.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'banque':
$title = titreAvecSiren('Relation banquaire');
$page2 = 'banque.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'liasse':
$title = titreAvecSiren('Liasse fiscale');
$page2 = 'liasse.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'competences':
$title = titreAvecSiren('Comp&eacute;tences Territoriales');
$page2 = 'competences.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'conventions':
$title = titreAvecSiren('Conventions Collectives');
$page2 = 'conventions.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'marques':
$title = titreAvecSiren('Marques d&eacute;pos&eacute;es');
$page2 = 'marques.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'getmarques':
require_once realpath(dirname(__FILE__)).'/pages/getMarques.php';
break;
case 'pieces':
titreAvecSiren('Commande de pi&egrave;ces officielles');
$page2 = 'piecescmd.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'kbis':
$title = titreAvecSiren('KBis');
$page2 = 'kbis.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'kbis2':
$title = titreAvecSiren('KBis');
$page2 = 'kbis2.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'synthese':
$title = 'Eléments financier';
$page2 = 'synthese.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
// Code ajouté "synthese_perso"
case 'synthese_perso':
$title = 'Eléments financier';
$page2 = 'synthese_perso.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'bilans':
$title = titreAvecSiren('Bilans');
$page2 = 'bilans.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'ratios':
$title = 'Eléments financier';
$page2 = 'ratios.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'indiscore':
$title = titreAvecSiren('indiScore');
$page2 = 'indiscore.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'scorescf':
$title = titreAvecSiren('score Credit Safe &copy;');
$page2 = 'scorescf.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'rsynthese':
$title = titreAvecSiren('Rapport de synthèse');
$page2 = 'rsynthese.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'rsynthesemin':
$title = titreAvecSiren('Rapport de synthèse');
$page2 = 'rsynthesemin.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'enquetec' :
$title = titreAvecSiren('Enquête commerciale');
$page2 = 'enquetec.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'survliste':
$title = 'Surveillance';
$page2 = 'survliste.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'survlisteann':
$title = 'Surveillance';
$page2 = 'survlisteann.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'avis':
require_once realpath(dirname(__FILE__)).'/pages/avis.php';
break;
case 'actes':
require_once realpath(dirname(__FILE__)).'/pages/actes.php';
break;
case 'attente':
require_once realpath(dirname(__FILE__)).'/pages/attente.php';
break;
case 'original':
require_once realpath(dirname(__FILE__)).'/pages/original.php';
break;
case 'fichier':
require_once realpath(dirname(__FILE__)).'/pages/fichier.php';
break;
case 'greffes':
$title = titreAvecSiren('Pi&egrave;ces Officielles');
$page2 = 'greffes2.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'surveillance':
$title = 'Liste des établissements sous suveillances';
$page2 = 'options_surv.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'portefeuille':
$title = 'Portefeuille';
$page2 = 'portefeuille.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'bdf':
//Type de module
$module = isset($_REQUEST['module']) ? $_REQUEST['module'] : '';
$siret = isset($_REQUEST['siret']) ? $_REQUEST['siret'] : '';
$service = isset($_REQUEST['service']) ? $_REQUEST['service'] : 'fiben';
$req = isset($_REQUEST['req']) ? $_REQUEST['req'] : '';
$denom = isset($_REQUEST['denom']) ? $_REQUEST['denom'] : '';
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : '';
$code = isset($_REQUEST['code']) ? $_REQUEST['code'] : '';
$rechet = isset($_REQUEST['rechet']) ? $_REQUEST['rechet'] : '';
$ape = isset($_REQUEST['ape']) ? $_REQUEST['ape'] : '';
2010-03-02 15:50:11 +00:00
if ($siret != '' && $req != '' && $siret != $req) {
$siret = '';
} else if (substr($siret, 0, 9) == $req || empty($req)) {
$req = substr($siret, 0, 9);
}
2010-01-28 16:45:29 +00:00
require_once 'bdf/bdf.php';
2010-03-02 15:50:11 +00:00
//Titre
$title = 'Banque De France - '.strtoupper($service);
if ($siret == '') {
$title .= ' - '.$req;
} else {
$title .= titreAvecSiren('');
}
$page2 = 'bdf.php';
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
case 'main':
require_once realpath(dirname(__FILE__)).'/pages/main.php';
break;
default:
$title = 'Erreur';
afficheErreur("Erreur 10400 : La page demandée est inexistante !");
break;
2009-03-25 09:34:04 +00:00
}
2010-03-02 15:50:11 +00:00
logAction($tabInfo['login'],
$page,
isset($_REQUEST['siret']) ? $_REQUEST['siret'] : '',
$tabInfo['ip'],
$tabInfo['host'],
$tabInfo['resolution'],
$tabInfo['nbcolors'],
$tabInfo['user_agent'],
$tabInfo['referer1'],
gmdate('Y/m/d H:i:s', $tabInfo['date_login'] + 3600),
gmdate('Y/m/d H:i:s', $tabInfo['date_last_action'] + 3600),
implode_r(', ', $_REQUEST));
if ($sortie == 'pdf') {
if (isset($siret)) {
$page .= '-'.$siret;
}
if (isset($idEntreprise)) {
$page .= '-'.$idEntreprise;
}
print_page($page);
}
?>