From 2f3da7731a3a12d9c335ccbb4e9aab081b0d7a05 Mon Sep 17 00:00:00 2001 From: gnieark Date: Fri, 27 Nov 2015 18:59:04 +0100 Subject: [PATCH] p --- html/index.php | 36 +++++++++++++++++++++++++++++++++--- lang/en.php | 3 ++- lang/fr.php | 3 ++- src/functions.php | 8 -------- 4 files changed, 37 insertions(+), 13 deletions(-) diff --git a/html/index.php b/html/index.php index 242fece..af46480 100644 --- a/html/index.php +++ b/html/index.php @@ -18,9 +18,28 @@ require_once("../src/functions.php"); $arenas=get_arenas_list(); $lang=get_language_array(); + + +if(isset($_GET['arena'])){ + //check if arena is list + $currentArena = false; + foreach($arenas as $arena){ + if($arena['id'] == $GET['arena']){ + $currentArena = $GET['arena']; + break; + } + } + if(!$currentArena){ + error("Wrong parameter"); + die; + } +}else{ + $currentArena = ""; +} + + //form submitting -if (isset($_POST['xd_check'])) -{ +if (isset($_POST['xd_check'])){ //vérifier le numero de formulaire if (($_SESSION['xd_check']!=$_POST['xd_check']) AND ($_POST['xd_check'] !="")){ erreur ('Something wrong has appen'); @@ -51,7 +70,18 @@ if (isset($_POST['xd_check']))
- + +