Integration modification trunk
This commit is contained in:
parent
a8b92ae72c
commit
672d2e6645
@ -2,46 +2,51 @@
|
||||
<form name="form_recherche" action="./?page=recherche&action=rechercher&vue=list" method="POST" enctype="multipart/form-data">
|
||||
<input type="hidden" name="formR[type]" value="dir"/>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top" width="580" height="200" align="center">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top" width="580" height="200" align="center">
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><h2 align="center" class="StyleRechercheTitre">RECHERCHE PAR DIRIGEANT</h2></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>NOM</b></td>
|
||||
<td width="300"><input type="text" name="formR[dirNom]" value="<?=$formR['dirNom']?>" size="25" maxlength="40" /></td>
|
||||
<td width="72"><img onClick="return overlay(this, 'subcontent1')" src="./img/puce_plus_rond.gif" alt="Plus d'options de recherche..."></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>PRENOM</b></td>
|
||||
<td width="300"><input type="text" name="formR[dirPrenom]" value="<?=$formR['dirPrenom']?>" size="25" maxlength="40" /></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--<div id="subcontent1" style="display:none">--><div id="subcontent1" style="display:block">
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>DATE NAISSANCE</b></td>
|
||||
<td width="300" class="StyleRechercheLib"><input maxLength="2" size="3" name="formR[dirDateNaissJJ]" value="<?=$formR['dirDateNaissJJ']?>"/> / <input maxLength="2" size="3" name="formR[dirDateNaissMM]" value="<?=$formR['dirDateNaissMM']?>"/> / <input maxLength="4" size="5" name="formR[dirDateNaissAAAA]" value="<?=$formR['dirDateNaissAAAA']?>"/></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>CP OU DÉP. / VILLE DE NAISSANCE</b></td>
|
||||
<td width="300"><input type="text" name="formR[dirCpVille]" value="<?=$formR['dirCpVille']?>" size="25" maxlength="40"></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td align="center"><h2 align="center" class="StyleRechercheTitre">RECHERCHE PAR DIRIGEANT</h2></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>NOM</b></td>
|
||||
<td width="300"><input type="text" name="formR[dirNom]" value="<?=$formR['dirNom']?>" size="25" maxlength="40" /></td>
|
||||
<td width="72"><img onClick="return overlay(this, 'subcontent1')" src="./img/puce_plus_rond.gif" alt="Plus d'options de recherche..."></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>PRENOM</b></td>
|
||||
<td width="300"><input type="text" name="formR[dirPrenom]" value="<?=$formR['dirPrenom']?>" size="25" maxlength="40" /></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--<div id="subcontent1" style="display:none">--><div id="subcontent1" style="display:block">
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>DATE NAISSANCE</b></td>
|
||||
<td width="300" class="StyleRechercheLib"><input maxLength="2" size="3" name="formR[dirDateNaissJJ]" value="<?=$formR['dirDateNaissJJ']?>"/> / <input maxLength="2" size="3" name="formR[dirDateNaissMM]" value="<?=$formR['dirDateNaissMM']?>"/> / <input maxLength="4" size="5" name="formR[dirDateNaissAAAA]" value="<?=$formR['dirDateNaissAAAA']?>"/></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>CP OU DÉP. / VILLE DE NAISSANCE</b></td>
|
||||
<td width="300"><input type="text" name="formR[dirCpVille]" value="<?=$formR['dirCpVille']?>" size="25" maxlength="40"></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="580">
|
||||
<tr>
|
||||
<td align="center" valign="top"><input type="image" src="./img/boutton_valider_off.gif" name="submit" onmouseover="this.src='./img/boutton_valider_on.gif'" onmouseout="this.src='./img/boutton_valider_off.gif'" title="Lancer la recherche..."></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top"><input type="image" src="./img/boutton_valider_off.gif" name="submit" onmouseover="this.src='./img/boutton_valider_on.gif'" onmouseout="this.src='./img/boutton_valider_off.gif'" title="Lancer la recherche..."></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
@ -15,66 +15,73 @@ $(document).ready(function(){
|
||||
<form name="form_recherche" id="formR-id"action="./?page=recherche&action=rechercher&vue=list" method="POST" enctype="multipart/form-data">
|
||||
<input type="hidden" name="formR[type]" value="ent"/>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top" width="580" height="200" align="center">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top" width="580" height="200" align="center">
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><h2 align="center" class="StyleRechercheTitre">RECHERCHE ENTREPRISE</h2></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>SIREN</b></td>
|
||||
<td width="300"><input type="text" name="formR[siret]" value="<?=$formR['siret']?>" size="25" maxlength="20" /> <img src="img/exclamation.png"/ title="Recherche par SIREN, SIRET, N° TVA intracommunautaire, N° RC, N° WALDEC, ISIN"></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>RAISON SOCIALE<br/>ENSEIGNE / SIGLE</b></td>
|
||||
<td width="300"><input type="text" name="formR[raisonSociale]" value="<?=$formR['raisonSociale']?>" size="25" maxlength="40" /></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- <div id="subcontent1" style="display:block"> -->
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>N° & VOIE</b></td>
|
||||
<td width="300"><input type="text" name="formR[numVoie]" value="<?=$formR['numVoie']?>" size="4" maxlength="4" /><input type="text" name="formR[voie]" value="<?=$formR['voie']?>" size="17" maxlength="30" /></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>CP OU DÉP. / VILLE</b></td>
|
||||
<td width="300"><input type="text" name="formR[cpVille]" value="<?=$formR['cpVille']?>" size="25" maxlength="40" /></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>TÉL / FAX</b></td>
|
||||
<td width="300"><input type="text" name="formR[telFax]" value="<?=$formR['telFax']?>" size="15" maxlength="15" /><!-- <img onClick="return overlay(this, 'subcontent1')" src="./img/puce_plus_rond.gif" alt="Plus d'options de recherche..." />--></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="subcontent1" style="display:block">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>NAF</b></td>
|
||||
<td width="300">
|
||||
<input type="text" title="Commencer à saisir le code ou le libellé du Naf, puis séléctionner l'une des propositions" size="15" name="formR[naf]" id="formR-naf" value="<?=$formR['naf']?>" />
|
||||
</td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td align="center"><h2 align="center" class="StyleRechercheTitre">RECHERCHE ENTREPRISE</h2></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>SIREN</b></td>
|
||||
<td width="300"><input type="text" name="formR[siret]" value="<?=$formR['siret']?>" size="25" maxlength="20" /> <img src="img/exclamation.png"/ title="Recherche par SIREN, SIRET, N° TVA intracommunautaire, N° RC, N° WALDEC, ISIN"></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>RAISON SOCIALE<br/>ENSEIGNE / SIGLE</b></td>
|
||||
<td width="300"><input type="text" name="formR[raisonSociale]" value="<?=$formR['raisonSociale']?>" size="25" maxlength="40" /></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- <div id="subcontent1" style="display:block"> -->
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>N° & VOIE</b></td>
|
||||
<td width="300"><input type="text" name="formR[numVoie]" value="<?=$formR['numVoie']?>" size="4" maxlength="4" /><input type="text" name="formR[voie]" value="<?=$formR['voie']?>" size="17" maxlength="30" /></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>CP OU DÉP. / VILLE</b></td>
|
||||
<td width="300"><input type="text" name="formR[cpVille]" value="<?=$formR['cpVille']?>" size="25" maxlength="40" /></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>TÉL / FAX</b></td>
|
||||
<td width="300"><input type="text" name="formR[telFax]" value="<?=$formR['telFax']?>" size="15" maxlength="15" /><!-- <img onClick="return overlay(this, 'subcontent1')" src="./img/puce_plus_rond.gif" alt="Plus d'options de recherche..." />--></td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="subcontent1" style="display:block">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="208" align="right" class="StyleRechercheLib"><b>NAF</b></td>
|
||||
<td width="300">
|
||||
<input type="text" title="Commencer à saisir le code ou le libellé du Naf, puis séléctionner l'une des propositions" size="15" name="formR[naf]" id="formR-naf" value="<?=$formR['naf']?>" />
|
||||
</td>
|
||||
<td width="72"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="580">
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<input type="image" src="./img/boutton_valider_off.gif" name="submit" id="formR-submit" onmouseover="this.src='./img/boutton_valider_on.gif'" onmouseout="this.src='./img/boutton_valider_off.gif'" title="Lancer la recherche...">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<input type="image" src="./img/boutton_valider_off.gif" name="submit" id="formR-submit" onmouseover="this.src='./img/boutton_valider_on.gif'" onmouseout="this.src='./img/boutton_valider_off.gif'" title="Lancer la recherche...">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
@ -1,4 +1,10 @@
|
||||
<?php
|
||||
if (!is_array($formR) || count($formR)==0) $formR=$_POST['formR'];
|
||||
if ($formR['type']=='ent' || $formR['type']=='dir') $typeRech = $formR['type'];
|
||||
$siret = trim(strtr($formR['siret'],array(' '=>'', '.'=>'', '-'=>'', '/'=>'')));
|
||||
$pays = strtoupper(substr($siret,0,2));
|
||||
$typeId = '';
|
||||
|
||||
function isUTF8($string)
|
||||
{
|
||||
return (utf8_encode(utf8_decode($string)) == $string);
|
||||
@ -9,29 +15,21 @@ function isUTF8($string)
|
||||
<td width="10"> </td>
|
||||
<td valign="top" width="570"><br/>
|
||||
<?php
|
||||
/** On effectue la recherche **/
|
||||
if (!is_array($formR) || count($formR)==0) $formR=$_POST['formR'];
|
||||
|
||||
if ($formR['type']=='ent' || $formR['type']=='dir') $typeRech=$formR['type'];
|
||||
|
||||
$siret=trim(strtr($formR['siret'],array(' '=>'', '.'=>'', '-'=>'', '/'=>'')));
|
||||
$pays=strtoupper(substr($siret,0,2));
|
||||
$typeId='';
|
||||
|
||||
if ($siret<>'') {
|
||||
//Numéro WALDEC
|
||||
if ($siret<>'')
|
||||
{
|
||||
//Numéro WALDEC
|
||||
if (strtoupper(substr($siret,0,1))=='W') {
|
||||
$typeId='W';
|
||||
$autreId=$siret;
|
||||
$siret='';
|
||||
}
|
||||
//TVA Intracommunautaire
|
||||
//TVA Intracommunautaire
|
||||
elseif ($pays=='AT' || $pays=='BE' || $pays=='BG' || $pays=='CY' || $pays=='CZ' || $pays=='DE' || $pays=='DK' ||
|
||||
$pays=='EE' || $pays=='EL' || $pays=='ES' || $pays=='FI' || $pays=='GB' || $pays=='HU' || $pays=='IE' ||
|
||||
$pays=='IT' || $pays=='LT' || $pays=='LU' || $pays=='LV' || $pays=='MT' || $pays=='NL' || $pays=='PL' ||
|
||||
$pays=='PT' || $pays=='RO' || $pays=='SE' || $pays=='SI' || $pays=='SK')
|
||||
die("La recherche par numéro de TVA n'est pas encore possible sur ce pays !");
|
||||
//Pour la france
|
||||
//Pour la france
|
||||
elseif ($pays=='FR') {
|
||||
$len=strlen($siret);
|
||||
if ($len==13) $siret=substr($siret,4,9);
|
||||
@ -44,28 +42,28 @@ if ($siret<>'') {
|
||||
$firephp->info('Code ISIN');
|
||||
}
|
||||
}
|
||||
//Numéro RC
|
||||
//Numéro RC
|
||||
elseif (preg_match('/A|B|C|D/i', $siret)) {
|
||||
$typeId='R';
|
||||
$autreId=$siret;
|
||||
$siret='';
|
||||
}
|
||||
//Siren normal on enleve tout ce qui n'est pas un chiffre
|
||||
//Siren normal on enleve tout ce qui n'est pas un chiffre
|
||||
else
|
||||
$siret=trim(preg_replace('/[^0-9]/', '', $siret));
|
||||
}
|
||||
|
||||
$telFax=trim(preg_replace('/[^0-9]/', '', $formR['telFax']));
|
||||
$naf=trim(preg_replace('/[^0-9A-Z]/i', '', $formR['naf']));
|
||||
$telFax = trim(preg_replace('/[^0-9]/', '', $formR['telFax']));
|
||||
$naf = trim(preg_replace('/[^0-9A-Z]/i', '', $formR['naf']));
|
||||
//if ($telFax<>'') $typeId='T';
|
||||
|
||||
//Traitement des données formulaire;
|
||||
if (isUTF8($formR['raisonSociale'])) $formR['raisonSociale']=utf8_decode($formR['raisonSociale']);
|
||||
if (isUTF8($formR['raisonSociale'])) $formR['raisonSociale'] = utf8_decode($formR['raisonSociale']);
|
||||
$raisonSociale = preg_replace('/[^0-9A-Z]/', ' ', strtoupper(strtr($formR['raisonSociale'], 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝŸ', 'aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUYY')));
|
||||
$numVoie = preg_replace('/[^0-9]/', '', $formR['numVoie']);
|
||||
if ($numVoie>9999) die('Numéro de voie incorrecte !');
|
||||
$libVoie=preg_replace('/[^0-9A-Z]/', ' ', strtoupper(strtr(strtolower($formR['voie']), 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝŸ', 'aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUYY')));
|
||||
$cpVille=preg_replace('/ +/',' ', preg_replace('/[^0-9A-Z]/', ' ', //strtoupper(trimAccent($formR['cpVille']))));
|
||||
if ($numVoie>9999) die('Numéro de voie incorrecte !');
|
||||
$libVoie = preg_replace('/[^0-9A-Z]/', ' ', strtoupper(strtr(strtolower($formR['voie']), 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝŸ', 'aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUYY')));
|
||||
$cpVille = preg_replace('/ +/',' ', preg_replace('/[^0-9A-Z]/', ' ', //strtoupper(trimAccent($formR['cpVille']))));
|
||||
strtoupper(strtr(strtolower($formR['cpVille']), 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝŸ', 'aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUYY'))));
|
||||
|
||||
if (preg_match("/^([0-9]{2,5})([\D]*)/i", $cpVille, $matches)) {
|
||||
@ -96,7 +94,7 @@ if ($typeRech=='dir')
|
||||
else $dirVille=trim($dirCpVille);
|
||||
}
|
||||
|
||||
$position=$formR['index'];
|
||||
$position = $formR['index'];
|
||||
|
||||
//Type de recherche = entreprise
|
||||
if ($typeRech=='ent' && $siret<>'') {
|
||||
|
Loading…
Reference in New Issue
Block a user