extranet/www/pages/enquetec.php
2009-04-29 14:58:49 +00:00

209 lines
6.4 KiB
PHP

<?php
if (!$_SESSION['connected']) die();
require_once(realpath(dirname(__FILE__).'/../../includes/').'/utils.php');
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
$idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
$siren=substr($siret,0,9);
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();
}
?>
<style>
#center { background: #ffffff; width:580px; padding:5px; }
#center h1 { margin:5px; padding:5px; background: #606060; color:#ffffff; font: 600 1.4em arial, verdana, sans-serif; }
#center h2 { margin:5px; padding:5px; background: #00008c; color:#ffffff; font: bold 1.2em arial, verdana, sans-serif; }
.infoTitle {clear:both; float:left; width:150px; margin-left:50px; padding:0 10px 0 0;}
.infoData {float:left; width:320px; margin:2px 0;}
form em { color:#FF0000;}
fieldset {border:0; margin:0; padding:0;}
fieldset legend{}
.fieldgrp{clear:both; width:100%; margin-bottom:.5em; overflow:hidden;}
.fieldgrp:after{content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; }
label{font-weight:bold; margin-left:50px; width:150px; clear:both; padding:0 10px 0 0;line-height:22px;_padding-top:3px; float:left; display:block; color:#333; font-size:108%;}
label span{font-weight:normal;}
.fieldgrp label abbr{color:#4B911C; font-size:120%; vertical-align:middle;}
.field {width:320px; float:left; font-size:95%;}
.field .longfield{width:215px;}
.field .longfield-select{width:220px;}
.field .smallfield{width:95px;}
.field .medfield{width:110px;}
.field input, .field select{ font-size:110%; margin:2px 0; }
div.submit{clear:both; float:left; padding-left:0px; margin-top:1em;}
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:1em;}
div.submit p.required-note span{color:#4B911C;_color:#666;font-size:170%;vertical-align:top;}
</style>
<div id="center">
<h1 class="titre">ENQU&Ecirc;TE COMMERCIALE</h1>
<form>
<h2>Entreprise concernée : </h2>
<div class="infoTitle StyleInfoLib">Num&eacute;ro identifiant Siren</div>
<div class="infoData"><?php print substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3); ?></div>
<div class="infoTitle StyleInfoLib">Num&eacute;ro identifiant Siret</div>
<div class="infoData"><?php print substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3).'&nbsp; <i>'.substr($etab['Siret'],9,5).'</i>' ?></div>
<div class="infoTitle StyleInfoLib">Num&eacute;ro de TVA Intracom.</div>
<div class="infoData"><?php print substr($etab['TvaNumero'],0,2).' '.substr($etab['TvaNumero'],2,2).' '.substr($etab['TvaNumero'],-9); ?></div>
<div class="infoTitle StyleInfoLib">Raison Sociale</div>
<div class="infoData"><?php print $etab['Nom']; ?></div>
<div class="infoTitle StyleInfoLib">Adresse</div>
<div class="infoData"><?php print $etab['Adresse']; ?></div>
<?php
if (trim($etab['Tel'])!=''){
?>
<div class="infoTitle StyleInfoLib">Téléphone</div>
<div class="infoData"><?php print $etab['Tel']; ?></div>
<?php
}else{
?>
<div class="fieldgrp">
<label class="StyleInfoLib">Téléphone <font color="Red">*</font></label>
<div class="field"><input type="text" name="entrep[Tel]"/></div>
</div>
<?php
}
?>
<?php
if (trim($etab['Fax'])!=''){
?>
<div class="infoTitle StyleInfoLib">Fax</div>
<div class="infoData"><?php print $etab['Fax']; ?></div>
<?php
}else{
?>
<div class="fieldgrp">
<label class="StyleInfoLib">Fax</label>
<div class="field"><input type="text" name="entrep[Fax]"/></div>
</div>
<?php
}
?>
<?php
if (trim($etab['Email'])!=''){
?>
<div class="infoTitle StyleInfoLib">E-mail</div>
<div class="infoData"><?php print $etab['Mail']; ?></div>
<?php
}else{
?>
<div class="fieldgrp">
<label class="StyleInfoLib">E-mail</label>
<div class="field"><input type="text" name="entrep[Email]"/></div>
</div>
<?php
}
?>
<div class="fieldgrp">
<label class="StyleInfoLib">Domiciliation bancaire</label>
<div class="field"><input type="text" name="entrep[banque]"/></div>
</div>
<div class="fieldgrp">
<label class="StyleInfoLib">Encours</label>
<div class="field"><input type="text" name="entrep[encours]"/></div>
</div>
<h2>Demandeur : </h2>
<div class="fieldgrp">
<label class="StyleInfoLib">Votre profil <font color="Red">*</font>:</label>
<div class="field">
<select name="demandeur[Profil]">
<option value="Achats">Achats</option>
<option value="Commerce">Commerce</option>
<option value="Recouvrement">Recouvrement</option>
<option value="Contentieux">Contentieux</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label class="StyleInfoLib">Autre profil :</label>
<div class="field"><input type="text" name="demandeur[Profil]" value="" /></div>
</div>
<div class="fieldgrp">
<label class="StyleInfoLib">Identité :</label>
<div class="field"><textarea name="identite"></textarea></div>
</div>
<fieldset>
<legend>Coordonnées : </legend>
<div class="fieldgrp">
<label class="StyleInfoLib">Téléphone <font color="Red">*</font>:</label>
<div class="field"><input type="text" name="demandeur[Tel]" /></div>
</div>
<div class="fieldgrp">
<label class="StyleInfoLib">E-mail <font color="Red">*</font>:</label>
<div class="field"><input type="text" name="demandeur[Email]" /></div>
</div>
<div class="fieldgrp">
<label class="StyleInfoLib">Fax :</label>
<div class="field"><input type="text" name="demandeur[Fax]" /></div>
</div>
</fieldset>
<h2>Enquête : </h2>
<div class="fieldgrp">
<label class="StyleInfoLib">Type d'enquête</label>
<div class="field">
<select name="enquete[type]">
<option value="premier">PREMIER</option>
<option value="gold">GOLD</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label class="StyleInfoLib">Délai</label>
<div class="field">Affichage du délai</div>
</div>
<div class="fieldgrp">
<label class="StyleInfoLib">Précisions sur la demande</label>
<div class="field">
<select name="">
<option>Liste de choix ???</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label class="StyleInfoLib">Observations ou questions spéciales</label>
<div class="field"><textarea name="entrep[observation]"></textarea></div>
</div>
</form>
</div>