Esempio n. 1
0
 static function param($name)
 {
     $value = HTTP_RESQUEST::get($name);
     if (!isset($value)) {
         $value = HTTP_RESQUEST::post($name);
     }
     return $value;
 }
Esempio n. 2
0
    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') {
        ?>
Esempio n. 3
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>
	
Esempio n. 4
0
<link href="./style.css" rel="stylesheet" type="text/css">
</head>

<body>
<br>
	<table class="principale" width="100%" style="border-style: none;">
		<tr>
			<td><h1><?php 
require_once 'tools/db/DbUtils.php';
require_once 'tools/http/HTTP_REQUEST.php';
if (HTTP_RESQUEST::exist('login') && HTTP_RESQUEST::exist('password') && HTTP_RESQUEST::exist('course')) {
    $login = HTTP_RESQUEST::param('login');
    $password = HTTP_RESQUEST::param('password');
    if ($login == "set" && ($password = "******")) {
        $obj_utils = new DbUtils();
        $obj_utils->connect();
        $obj_utils->setCourse(HTTP_RESQUEST::param('course'));
        $obj_utils->close();
        echo "COURSE: " . HTTP_RESQUEST::param('course');
    }
    ?>
</h1> <?php 
}
?>
			</td>
		</tr>
		
	</table>
</body>
</html>
Esempio n. 5
0
<?php

require_once 'tools/http/HTTP_REQUEST.php';
require_once 'tools/db/DbUtils.php';
require_once 'tools/service/tools.php';
require_once 'tools/db/queries.php';
if (Config::team) {
    include 'pages/header/result_header.php';
}
$obj_utils = new DbUtils();
$obj_utils->connect();
$queryKey = HTTP_RESQUEST::get('query');
$course = HTTP_RESQUEST::get('course');
if ($queryKey == "general") {
    $course = $obj_utils->getCourse();
}
$courseToShow = $course;
if ($queryKey == "challenge") {
    $courseToShow = "ALL CHALLENGE";
}
$tool = new Tool($obj_utils);
$query = getQueryForKey($queryKey, $course);
$tabRequest = $obj_utils->executeQuery($query);
?>
<h1>Resultats <?php 
echo $courseToShow;
?>
</h1>
<?php 
if ($queryKey == "challenge" && $tabRequest != 0) {
    $results = $tool->buildList($tabRequest);
Esempio n. 6
0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<link href="./style.css" rel="stylesheet" type="text/css">
</head>

<body>
	<table class="principale" width="100%" style="border-style: none;">
		<tr>
			<td><h1><?php 
require_once 'tools/db/DbUtils.php';
require_once 'tools/http/HTTP_REQUEST.php';
if (HTTP_RESQUEST::exist('login') && HTTP_RESQUEST::exist('password')) {
    $login = HTTP_RESQUEST::param('login');
    $password = HTTP_RESQUEST::param('password');
    if ($login == "reset" && $password == "database" && Config::team) {
        $obj_utils = new DbUtils();
        $obj_utils->connect();
        $obj_utils->resetDB();
        $obj_utils->close();
        echo "La base de donnée a été réinitialisée";
    } else {
        if ($login == "reset" && ($password == "database_all" || !Config::team && $password == "database")) {
            $obj_utils = new DbUtils();
            $obj_utils->connect();
            $obj_utils->resetDBALL();
            $obj_utils->close();
            echo "La base de donnée a été réinitialisée TOTALEMENT !!!!";
        }
    }
Esempio n. 7
0
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'" : "";
    ?>
>