arenas paths

This commit is contained in:
Gnieark 2015-11-27 20:29:00 +01:00
parent 2f3da7731a
commit 54f6239571
3 changed files with 19 additions and 6 deletions

View File

@ -46,10 +46,10 @@ if (isset($_POST['xd_check'])){
die; die;
} }
//call the good act.php //call the good act.php
if((isset($arenas['current'])) && (file_exists("src/arenas/act.php"))){ if($currentArena <> "") && (file_exists("../src/arenas/".$currentArena."/act.php"))){
require_once("src/arenas/act.php"); require_once("../src/arenas/".$currentArena."/act.php");
}else{ }else{
require_once("src/default/act.php"); require_once("../src/arenas/".$currentArena."/act.php");
} }
} }
@ -83,13 +83,24 @@ if (isset($_POST['xd_check'])){
} }
?> ?>
<h1><?php <h1><?php
if(isset($arenas['current'])){ if($currentArena=="")){
echo $arenas['current']['title'];
}else{
echo $lang['SITE_NAME']; echo $lang['SITE_NAME'];
}else{
echo $arenas['current']['title'];
} ?></h1> } ?></h1>
</header> </header>
<section> <section>
<?php
switch($arena){
case "":
echo "<h2>Accueil</h2>";
break;
default:
include ("../src/arenas/".$currentArena."/public.php");
break;
}
?>
</section> </section>
<footer> <footer>
</footer> </footer>

View File

@ -0,0 +1 @@
<h2>Battle ship</h2>

View File

@ -0,0 +1 @@
<h2> tic tac toe </h2>