<?php

error_reporting(E_ALL);
require_once 'class.authentification.php';
require_once 'class.database.php';
require_once 'class.util.php';
$statusId = util::getParam($_POST, 'statusId');
$db = database::instance();
$result = $db->requete("SELECT description FROM st_status WHERE st_status.statusId={$statusId}");
$resultArray = mysql_fetch_array($result);
print util::cleanUTF8($resultArray['description']);
示例#2
0
if (!isset($status) || !isset($matricules)) {
    $response->statusChangeIndicatorImagePath = $errorIconPath;
    $response->statusChangeMessage = "Argument manquant";
    $response->hasError = true;
    print json_encode($response);
    return;
}
$response->selectedDemands = json_decode($matricules);
try {
    //$matricules = json_decode($matricules);
    $database = database::instance();
    $database->beginTransaction();
    $matricules = json_decode($matricules);
    foreach ($matricules as $matricule) {
        $demand = new demande($matricule);
        $sendSuccesful = $demand->getStatus()->changeStatusTo($status, $details, $sendMail, $includeDetails);
        if (!$sendSuccesful) {
            throw new Exception("Erreur d'envoi du message");
        }
        $demand->refreshStatus();
        $response->newStatus = util::cleanUTF8($demand->getStatus()->getName());
    }
    $database->commitTransaction();
    print json_encode($response);
} catch (Exception $e) {
    $response->statusChangeIndicatorImagePath = $errorIconPath;
    $response->statusChangeMessage = $e->getMessage();
    $response->hasError = true;
    $database->abortTransaction();
    print json_encode($response);
}
function getCarHtmlContent(car $car)
{
    $carIndex = $car->getIndex();
    return "<span id='demandVerificationInfoContainer'>\t\n\t\t\t\t\t<label class='infoFieldTitleWithBar' >" . util::cleanUTF8('Modèle') . "</label>\n\t\t\t\t\t<label id='car" . $carIndex . "Model' class='infoFieldValue' style='font-size:18px'>" . $car->getModel() . "</label>\n\t\t\t\t\n\t\t\t\t\t<label class='infoFieldTitleWithBar' >Couleur</label>\n\t\t\t\t\t<label id='car" . $carIndex . "Color' class='infoFieldValue' style='font-size:18px'>" . $car->getColor() . "</label> \n\t\t\t\t\n\t\t\t\t\t<label class='infoFieldTitleWithBar' >" . util::cleanUTF8('Année') . "</label>\n\t\t\t\t\t<label id='car" . $carIndex . "Year' class='infoFieldValue' style='font-size:18px'>" . $car->getYear() . "</label> \n\t\t\t\t\n\t\t\t\t\t<label class='infoFieldTitleWithBar' >" . util::cleanUTF8('Année') . "</label>\n\t\t\t\t\t<label id='car" . $carIndex . "License' class='infoFieldValue' style='font-size:18px'>" . $car->getLicense() . "</label>\n\t\t\t\t</span>";
}
示例#4
0
 public function saveToServer($currentFileUrl)
 {
     if (!$this->isValid) {
         return false;
     }
     // No modif: no need to change file on server
     if (!$this->isModified) {
         return false;
     }
     //Delete previous file (if any)
     $currentFileUrl = realpath($currentFileUrl);
     if (is_readable($currentFileUrl)) {
         unlink($currentFileUrl);
     }
     move_uploaded_file($_FILES[$this->input_name]["tmp_name"], util::cleanUTF8($this->output_location));
     return true;
 }
 public function getCity()
 {
     return util::cleanUTF8($this->city);
 }
示例#6
0
printTableRow("Date de la demande", date("d/m/Y", strtotime($demande->getModificationDate())));
printTableRow("Status", util::cleanUTF8($demande->getStatus()->getName()));
printTableRow("Paiement", util::cleanUTF8($demande->getPaymentMethodString()));
printTableRow("Note", util::cleanUTF8($demande->getDetails()));
?>
    </table>
</div>
</fieldset>
<fieldset>
<legend><h3>Voiture 1</h3></legend>
<div style="display:block;margin-top:10px">
    <table>
    <?php 
$car = $demande->getFirstCar();
printTableRow("Marque", util::cleanUTF8($car->getModel()));
printTableRow("Couleur", util::cleanUTF8($car->getColor()));
printTableRow("Annee", $car->getYear());
printTableRow("Plaque", $car->getLicense());
?>
    </table>
</div>
</fieldset>
<fieldset>
<legend><h3>Voiture 2 - Optionnelle</h3></legend>
<div style="display:block;margin-top:10px">
    <table>
    <?php 
$car = $demande->getSecondCar();
if ($car->isValid()) {
    print "Pas de seconde voiture";
} else {