Remove notice
This commit is contained in:
parent
15db04b195
commit
d5e6c01aee
@ -46,10 +46,12 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
|
||||
|
||||
// --- Secure demo mode
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$user = $auth->getIdentity();
|
||||
if ($user->idClient != 1) {
|
||||
$toSecure = $container->findOneBy('Label', "Démonstration");
|
||||
$container->removePage($toSecure);
|
||||
if ($auth->hasIdentity()) {
|
||||
$user = $auth->getIdentity();
|
||||
if ($user->idClient != 1) {
|
||||
$toSecure = $container->findOneBy('Label', "Démonstration");
|
||||
$container->removePage($toSecure);
|
||||
}
|
||||
}
|
||||
|
||||
$view->navigation($container);
|
||||
|
@ -172,7 +172,7 @@ return array(
|
||||
"DH" => "MAD",
|
||||
"EUROS, CRÉATION L'AUTRE BRANCHE ACTIVITÉ" => "EUR",
|
||||
"LEI ROUMAIN" => "RON",
|
||||
"$HGK" => "HKD",
|
||||
"HGK" => "HKD",
|
||||
"EUROS, ÉTANT PRÉCISÉ QUE LE CÉDANT A CON" => "EUR",
|
||||
"DZD" => "DZD",
|
||||
"DON" => "VND",
|
||||
|
@ -1584,47 +1584,47 @@ class MInsee
|
||||
if ($strLigneDAdresse=='') return $tabRet;
|
||||
$tabLignes=explode(',', preg_replace('/,$/', '', $strLigneDAdresse));
|
||||
foreach ($tabLignes as $strLigneDAdresse) {
|
||||
$strLigneDAdresse=trimAccent($strLigneDAdresse);
|
||||
$strLigneDAdresse=preg_replace('/[^0-9a-zA-Z]/', ' ', $strLigneDAdresse);
|
||||
$strLigneDAdresse=trim(preg_replace('/ +/', ' ', $strLigneDAdresse));
|
||||
//echo "1. Adresse nettoyées = $strLigneDAdresse".EOL;
|
||||
$adrAvecCP=preg_match("/(.*)([0-9]{5,5}|[0-9][0-9] [0-9]{3,3})([\D]*)/", $strLigneDAdresse, $tabAdrTmp);
|
||||
if ($adrAvecCP) {
|
||||
//echo "Adresse avec Code Postal\n";
|
||||
//print_r($tabAdrTmp);
|
||||
$strLigneDAdresse=trim($tabAdrTmp[1]);
|
||||
$tabRet['cp']=$tabAdrTmp[2];
|
||||
$tabRet['ville']=trim(strtoupper($tabAdrTmp[3]));
|
||||
}// else echo "Adresse sans Code Postal\n";
|
||||
$adrAvecNum=preg_match("/^([0-9]{1,4})(.*)/", $strLigneDAdresse, $tabAdrTmp);
|
||||
if ($adrAvecNum) {
|
||||
//echo "Adresse avec Numéro de voie\n";
|
||||
//print_r($tabAdrTmp);
|
||||
$tabRet['num']=$tabAdrTmp[1];
|
||||
if (preg_match("/^\s(B|BIS|T|TER|Q|a|c|d|e|f|g|h|i|j|k|l|m|n|o|p|s)\s(.*)/i", $tabAdrTmp[2], $tabAdrTmp2))
|
||||
{ //echo "Adresse avec Bis, Ter, Q...\n";
|
||||
//print_r($tabAdrTmp2);
|
||||
$tabRet['indRep']=strtoupper(trim($tabAdrTmp2[1]));
|
||||
$typeVoie=trim($tabAdrTmp2[2]);
|
||||
} else {
|
||||
$typeVoie=trim($tabAdrTmp[2]);
|
||||
}
|
||||
} else {
|
||||
$typeVoie=trim($strLigneDAdresse);
|
||||
}
|
||||
// On récupère le type de voie si possible et le libellé de la voie
|
||||
$voieTrouvee=false;
|
||||
foreach ($this->tabCodeVoie as $code=>$voie) {
|
||||
if (preg_match("/^($voie |$voie".'s '."|$code )(.*)/i", $typeVoie, $tabAdrTmp)) {
|
||||
//echo "Adresse avec type de voie\n";
|
||||
//print_r($tabAdrTmp);
|
||||
$tabRet['typeVoie']=$code;
|
||||
$tabRet['libVoie']=trim(strtoupper($tabAdrTmp[2]));
|
||||
$voieTrouvee=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$voieTrouvee) $tabAdr[]=$typeVoie;
|
||||
$strLigneDAdresse=trimAccent($strLigneDAdresse);
|
||||
$strLigneDAdresse=preg_replace('/[^0-9a-zA-Z]/', ' ', $strLigneDAdresse);
|
||||
$strLigneDAdresse=trim(preg_replace('/ +/', ' ', $strLigneDAdresse));
|
||||
//echo "1. Adresse nettoyées = $strLigneDAdresse".EOL;
|
||||
$adrAvecCP=preg_match("/(.*)([0-9]{5,5}|[0-9][0-9] [0-9]{3,3})([\D]*)/", $strLigneDAdresse, $tabAdrTmp);
|
||||
if ($adrAvecCP) {
|
||||
//echo "Adresse avec Code Postal\n";
|
||||
//print_r($tabAdrTmp);
|
||||
$strLigneDAdresse=trim($tabAdrTmp[1]);
|
||||
$tabRet['cp']=$tabAdrTmp[2];
|
||||
$tabRet['ville']=trim(strtoupper($tabAdrTmp[3]));
|
||||
}// else echo "Adresse sans Code Postal\n";
|
||||
$adrAvecNum=preg_match("/^([0-9]{1,4})(.*)/", $strLigneDAdresse, $tabAdrTmp);
|
||||
if ($adrAvecNum) {
|
||||
//echo "Adresse avec Numéro de voie\n";
|
||||
//print_r($tabAdrTmp);
|
||||
$tabRet['num']=$tabAdrTmp[1];
|
||||
if (preg_match("/^\s(B|BIS|T|TER|Q|a|c|d|e|f|g|h|i|j|k|l|m|n|o|p|s)\s(.*)/i", $tabAdrTmp[2], $tabAdrTmp2))
|
||||
{ //echo "Adresse avec Bis, Ter, Q...\n";
|
||||
//print_r($tabAdrTmp2);
|
||||
$tabRet['indRep']=strtoupper(trim($tabAdrTmp2[1]));
|
||||
$typeVoie=trim($tabAdrTmp2[2]);
|
||||
} else {
|
||||
$typeVoie=trim($tabAdrTmp[2]);
|
||||
}
|
||||
} else {
|
||||
$typeVoie=trim($strLigneDAdresse);
|
||||
}
|
||||
// On récupère le type de voie si possible et le libellé de la voie
|
||||
$voieTrouvee=false;
|
||||
foreach ($this->tabCodeVoie as $code=>$voie) {
|
||||
if (preg_match("/^($voie |$voie".'s '."|$code )(.*)/i", $typeVoie, $tabAdrTmp)) {
|
||||
//echo "Adresse avec type de voie\n";
|
||||
//print_r($tabAdrTmp);
|
||||
$tabRet['typeVoie']=$code;
|
||||
$tabRet['libVoie']=trim(strtoupper($tabAdrTmp[2]));
|
||||
$voieTrouvee=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$voieTrouvee) $tabAdr[]=$typeVoie;
|
||||
}
|
||||
foreach ($tabAdr as $k=>$ligne)
|
||||
$tabRet['adrComp'.$k]=trim(strtoupper($ligne));
|
||||
|
@ -66,7 +66,7 @@ class Scores_Ws_Server
|
||||
'127.0.0.1',
|
||||
'192.168.33.1',
|
||||
);
|
||||
|
||||
|
||||
protected $listProxyIp = array(
|
||||
'62.210.222.34',
|
||||
);
|
||||
@ -418,8 +418,6 @@ class Scores_Ws_Server
|
||||
$dataInsert = array(
|
||||
'login' => $this->User->login,
|
||||
'page' => $service,
|
||||
'siren' => $siren,
|
||||
'nic' => $nic,
|
||||
'params' => $ref,
|
||||
'idClient' => $this->User->idClient,
|
||||
'test' => $test,
|
||||
@ -433,9 +431,28 @@ class Scores_Ws_Server
|
||||
|
||||
$db = Zend_Db_Table_Abstract::getDefaultAdapter();
|
||||
|
||||
if ( in_array($service, array('identite', 'greffe_bilans', 'greffe_actes', 'liens',
|
||||
'dirigeants', 'etablissements', 'dirigeantsOp', 'kbis', 'indiscore', 'indiscore2',
|
||||
'indiscore3', 'rapport2', 'rapport3')) ) {
|
||||
$pageRS = array(
|
||||
'identite',
|
||||
'greffe_bilans',
|
||||
'greffe_actes',
|
||||
'liens',
|
||||
'dirigeants',
|
||||
'etablissements',
|
||||
'dirigeantsOp',
|
||||
'kbis',
|
||||
'indiscore',
|
||||
'indiscore2',
|
||||
'indiscore3',
|
||||
'rapport2',
|
||||
'rapport3'
|
||||
);
|
||||
|
||||
if ( intval($siren)!=0 ) {
|
||||
$dataInsert['siren'] = $siren;
|
||||
$dataInsert['nic'] = $nic;
|
||||
}
|
||||
|
||||
if ( intval($siren)!=0 && in_array($service, $pageRS) ) {
|
||||
|
||||
$sql = $db->select()->from('jo.etablissements', array('siren', 'nic', 'actif', 'siege', 'raisonSociale',
|
||||
'adr_cp', 'adr_ville', 'source'))->where('siren=?', $siren);
|
||||
@ -534,7 +551,7 @@ class Scores_Ws_Server
|
||||
if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) && in_array($ip, $this->listProxyIp)) {
|
||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Lors d'une demande d'authentification depuis une application on garde l'IP en mémoire,
|
||||
* c'est donc celle là qu'il faut utiliser.
|
||||
@ -598,7 +615,7 @@ class Scores_Ws_Server
|
||||
$output = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@ -697,7 +714,7 @@ class Scores_Ws_Server
|
||||
}
|
||||
|
||||
$this->authLog($login, $authResult, $ip);
|
||||
|
||||
|
||||
return $authResult;
|
||||
}
|
||||
|
||||
@ -1075,7 +1092,7 @@ class Scores_Ws_Server
|
||||
} else if (is_string($result)) {
|
||||
$authenticate = $result;
|
||||
}
|
||||
|
||||
|
||||
$data = array(
|
||||
'login' => $login,
|
||||
'authenticate' => $authenticate,
|
||||
@ -1086,7 +1103,7 @@ class Scores_Ws_Server
|
||||
$authLogM->insert($data);
|
||||
} catch (Zend_Db_Exception $e) {}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Service Access List
|
||||
* @param int $clientId
|
||||
|
@ -304,30 +304,28 @@ class WDB
|
||||
if (!$fp) return false;
|
||||
|
||||
$res = $this->query($query);
|
||||
$nbLignes = mysql_num_rows($res);
|
||||
while ($ligne=$this->fetch(MYSQL_ASSOC)) {
|
||||
$nbLignes = count($res);
|
||||
for($i=0; $i<$nbLignes; $i++) {
|
||||
$ligne = $res[$i];
|
||||
|
||||
//Header
|
||||
if ($i==0) {
|
||||
$nbCols = count($ligne);
|
||||
$fields = array();
|
||||
$header = array();
|
||||
foreach ($ligne as $libCol=>$col) {
|
||||
foreach ($ligne as $libCol => $col) {
|
||||
$header[] = $libCol;
|
||||
$fields[] = $col;
|
||||
}
|
||||
fputcsv($fp, $header, $sep, '"');
|
||||
fputcsv($fp, $fields, $sep, '"');
|
||||
}
|
||||
|
||||
//Content
|
||||
else {
|
||||
$fields = array();
|
||||
foreach ($ligne as $libCol=>$col) {
|
||||
$fields[] = $col;
|
||||
}
|
||||
fputcsv($fp, $fields, $sep, '"');
|
||||
}
|
||||
$i++;
|
||||
$fields = array();
|
||||
foreach ($ligne as $libCol => $col) {
|
||||
$fields[] = $col;
|
||||
}
|
||||
fputcsv($fp, $fields, $sep, '"');
|
||||
}
|
||||
|
||||
fclose($fp);
|
||||
return $nbLignes;
|
||||
}
|
||||
|
@ -304,30 +304,28 @@ class WDB
|
||||
if (!$fp) return false;
|
||||
|
||||
$res = $this->query($query);
|
||||
$nbLignes = mysql_num_rows($res);
|
||||
while ($ligne=$this->fetch(MYSQL_ASSOC)) {
|
||||
$nbLignes = count($res);
|
||||
for($i=0; $i<$nbLignes; $i++) {
|
||||
$ligne = $res[$i];
|
||||
|
||||
//Header
|
||||
if ($i==0) {
|
||||
$nbCols = count($ligne);
|
||||
$fields = array();
|
||||
$header = array();
|
||||
foreach ($ligne as $libCol=>$col) {
|
||||
foreach ($ligne as $libCol => $col) {
|
||||
$header[] = $libCol;
|
||||
$fields[] = $col;
|
||||
}
|
||||
fputcsv($fp, $header, $sep, '"');
|
||||
fputcsv($fp, $fields, $sep, '"');
|
||||
}
|
||||
|
||||
//Content
|
||||
else {
|
||||
$fields = array();
|
||||
foreach ($ligne as $libCol=>$col) {
|
||||
$fields[] = $col;
|
||||
}
|
||||
fputcsv($fp, $fields, $sep, '"');
|
||||
}
|
||||
$i++;
|
||||
$fields = array();
|
||||
foreach ($ligne as $libCol => $col) {
|
||||
$fields[] = $col;
|
||||
}
|
||||
fputcsv($fp, $fields, $sep, '"');
|
||||
}
|
||||
|
||||
fclose($fp);
|
||||
return $nbLignes;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user