international: enquete: changements sur les E/S
This commit is contained in:
parent
ff32358c32
commit
03012c531c
@ -636,7 +636,8 @@ function envoieCourriel($ref) {
|
||||
function setEnquete($pays){
|
||||
global $page, $mode, $firephp, $graydon, $authentication;
|
||||
|
||||
$serviceSpeed = strtolower($_REQUEST['InfoEnq']['Servicespeed']);
|
||||
$serviceSpeed = strtolower($_POST['InfoEnq']['Servicespeed']);
|
||||
|
||||
// Obtention du prix du service
|
||||
$prix = Doctrine_Query::create()
|
||||
->select('p.'.$serviceSpeed)
|
||||
@ -646,90 +647,98 @@ function setEnquete($pays){
|
||||
->fetchOne();
|
||||
|
||||
// Sauvegarde des infos dans la base avant le passage de la commande
|
||||
$commandes = new Commandes();
|
||||
//$commandes->reference = '';
|
||||
$commandes->servicespeed = $serviceSpeed;
|
||||
$commandes->prix = $prix->$serviceSpeed;
|
||||
$commandes->orderstate = '';
|
||||
//$commandes->dateordered =
|
||||
//$commandes->datecompleted =
|
||||
//$commandes->datedue =
|
||||
//$commandes->companyproductidentifier = ;
|
||||
//$commandes->sessionid = $sessionID;
|
||||
//$commandes->transactionidentifier = $transactionIdentifier;
|
||||
$commandes->user = $_SESSION['tabInfo']['login'];
|
||||
$commandes->mode = $_SESSION['graydon']['mode'];
|
||||
$commande = new Commandes();
|
||||
$commande->servicespeed = $serviceSpeed;
|
||||
$commande->prix = $prix->$serviceSpeed;
|
||||
$commande->orderstate = '';
|
||||
$commande->companyproductidentifier = $_POST['pidentifier'];
|
||||
$commande->user = $_SESSION['tabInfo']['login'];
|
||||
$commande->mode = $_SESSION['graydon']['mode'];
|
||||
|
||||
$country = Doctrine_Query::create()
|
||||
->from('Country')
|
||||
->where('graydon_country = ?', $pays)
|
||||
->fetchOne();
|
||||
$commandes->Country = $country;
|
||||
$commande->Country = $country;
|
||||
|
||||
$commandes->save();
|
||||
$firephp->log($commandes->toArray(),'dataCommandes');
|
||||
$commandes_id = $commandes->id;
|
||||
$commande->save();
|
||||
$firephp->log($commande->toArray(), 'dataCommande');
|
||||
$commande_id = $commande->id;
|
||||
|
||||
// Enregistrement des détails de la commande
|
||||
$commandesDetail = new CommandesDetail();
|
||||
$commandesDetail->dIdentite = $_REQUEST['InfoUser']['Identite'];
|
||||
$commandesDetail->dTelephone = $_REQUEST['InfoUser']['Tel'];
|
||||
$commandesDetail->dEmail = $_REQUEST['InfoUser']['Email'];
|
||||
$commandesDetail->dFax = $_REQUEST['InfoUser']['Fax'];
|
||||
$commandesDetail->eLanguageCode = 'F';
|
||||
$commandesDetail->eName = $_REQUEST['InfoEnq']['Name'];
|
||||
$commandesDetail->eIdentifiers = $_POST['identifier'];
|
||||
$commandesDetail->eAdresse = $_REQUEST['InfoEnq']['Adresse'];
|
||||
$commandesDetail->eTelephone = $_REQUEST['InfoEnq']['Telephone'];
|
||||
$commandesDetail->ePays = $_REQUEST['InfoEnq']['Pays'];
|
||||
$commandesDetail->eCreditOpinionCurrency = 'EUR';
|
||||
//$commandesDetail->eCreditOpinionPeriod = '';
|
||||
if (isset($_REQUEST['InfoEnq']['Bankers']) == true) {
|
||||
$commandesDetail->eBankers = $_REQUEST['InfoEnq']['Bankers'];
|
||||
$commandeDetail = new CommandesDetail();
|
||||
$commandeDetail->dIdentite = $_POST['InfoUser']['Identite'];
|
||||
$commandeDetail->dTelephone = $_POST['InfoUser']['Tel'];
|
||||
$commandeDetail->dEmail = $_POST['InfoUser']['Email'];
|
||||
$commandeDetail->dFax = $_POST['InfoUser']['Fax'];
|
||||
$commandeDetail->eLanguageCode = 'F';
|
||||
$commandeDetail->eName = $_POST['InfoEnq']['Name'];
|
||||
$commandeDetail->eIdentifiers = $_POST['identifier'];
|
||||
$commandeDetail->eAdresse = $_POST['InfoEnq']['Adresse'];
|
||||
$commandeDetail->eTelephone = $_POST['InfoEnq']['Telephone'];
|
||||
$commandeDetail->ePays = $_POST['InfoEnq']['Pays'];
|
||||
$commandeDetail->eAttentionOf = $_POST['InfoEnq']['AttentionOf'];
|
||||
$commandeDetail->eSpecialRemarks = $_POST['InfoEnq']['SpecialRemarks'];
|
||||
$commandeDetail->commandes_id = $commande_id;
|
||||
$commandeDetail->eCreditOpinionCurrency = 'EUR';
|
||||
if (isset($_POST['InfoEnq']['Bankers']) == true) {
|
||||
$commandeDetail->eBankers = $_POST['InfoEnq']['Bankers'];
|
||||
}
|
||||
$commandesDetail->eAttentionOf = $_REQUEST['InfoEnq']['AttentionOf'];
|
||||
$commandesDetail->eSpecialRemarks = $_REQUEST['InfoEnq']['SpecialRemarks'];
|
||||
$commandesDetail->commandes_id = $commandes_id;
|
||||
$commandesDetail->save();
|
||||
$commandeDetail->save();
|
||||
|
||||
// Passage de la commande chez graydon
|
||||
$request = new StdClass();
|
||||
$request->Authentication_Parameters = $authentication;
|
||||
if (!isset($_REQUEST['pidentifier'])) {
|
||||
if (!isset($_POST['pidentifier'])) {
|
||||
$request->OrderCreatorEmail = EMAIL_SUPPORTDEV;
|
||||
$request->Order->LanguageCode = 'F';
|
||||
$request->Order->Name = $_REQUEST['InfoEnq']['Name'];
|
||||
$request->Order->ServiceSpeed = $_REQUEST['InfoEnq']['Servicespeed'];
|
||||
$request->Order->Country = $_REQUEST['InfoEnq']['Pays'];
|
||||
$request->Order->Name = $_POST['InfoEnq']['Name'];
|
||||
$request->Order->ServiceSpeed = $_POST['InfoEnq']['Servicespeed'];
|
||||
$request->Order->Country = $_POST['InfoEnq']['Pays'];
|
||||
$request->Order->Address->EntireAddress =
|
||||
$_REQUEST['InfoEnq']['Adresse'];
|
||||
$_POST['InfoEnq']['Adresse'];
|
||||
|
||||
if (count($_REQUEST['InfoEnq']['Identifiers']) > 1) {
|
||||
if (count($_POST['InfoEnq']['Identifiers']) > 1) {
|
||||
$count = 0;
|
||||
foreach ($_REQUEST['InfoEnq']['Identifiers'] as $key => $value) {
|
||||
foreach ($_POST['InfoEnq']['Identifiers'] as $key => $value) {
|
||||
$request->Order->CompanyIdentifier[$count]->Identifier = $value;
|
||||
$request->Order->CompanyIdentifier[$count]->Type = $key;
|
||||
$count++;
|
||||
}
|
||||
} else {
|
||||
foreach ($_REQUEST['InfoEnq']['Identifiers'] as $key => $value){
|
||||
foreach ($_POST['InfoEnq']['Identifiers'] as $key => $value){
|
||||
$request->Order->CompanyIdentifier->Identifier = $value;
|
||||
$request->Order->CompanyIdentifier->Type = $key;
|
||||
}
|
||||
}
|
||||
|
||||
$request->Order->AttentionOf = $_REQUEST['InfoEnq']['AttentionOf'];
|
||||
$request->Order->Bankers = $_REQUEST['InfoEnq']['Bankers'];
|
||||
$request->Order->SpecialRemarks = $_REQUEST['InfoEnq']['SpecialRemarks'];
|
||||
$request->Order->Telephone = $_REQUEST['InfoEnq']['Telephone'];
|
||||
$request->Order->AttentionOf = $_POST['InfoEnq']['AttentionOf'];
|
||||
$request->Order->Bankers = $_POST['InfoEnq']['Bankers'];
|
||||
$request->Order->SpecialRemarks = $_POST['InfoEnq']['SpecialRemarks'];
|
||||
$request->Order->Telephone = $_POST['InfoEnq']['Telephone'];
|
||||
} else {
|
||||
$request->OrderCreatorEmail = 'mricois@scores-decisions.com';
|
||||
$request->CompanyProductIdentifier = $_REQUEST['pidentifier'];
|
||||
$request->CompanyProductIdentifier = $_POST['pidentifier'];
|
||||
$request->PartnerData = '';
|
||||
}
|
||||
$request->PartnerData = '';
|
||||
try {
|
||||
$placeOrderResult = $graydon->placeOrder($request);
|
||||
} catch (SoapFault $fault) {
|
||||
$code = $fault->detail->GraydonCompanyData_Fault->FaultReturnCode;
|
||||
$text = $fault->detail->GraydonCompanyData_Fault->FaultMessage;
|
||||
$firephp->log($text, 'texterror');
|
||||
require_once 'graydon/graydon_error.php';
|
||||
$error = graydon_error($code, $text);
|
||||
if ($error == false) {
|
||||
print graydon_processSoapFault($graydon, $e, $_SESSION['tabInfo']);
|
||||
} else {
|
||||
print graydon_messageSoapFault();
|
||||
}
|
||||
// Envoi d'un mail pour le passage de la commande en erreur
|
||||
envoieCourriel(", identifiant : ".$commande_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Enregistrement de l'action dans les logs
|
||||
$transactionIdentifier =
|
||||
@ -748,58 +757,37 @@ function setEnquete($pays){
|
||||
$log->mode = $mode;
|
||||
$log->save();
|
||||
|
||||
// Enregistrement des commandes dans la bdd
|
||||
$commandes = new Commandes();
|
||||
$commandes->assignIdentifier($commandes_id);
|
||||
$commandes->reference = $placeOrderResult->OrderStatus->OrderReference;
|
||||
$commandes->servicespeed =
|
||||
// Enregistrement de la commande dans la bdd
|
||||
$commande = new Commandes();
|
||||
$commande->assignIdentifier($commande_id);
|
||||
$commande->reference = $placeOrderResult->OrderStatus->OrderReference;
|
||||
$commande->servicespeed =
|
||||
$placeOrderResult->OrderStatus->Order->ServiceSpeed;
|
||||
$commandes->prix = $prix->$serviceSpeed;
|
||||
$commandes->orderstate = $placeOrderResult->OrderStatus->OrderState;
|
||||
$commandes->dateordered = $placeOrderResult->OrderStatus->DateOrdered;
|
||||
$commande->prix = $prix->$serviceSpeed;
|
||||
$commande->orderstate = $placeOrderResult->OrderStatus->OrderState;
|
||||
$commande->dateordered = $placeOrderResult->OrderStatus->DateOrdered;
|
||||
if (isset($placeOrderResult->OrderStatus->DateCompleted) == true) {
|
||||
$commandes->datecompleted =
|
||||
$commande->datecompleted =
|
||||
$placeOrderResult->OrderStatus->DateCompleted;
|
||||
}
|
||||
if (isset($placeOrderResult->OrderStatus->DateDue) == true) {
|
||||
$commandes->datedue = $placeOrderResult->OrderStatus->DateDue;
|
||||
$commande->datedue = $placeOrderResult->OrderStatus->DateDue;
|
||||
}
|
||||
$commandes->companyproductidentifier = $_POST['pidentifier'];
|
||||
$commandes->sessionid = $sessionID;
|
||||
$commandes->transactionidentifier = $transactionIdentifier;
|
||||
$commandes->user = $_SESSION['tabInfo']['login'];
|
||||
$commandes->mode = $_SESSION['graydon']['mode'];
|
||||
$commandes->Country = $country;
|
||||
$commandes->save();
|
||||
$firephp->log($commandes->toArray(), 'dataCommandes');
|
||||
$commandes_id = $commandes->id;
|
||||
$commande->sessionid = $sessionID;
|
||||
$commande->transactionidentifier = $transactionIdentifier;
|
||||
$commande->user = $_SESSION['tabInfo']['login'];
|
||||
$commande->mode = $_SESSION['graydon']['mode'];
|
||||
$commande->Country = $country;
|
||||
$commande->save();
|
||||
$firephp->log($commande->toArray(), 'dataCommande');
|
||||
$commande_id = $commande->id;
|
||||
|
||||
// Enregistrement des détails de la commande
|
||||
// Déjà fait avant le passage de la commande chez graydon
|
||||
|
||||
// Envoi d'un mail pour le passage de la commande
|
||||
envoieCourriel(", ref : ".$commandes->reference);
|
||||
$commandeOk = true;
|
||||
} catch (SoapFault $fault) {
|
||||
$code = $fault->detail->GraydonCompanyData_Fault->FaultReturnCode;
|
||||
$text = $fault->detail->GraydonCompanyData_Fault->FaultMessage;
|
||||
$firephp->log($text, 'texterror');
|
||||
require_once 'graydon/graydon_error.php';
|
||||
$error = graydon_error($code, $text);
|
||||
if ($error == false) {
|
||||
print graydon_processSoapFault($graydon, $e, $_SESSION['tabInfo']);
|
||||
} else {
|
||||
print graydon_messageSoapFault();
|
||||
}
|
||||
// Envoi d'un mail pour le passage de la commande en erreur
|
||||
envoieCourriel(", identifiant : ".$commandes_id);
|
||||
$commandeOk = false;
|
||||
}
|
||||
envoieCourriel(", ref : ".$commande->reference);
|
||||
|
||||
if ($commandeOk === false) {
|
||||
return $commandes_id;
|
||||
} else {
|
||||
return $commandeOk;
|
||||
}
|
||||
return $commande_id;
|
||||
}
|
||||
?>
|
||||
|
@ -22,38 +22,38 @@ $country = Doctrine_Query::create()
|
||||
->fetchOne();
|
||||
$pays = $country->graydon_country;
|
||||
|
||||
if (isset($_REQUEST['submit'])) {
|
||||
if (isset($_POST['submit'])) {
|
||||
$firephp->log('Soumission formulaire');
|
||||
// Vérification des informations
|
||||
$formError = false;
|
||||
$fields = array();
|
||||
// Info utilisateur obligatoire :
|
||||
if ($_REQUEST['InfoUser']['Identite'] == '') {
|
||||
if ($_POST['InfoUser']['Identite'] == '') {
|
||||
$fields[] = 'Votre Identite';
|
||||
$formError = true;
|
||||
}
|
||||
if ($_REQUEST['InfoUser']['Tel'] == '') {
|
||||
if ($_POST['InfoUser']['Tel'] == '') {
|
||||
$fields[] = 'Votre Téléphone';
|
||||
$formError = true;}
|
||||
if ($_REQUEST['InfoUser']['Email'] == '') {
|
||||
if ($_POST['InfoUser']['Email'] == '') {
|
||||
$fields[] = 'Votre Email';
|
||||
$formError = true;
|
||||
}
|
||||
|
||||
// Info entreprise obligatoire :
|
||||
if (!isset($_REQUEST['pidentifier'])) {
|
||||
if ($_REQUEST['InfoEnq']['Name'] == '') {
|
||||
if (!isset($_POST['pidentifier'])) {
|
||||
if ($_POST['InfoEnq']['Name'] == '') {
|
||||
$fields[] = 'Raison Sociale';
|
||||
$formError = true;}
|
||||
if ($_REQUEST['InfoEnq']['Telephone'] == '') {
|
||||
$fields[] = 'Téléphone';
|
||||
$formError = true;}
|
||||
if ($_REQUEST['InfoEnq']['Adresse'] == '') {
|
||||
// if ($_POST['InfoEnq']['Telephone'] == '') {
|
||||
// $fields[] = 'Téléphone';
|
||||
// $formError = true;}
|
||||
if ($_POST['InfoEnq']['Adresse'] == '') {
|
||||
$fields[] = 'Adresse';
|
||||
$formError = true;
|
||||
}
|
||||
}
|
||||
if ($_REQUEST['InfoEnq']['Servicespeed'] == '') {
|
||||
if ($_POST['InfoEnq']['Servicespeed'] == '') {
|
||||
$fields[] = 'Type d\'enquête';
|
||||
$formError = true;
|
||||
}
|
||||
@ -64,12 +64,12 @@ if (isset($_REQUEST['submit'])) {
|
||||
$message .= join(', ', $fields);
|
||||
$message .= '</font>';
|
||||
} else {
|
||||
$commandeOk = setEnquete($pays);
|
||||
$commande_id = setEnquete($pays);
|
||||
require_once 'mail/mail.php';
|
||||
sendMail("DEBUG - Commandes de rapport graydon",
|
||||
"Commandes\n".
|
||||
"Utilisateur :\n".print_r($_REQUEST['InfoUser'], true)."\n".
|
||||
"Enquêtes : \n".print_r($_REQUEST['InfoEnq' ], true)."\n",
|
||||
"Utilisateur :\n".print_r($_POST['InfoUser'], true)."\n".
|
||||
"Enquêtes : \n".print_r($_POST['InfoEnq' ], true)."\n",
|
||||
// From
|
||||
array('email' => 'contact@scores-decisions.com',
|
||||
'name' => 'Serveur SD-13408', ),
|
||||
@ -123,7 +123,7 @@ div.submit p.required-note span{color:#4B911C;_color:#666;font-size:170%;vertica
|
||||
|
||||
<h1 class="titre">ENQUÊTE INTERNATIONALE</h1>
|
||||
<?php
|
||||
if (isset($commandeOk) == true && $commandeOk == true) {
|
||||
if (isset($commande_id) == true && $commande_id > 0) {
|
||||
?>
|
||||
<div id="message">Commande enregistrée.</div>
|
||||
<?php
|
||||
@ -135,7 +135,7 @@ if (isset($commandeOk) == true && $commandeOk == true) {
|
||||
} catch (SoapFault $fault) {
|
||||
}
|
||||
|
||||
if (isset($commandeOk) == true && is_numeric($commandeOk)) {
|
||||
if (isset($commande_id) == true && $commande_id == 0) {
|
||||
$message = '<font color="red">'.
|
||||
'Erreur lors de la soumission de l\'enquête.</font>';
|
||||
}
|
||||
@ -143,7 +143,8 @@ if (isset($commandeOk) == true && $commandeOk == true) {
|
||||
|
||||
<div id="message"><?php print $message; ?></div>
|
||||
|
||||
<form action="./?page=international_enquete" method="POST" enctype="multipart/form-data">
|
||||
<form action="./?page=international_enquete" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
|
||||
<h2>Entreprise concernée : </h2>
|
||||
|
||||
@ -158,47 +159,55 @@ if ($company->Name != '') {
|
||||
$name = $_SESSION['graydon']['name'];
|
||||
}
|
||||
|
||||
if (isset($_GET['pidentifier']) == true) {
|
||||
if (isset($_REQUEST['pidentifier']) == true) {
|
||||
print '<input type="hidden" name="pidentifier" value="'.
|
||||
$_GET['pidentifier'].'" />';
|
||||
$_REQUEST['pidentifier'].'" />';
|
||||
}
|
||||
if (isset($_GET['identifier']) == true) {
|
||||
if (isset($_REQUEST['identifier']) == true) {
|
||||
print '<input type="hidden" name="identifier" value="'.
|
||||
$_GET['identifier'].'" />';
|
||||
$_REQUEST['identifier'].'" />';
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['pidentifier']))
|
||||
{
|
||||
if (isset($_REQUEST['pidentifier']) == true) {
|
||||
?>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Raison Sociale :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Name]" value="<?php if (isset($_REQUEST['InfoEnq']['Name'])){ print $_REQUEST['InfoEnq']['Name'];}else{ print $name;} ?>" readonly="readonly"/></div>
|
||||
<label class="StyleInfoLib">Raison Sociale :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Name]"
|
||||
value="<?php if (isset($_POST['InfoEnq']['Name'])){ print $_POST['InfoEnq']['Name'];}else{ print $name;} ?>"
|
||||
readonly="readonly"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Adresse :</label>
|
||||
<div class="field"><textarea name="InfoEnq[Adresse]" readonly="readonly"><?php print $company->RegisteredAddress->EntireAddress; ?></textarea></div>
|
||||
<label class="StyleInfoLib">Adresse :</label>
|
||||
<div class="field">
|
||||
<textarea name="InfoEnq[Adresse]" readonly="readonly">
|
||||
<?php print $company->RegisteredAddress->EntireAddress; ?>
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Pays :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Pays]" value="<?php print $pays;?>" readonly="readonly"/></div>
|
||||
<label class="StyleInfoLib">Pays :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Pays]" value="<?php print $pays;?>"
|
||||
readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Téléphone</label>
|
||||
<div class="field">
|
||||
<input type="text"
|
||||
name="InfoEnq[Telephone]"
|
||||
<label class="StyleInfoLib">Téléphone</label>
|
||||
<div class="field">
|
||||
<input type="text" name="InfoEnq[Telephone]"
|
||||
<?php
|
||||
if (isset($company->Telephone) == true) {
|
||||
print 'value="'.$company->Telephone.'"';
|
||||
}
|
||||
?>
|
||||
readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@ -209,7 +218,7 @@ else
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Raison Sociale :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Name]" value="<?php if (isset($_REQUEST['InfoEnq']['Name'])){ print $_REQUEST['InfoEnq']['Name'];}else{ print $name;} ?>"/></div>
|
||||
<div class="field"><input type="text" name="InfoEnq[Name]" value="<?php if (isset($_POST['InfoEnq']['Name'])){ print $_POST['InfoEnq']['Name'];}else{ print $name;} ?>"/></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@ -226,9 +235,8 @@ if(is_array($identifiers)){
|
||||
if($identifier->Type != 'Internal'){
|
||||
?>
|
||||
<div class="fieldgrp">
|
||||
<input type="hidden" name="method" value="identifier" />
|
||||
<label><?php print $identifier->Description ?></label>
|
||||
<input type="text" name="InfoEnq[Identifier][<?=$identifier->Type?>]" value="<?php if (isset($_REQUEST['InfoEnq']['Identifier'][$identifier->Type])){ print $_REQUEST['InfoEnq']['Identifier'][$identifier->Type];} ?>" />
|
||||
<input type="text" name="InfoEnq[Identifier][<?=$identifier->Type?>]" value="<?php if (isset($_POST['InfoEnq']['Identifier'][$identifier->Type])){ print $_POST['InfoEnq']['Identifier'][$identifier->Type];} ?>" />
|
||||
</div>
|
||||
<?php
|
||||
$count++;
|
||||
@ -246,7 +254,7 @@ if(is_array($identifiers)){
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Adresse :</label>
|
||||
<div class="field"><textarea name="InfoEnq[Adresse]"><?php if(isset($_REQUEST['InfoEnq']['Adresse'])){print $_REQUEST['InfoEnq']['Adresse'];}?></textarea></div>
|
||||
<div class="field"><textarea name="InfoEnq[Adresse]"><?php if(isset($_POST['InfoEnq']['Adresse'])){print $_POST['InfoEnq']['Adresse'];}?></textarea></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
@ -256,7 +264,7 @@ if(is_array($identifiers)){
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Téléphone</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Telephone]" value="<?php if(isset($_REQUEST['InfoEnq']['Telephone'])){print $_REQUEST['InfoEnq']['Telephone'];}?>"/></div>
|
||||
<div class="field"><input type="text" name="InfoEnq[Telephone]" value="<?php if(isset($_POST['InfoEnq']['Telephone'])){print $_POST['InfoEnq']['Telephone'];}?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
@ -295,17 +303,17 @@ if(is_array($identifiers)){
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Téléphone <font color="Red">*</font>:</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Tel]" value="<?php if(isset($_REQUEST['InfoUser']['Tel'])){print $_REQUEST['InfoUser']['Tel'];}else{ print $user['tel']; }?>" /></div>
|
||||
<div class="field"><input type="text" name="InfoUser[Tel]" value="<?php if(isset($_POST['InfoUser']['Tel'])){print $_POST['InfoUser']['Tel'];}else{ print $user['tel']; }?>" /></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">E-mail <font color="Red">*</font>:</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Email]" value="<?php if(isset($_REQUEST['InfoUser']['Email'])){print $_REQUEST['InfoUser']['Email'];}else{ print $user['email']; }?>"/></div>
|
||||
<div class="field"><input type="text" name="InfoUser[Email]" value="<?php if(isset($_POST['InfoUser']['Email'])){print $_POST['InfoUser']['Email'];}else{ print $user['email']; }?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Fax :</label>
|
||||
<div class="field"><input type="text" name="InfoUser[Fax]" value="<?php if(isset($_REQUEST['InfoUser']['Fax'])){print $_REQUEST['InfoUser']['Fax'];}else{ print $user['fax']; }?>"/></div>
|
||||
<div class="field"><input type="text" name="InfoUser[Fax]" value="<?php if(isset($_POST['InfoUser']['Fax'])){print $_POST['InfoUser']['Fax'];}else{ print $user['fax']; }?>"/></div>
|
||||
</div>
|
||||
|
||||
<h2>Enquête : </h2>
|
||||
@ -338,15 +346,14 @@ if ($countryavailability != false) {
|
||||
$serviceActif = array('Normal', 'Superflash');
|
||||
$serviceNom = array('Normal', 'Rapide');
|
||||
foreach ($availability as $item) {
|
||||
if(in_array($item->ServiceSpeed, $serviceActif) == true) {
|
||||
if (in_array($item->ServiceSpeed, $serviceActif) == true) {
|
||||
$key = array_search($item->ServiceSpeed, $serviceActif);
|
||||
$speed = $_REQUEST['speed'];
|
||||
$firephp->log($speed, 'speed');
|
||||
$firephp->log($item->ServiceSpeed, 'ServiceSpeed');
|
||||
$select = '';
|
||||
if((isset($_REQUEST['InfoEnq']['Servicespeed']) &&
|
||||
$_REQUEST['InfoEnq']['Servicespeed'] == $item->ServiceSpeed)
|
||||
|| ucfirst($speed) == $item->ServiceSpeed) {
|
||||
if ((isset($_POST['InfoEnq']['Servicespeed']) &&
|
||||
$_POST['InfoEnq']['Servicespeed'] == $item->ServiceSpeed) ||
|
||||
(isset($_GET['speed']) == true &&
|
||||
ucfirst($_GET['speed']) == $item->ServiceSpeed)) {
|
||||
$select = 'checked';
|
||||
}
|
||||
?>
|
||||
@ -374,13 +381,13 @@ foreach ($availability as $item) {
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Précisions sur la demande</label>
|
||||
<div class="field">
|
||||
<textarea name="InfoEnq[AttentionOf]"><?php if(isset($_REQUEST['InfoEnq']['AttentionOf']) ){print $_REQUEST['InfoEnq']['AttentionOf'];}?></textarea>
|
||||
<textarea name="InfoEnq[AttentionOf]"><?php if(isset($_POST['InfoEnq']['AttentionOf']) ){print $_POST['InfoEnq']['AttentionOf'];}?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Observations ou questions spéciales</label>
|
||||
<div class="field"><textarea name="InfoEnq[SpecialRemarks]"><?php if(isset($_REQUEST['InfoEnq']['SpecialRemarks']) ){print $_REQUEST['InfoEnq']['SpecialRemarks'];}?></textarea></div>
|
||||
<div class="field"><textarea name="InfoEnq[SpecialRemarks]"><?php if(isset($_POST['InfoEnq']['SpecialRemarks']) ){print $_POST['InfoEnq']['SpecialRemarks'];}?></textarea></div>
|
||||
</div>
|
||||
|
||||
<div class="submit"><p class="submit-button"><input type="submit" name="submit" value="Envoyer" /></p></div>
|
||||
|
@ -16,17 +16,6 @@ $pidentifier = $_GET['pidentifier'];
|
||||
|
||||
print '<div id="center">';
|
||||
|
||||
// Verifier si la commande existe pour cet utilisateur
|
||||
if (Doctrine_Query::create()
|
||||
->from('CommandesDetail d, Commandes c')
|
||||
->where('d.eIdentifiers = ?', $identifier)
|
||||
->andWhere('c.user = ?', $login)
|
||||
->andWhere('d.commandes_id = c.id') == false) {
|
||||
print 'Commande déjà effectuée';
|
||||
print '</div>';
|
||||
exit;
|
||||
}
|
||||
|
||||
// Verifier si on a un rapport
|
||||
$rapports = Doctrine_Query::create()
|
||||
->from('Report')
|
||||
|
Loading…
x
Reference in New Issue
Block a user