select( 'utilisateurs', 'id, 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) { ?>

you have logged!

Consommations Mensuelles AMABIS

select( 'zonage', "COUNT(*) AS nb, YEAR(dateInsert) AS annee, MONTH(dateInsert) AS mois", "dateInsert>='$Y-$m-01' GROUP BY annee, mois", false, MYSQL_ASSOC); foreach ($tabConsos as $tabConso) { ?>
Mois/Année Requêtes Total HT

Consommations Mensuelles Suivi Privilèges (Abonné 00710-00001)

select('greffes_priv_stock', "COUNT(*) AS nb, YEAR(greDateSurvDeb) AS annee, MONTH(greDateSurvDeb) AS mois", "greDateSurvDeb>='$Y-$m-01' GROUP BY annee, mois", false, MYSQL_ASSOC); foreach ($tabConsos as $tabConso) { ?>
Mois/Année Nb Suivis Total Suivis HT

Consommations Mensuelles Kbis/Privilèges (Abonné 00041-02559)

select('sdv1.`logs`', "date(dateHeure) AS jour, siren, COUNT(*) AS nb, YEAR(dateHeure) AS annee, MONTH(dateHeure) AS mois", "dateHeure>='$Y-$m-01' AND page='kbis' GROUP BY jour, siren ORDER BY annee, mois", false, MYSQL_ASSOC); foreach ($tabConsos as $tabConso) @$tabKbis[''.sprintf('%02s',$tabConso['mois']).'/'.$tabConso['annee']]++; // Privilèges $tabConsos=$iDb->select('sdv1.`logs`', "date(dateHeure) AS jour, siren, params, COUNT(*) AS nb, YEAR(dateHeure) AS annee, MONTH(dateHeure) AS mois", "dateHeure>='$Y-$m-01' AND page='privileges' AND params<>'' GROUP BY jour, siren, params ORDER BY annee, mois", false, MYSQL_ASSOC); foreach ($tabConsos as $tabConso) { if (strpos($tabConso['params'], 'declCrea')) @$tabPriv[''.sprintf('%02s',$tabConso['mois']).'/'.$tabConso['annee']]++; if (strpos($tabConso['params'], 'nantFond')) @$tabPriv[''.sprintf('%02s',$tabConso['mois']).'/'.$tabConso['annee']]++; if (strpos($tabConso['params'], 'nantVend')) @$tabPriv[''.sprintf('%02s',$tabConso['mois']).'/'.$tabConso['annee']]++; if (strpos($tabConso['params'], 'privTres')) @$tabPriv[''.sprintf('%02s',$tabConso['mois']).'/'.$tabConso['annee']]++; if (strpos($tabConso['params'], 'privSecu')) @$tabPriv[''.sprintf('%02s',$tabConso['mois']).'/'.$tabConso['annee']]++; } foreach (@$tabKbis as $moisAnnee=>$nb) { ?>
Mois/Année Nb Kbis Nb Priv. Total HT

Consommations Mensuelles WS Infogreffe (Abonné 08500-00109)

select('sdv1.`logs`', "date(dateHeure) AS jour, page, siren, params, COUNT(*) AS nb, YEAR(dateHeure) AS annee, MONTH(dateHeure) AS mois", "dateHeure>='$Y-$m-01' AND page IN ('greffe_actes','greffe_bilans','greffe_statuts') AND params<>'' GROUP BY siren, page, params ORDER BY annee, mois", false, MYSQL_ASSOC); foreach ($tabConsos as $tabConso) { $mois=''.sprintf('%02s',$tabConso['mois']).'/'.$tabConso['annee']; if (strpos($tabConso['params'], '/G')) @$tabCmd[$mois]++; elseif ($tabConso['page']=='greffe_statuts' || $tabConso['page']=='greffe_actes') @$tabAct[$mois]++; elseif ($tabConso['page']=='greffe_bilans') @$tabBil[$mois]++; } $tabConsos=$iDb->select('greffes_requetes', "COUNT(*) AS nb, YEAR(dateRequete) AS annee, MONTH(dateRequete) AS mois", "dateRequete>='$Y-$m-01' AND `type`='BS' AND `option`<>'' GROUP BY annee, mois", false, MYSQL_ASSOC); foreach ($tabConsos as $tabConso) @$tabBiS[''.sprintf('%02s',$tabConso['mois']).'/'.$tabConso['annee']]=$tabConso['nb']; foreach (@$tabAct as $moisAnnee=>$nb) { ?>
Mois/Année Nb Actes Pdf Nb Bilans Pdf Nb Commandes Nb Bilans Txt Total HT