commit
ac30b1a1f2
|
@ -86,7 +86,8 @@ if($currentArena == ""){
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1><?php echo $siteTitle; ?></h1>
|
<h1><?php echo $siteTitle; ?></h1>
|
||||||
<nav id="languages"><a href="-fr">fr</a> <a href="-en">en</a></nav>
|
|
||||||
|
<nav id="languages"><a href="<?php echo $currentArena; ?>-fr">fr</a> <a href="<?php echo $currentArena; ?>-en">en</a></nav>
|
||||||
<nav id="menus"><a href="/"<?php if($currentArena == "") echo ' class="selected"'; ?>><?php echo $lang['HOME']; ?></a>
|
<nav id="menus"><a href="/"<?php if($currentArena == "") echo ' class="selected"'; ?>><?php echo $lang['HOME']; ?></a>
|
||||||
<?php
|
<?php
|
||||||
foreach($arenas as $arena){
|
foreach($arenas as $arena){
|
||||||
|
@ -103,7 +104,7 @@ if($currentArena == ""){
|
||||||
<?php
|
<?php
|
||||||
switch($currentArena){
|
switch($currentArena){
|
||||||
case "":
|
case "":
|
||||||
echo "<h2>Accueil</h2>";
|
include ("../src/home.php");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
include ("../src/arenas/".$currentArena."/public.php");
|
include ("../src/arenas/".$currentArena."/public.php");
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
$lang=array(
|
$lang=array(
|
||||||
'SITE_NAME' => 'Arène à bots',
|
'SITE_NAME' => 'Arène à bots',
|
||||||
'SITE_DESCRIPTION' => 'blah blah blah mais en francais',
|
'SITE_DESCRIPTION' =>
|
||||||
|
'<p>Bienvenue sur cette arène à bots.<br/>
|
||||||
|
Plusieurs jeux sont proposés ici. Vous ne devez pas y jouer, mais dévolopper le "bot" qui jouera en votre nom.
|
||||||
|
Ce site permet de faire s\'affronter les bots des différents développeurs.</p>',
|
||||||
'HOME' => 'accueil'
|
'HOME' => 'accueil'
|
||||||
);
|
);
|
7
src/config.php
Normal file
7
src/config.php
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
$mysqlParams=array(
|
||||||
|
'host' => 'localhost',
|
||||||
|
'user' => '',
|
||||||
|
'pass' => '',
|
||||||
|
'database'=>''
|
||||||
|
);
|
|
@ -58,13 +58,11 @@ function get_language_array(){
|
||||||
$language="";
|
$language="";
|
||||||
if( isset($_GET['lang']) ){
|
if( isset($_GET['lang']) ){
|
||||||
|
|
||||||
$lang = $_GET['lang'];
|
$language = $_GET['lang'];
|
||||||
setcookie( 'lang', $language, time() + 60*60*24*30 );
|
setcookie( 'lang', $language, time() + 60*60*24*30 );
|
||||||
|
|
||||||
}elseif( isset($_COOKIE['lang']) ){
|
}elseif( isset($_COOKIE['lang']) ){
|
||||||
|
|
||||||
$language=$_COOKIE['lang'];
|
$language=$_COOKIE['lang'];
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
if(in_array(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2),$langsAvailable)){
|
if(in_array(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2),$langsAvailable)){
|
||||||
|
|
2
src/home.php
Normal file
2
src/home.php
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<?php
|
||||||
|
echo $lang['SITE_DESCRIPTION'];
|
Loading…
Reference in New Issue
Block a user