2009-06-18 15:26:44 +00:00
< ? php
2009-04-28 17:07:11 +00:00
if ( ! $_SESSION [ 'connected' ]) die ();
2009-07-21 07:17:54 +00:00
require_once 'utils.php' ;
2009-04-28 16:00:13 +00:00
$siret = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'siret' ]));
if ( strlen ( $siret ) <> 0 && strlen ( $siret ) <> 9 && strlen ( $siret ) <> 14 ) die ( 'Param<61> tres incorrects !' );
$idEntreprise = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'idEntreprise' ])) * 1 ; // Si id=0 alors non communiqu<71>
if (( $siret * 1 ) == 0 && $idEntreprise == 0 ) die ( 'Param<61> tres incorrects !' );
$siren = substr ( $siret , 0 , 9 );
2009-06-11 16:14:49 +00:00
$commandeEnquete = FALSE ;
2009-04-30 13:50:00 +00:00
2009-05-18 12:46:02 +00:00
if ( $_REQUEST [ 'submit' ]){
//Affichage de la demande
2009-06-18 15:26:44 +00:00
$firephp -> log ( 'Soumission formulaire' );
2009-05-18 12:46:02 +00:00
//V<> rification des informations
$formError = FALSE ;
$fields = array ();
2009-06-18 15:26:44 +00:00
2009-05-18 12:46:02 +00:00
//Info utilisateur obligatoire :
if ( $_REQUEST [ 'InfoUser' ][ 'Identite' ] == '' ){ $fields [] = 'Votre Identite' ; $formError = TRUE ;}
if ( $_REQUEST [ 'InfoUser' ][ 'Tel' ] == '' ){ $fields [] = 'Votre T<> l<EFBFBD> phone' ; $formError = TRUE ;}
if ( $_REQUEST [ 'InfoUser' ][ 'Email' ] == '' ){ $fields [] = 'Votre Email' ; $formError = TRUE ;}
2009-06-18 15:26:44 +00:00
2009-05-18 12:46:02 +00:00
//Info entreprise obligatoire :
if ( $_REQUEST [ 'InfoEnq' ][ 'Type' ] == '' ){ $fields [] = 'Choix du type d\'enqu<71> te' ; $formError = TRUE ;}
if ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '' ){ $fields [] = 'Pr<50> cisions de la demande' ; $formError = TRUE ;}
if ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '1' ){
2009-06-18 15:26:44 +00:00
if ( $_REQUEST [ 'InfoEnq' ][ 'Precisions' ][ 'Motif' ] == '' ){ $fields [] = 'Mofif de la demande' ; $formError = TRUE ;}
2009-05-18 12:46:02 +00:00
} elseif ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '3' || $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '4' ){
if ( $_REQUEST [ 'InfoEnq' ][ 'Precisions' ][ 'MontantCA' ] == '' ){ $fields [] = 'Pr<50> cisions de la demande' ; $formError = TRUE ;}
} elseif ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '5' ){
if ( $_REQUEST [ 'InfoEnq' ][ 'Precisions' ][ 'Autre' ] == '' ){ $fields [] = 'Pr<50> cisions de la demande' ; $formError = TRUE ;}
}
if ( $_REQUEST [ 'InfoEnq' ][ 'Anciennete' ] == '' || ! isset ( $_REQUEST [ 'InfoEnq' ][ 'AncienneteDuree' ]) ){ $fields [] = 'Anciennet<65> ' ; $formError = TRUE ;}
2009-06-18 15:26:44 +00:00
if ( isset ( $_REQUEST [ 'InfoEnq' ][ 'ImpayeesChoix' ]) && $_REQUEST [ 'InfoEnq' ][ 'ImpayeesChoix' ] == 'oui' ){
2009-05-18 12:46:02 +00:00
if ( $_REQUEST [ 'InfoEnq' ][ 'Impayees' ][ 'Montant' ] == '' || $_REQUEST [ 'InfoEnq' ][ 'Impayees' ][ 'Nombre' ] == '' || $_REQUEST [ 'InfoEnq' ][ 'Impayees' ][ 'Date' ] == '' ){ $fields [] = 'Pr<50> cisions sur les impay<61> es' ; $formError = TRUE ;}
}
2009-06-18 15:26:44 +00:00
if ( isset ( $_REQUEST [ 'InfoEnq' ][ 'RetardPaiementChoix' ]) && $_REQUEST [ 'InfoEnq' ][ 'RetardPaiementChoix' ] == 'oui' ){
2009-05-18 12:46:02 +00:00
if ( $_REQUEST [ 'InfoEnq' ][ 'RetardPaiement' ][ 'Montant' ] == '' || $_REQUEST [ 'InfoEnq' ][ 'RetardPaiement' ][ 'Nombre' ] == '' || $_REQUEST [ 'InfoEnq' ][ 'RetardPaiement' ][ 'Date' ] == '' ){ $fields [] = 'Pr<50> cisions sur le retarde de paiement' ; $formError = TRUE ;}
}
2009-06-18 15:26:44 +00:00
if ( isset ( $_REQUEST [ 'InfoEnq' ][ 'LitigeChoix' ]) && $_REQUEST [ 'InfoEnq' ][ 'LitigeChoix' ] == 'oui' ){
2009-05-18 12:46:02 +00:00
if ( $_REQUEST [ 'InfoEnq' ][ 'Litige' ][ 'Precisions' ] == '' || $_REQUEST [ 'InfoEnq' ][ 'Litige' ][ 'Precisions' ] == '' ){ $fields [] = 'Pr<50> cisions sur le litige' ; $formError = TRUE ;}
}
2009-06-18 15:26:44 +00:00
2009-05-18 12:46:02 +00:00
if ( $formError == TRUE ){
$message = '<font color="red">' ;
$message .= 'Veuillez remplir les champs suivants : ' ;
$message .= join ( ', ' , $fields );
$message .= '</font>' ;
} else {
2009-06-11 16:14:49 +00:00
$InfoEnq = $_REQUEST [ 'InfoEnq' ];
$InfoDemande = $_REQUEST [ 'InfoUser' ];
$siren = $InfoEnq [ 'Siren' ];
unset ( $InfoEnq [ 'Siren' ]);
//Suppression et assigation des valeurs pour le webservice
if ( $InfoEnq [ 'PrecisionsChoix' ] = 1 ){
2009-06-18 15:26:44 +00:00
$InfoEnq [ 'Precisions' ][ 'Type' ] = " Enqu<EFBFBD> te sur un client (contr<74> le cr<63> dit) " ;
unset ( $InfoEnq [ 'PrecisionsChoix' ]);
2009-06-11 16:14:49 +00:00
} elseif ( $InfoEnq [ 'PrecisionsChoix' ] == 2 ){
$InfoEnq [ 'Precisions' ][ 'Type' ] = " Enqu<EFBFBD> te sur un prospect (ouverture de compte) " ;
unset ( $InfoEnq [ 'PrecisionsChoix' ]);
} elseif ( $InfoEnq [ 'PrecisionsChoix' ] == 3 ){
$InfoEnq [ 'Precisions' ][ 'Type' ] = " Enqu<EFBFBD> te sur un fournisseur strat<61> gique " ;
unset ( $InfoEnq [ 'PrecisionsChoix' ]);
} elseif ( $InfoEnq [ 'PrecisionsChoix' ] == 4 ){
$InfoEnq [ 'Precisions' ][ 'Type' ] = " Enqu<EFBFBD> te sur un fournisseur non strat<61> gique " ;
unset ( $InfoEnq [ 'PrecisionsChoix' ]);
} elseif ( $InfoEnq [ 'PrecisionsChoix' ] == 5 ){
$InfoEnq [ 'Precisions' ][ 'Type' ] = " Autre type d'enqu<71> te (Pr<50> cisez...) " ;
unset ( $InfoEnq [ 'PrecisionsChoix' ]);
}
//Traiter les caract<63> res qui ne passe pas dans le webservice
require 'i18n/cleanchar.php' ;
$InfoEnq = cleanstring_deep ( $InfoEnq );
$InfoDemande = cleanstring_deep ( $InfoDemande );
2009-05-18 12:46:02 +00:00
//Soumission des donn<6E> es au webservice
2009-06-18 15:26:44 +00:00
try {
2009-06-11 16:14:49 +00:00
$result = $client -> commandeEnquete ( $siren , $InfoEnq , $InfoDemande );
$commandeEnquete = TRUE ;
} catch ( SoapFault $fault ){
require_once 'soaperror.php' ;
processSoapFault ( $client , $fault , $tabInfo );
}
2009-06-18 15:26:44 +00:00
}
2009-05-18 12:46:02 +00:00
}
2009-04-30 13:50:00 +00:00
2009-06-11 16:14:49 +00:00
if ( $commandeEnquete == FALSE ){
2009-04-30 13:50:00 +00:00
2009-06-11 16:14:49 +00:00
try {
$O = $client -> getIdentite ( $siret , $idEntreprise );
$etab = $O [ 'result' ];
$firephp -> log ( $etab , 'etab' );
} catch ( SoapFault $fault ) {
require_once 'soaperror.php' ;
processSoapFault ( $client , $fault , $tabInfo );
die ();
}
2009-06-18 15:26:44 +00:00
2009-06-11 16:14:49 +00:00
$tabInfo = $_SESSION [ 'tabInfo' ];
2009-06-18 15:26:44 +00:00
2009-06-11 16:14:49 +00:00
try {
$O = $client -> getInfosLogin ( $tabInfo [ 'login' ]);
$user = $O [ 'result' ];
$firephp -> log ( $user , 'user' );
} catch ( SoapFault $fault ) {
2009-06-18 15:26:44 +00:00
2009-06-11 16:14:49 +00:00
}
2009-04-30 13:50:00 +00:00
}
2009-04-28 16:00:13 +00:00
?>
< style >
2009-06-09 09:48:58 +00:00
#center p { margin:5px; padding:5px;}
2009-04-30 13:50:00 +00:00
. infoTitle { clear : both ; float : left ; width : 180 px ; margin - left : 30 px ; padding : 0 10 px 0 0 ;}
2009-04-28 16:00:13 +00:00
. infoData { float : left ; width : 320 px ; margin : 2 px 0 ;}
2009-04-30 13:50:00 +00:00
form { }
2009-04-28 16:00:13 +00:00
form em { color : #FF0000;}
2009-04-28 17:07:11 +00:00
fieldset { border : 0 ; margin : 0 ; padding : 0 ;}
2009-04-30 13:50:00 +00:00
fieldset legend { padding : 0 0 0 10 px ;}
2009-04-28 16:00:13 +00:00
. fieldgrp { clear : both ; width : 100 % ; margin - bottom :. 5 em ; overflow : hidden ;}
. fieldgrp : after { content : " . " ; display : block ; clear : both ; visibility : hidden ; line - height : 0 ; height : 0 ; }
2009-04-30 13:50:00 +00:00
. fieldgrp label { font - weight : bold ; margin - left : 30 px ; width : 180 px ; clear : both ; padding : 0 10 px 0 0 ; line - height : 22 px ; _padding - top : 3 px ; float : left ; display : block ; font - size : 108 % ;}
. fieldgrp label span { font - weight : normal ;}
2009-04-29 14:58:49 +00:00
. fieldgrp label abbr { color : #4B911C; font-size:120%; vertical-align:middle;}
2009-06-10 14:32:51 +00:00
. field { width : 320 px ; float : left ; padding : 0 10 px 0 0 ; line - height : 22 px ; _padding - top : 3 px ;}
2009-04-28 16:00:13 +00:00
. field . longfield { width : 215 px ;}
. field . longfield - select { width : 220 px ;}
. field . smallfield { width : 95 px ;}
. field . medfield { width : 110 px ;}
. field input , . field select { font - size : 110 % ; margin : 2 px 0 ; }
2009-04-30 13:50:00 +00:00
. field input [ type = " radio " ] { margin : 0 5 px 0 5 px ; }
div . submit { margin - left : 200 px ; padding - left : 0 px ; margin - top : 1 em ; }
2009-04-28 16:00:13 +00:00
div . submit p . submit - button { margin - top : 0 ;}
div . submit p . details { font - size : 85 % ; color : #666;margin:0;}
div . submit p . required - note { margin - top : 1 em ;}
div . submit p . required - note span { color : #4B911C;_color:#666;font-size:170%;vertical-align:top;}
2009-06-10 14:32:51 +00:00
. noborder { border : none ;}
2009-06-11 16:14:49 +00:00
< ? php if ( isset ( $_REQUEST [ 'InfoUser' ][ 'Profil' ]) && $_REQUEST [ 'InfoUser' ][ 'Profil' ] == 'Autre' ){ ?> #autreProfil {display:block;}<?php }else{?> #autreProfil {display:none;} <?php }?>
< ? php if ( isset ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ]) && $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '5' ){ ?> #autrePrecisions {display:block;} <?php }else{ ?> #autrePrecisions {display:none;} <?php }?>
< ? php if ( isset ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ]) && ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '3' || $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '4' )){ ?> #fournisseur {display:block;} <?php }else{ ?> #fournisseur {display:none;} <?php }?>
< ? php if ( isset ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ]) && $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '1' ){ ?> #credit {display:block;} <?php }else{ ?> #credit {display:none;} <?php }?>
< ? php if ( isset ( $_REQUEST [ 'InfoEnq' ][ 'ImpayeesChoix' ]) && $_REQUEST [ 'InfoEnq' ][ 'ImpayeesChoix' ] == 'oui' ){ ?> #impayees {display:block;}<?php }else{?> #impayees {display:none;} <?php }?>
< ? php if ( isset ( $_REQUEST [ 'InfoEnq' ][ 'ImpayeesChoix' ]) && $_REQUEST [ 'InfoEnq' ][ 'ImpayeesChoix' ] == 'oui' ){ ?> #retardpaiement {display:block;}<?php }else{?> #retardpaiement {display:none;} <?php }?>
< ? php if ( isset ( $_REQUEST [ 'InfoEnq' ][ 'LitigeChoix' ]) && $_REQUEST [ 'InfoEnq' ][ 'LitigeChoix' ] == 'oui' ){ ?> #litige {display:block;}<?php }else{?> #litige {display:none;} <?php }?>
2009-04-28 16:00:13 +00:00
</ style >
2009-06-11 16:14:49 +00:00
< ? php if ( $commandeEnquete == FALSE ){ ?>
2009-04-30 13:50:00 +00:00
< script type = " text/javascript " >
$ ( document ) . ready ( function (){
$ ( " #profil " ) . change ( function () {
var val = $ ( " #profil " ) . val ();
if ( val == 'Autre' ){
$ ( " #autreProfil " ) . css ( 'display' , 'block' );
} else {
$ ( " #autreProfil " ) . css ( 'display' , 'none' );
}
});
$ ( " #precision " ) . change ( function () {
var val = $ ( " #precision " ) . val ();
if ( val == '5' ){
$ ( " #autrePrecisions " ) . css ( 'display' , 'block' );
} else {
$ ( " #autrePrecisions " ) . css ( 'display' , 'none' );
}
if ( val == '3' || val == '4' ){
2009-06-18 15:26:44 +00:00
$ ( " #fournisseur " ) . css ( 'display' , 'block' );
2009-04-30 13:50:00 +00:00
} else {
$ ( " #fournisseur " ) . css ( 'display' , 'none' );
}
if ( val == '1' ){
$ ( " #credit " ) . css ( 'display' , 'block' );
} else {
$ ( " #credit " ) . css ( 'display' , 'none' );
}
});
2009-06-10 14:01:59 +00:00
$ ( 'input[type=radio][name=InfoEnq[ImpayeesChoix]]' ) . click ( function (){
2009-04-30 13:50:00 +00:00
var val = $ ( this ) . attr ( 'value' );
if ( val == 'oui' ){
$ ( " #impayees " ) . css ( 'display' , 'block' );
} else {
$ ( " #impayees " ) . css ( 'display' , 'none' );
2009-06-18 15:26:44 +00:00
}
2009-04-30 13:50:00 +00:00
});
2009-06-10 14:01:59 +00:00
$ ( 'input[type=radio][name=InfoEnq[RetardPaiementChoix]]' ) . click ( function (){
2009-04-30 13:50:00 +00:00
var val = $ ( this ) . attr ( 'value' );
if ( val == 'oui' ){
$ ( " #retardpaiement " ) . css ( 'display' , 'block' );
} else {
$ ( " #retardpaiement " ) . css ( 'display' , 'none' );
2009-06-18 15:26:44 +00:00
}
2009-04-30 13:50:00 +00:00
});
2009-06-10 14:01:59 +00:00
$ ( 'input[type=radio][name=InfoEnq[LitigeChoix]]' ) . click ( function (){
2009-04-30 13:50:00 +00:00
var val = $ ( this ) . attr ( 'value' );
if ( val == 'oui' ){
$ ( " #litige " ) . css ( 'display' , 'block' );
} else {
$ ( " #litige " ) . css ( 'display' , 'none' );
}
});
$ ( 'input[type=text][name=InfoEnq[Encours]]' ) . blur ( function (){
var val = $ ( this ) . val ();
2009-06-11 16:14:49 +00:00
if ( parseInt ( val ) > 20000 && val != '' ){
$ ( '#gold' ) . val ( 'gold' ) . attr ( 'checked' , 'check' );
} else if ( parseInt ( val ) < 20000 && val != '' ){
$ ( '#premier' ) . val ( 'premier' ) . attr ( 'checked' , 'check' );
2009-04-30 13:50:00 +00:00
}
});
2009-06-18 15:26:44 +00:00
2009-04-30 13:50:00 +00:00
});
</ script >
2009-06-11 16:14:49 +00:00
< ? php } ?>
2009-04-28 16:00:13 +00:00
< div id = " center " >
2009-06-18 15:26:44 +00:00
< h1 class = " titre " > ENQU & Ecirc ; TE COMMERCIALE </ h1 >
2009-04-28 16:00:13 +00:00
2009-06-18 15:26:44 +00:00
< ? php
2009-06-11 16:14:49 +00:00
if ( $commandeEnquete == FALSE ){
?>
2009-06-22 11:59:08 +00:00
< p class = " StyleInfoLib " > Nos enqu<EFBFBD> tes commerciales sont r<EFBFBD> alis<EFBFBD> es par des analystes financiers .</ p >
2009-04-28 16:00:13 +00:00
2009-05-18 12:46:02 +00:00
< div id = " message " >< ? php print $message ; ?> </div>
2009-06-09 09:48:58 +00:00
< form action = " ./?page=enquetec&siret=<?php print $siret ;?>&idEntreprise=<?php print $idEntreprise ;?> " method = " POST " enctype = " multipart/form-data " >
2009-04-28 16:00:13 +00:00
< h2 > Entreprise concern<EFBFBD> e : </ h2 >
< div class = " infoTitle StyleInfoLib " > Num & eacute ; ro identifiant Siren </ div >
2009-04-30 13:50:00 +00:00
< div class = " infoData " >
< ? php print substr ( $etab [ 'Siren' ], 0 , 3 ) . ' ' . substr ( $etab [ 'Siren' ], 3 , 3 ) . ' ' . substr ( $etab [ 'Siren' ], 6 , 3 ); ?>
2009-05-18 12:46:02 +00:00
< input type = " hidden " name = " InfoEnq[Siren] " value = " <?php print $etab['Siren'] ; ?> " />
2009-04-30 13:50:00 +00:00
</ div >
2009-04-28 16:00:13 +00:00
< div class = " infoTitle StyleInfoLib " > Num & eacute ; ro identifiant Siret </ div >
2009-04-28 17:07:11 +00:00
< div class = " infoData " >< ? php print substr ( $etab [ 'Siren' ], 0 , 3 ) . ' ' . substr ( $etab [ 'Siren' ], 3 , 3 ) . ' ' . substr ( $etab [ 'Siren' ], 6 , 3 ) . ' <i>' . substr ( $etab [ 'Siret' ], 9 , 5 ) . '</i>' ?> </div>
2009-04-28 16:00:13 +00:00
< div class = " infoTitle StyleInfoLib " > Num & eacute ; ro de TVA Intracom .</ div >
2009-04-28 17:07:11 +00:00
< div class = " infoData " >< ? php print substr ( $etab [ 'TvaNumero' ], 0 , 2 ) . ' ' . substr ( $etab [ 'TvaNumero' ], 2 , 2 ) . ' ' . substr ( $etab [ 'TvaNumero' ], - 9 ); ?> </div>
2009-04-28 16:00:13 +00:00
< div class = " infoTitle StyleInfoLib " > Raison Sociale </ div >
2009-04-28 17:07:11 +00:00
< div class = " infoData " >< ? php print $etab [ 'Nom' ]; ?> </div>
2009-04-28 16:00:13 +00:00
< div class = " infoTitle StyleInfoLib " > Adresse </ div >
2009-04-28 17:07:11 +00:00
< div class = " infoData " >< ? php print $etab [ 'Adresse' ]; ?> </div>
2009-04-28 16:00:13 +00:00
< div class = " fieldgrp " >
2009-04-30 13:50:00 +00:00
< label class = " StyleInfoLib " > T<EFBFBD> l<EFBFBD> phone < ? php if ( trim ( $etab [ 'Tel' ]) == '' ){ ?> <font color="Red">*</font><?php }?> / Fax</label>
< div class = " field " >
2009-06-18 15:26:44 +00:00
< ? php if ( trim ( $etab [ 'Tel' ]) != '' ){ print $etab [ 'Tel' ]; } else { ?> <input type="text" name="InfoEnq[Entrep][Tel]" value="<?php print $_REQUEST['InfoEnq']['Entrep']['Tel'];?>"/><?php } ?> <b>/</b>
< ? php if ( trim ( $etab [ 'Fax' ]) != '' ){ print $etab [ 'Fax' ]; } else { ?> <input type="text" name="InfoEnq[Entrep][Fax]" value="<?php print $_REQUEST['InfoEnq']['Entrep']['Fax'];?>"/><?php } ?>
2009-04-28 16:00:13 +00:00
</ div >
2009-04-30 13:50:00 +00:00
</ div >
< ? php if ( trim ( $etab [ 'Tel' ]) != '' ){ ?>
2009-04-28 16:00:13 +00:00
< div class = " fieldgrp " >
2009-04-30 13:50:00 +00:00
< label class = " StyleInfoLib " > Autre t<EFBFBD> l<EFBFBD> phone :</ label >
2009-06-11 16:14:49 +00:00
< div class = " field " >< input type = " text " name = " InfoEnq[Entrep][AutreTel] " value = " <?php print $_REQUEST['InfoEnq'] ['Entrep']['AutreTel'];?> " /> </ div >
2009-04-28 16:00:13 +00:00
</ div >
2009-04-30 13:50:00 +00:00
< ? php } ?>
2009-04-28 16:00:13 +00:00
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > E - mail </ label >
2009-05-18 12:46:02 +00:00
< div class = " field " >< ? php if ( trim ( $etab [ 'Mail' ]) != '' ){ print $etab [ 'Mail' ]; } else { ?> <input type="text" name="InfoEnq[Entrep][Mail]" value="<?php print $_REQUEST['InfoEnq']['Entrep']['Mail'];?>"/><?php }?></div>
2009-04-28 16:00:13 +00:00
</ div >
2009-04-30 13:50:00 +00:00
< ? php if ( trim ( $etab [ 'Mail' ]) != '' ){ ?>
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Autre e - mail </ label >
2009-06-11 16:14:49 +00:00
< div class = " field " >< input type = " text " name = " InfoEnq[Entrep][AutreMail] " value = " <?php print $_REQUEST['InfoEnq'] ['Entrep']['AutreTel'];?> " /></ div >
2009-04-30 13:50:00 +00:00
</ div >
< ? php } ?>
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Site Web </ label >
2009-05-18 12:46:02 +00:00
< div class = " field " >< ? php if ( trim ( $etab [ 'Web' ]) != '' ){ print $etab [ 'Web' ]; } else { ?> <input type="text" name="InfoEnq[Entrep][Web]" value="<?php print $_REQUEST['InfoEnq']['Entrep']['Web'];?>"/><?php }?></div>
2009-04-30 13:50:00 +00:00
</ div >
2009-04-28 16:00:13 +00:00
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Domiciliation bancaire </ label >
2009-04-30 13:50:00 +00:00
< div class = " field " >
2009-05-18 12:46:02 +00:00
< input type = " text " name = " InfoEnq[Entrep][Rib][Banque] " maxlength = " 5 " size = " 5 " value = " <?php print $_REQUEST['InfoEnq'] ['Entrep']['Rib']['Banque'];?> " />
< input type = " text " name = " InfoEnq[Entrep][Rib][Guichet] " maxlength = " 5 " size = " 5 " value = " <?php print $_REQUEST['InfoEnq'] ['Entrep']['Rib']['Guichet'];?> " />
< input type = " text " name = " InfoEnq[Entrep][Rib][Compte] " maxlength = " 11 " size = " 11 " value = " <?php print $_REQUEST['InfoEnq'] ['Entrep']['Rib']['Compte'];?> " />
< input type = " text " name = " InfoEnq[Entrep][Rib][Cle] " maxlength = " 2 " size = " 2 " value = " <?php print $_REQUEST['InfoEnq'] ['Entrep']['Rib']['Cle'];?> " />
2009-04-30 13:50:00 +00:00
</ div >
2009-04-28 16:00:13 +00:00
</ div >
< div class = " fieldgrp " >
2009-05-18 12:46:02 +00:00
< label class = " StyleInfoLib " > Encours demand<EFBFBD> </ label >
< div class = " field " >< input type = " text " name = " InfoEnq[Encours] " value = " <?php print $_REQUEST['InfoEnq'] ['Encours'];?> " /> & euro ; </ div >
2009-04-28 16:00:13 +00:00
</ div >
2009-06-11 16:14:49 +00:00
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Nombre d ' <EFBFBD> ch<EFBFBD> ances</ label >
< div class = " field " >< input type = " text " name = " InfoEnq[NbEcheances] " value = " <?php print $_REQUEST['InfoEnq'] ['NbEcheances'];?> " /> ; </ div >
</ div >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Avis de l ' assureur cr<EFBFBD> dit </ label >
< div class = " field " >
< select name = " InfoEnq[AvisAssureur] " >
< option value = " - " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'AvisAssureur' ] == '-' ){ print 'checked="check"' ;} ?> >-</option>
< option value = " Favorable " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'AvisAssureur' ] == 'Favorable' ){ print 'checked="check"' ;} ?> >Favorable</option>
< option value = " D<EFBFBD> favorable " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'AvisAssureur' ] == 'D<> favorable' ){ print 'checked="check"' ;} ?> >D<> favorable</option>
</ select >
</ div >
</ div >
2009-04-28 17:07:11 +00:00
< h2 > Demandeur : </ h2 >
< div class = " fieldgrp " >
2009-05-18 12:46:02 +00:00
< label class = " StyleInfoLib " > Votre profil < font color = " Red " >*</ font ></ label >
2009-04-28 17:07:11 +00:00
< div class = " field " >
2009-04-30 13:50:00 +00:00
< select id = " profil " name = " InfoUser[Profil] " >
2009-05-18 12:46:02 +00:00
< option value = " Achats " < ? php if ( $_REQUEST [ 'InfoUser' ][ 'Profil' ] == 'Achats' ){ print 'selected="selected"' ;}; ?> >Service Achats</option>
< option value = " Commerce " < ? php if ( $_REQUEST [ 'InfoUser' ][ 'Profil' ] == 'Commerce' ){ print 'selected="selected"' ;}; ?> >Commerce</option>
< option value = " Recouvrement " < ? php if ( $_REQUEST [ 'InfoUser' ][ 'Profil' ] == 'Recouvrement' ){ print 'selected="selected"' ;}; ?> >Recouvrement</option>
< option value = " Contentieux " < ? php if ( $_REQUEST [ 'InfoUser' ][ 'Profil' ] == 'Contentieux' ){ print 'selected="selected"' ;}; ?> >Contentieux</option>
< option value = " Autre " < ? php if ( $_REQUEST [ 'InfoUser' ][ 'Profil' ] == 'Autre' ){ print 'selected="selected"' ;}; ?> >Autre</option>
2009-04-28 17:07:11 +00:00
</ select >
</ div >
</ div >
2009-04-30 13:50:00 +00:00
< div id = " autreProfil " class = " fieldgrp " >
2009-05-18 12:46:02 +00:00
< label class = " StyleInfoLib " > Pr<EFBFBD> cisez </ label >
< div class = " field " >< input type = " text " name = " InfoUser[ProfilAutre] " value = " <?php print $_REQUEST['InfoUser'] ['ProfilAutre'];?> " /></ div >
2009-04-28 17:07:11 +00:00
</ div >
< div class = " fieldgrp " >
2009-05-18 12:46:02 +00:00
< label class = " StyleInfoLib " > Votre Identit<EFBFBD> </ label >
2009-04-30 13:50:00 +00:00
< div class = " field " >< input type = " text " name = " InfoUser[Identite] " value = " <?php print $user['nom'] .' '. $user['prenom'] ; ?> " /></ div >
2009-04-28 17:07:11 +00:00
</ div >
< div class = " fieldgrp " >
2009-05-18 12:46:02 +00:00
< label class = " StyleInfoLib " > Votre T<EFBFBD> l<EFBFBD> phone < font color = " Red " ></ font >:</ label >
2009-06-18 15:26:44 +00:00
< div class = " field " >< input type = " text " name = " InfoUser[Tel] " value = " <?php
2009-05-18 12:46:02 +00:00
if ( isset ( $_REQUEST [ 'InfoUser' ][ 'Tel' ])){ print $_REQUEST [ 'InfoUser' ][ 'Tel' ];}
else print $user [ 'tel' ]; ?> " /></div>
2009-04-28 17:07:11 +00:00
</ div >
< div class = " fieldgrp " >
2009-05-18 12:46:02 +00:00
< label class = " StyleInfoLib " > Votre Fax </ label >
2009-06-18 15:26:44 +00:00
< div class = " field " >< input type = " text " name = " InfoUser[Fax] " value = " <?php
2009-05-18 12:46:02 +00:00
if ( isset ( $_REQUEST [ 'InfoUser' ][ 'Fax' ])){ print $_REQUEST [ 'InfoUser' ][ 'Fax' ];}
else print $user [ 'fax' ]; ?> "/></div>
2009-04-28 17:07:11 +00:00
</ div >
2009-06-11 16:14:49 +00:00
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Votre E - mail < font color = " Red " >*</ font ></ label >
2009-06-18 15:26:44 +00:00
< div class = " field " >< input type = " text " name = " InfoUser[Email] " value = " <?php
2009-06-11 16:14:49 +00:00
if ( isset ( $_REQUEST [ 'InfoUser' ][ 'Email' ])){ print $_REQUEST [ 'InfoUser' ][ 'Email' ];}
else print $user [ 'mail' ]; ?> "/></div>
</ div >
2009-04-28 17:07:11 +00:00
< h2 > Enqu<EFBFBD> te : </ h2 >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Type d ' enqu<EFBFBD> te </ label >
< div class = " field " >
2009-07-23 08:55:34 +00:00
< input class = " noborder " type = " radio " id = " premier " name = " InfoEnq[Type] " value = " premier " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'Type' ] == 'premier' ){ print 'checked="checked"' ;}; ?> >EXPRESSE (24 h - encours inf<6E> rieur <20> 20K€)
2009-04-30 13:50:00 +00:00
< br />
2009-07-23 08:55:34 +00:00
< input class = " noborder " type = " radio " id = " gold " name = " InfoEnq[Type] " value = " gold " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'Type' ] == 'gold' ){ print 'checked="checked"' ;}; ?> >DECISION (72 h - encours sup<75> rieur <20> 20K€)
2009-04-30 13:50:00 +00:00
</ div >
</ div >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Pr<EFBFBD> cisions sur la demande </ label >
< div class = " field " >
2009-05-18 12:46:02 +00:00
< select id = " precision " name = " InfoEnq[PrecisionsChoix] " >
2009-04-30 13:50:00 +00:00
< option value = " " > Choisissez ...</ option >
2009-05-18 12:46:02 +00:00
< option value = " 1 " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '1' ){ print 'selected="selected"' ;}; ?> >Enqu<71> te sur un client (contr<74> le cr<63> dit)</option>
< option value = " 2 " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '2' ){ print 'selected="selected"' ;}; ?> >Enqu<71> te sur un prospect (ouverture de compte)</option>
< option value = " 3 " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '3' ){ print 'selected="selected"' ;}; ?> >Enqu<71> te sur un fournisseur strat<61> gique</option>
< option value = " 4 " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '4' ){ print 'selected="selected"' ;}; ?> >Enqu<71> te sur un fournisseur non strat<61> gique</option>
< option value = " 5 " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'PrecisionsChoix' ] == '5' ){ print 'selected="selected"' ;}; ?> >Autre type d'enqu<71> te (Pr<50> cisez...)</option>
2009-04-28 17:07:11 +00:00
</ select >
</ div >
</ div >
2009-04-30 13:50:00 +00:00
< div id = " fournisseur " class = " fieldgrp " >
2009-05-18 12:46:02 +00:00
< label class = " StyleInfoLib " > CA r<EFBFBD> alis<EFBFBD> avec le fournisseur </ label >
< div class = " field " >< input type = " text " name = " InfoEnq[Precisions][MontantCA] " value = " <?php print $_REQUEST['InfoEnq'] ['Precisions']['MontantCA']; ?> " /> & euro ; </ div >
2009-04-30 13:50:00 +00:00
</ div >
< div id = " credit " class = " fieldgrp " >
2009-05-18 12:46:02 +00:00
< label class = " StyleInfoLib " > Motif du contr<EFBFBD> le </ label >
< div class = " field " >< textarea name = " InfoEnq[Precisions][Motif] " >< ? php print $_REQUEST [ 'InfoEnq' ][ 'Precisions' ][ 'Motif' ]; ?> </textarea></div>
2009-04-30 13:50:00 +00:00
</ div >
< div id = " autrePrecisions " class = " fieldgrp " >
2009-05-18 12:46:02 +00:00
< label class = " StyleInfoLib " > Pr<EFBFBD> cisez </ label >
< div class = " field " >< textarea name = " InfoEnq[Precisions][Autre] " >< ? php print $_REQUEST [ 'InfoEnq' ][ 'Precisions' ][ 'Autre' ]; ?> </textarea></div>
2009-04-30 13:50:00 +00:00
</ div >
2009-04-28 17:07:11 +00:00
< div class = " fieldgrp " >
2009-04-30 13:50:00 +00:00
< label class = " StyleInfoLib " > Anciennet<EFBFBD> de la relation :</ label >
< div class = " field " >
2009-05-18 12:46:02 +00:00
< input type = " text " name = " InfoEnq[Anciennete] " size = " 2 " value = " <?php print $_REQUEST['InfoEnq'] ['Anciennete']; ?> " />
2009-06-10 14:32:51 +00:00
< input class = " noborder " type = " radio " name = " InfoEnq[AncienneteDuree] " value = " Mois " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'AncienneteDuree' ] == 'Mois' ){ print 'checked="checked"' ;} ?> />Mois
< input class = " noborder " type = " radio " name = " InfoEnq[AncienneteDuree] " value = " Annees " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'AncienneteDuree' ] == 'Annees' ){ print 'checked="checked"' ;} ?> />Ann<6E> es
2009-04-30 13:50:00 +00:00
</ div >
2009-04-28 17:07:11 +00:00
</ div >
2009-04-28 16:00:13 +00:00
< div class = " fieldgrp " >
2009-04-30 13:50:00 +00:00
< label class = " StyleInfoLib " > Impay<EFBFBD> es :</ label >
2009-04-28 16:00:13 +00:00
< div class = " field " >
2009-06-10 14:32:51 +00:00
< input class = " noborder " type = " radio " name = " InfoEnq[ImpayeesChoix] " value = " oui " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'ImpayeesChoix' ] == 'oui' ){ print 'checked="checked"' ;} ?> />Oui
< input class = " noborder " type = " radio " name = " InfoEnq[ImpayeesChoix] " value = " non " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'ImpayeesChoix' ] == 'non' ){ print 'checked="checked"' ;} ?> />Non
2009-04-30 13:50:00 +00:00
</ div >
</ div >
< div id = " impayees " >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Montant :</ label >
2009-05-18 12:46:02 +00:00
< div class = " field " >< input type = " text " name = " InfoEnq[Impayees][Montant] " value = " <?php print $_REQUEST['InfoEnq'] ['Impayees']['Montant']; ?> " /> & euro ; </ div >
2009-04-30 13:50:00 +00:00
</ div >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Nombre :</ label >
2009-05-18 12:46:02 +00:00
< div class = " field " >< input type = " text " name = " InfoEnq[Impayees][Nombre] " value = " <?php print $_REQUEST['InfoEnq'] ['Impayees']['Nombre']; ?> " /></ div >
2009-04-30 13:50:00 +00:00
</ div >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Date :</ label >
2009-05-18 12:46:02 +00:00
< div class = " field " >< input type = " text " name = " InfoEnq[Impayees][Date] " value = " <?php print $_REQUEST['InfoEnq'] ['Impayees']['Date']; ?> " /> ( Format : JJ / MM / AAAA ) </ div >
2009-04-30 13:50:00 +00:00
</ div >
</ div >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Retard de paiement :</ label >
< div class = " field " >
2009-06-10 14:32:51 +00:00
< input class = " noborder " type = " radio " name = " InfoEnq[RetardPaiementChoix] " value = " oui " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'RetardPaiementChoix' ] == 'oui' ){ print 'checked="checked"' ;} ?> />Oui
< input class = " noborder " type = " radio " name = " InfoEnq[RetardPaiementChoix] " value = " non " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'RetardPaiementChoix' ] == 'non' ){ print 'checked="checked"' ;} ?> />Non
2009-04-30 13:50:00 +00:00
</ div >
</ div >
< div id = " retardpaiement " >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Montant :</ label >
2009-05-18 12:46:02 +00:00
< div class = " field " >< input type = " text " name = " InfoEnq[RetardPaiement][Montant] " value = " <?php print $_REQUEST['InfoEnq'] ['RetardPaiement']['Montant']; ?> " /> & euro ; </ div >
2009-04-30 13:50:00 +00:00
</ div >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Nombre :</ label >
2009-05-18 12:46:02 +00:00
< div class = " field " >< input type = " text " name = " InfoEnq[RetardPaiement][Nombre] " value = " <?php print $_REQUEST['InfoEnq'] ['RetardPaiement']['Nombre']; ?> " /></ div >
2009-04-30 13:50:00 +00:00
</ div >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Date :</ label >
2009-05-18 12:46:02 +00:00
< div class = " field " >< input type = " text " name = " InfoEnq[RetardPaiement][Date] " value = " <?php print $_REQUEST['InfoEnq'] ['RetardPaiement']['Date']; ?> " /> ( Format : JJ / MM / AAAA ) </ div >
2009-04-30 13:50:00 +00:00
</ div >
</ div >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Litiges techniques ou commerciaux :</ label >
< div class = " field " >
2009-06-10 14:32:51 +00:00
< input class = " noborder " type = " radio " name = " InfoEnq[LitigeChoix] " value = " oui " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'LitigeChoix' ] == 'oui' ){ print 'checked="checked"' ;} ?> />Oui
< input class = " noborder " type = " radio " name = " InfoEnq[LitigeChoix] " value = " non " < ? php if ( $_REQUEST [ 'InfoEnq' ][ 'LitigeChoix' ] == 'non' ){ print 'checked="checked"' ;} ?> />Non
2009-04-28 16:00:13 +00:00
</ div >
</ div >
2009-04-30 13:50:00 +00:00
< div id = " litige " >
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Pr<EFBFBD> cisions :</ label >
< div class = " field " >
2009-05-18 12:46:02 +00:00
< textarea name = " InfoEnq[Litige][Precisions] " >< ? php print $_REQUEST [ 'InfoEnq' ][ 'Litige' ][ 'Precisions' ]; ?> </textarea>
2009-04-30 13:50:00 +00:00
</ div >
</ div >
</ div >
2009-04-28 16:00:13 +00:00
< div class = " fieldgrp " >
< label class = " StyleInfoLib " > Observations ou questions sp<EFBFBD> ciales </ label >
2009-05-18 12:46:02 +00:00
< div class = " field " >< textarea name = " InfoEnq[Observation] " >< ? php print $_REQUEST [ 'InfoEnq' ][ 'Observation' ]; ?> </textarea></div>
2009-04-28 16:00:13 +00:00
</ div >
2009-05-18 12:46:02 +00:00
< div class = " submit " >< p class = " submit-button " >< input type = " submit " name = " submit " value = " Envoyer " /></ p ></ div >
2009-04-30 13:50:00 +00:00
2009-04-28 16:00:13 +00:00
</ form >
2009-06-18 15:26:44 +00:00
< ? php
2009-06-11 16:14:49 +00:00
}
if ( $commandeEnquete == TRUE ){
if ( $result [ 'results' ][ 'error' ][ 'errnum' ] == 0 ){
$annee = substr ( $result [ 'results' ][ 'dateCommande' ], 0 , 4 );
$mois = substr ( $result [ 'results' ][ 'dateCommande' ], 4 , 2 );
$jour = substr ( $result [ 'results' ][ 'dateCommande' ], 6 , 2 );
$heure = substr ( $result [ 'results' ][ 'dateCommande' ], 8 , 2 );
$minutes = substr ( $result [ 'results' ][ 'dateCommande' ], 10 , 2 );
$ref = substr ( $result [ 'results' ][ 'refCmde' ], 1 );
$siren = $result [ 'results' ][ 'siren' ];
2009-06-18 15:26:44 +00:00
2009-06-11 16:14:49 +00:00
?>
< p >
Votre demande <EFBFBD> <EFBFBD> t<EFBFBD> prise en compte le < ? = $jour . '/' . $mois . '/' . $annee ?> <20> <?=$heure?> h <?=$minutes?> sous la r<> f<EFBFBD> rence <b><?=$ref?></b> pour le siren <b><?=$siren?></b>.
</ p >
2009-06-18 15:26:44 +00:00
< ? php
2009-06-11 16:14:49 +00:00
} else {
$errnum = $result [ 'results' ][ 'error' ][ 'errnum' ];
$errmsg = $result [ 'results' ][ 'error' ][ 'errmsg' ];
?>
< p style = " color:red; " >
Erreur n<EFBFBD> < ? = $errnum ?> - <?=$errmsg?>.
</ p >
2009-06-18 15:26:44 +00:00
< ? php
2009-06-11 16:14:49 +00:00
}
}
?>
2009-05-18 12:46:02 +00:00
</ div >