doc
This commit is contained in:
parent
f9af1b5fec
commit
16889fb2e4
|
@ -102,26 +102,48 @@ if($currentArena == ""){
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
<?php
|
<?php
|
||||||
switch($currentArena){
|
if(isset($_GET['doc'])){
|
||||||
case "":
|
//on affiche une page de doc.
|
||||||
include ("../src/home.php");
|
$pageExists=false;
|
||||||
break;
|
foreach($arenas as $arena){
|
||||||
default:
|
if($arena['id'] == $_GET['doc']){
|
||||||
//battle history for this arena
|
if(file_exists("../src/arenas/".$arena['id']."/doc-".$lang['lang'].".html")){
|
||||||
$hist=get_battles_history($currentArena);
|
$pageExists=true;
|
||||||
echo '<aside id="history"><h2>Scores</h2>';
|
echo file_get_contents("../src/arenas/".$arena['id']."/doc-".$lang['lang'].".html");
|
||||||
foreach($hist as $sc){
|
break;
|
||||||
echo '<h3>'.$sc['bot1'].' VS '.$sc['bot2'].'</h3>
|
}
|
||||||
<ul>
|
|
||||||
<li>'.$sc['bot1']." ".$lang['VICTORIES'].":".$sc['player1Wins'].'</li>
|
|
||||||
<li>'.$sc['bot2']." ".$lang['VICTORIES'].":".$sc['player2Wins'].'</li>
|
|
||||||
<li>'.$lang['DRAW'].":".$sc['draws'].'</li>
|
|
||||||
</ul>';
|
|
||||||
}
|
}
|
||||||
echo '</aside>';
|
}
|
||||||
include ("../src/arenas/".$currentArena."/public.php");
|
if(!$pageExists){
|
||||||
break;
|
error(404,"doc is missing");
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
//on affiche une arene ou page d'accueil
|
||||||
|
switch($currentArena){
|
||||||
|
case "":
|
||||||
|
include ("../src/home.php");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//battle history for this arena
|
||||||
|
$hist=get_battles_history($currentArena);
|
||||||
|
echo '<aside id="history"><h2>Scores</h2>';
|
||||||
|
foreach($hist as $sc){
|
||||||
|
echo '<h3>'.$sc['bot1'].' VS '.$sc['bot2'].'</h3>
|
||||||
|
<ul>
|
||||||
|
<li>'.$sc['bot1']." ".$lang['VICTORIES'].":".$sc['player1Wins'].'</li>
|
||||||
|
<li>'.$sc['bot2']." ".$lang['VICTORIES'].":".$sc['player2Wins'].'</li>
|
||||||
|
<li>'.$lang['DRAW'].":".$sc['draws'].'</li>
|
||||||
|
</ul>';
|
||||||
|
}
|
||||||
|
echo '</aside>';
|
||||||
|
include ("../src/arenas/".$currentArena."/public.php");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</section>
|
</section>
|
||||||
<footer>
|
<footer>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$lang=array(
|
$lang=array(
|
||||||
|
'lang' => 'en',
|
||||||
'SITE_NAME' => 'bots\'arena',
|
'SITE_NAME' => 'bots\'arena',
|
||||||
'SITE_DESCRIPTION' => 'blah blah blah but english',
|
'SITE_DESCRIPTION' => 'blah blah blah but english',
|
||||||
'HOME' => 'Home page',
|
'HOME' => 'Home page',
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$lang=array(
|
$lang=array(
|
||||||
|
'lang' => 'fr',
|
||||||
'SITE_NAME' => 'Arène à bots',
|
'SITE_NAME' => 'Arène à bots',
|
||||||
'SITE_DESCRIPTION' =>
|
'SITE_DESCRIPTION' =>
|
||||||
'<p>Bienvenue sur cette arène à bots.<br/>
|
'<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