8847079109
Intégration include_path (prepend.php)
51 lines
2.6 KiB
PHP
51 lines
2.6 KiB
PHP
<?
|
|
if (!$_SESSION['connected'])
|
|
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
|
else
|
|
{
|
|
if (isset($_GET['siret']) && $_GET['siret']<>'')
|
|
{
|
|
/*?>
|
|
<a href='./?page=<?=$_REQUEST['referer']?>'>Retour à la page précédente</a> <a name="haut" href='#bas'>Aller en bas</a><br/>
|
|
<hr width="95%"/>
|
|
<?*/
|
|
include INCLUDE_PATH.'/constantes.php';
|
|
|
|
include_once(realpath(dirname(__FILE__). '/../../framework/default/_includes/mysql.php'));
|
|
$con = mysql_pconnect('localhost', 'root', 'catsysyo92');
|
|
if (!($con === false)) {
|
|
if (mysql_select_db('insee', $con) === false)
|
|
die('Could not select database: ' . mysql_error());
|
|
}
|
|
|
|
$siren=substr($_GET['siret'],0,9);
|
|
$nic=substr($_GET['siret'],9,5);
|
|
$_SESSION['siren']=$siren;
|
|
$_SESSION['nic']=$nic;
|
|
$fields='insSIREN, insNIC, insNOMEN, insNOMET, insSIGLE, insCADR, insNUMVOIE, insINDREP, insTYPVOIE, insLIBVOIE, insDISTSP, insACHPOSTE, insZR, insRPET, insDEPET, insARRONET, insCTONET, insCOMET, insLIBCOM, insDU, insTU, insU7U, insCODPOS, insILOT, insTCD, insZEMET, insCODEVOIE, insAPET700, insAPET31, insSIEGE, insTEFET, insEFETCENT, insORIGINE, insDCRET, insMMINTRET, insNATURE, insSAISONAT, insMODET, insDAPET, insDEFET, insSINGT, insAUXILT, insEAEANT, insEAEAPET, insEAESEC1T, insEAESEC2T, insCJ, insTEFEN, insEFENCENT, insAPEN700, insAPEN31, insAPRM, insTCA, insSEXE, insRECME, insDAPEN, insDEFEN, insDCREN, insMMINTREN, insMONOACT, insMODEN, insORDIN, insEAEANN, insEAEAPEN, insEAESEC1N, insEAESEC2N, insEAESEC3N, insEAESEC4N, insNBTOA, insTCAEXPOR, insREGIMP, insMONOREG, insRPEN, insDEPCOMEN, insVMAJ, insVMAJ1, insVMAJ2, insVMAJ3, SPEACT, SORLJ_N, SOEVT, SOROL, SODJL_D, SOEDRQ, SOEDRN_X, SOEDRD_D, SOEDRL_N, SORSNC, SORSNO, SOETEL, SOEFAX, SODTEN_D';
|
|
$where="insSIREN='$siren' ";
|
|
if (strlen($nic)==5)
|
|
$where.="AND insNIC='$nic';";
|
|
else
|
|
$where.="AND insSIEGE='1';";
|
|
|
|
//$tdeb=microtime_float();
|
|
$RP=mysql_select('insee', $fields, $where);
|
|
$etab=$RP[0];
|
|
$_SESSION['nic']=$etab['insNIC'];
|
|
|
|
//$tfin=microtime_float();
|
|
//$trec=$tfin-$tdeb;
|
|
// echo "Durée : $trec s<br/>";
|
|
|
|
switch($_REQUEST['option']) {
|
|
case 'ef': include ('visuEntrepriseEF.php'); break;
|
|
case 'dir': include ('visuEntrepriseDirigeants.php'); break;
|
|
case 'liens': include ('visuEntrepriseLiens.php'); break;
|
|
case 'balo': include ('visuEntrepriseBalo.php'); break;
|
|
case 'banques': include ('visuEntrepriseBanques.php'); break;
|
|
case 'bilans': include ('visuEntrepriseBilans.php'); break;
|
|
default : include ('visuEntrepriseInsee.php'); break;
|
|
}
|
|
}
|
|
} ?>
|