98 lines
3.9 KiB
PHP
98 lines
3.9 KiB
PHP
<?php
|
|
/**
|
|
* Inclusion du fichier de configuration des includes Métiers de S&D
|
|
*/
|
|
include '/var/www/includes/config.php';
|
|
|
|
/**
|
|
* Inclusion du Framework
|
|
*/
|
|
if( !defined('FWK_PATH') )
|
|
include '/var/www/framework/fwk.php';
|
|
|
|
$t1=microtime_float();
|
|
include_once(INCLUDE_PATH.'insee/classMInsee.php');
|
|
include_once(INCLUDE_PATH.'bodacc/classMBodacc.php');
|
|
include_once(FWK_PATH.'common/dates.php');
|
|
|
|
$iDb=new WDB('jo');
|
|
$iDb2=new WDB('sdv1');
|
|
|
|
session_start();
|
|
$tabSirenPC=array();
|
|
|
|
$authorized = false;
|
|
|
|
if(isset($_GET['logout']) && ($_SESSION['auth'])) {
|
|
$_SESSION['auth'] = null;
|
|
session_destroy();
|
|
echo "logging out...";
|
|
}
|
|
|
|
if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
|
|
$user=addslashes(trim($_SERVER['PHP_AUTH_USER']));
|
|
$pwd =addslashes(trim($_SERVER['PHP_AUTH_PW']));
|
|
$tabTmp=$iDb2->select( 'utilisateurs',
|
|
'id, login, email',
|
|
"login='$user' AND password='$pwd' AND idClient=1 AND actif=1 AND deleted=0");
|
|
$_SESSION['userId']=$tabTmp[0][0];
|
|
$_SESSION['userMail']=$tabTmp[0][1];
|
|
|
|
if ( $_SESSION['userId'] ) {//&& $_SESSION['auth']) {
|
|
$authorized = true;
|
|
}
|
|
} else {
|
|
|
|
//if (isset($_GET["login"]) && (! $authorized)) {
|
|
header('WWW-Authenticate: Basic Realm="Login please"');
|
|
header('HTTP/1.0 401 Unauthorized');
|
|
$_SESSION['auth'] = true;
|
|
print('Login now or forever hold your clicks...');
|
|
exit;
|
|
}
|
|
|
|
if (!$authorized) {
|
|
?><h1>you have <? echo ($authorized) ? '' : 'not'; ?> logged!</h1><?
|
|
} else {
|
|
|
|
//echo '<!--';
|
|
$nomAncre='';
|
|
if (isset($_POST['envoyer'])) {
|
|
foreach ($_POST['envoyer'] as $idEnv=>$env) {
|
|
$nomAncre='#n'.$idEnv;
|
|
}}
|
|
?>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html" />
|
|
<title>Gestion des informations de la base de données</title>
|
|
<link rel="stylesheet" type="text/css" href="../nonimg/gestion.css" />
|
|
<script language='javascript' src='../nonimg/calendar.js'></script>
|
|
</head>
|
|
<?
|
|
$iInsee=new MInsee();
|
|
$iBodacc=new MBodacc();
|
|
$tabTmp=$iDb2->select( 'utilisateurs',
|
|
'id, login',
|
|
"idClient=1");
|
|
$tabLogin=array(0=>'Batch');
|
|
foreach ($tabTmp as $user) {
|
|
$tabLogin[$user['id']]=$user['login'];
|
|
}
|
|
?>
|
|
<h3 align="center">Sirenage des annonces Bodacc</h3>
|
|
<table BgColor="#177AE9" cellspacing="1" cellpadding="2" border="0" align="center" BorderColor="#000020">
|
|
<tr><td><b><font color="Black">Date</font></b></td><td><b><font color="Black">Login</font></b></td><td><b><font color="Black">Total sirené</font></b></td></tr>
|
|
<?
|
|
$tabTmp=$iDb->select( 'bodacc_sirenage s, bodacc_detail b, bodacc d, tabMandataires m',
|
|
's.idLien, s.idAnn, s.siren, s.siretProposes, s.dateInsert AS dateInsert_Sirenage, b.Bodacc_Num, b.Bodacc_Date_Parution, b.Num_Annonce, b.Tribunal_Code, b.Rubrique_Bodacc, b.Rubrique, b.typeAnnonce, b.corrNum_Annonce, b.corrBodacc_Date_Parution, b.corrPage, b.corrNumParution, b.corrTexteRectificatif, b.RC, b.raisonSociale, b.nomCommercial, b.enseigne, b.nationalite, b.FJ, b.Capital, b.CapitalDev, b.adresse, b.adrNum, b.adrIndRep, b.adrTypVoie, b.adrLibVoie, b.adrComp1, b.adrComp2, b.codePostal, b.ville, b.adresseSiege, b.adrSiegeNum, b.adrSiegeIndRep, b.adrSiegeTypVoie, b.adrSiegeLibVoie, b.adrSiegeComp1, b.adrSiegeComp2, b.codePostalSiege, b.villeSiege, b.administration, b.activite, b.typeEven, b.dateEffet, b.dateDebutActivite, b.dateCessationActivite, b.dateCessationPaiement, b.dateJugement, b.dateInsert AS dateInsert_Bodacc, d.annonce, b.activite, s.appelerMand, m.Nom, m.Prenom, m.type, m.coursAppel, m.tribunal, m.Statut, m.adresse, m.adresseComp, m.cp, m.ville, m.tel, m.fax, m.email, m.web, m.contact',
|
|
's.appelerMand>0 AND s.idAnn=b.id AND b.id=d.id AND s.siren=b.siren AND s.appelerMand=m.id ORDER BY s.appelerMand ASC', false, MYSQL_ASSOC);
|
|
print_r($tabTmp);die();
|
|
foreach ($tabTmp as $tabJour) {
|
|
echo '<tr BgColor="#E2EEFC"><td>'.$tabJour['Jour'].'</td><td>'.$tabLogin[$tabJour['idSirenage']].'</td><td>'.$tabJour['Nb'].'</td></tr>';
|
|
}
|
|
?>
|
|
</table>
|
|
<?
|
|
}
|
|
?>
|