doc
This commit is contained in:
parent
f9af1b5fec
commit
16889fb2e4
|
@ -102,6 +102,25 @@ if($currentArena == ""){
|
|||
</header>
|
||||
<section>
|
||||
<?php
|
||||
if(isset($_GET['doc'])){
|
||||
//on affiche une page de doc.
|
||||
$pageExists=false;
|
||||
foreach($arenas as $arena){
|
||||
if($arena['id'] == $_GET['doc']){
|
||||
if(file_exists("../src/arenas/".$arena['id']."/doc-".$lang['lang'].".html")){
|
||||
$pageExists=true;
|
||||
echo file_get_contents("../src/arenas/".$arena['id']."/doc-".$lang['lang'].".html");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!$pageExists){
|
||||
error(404,"doc is missing");
|
||||
die;
|
||||
}
|
||||
|
||||
}else{
|
||||
//on affiche une arene ou page d'accueil
|
||||
switch($currentArena){
|
||||
case "":
|
||||
include ("../src/home.php");
|
||||
|
@ -122,6 +141,9 @@ if($currentArena == ""){
|
|||
include ("../src/arenas/".$currentArena."/public.php");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</section>
|
||||
<footer>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
$lang=array(
|
||||
'lang' => 'en',
|
||||
'SITE_NAME' => 'bots\'arena',
|
||||
'SITE_DESCRIPTION' => 'blah blah blah but english',
|
||||
'HOME' => 'Home page',
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
$lang=array(
|
||||
'lang' => 'fr',
|
||||
'SITE_NAME' => 'Arène à bots',
|
||||
'SITE_DESCRIPTION' =>
|
||||
'<p>Bienvenue sur cette arène à bots.<br/>
|
||||
|
|
0
src/about.html
Normal file
0
src/about.html
Normal file
0
src/arenas/tictactoe/doc-en.html
Normal file
0
src/arenas/tictactoe/doc-en.html
Normal file
1
src/arenas/tictactoe/doc-fr.html
Normal file
1
src/arenas/tictactoe/doc-fr.html
Normal file
|
@ -0,0 +1 @@
|
|||
<h1>Documentation du TicTacToe</h1>
|
0
src/arenas/tictactoe/doc.html
Normal file
0
src/arenas/tictactoe/doc.html
Normal file
0
src/legals.html
Normal file
0
src/legals.html
Normal file
Loading…
Reference in New Issue
Block a user