Пример #1
0
                        header("Location: demande.php");
                    }
                }
            }
        }
    } else {
        if ($submissionTarget == 'changeInfos') {
            header("Location: register.php");
        } else {
            $demande->getDataGromDB($matricule);
        }
    }
    require_once "header.php";
    // STATUS
    //////////////////////////
    print createStatusForm($demande->getStatus());
    if (!util::isWebsiteOpen()) {
        print "<h3>LES DEMANDES SONT PRESENTEMMENT FERMES - Vous serez avisé par courriel lorsque la période de demande ouvrira. Bonne journée.<h3>";
    }
    // INFORMATIONS PERSONELLES
    //////////////////////////
    $userData = $demande->getUserData();
    print '<form method="post" action="register.php?" name="" enctype="multipart/form-data">
			<input type="hidden" name="submissionTarget" value="changeInfos"/>';
    print '<fieldset >
			<legend> <h3>Informations personnelles</h3> </legend>
			Assurez que vos informations personnelles sont exactes et valides avant de faire votre demande. 
			<div style="display:block;margin-top:10px" >';
    print createInfoField(userData::LAST_NAME_TAG, $userData->getLastName() . ", " . $userData->getFirstName());
    print createInfoField(userData::EMAIL_TAG, $userData->getEmail());
    print createInfoField(userData::ADDRESS_TAG, util::UTF8toISO8859($userData->getAddress()) . ", " . $userData->getCity() . ", " . $userData->getZipCode());
Пример #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);
}
Пример #3
0
require_once 'class.demande.php';
define('licenseTabName', 'licenseTab');
define('residentialProofTabName', 'residentialProofTab');
define('car1TabName', 'car1Tab');
define('car2TabName', 'car2Tab');
$auth = authentification::instance();
$matricules = util::getParam($_POST, 'matricules');
$section = util::getParam($_GET, 'section');
if ($auth->estIdentifie() && isset($matricules) && isset($section)) {
    $matricules = json_decode($matricules);
    $demandCount = count($matricules);
    $demande = null;
    if ($demandCount == 1) {
        $demande = new demande($matricules[0]);
        $demande->updateDataFromDB();
        $options = $demande->getStatus()->getStatusSelectorOptions();
    } else {
        if ($demandCount == 0) {
            exit(0);
        }
    }
    if ($section == 'status') {
        if ($demandCount > 1) {
            generateStatusSectionContentMultiDemands($demandCount);
        } else {
            generateStatusSectionContent($demande);
        }
    } else {
        if ($section == 'proof') {
            generateProofSectionContent($demande);
        }
Пример #4
0
    session_destroy();
    header("Location: auth.php");
    exit;
}
if (!$objAuth->estIdentifie()) {
    header("Location: auth.php");
    exit;
}
$ids = array();
$ids = $_POST['id'];
$objDemande = new demande();
foreach ($ids as $id) {
    $changementStatus = false;
    $objDemande->ouvrir($id);
    $objDemande->setStatus(getParam('form_status'));
    if (getParam('form_status') != $objDemande->getStatus()) {
        $changementStatus = true;
    }
    if (!$objDemande->setStatus(getParam('form_status'))) {
        $changementStatus = false;
    }
    if ($objDemande->sauvegarde()) {
        $statutEnMot = printLecture('statusLong', $objDemande->getStatus());
        $email = file_get_contents('emailStatut.txt');
        $email = preg_replace("/@@PRENOM@@/", $objDemande->getPrenom(), $email);
        $email = preg_replace("/@@NOM@@/", $objDemande->getNom(), $email);
        $email = preg_replace("/@@ID@@/", $objDemande->getID(), $email);
        $email = preg_replace("/@@STATUT@@/", $statutEnMot, $email);
        $headers = 'From: Stationnement AEP <*****@*****.**>' . "\r\n" . 'X-Mailer: pHP/' . phpversion();
        if (config::SendEmail) {
            mail($objDemande->getEmail(), "Demande de stationnement (" . $objDemande->getId() . ") : changement de statut", $email, $headers);
Пример #5
0
$auth = authentification::instance();
$matricule = util::getParam($_GET, 'matricule');
$changeStatus = util::getParam($_GET, 'changeStatus');
if (!$auth->isUserAdmin() || empty($matricule)) {
    require_once "header.php";
    print util::cleanUTF8("Problème d'identification ou de matricule");
    exit(0);
}
$demande = new demande($matricule);
$user = new userData($matricule);
$db = database::instance();
if ($changeStatus == "1") {
    $printedStatus = demandStatus::PRINTED_STATUS;
    $result = $db->requete("SELECT description FROM st_status WHERE st_status.statusId={$printedStatus}");
    $resultArray = mysql_fetch_array($result);
    $demande->getStatus()->setToPrinted(util::cleanUTF8($resultArray[demandStatus::STATUS_DESC_DB_FIELD]));
    print '<body>';
} else {
    print '<body onload="javascript:window.print()">';
}
?>
<img src="AEP.gif"/>
<h2>Demande de stationnement</h2>
<p>
<fieldset>
<legend><h3>Informations personnelles</h3></legend>
<div style="display:block;margin-top:10px">
    <table>
    <?php 
printTableRow("Matricule", $user->getMatricule());
printTableRow("Nom", $user->getLastName());
Пример #6
0
<?php

error_reporting(E_ALL);
require_once "class.demande.php";
require_once "class.log.php";
$demande = new demande();
readfile('header.php');
if (@isset($_POST['soumission']) && $_POST['soumission'] == '1') {
    if ($_POST['id'] < 1 || !$demande->ouvrir($_POST['id'])) {
        print "<font color=\"#ff0000\"><b>Demande introuvable!</b></font>\n<br>";
    } else {
        print "Statut de la demande numéro <b>" . $_POST['id'] . "</b> : " . getStatusLecture($demande->getStatus()) . '<br>';
    }
}
?>
<br>
Veuillez indiquer le numéro de votre demande pour vérifier son statut.  Si vous ne connaissez pas le numéro de votre demande, veuillez en avisez <a href="mailto:stationnement@aep.polymtl.ca">stationnement@aep.polymtl.ca</a>.
<br><br>
<form method="POST">
<input type="text" name="id"><br>
<input type="submit" value="Consulter le statut">
<input type="hidden" name="soumission" value="1">
</form>
<?php 
readfile('footer.html');
function getStatusLecture($valeur)
{
    if ($valeur == DEMANDE_STATUS_ATTENTE) {
        return "Demande reçue, en attente...  Pièces justificatives <font color=\"#ff0000\"><b>NON-REÇUES</b></font>.";
    }
    if ($valeur == DEMANDE_STATUS_REFUSE) {