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