From 54f623957172403f4e0ca14c6fec7110890cc6a1 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Fri, 27 Nov 2015 20:29:00 +0100 Subject: [PATCH] arenas paths --- html/index.php | 23 +++++++++++++++++------ src/arenas/Battleship/public.php | 1 + src/arenas/tictactoe/public.php | 1 + 3 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 src/arenas/Battleship/public.php create mode 100644 src/arenas/tictactoe/public.php diff --git a/html/index.php b/html/index.php index af46480..18acb36 100644 --- a/html/index.php +++ b/html/index.php @@ -46,10 +46,10 @@ if (isset($_POST['xd_check'])){ die; } //call the good act.php - if((isset($arenas['current'])) && (file_exists("src/arenas/act.php"))){ - require_once("src/arenas/act.php"); + if($currentArena <> "") && (file_exists("../src/arenas/".$currentArena."/act.php"))){ + require_once("../src/arenas/".$currentArena."/act.php"); }else{ - require_once("src/default/act.php"); + require_once("../src/arenas/".$currentArena."/act.php"); } } @@ -83,13 +83,24 @@ if (isset($_POST['xd_check'])){ } ?>

+ Accueil"; + break; + default: + include ("../src/arenas/".$currentArena."/public.php"); + break; + } + ?>
diff --git a/src/arenas/Battleship/public.php b/src/arenas/Battleship/public.php new file mode 100644 index 0000000..61aa218 --- /dev/null +++ b/src/arenas/Battleship/public.php @@ -0,0 +1 @@ +

Battle ship

\ No newline at end of file diff --git a/src/arenas/tictactoe/public.php b/src/arenas/tictactoe/public.php new file mode 100644 index 0000000..020f14a --- /dev/null +++ b/src/arenas/tictactoe/public.php @@ -0,0 +1 @@ +

tic tac toe

\ No newline at end of file