static function param($name) { $value = HTTP_RESQUEST::get($name); if (!isset($value)) { $value = HTTP_RESQUEST::post($name); } return $value; }
if (Config::team) { $canSave = $runner1->isValid() && $runner2->isValid(); } else { $canSave = $runner1->isValid(); } if ($canSave) { $dbUtils->connect(); if (HTTP_RESQUEST::exist('dossard')) { if ($dbUtils->isDossardValid(HTTP_RESQUEST::post('dossard'))) { $team = new Team($runner1, $runner2, HTTP_RESQUEST::post('dossard')); $team->persist($dbUtils); $dbUtils->subscribeOld(HTTP_RESQUEST::post('dossard'), HTTP_RESQUEST::post('distance')); $dbUtils->close(); $lastNewDossard = HTTP_RESQUEST::post('dossard'); } else { $erroMsg = "LE DOSSARD " . HTTP_RESQUEST::post('dossard') . " EST DEJA INSCRIT SUR CETE COURSE"; } } else { $erroMsg = "VEUILLEZ ENTRER UN NUMERO DE DOSSARD VALIDE SVP"; } } } ?> <fieldset> <LEGEND align="left" class="main"> Inscriptions <?php if (!Config::team) { ?> <strong> - Dernier dossard nouvellement inscrit: <span <?php if ($lastNewDossard != '0') { ?>
$obj_utils = new DbUtils(); $tools = new Tool($dbUtils); $obj_utils->connect(); if (HTTP_RESQUEST::exist("actionType") && HTTP_RESQUEST::post("actionType") == 'runner') { $newDossard = HTTP_RESQUEST::post("newDossard"); $oldDossard = HTTP_RESQUEST::post("oldDossard"); $teamId = HTTP_RESQUEST::post("teamId"); $obj_utils->updateDossard($oldDossard, $newDossard, $teamId); $runner1Id = HTTP_RESQUEST::post("runner1Id"); $runner2Id = HTTP_RESQUEST::post("runner2Id"); $nom1 = HTTP_RESQUEST::post("nom1"); $prenom1 = HTTP_RESQUEST::post("prenom1"); $nom2 = HTTP_RESQUEST::post("nom2"); $prenom2 = HTTP_RESQUEST::post("prenom2"); $sexe1 = HTTP_RESQUEST::post("sexe1"); $sexe2 = HTTP_RESQUEST::post("sexe2"); $obj_utils->updateRunner($nom1, $prenom1, $runner1Id, $sexe1); $obj_utils->updateRunner($nom2, $prenom2, $runner2Id, $sexe2); } $tabRunners = $obj_utils->getAllRaceTeams(); if ($tabRunners != 0) { ?> <table class="principale"> <tr><th colspan="5"><h2>Liste des courreurs du challenge</h2></th></tr> <tr> <th>Equipier 1</th> <th>Equipier 2</th> <th>Dossard</th> <th></th> </tr>
if (HTTP_RESQUEST::exist("actionType") && HTTP_RESQUEST::post("actionType") == 'changeResults') { $newHour = HTTP_RESQUEST::post("newHour"); $newMin = HTTP_RESQUEST::post("newMin"); $newSec = HTTP_RESQUEST::post("newSec"); if (is_numeric($newHour) && is_numeric($newMin) && is_numeric($newSec)) { $resultId = HTTP_RESQUEST::post("resultId"); $course = HTTP_RESQUEST::post("course"); $obj_utils->updateResultTime($resultId, $course, $newHour, $newMin, $newSec); } else { ?> <script>alert("veuillez entrer une valeur numérique pour les champs ");</script> <?php } } else { if (HTTP_RESQUEST::exist("actionType") && HTTP_RESQUEST::post("actionType") == 'changeCourse') { $course = HTTP_RESQUEST::post("changeCourse"); } } ?> <form action="./index.php?page=correction/correction_results.php" method="post" id="changeCourseForm"> <select name="changeCourse" onchange="document.getElementById('changeCourseForm').submit();"> <?php foreach (Config::$courses as $currentCourse) { ?> <option value="<?php echo $currentCourse; ?> " <?php echo $course == $currentCourse ? "selected='selected'" : ""; ?> >