2009-07-22 07:12:37 +00:00
< ? php
2009-07-22 13:05:51 +00:00
if ( $_REQUEST [ 'action' ] <> 'envoyer' )
{
2010-02-10 17:27:03 +00:00
/** @todo Préremplir le formulaire avec les données précédentes */
2009-07-22 07:12:37 +00:00
?>
< br />< br />< br />< br />< br />
< form name = " form_recherche " action = " ./?page=recherche&action=envoyer&vue=enq " method = " POST " enctype = " multipart/form-data " >
< input type = " hidden " name = " formR[type] " value = " enq " />
< table cellpadding = " 0 " cellspacing = " 0 " >
< tr >
< td valign = " top " width = " 580 " height = " 200 " align = " center " >
< table >
< tr >
< td align = " center " >< h2 align = " center " class = " StyleRechercheTitre " > DEMANDE D ' INVESTIGATION </ h2 ></ td >
</ tr >
</ table >
< table >
< tr >
< td width = " 30 " ></ td >
< td >
2010-02-10 17:27:03 +00:00
< p class = " StyleInfoLib " >< i > Les demandes d 'investigations sont liées à la recherche d' un tiers par nos services suite à une recherche infructueuse sur nos outils </ i ></ p >
< p class = " StyleInfoLib " >< i > La demande d 'investigation est destinée uniquement à l' identification rigoureuse d ' un tiers . Tout autre demande ( commande de pièces officielles , Kbis ou Privilèges ) ne sera pas traitée par nos équipes .</ i ></ p >
2009-07-22 07:12:37 +00:00
</ td >
< td width = " 30 " ></ td >
</ tr >
</ table >
< table >
< tr >
< td width = " 208 " align = " right " class = " StyleRechercheLib " >< b > Identifiant ( SIREN , WALDEC ) </ b ></ td >
2010-02-10 17:27:03 +00:00
< td width = " 300 " >< input type = " text " name = " formR[siret] " size = " 30 " maxlength = " 20 " />& nbsp ; < img src = " img/exclamation.png " / title = " SIREN, SIRET, N° TVA intracommunautaire, N° RC, N° WALDEC, ISIN " ></ td >
2009-07-22 07:12:37 +00:00
< td width = " 72 " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 208 " align = " right " class = " StyleRechercheLib " >< b > Raison Sociale , Enseigne , Sigle < br /> ou Nom & amp ; Pr & eacute ; nom < font color = " red " >*</ font ></ b ></ td >
< td width = " 300 " >< input type = " text " name = " formR[raisonSociale] " size = " 30 " maxlength = " 40 " /></ td >
< td width = " 72 " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 208 " align = " right " class = " StyleRechercheLib " >< b > Adresse compl & egrave ; te </ b ></ td >
< td width = " 300 " >< input type = " text " name = " formR[adresse] " size = " 30 " maxlength = " 40 " /></ td >
< td width = " 72 " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 208 " align = " right " class = " StyleRechercheLib " >< b > Code Postal / Ville < font color = " red " >*</ font ></ b ></ td >
< td width = " 300 " >< input type = " text " name = " formR[cpVille] " size = " 30 " maxlength = " 40 " /></ td >
< td width = " 72 " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 208 " align = " right " class = " StyleRechercheLib " >< b > T & eacute ; l & eacute ; phone / Fax </ b ></ td >
< td width = " 300 " >< input type = " text " name = " formR[telFax] " size = " 30 " maxlength = " 40 " /></ td >
< td width = " 72 " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 208 " align = " right " class = " StyleRechercheLib " >< b > Activit & eacute ; ( NAF ou libell & eacute ;) </ b ></ td >
< td width = " 300 " >< input type = " text " name = " formR[activite] " size = " 30 " maxlength = " 80 " /></ td >
< td width = " 72 " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 208 " align = " right " class = " StyleRechercheLib " >< b > Cat & eacute ; gorie juridique </ b ></ td >
< td width = " 300 " >< input type = " text " name = " formR[categorieJur] " size = " 30 " maxlength = " 80 " /></ td >
< td width = " 72 " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 208 " align = " right " class = " StyleRechercheLib " >< b > Remarque ou commentaire < br />& agrave ; destination de l ' enqu & eacute ; teur < font color = " red " >*</ font ></ b ></ td >
< td width = " 300 " >< textarea rows = " 3 " name = " formR[remarque] " cols = " 20 " ></ textarea ></ td >
< td width = " 72 " >& nbsp ; </ td >
</ tr >
</ table >
< hr width = " 80% " />
< br />
< table >
< tr >
< td width = " 208 " align = " right " class = " StyleRechercheLib " > Votre email pour la r & eacute ; ception de l ' investigation < font color = " red " >*</ font ></ td >
< td width = " 300 " >< input type = " text " name = " formR[email] " size = " 30 " maxlength = " 80 " value = " <? if ( $_SESSION['tabInfo'] ['login']<>'testreunica') echo $tabInfo['email'] ?> " /></ td >
< td width = " 72 " >& nbsp ; </ td >
</ tr >
</ table >
< br />
< table >
< tr >
< td width = " 508 " align = " center " class = " StyleInfoLib " >< i >< font color = " red " >*</ font > : Pour qu 'une demande d' investigation soit recevable , il est obligatoire d 'indiquer la raison sociale et la ville de l' entit & eacute ; recherch & eacute ; e ainsi qu 'un commentaire relatif au motif de la demande d' investigation .</ i ></ td >
</ tr >
</ table >
< br />
</ 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 l'investigation... " /></ td >
</ tr >
</ table >
</ form >
< ?
} else {
2009-08-19 09:37:50 +00:00
$formR = $_REQUEST [ 'formR' ];
2009-07-22 07:12:37 +00:00
2009-08-19 09:37:50 +00:00
$rs = trim ( $formR [ 'raisonSociale' ]);
$ville = trim ( $formR [ 'cpVille' ]);
$email = trim ( $formR [ 'email' ]);
$remarque = trim ( $formR [ 'remarque' ]);
2009-07-22 07:12:37 +00:00
2010-03-01 11:29:38 +00:00
if ( preg_match ( '#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,5}$#' , $email )
&& $rs <> '' && $ville <> '' && $remarque <> '' )
{
2009-07-22 07:12:37 +00:00
$fp = fopen ( PATH_LOGS . 'enquetes.csv' , 'a' );
fwrite ( $fp , date ( 'Y/m/d H:i:s' ) . ' - ' . print_r ( $_REQUEST [ 'formR' ], true ) . print_r ( $tabInfo , true ) . " \n " );
fclose ( $fp );
2010-03-01 11:29:38 +00:00
require_once 'mail/mail.php' ;
sendMail (
" Demande d'investigation " ,
print_r ( $_REQUEST [ 'formR' ], true ) . print_r ( $tabInfo , true ),
//From
array (
'email' => 'contact@scores-decisions.com' ,
'name' => 'Contact' ,
),
//TO
array (
0 => array (
'email' => 'contact@scores-decisions.com' ,
'name' => 'Contact'
)
)
);
2009-07-22 13:05:51 +00:00
?>
2009-07-22 07:12:37 +00:00
< table width = " 580 " height = " 100% " border = " 0 " align = " left " bgcolor = " #FFFFFF " >
< tr >
< td width = " 10 " >& nbsp ; </ td >
< td valign = " top " width = " 570 " >< br />< p class = " StyleInfoLib " > Votre demande a bien & eacute ; t & eacute ; prise en compte et sera trait & eacute ; e par notre & eacute ; quipe enqu & ecirc ; te dans les meilleurs d & eacute ; lais .< br />< br />
< a href = " ./?page=recherche&action=rechercher&vue=ent " > Cliquez - ici pour revenir & agrave ; l ' & eacute ; cran de recherche .</ a ></ p ></ td >
</ tr >
</ table >
2009-07-22 13:05:51 +00:00
< ?
2010-03-01 11:29:38 +00:00
}
else
{
2009-07-22 13:05:51 +00:00
?>
2009-07-22 07:12:37 +00:00
< table width = " 580 " height = " 100% " border = " 0 " align = " left " bgcolor = " #FFFFFF " >
< tr >
< td width = " 10 " >& nbsp ; </ td >
< td valign = " top " width = " 570 " >< br />< p class = " StyleInfoLib " > Veuillez saisir une adresse email valide ainsi que les informations n & eacute ; cessaires & agrave ; la demande d 'investigation (Raison sociale, Ville, Motif de l' enqu & ecirc ; te , etc ... ) < br />< br />
< a href = " Javascript:history.back() " > Cliquez - ici pour revenir & agrave ; l ' & eacute ; cran pr & eacute ; c & eacute ; dent .</ a ></ p ></ td >
</ tr >
</ table >
< ?
}
}