33 lines
915 B
PHP
Executable File
33 lines
915 B
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Bonpec.php';
|
|
|
|
class ControleurAjaxinfosbonconsultation extends Controleur {
|
|
private $bonpec;
|
|
|
|
public function __construct() {
|
|
$this->bonpec = new Bonpec();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$codePrestataire = $_SESSION['p_codePrestataire_C'];
|
|
$numeroBon = $this->requete->getParametreFormulaire("numeroBon");
|
|
$codeTypeBon = "CONS";
|
|
|
|
$resultat = $this->bonpec->getetatbon($codePrestataire, $codeTypeBon, $numeroBon);
|
|
|
|
$codeEtatBon = $resultat['0'];
|
|
|
|
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
|
|
{
|
|
$msgErreur = $numeroBon.' : Claim Form '.$resultat['1'].' !';
|
|
}
|
|
else
|
|
{
|
|
$msgErreur = $numeroBon.' : Bon '.$resultat['1'].' !';
|
|
}
|
|
|
|
$this->genererVueAjax(array('numeroBon' => $numeroBon, 'codeEtatBon' => $codeEtatBon, 'msgErreur' => $msgErreur));
|
|
}
|
|
} |