Amélioration formulaire, issue #0000297
This commit is contained in:
parent
8aa47c1e86
commit
5b43e914cf
@ -30,23 +30,23 @@ foreach (array('siret',
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>NOM</label>
|
||||
<input type="text" name="formR[actNom]" value="<?=$formR['actNom']?>" size="25" maxlength="40" style="vertical-align:middle;" />
|
||||
<label>RAISON SOCIALE / NOM</label>
|
||||
<input type="text" name="formR[actNom]" value="<?=$formR['actNom']?>" size="30" maxlength="40" style="vertical-align:middle;" />
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp marge">
|
||||
<div class="fieldgrp">
|
||||
<label>PRENOM</label>
|
||||
<input type="text" name="formR[actPrenom]" value="<?=$formR['actPrenom']?>" size="25" maxlength="40" />
|
||||
<input type="text" name="formR[actPrenom]" value="<?=$formR['actPrenom']?>" size="30" maxlength="40" />
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp marge">
|
||||
<div class="fieldgrp">
|
||||
<label>DATE NAISSANCE</label>
|
||||
<input type="text" name="formR[naissJJ]" value="<?=$formR['naisJJ']?>" size="2" maxlength="2" /> /
|
||||
<input type="text" name="formR[naissMM]" value="<?=$formR['naisMM']?>" size="2" maxlength="2" /> /
|
||||
<input type="text" name="formR[naissAAAA]" value="<?=$formR['naisMM']?>" size="4" maxlength="4" />
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp marge">
|
||||
<div class="fieldgrp">
|
||||
<label>CP OU DÉP. / VILLE DE NAISSANCE</label>
|
||||
<input type="text" name="formR[cpVille]" value="<?=$formR['cpVille']?>" size="30" maxlength="250" />
|
||||
</div>
|
||||
@ -57,9 +57,9 @@ foreach (array('siret',
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>DETENTION</label>
|
||||
entre <input type="text" size="3" maxlength="3" name="formR[pctMin]" id="formR-naf" value="<?=$formR['pctMin']?>" /> et
|
||||
<input type="text" size="3" maxlength="3" name="formR[pctMax]" id="formR-naf" value="<?=$formR['pctMax']?>" />
|
||||
<label>PAR ACTION, DE</label>
|
||||
<input type="text" size="3" maxlength="3" name="formR[pctMin]" id="formR-naf" value="<?=$formR['pctMin']?>" /> À
|
||||
<input type="text" size="3" maxlength="3" name="formR[pctMax]" id="formR-naf" value="<?=$formR['pctMax']?>" /> %
|
||||
</div>
|
||||
|
||||
<div class="submit">
|
||||
|
@ -154,17 +154,23 @@ if ($typeRech == 'ent') {
|
||||
}
|
||||
} elseif ($typeRech == 'act') {
|
||||
|
||||
$actNom = $formR['actNom'];
|
||||
$actPrenom = $formR['actPrenom'];
|
||||
$dateNaiss = $formR['naissAAAA'];
|
||||
if (!empty($formR['naissMM']))
|
||||
$dateNaiss.= '-'.$formR['naissMM'];
|
||||
if (!empty($formR['naissJJ']))
|
||||
$dateNaiss.= '-'.$formR['naissJJ'];
|
||||
$actNom = trim($formR['actNom']);
|
||||
$actPrenom = trim($formR['actPrenom']);
|
||||
$d = array();
|
||||
$d[] = preg_replace('/[^0-9]/', '', trim($formR['naissAAAA']));
|
||||
$d[] = preg_replace('/[^0-9]/', '', trim($formR['naissMM']));
|
||||
$d[] = preg_replace('/[^0-9]/', '', trim($formR['naissJJ']));
|
||||
$dateNaiss = '';
|
||||
$i = 0;
|
||||
foreach ($d as $item) {
|
||||
if (empty($item)) break;
|
||||
if ($i>0 && $i<count($d)) $dateNaiss.= '-';
|
||||
$dateNaiss.= $item;
|
||||
$i++;
|
||||
}
|
||||
$pays = $formR['pays'];
|
||||
$pctMin = $formR['pctMin'];
|
||||
$pctMax = $formR['pctMax'];
|
||||
|
||||
$pctMin = preg_replace('/[^0-9]/', '', trim($formR['pctMin']));
|
||||
$pctMax = preg_replace('/[^0-9]/', '', trim($formR['pctMax']));
|
||||
$lieuNaiss = preg_replace('/ +/',' ', preg_replace('/[^0-9A-Z]/', ' ',
|
||||
strtoupper(cleanstring($formR['cpVille']))));
|
||||
|
||||
@ -215,10 +221,11 @@ if ($typeRech=='ent' && $siret<>'') {
|
||||
echo "<!--_typeRech=ent, $raisonSociale, ".
|
||||
"$numVoie $libVoie, $cp, $ville-->\n";
|
||||
try {
|
||||
$O = $client->searchNomAdr($raisonSociale, $numVoie.' '.$libVoie,
|
||||
$cp, $ville, false, false, $position,
|
||||
$tabInfo['nbReponses'], 200, false, false,
|
||||
$naf);
|
||||
$O = $client->searchNomAdr(
|
||||
$raisonSociale, $numVoie.' '.$libVoie, $cp, $ville, false, false,
|
||||
$position, $tabInfo['nbReponses'], 200, false, false,
|
||||
$naf
|
||||
);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
@ -226,7 +233,10 @@ if ($typeRech=='ent' && $siret<>'') {
|
||||
} elseif ($typeRech=='dir') {
|
||||
echo "<!--_typeRech=dir, $dirNom, $dirPrenom, -->\n";
|
||||
try {
|
||||
$O = $client->searchDir($dirNom, $dirPrenom, $dirDateNaiss, $dirVille, $position, $tabInfo['nbReponses'], 200, false);
|
||||
$O = $client->searchDir(
|
||||
$dirNom, $dirPrenom, $dirDateNaiss, $dirVille,
|
||||
$position, $tabInfo['nbReponses'], 200, false
|
||||
);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
@ -234,17 +244,9 @@ if ($typeRech=='ent' && $siret<>'') {
|
||||
} elseif ($typeRech=='act') {
|
||||
try {
|
||||
$O = $client->searchAct(
|
||||
$actNom,
|
||||
$actPrenom,
|
||||
$dateNaiss,
|
||||
$lieuNaiss,
|
||||
$siret,
|
||||
$pays,
|
||||
$pctMin,
|
||||
$pctMax,
|
||||
$tabInfo['nbReponses'],
|
||||
200,
|
||||
false);
|
||||
$actNom, $actPrenom, $dateNaiss, $lieuNaiss, $siret, $pays, $pctMin, $pctMax,
|
||||
$tabInfo['nbReponses'], 200, false
|
||||
);
|
||||
echo '<!-- '.print_r($formR,1).' -->';
|
||||
echo '<!-- '.print_r($O,1).' -->';
|
||||
|
||||
@ -262,6 +264,8 @@ if($typeRech == 'ent'){
|
||||
$strCriteres = '<a href="./?page=recherche&vue=ent'.$params.'">'.trim(@implode(' ', $O['results']['criteres'])).'</a>';
|
||||
} elseif($typeRech == 'dir') {
|
||||
$strCriteres = '<a href="./?page=recherche&vue=dir'.$params.'">'.trim(@implode(' ', $O['results']['criteres'])).'</a>';
|
||||
} elseif($typeRech == 'act') {
|
||||
$strCriteres = '<a href="./?page=recherche&vue=act'.$params.'">'.trim(@implode(' ', $O['results']['criteres'])).'</a>';
|
||||
}
|
||||
|
||||
if ( $O['results']['nbReponses']==0)
|
||||
@ -272,7 +276,6 @@ if ( $O['results']['nbReponses']==0)
|
||||
else
|
||||
{
|
||||
$etabs = $O['results']['reponses'];
|
||||
FB::log($O, 'reponses');
|
||||
//Enregistrement de la première raison sociale trouvé si la recherche n'a été faite que sur un siren
|
||||
if ($typeRech=='ent' && $siret!='' && $raisonSociale==''){
|
||||
recherche_saveinfo( array('raisonSociale' => $etabs[0]['Nom']) );
|
||||
@ -374,8 +377,13 @@ if ( isset($O['results']['info']) &&
|
||||
echo ' ('. strWsToHtml($etab['DirNomUsage']) . ')';
|
||||
echo '<i>, '.strWsToHtml($etab['DirFonction']).'</i><br/>';
|
||||
}
|
||||
//Affichage spécial
|
||||
|
||||
if ($typeRech == 'act'){
|
||||
|
||||
|
||||
}
|
||||
|
||||
//Affichage spécial
|
||||
if( $_SESSION['tabInfo']['idClient']==34 )
|
||||
{
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user