Commit aa62f173 authored by Mathieu Loiseau's avatar Mathieu Loiseau
Browse files

myFunction(variable) → changeParameters(pageNot)

parent 52467e2d
......@@ -116,11 +116,12 @@ CREATE TABLE IF NOT EXISTS `enregistrement` (
`cheminEnregistrement` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`idOracle` int(30) NOT NULL,
`OracleLang` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`nivpartie` enum('easy','medium','hard') NOT NULL DEFAULT 'easy' COMMENT 'niveau de la partie oracle',
`tpsEnregistrement` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`carteID` int(11) NOT NULL,
`nivcarte` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`validation` enum('valid','invalid','limbo') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'limbo',
`duration` TINYINT UNSIGNED NOT NULL COMMENT 'the length in seconds of the recording (max 255 sec)',
`duration` tinyint(3) unsigned NOT NULL COMMENT 'the length in seconds of the recording (max 255 sec)',
PRIMARY KEY (`enregistrementID`),
UNIQUE KEY `cheminEnregistrement` (`cheminEnregistrement`),
KEY `idOracle` (`idOracle`),
......
......@@ -19,7 +19,7 @@ if ( !$userlogged ){
else{
$title = 'Game of Words / Administration';
include('./views/page.header.html');
include('./controllersJS/menu_lang.js');
echo "<script type='text/javascript' src='./controllersJS/menu_lang.js'> </script>";
echo "<h1>".$lang['admin']."</h1>";
require_once('./models/item.factory.class.php');
$cardFactory = new ItemFactory($user->id,$user->langGame);
......
......@@ -17,10 +17,10 @@ class oracle_menu_game
public function process()
{
if ( $this->init() )
{
return $this->display();
}
return false;
{
return $this->display();
}
return false;
}
private function init()
......@@ -40,14 +40,14 @@ class oracle_menu_game
$_SESSION["idCard"] = $card_id;
}
}
return true;
return true;
}
private function display()
{
include('./views/oracle.menu.html');
return true;
return true;
}
}
......
<script>
function myFunction(variable) {
var choixLang = document.getElementById("chooseLang").value;
function changeParameters(pageNot) {
var choixLang = document.getElementById("chooseLang").value;
alert('ça marche');
//alert(choixLang);
var req = new XMLHttpRequest();
req.open("GET","update_userlang_game.php?userlang_game="+choixLang+"&page_not="+variable, true);
req.onreadystatechange = function(aEvt){
if (req.readyState == 4) {
if(req.status == 200)
{
console.log(req.responseText);
void window.location.reload();
}
else
{
console.log("Erreur pendant le chargement de la page.\n");
}
}
};
req.send(null);
var req = new XMLHttpRequest();
req.open("GET","update_userlang_game.php?userlang_game="+choixLang+"&page_not="+pageNot, true);
req.onreadystatechange = function(aEvt){
if (req.readyState == 4) {
if(req.status == 200){
console.log(req.responseText);
void window.location.reload();
}
else{
console.log("Erreur pendant le chargement de la page.\n");
}
}
</script>
\ No newline at end of file
};
req.send(null);
}
<?php
$title = 'Game of Words';
include('./views/page.header.html');
include('./controllersJS/menu_lang.js');
require_once('./sys/load_iso.php');
?>
<script type="text/javascript" src="./controllersJS/menu_lang.js"> </script>
<div id="main-container">
<div id="center-block">
<!-- cette formulaire sert � choisir la langue de jeu-->
<form id="select_lang">
<h2><?php echo $lang['learning'];?>
<select name="chooseLang" size="1" id="chooseLang" onchange="myFunction('Druide')">
<select name="chooseLang" size="1" id="chooseLang" onchange="changeParameters('Druide')">
<?php
foreach (explode(';',$user->spoken_lang) as $l) {
if (strlen($l) > 0) {
......
<?php
$title = 'Game of Words';
include('./views/page.header.html');
include('./controllersJS/menu_lang.js');
require_once('./sys/load_iso.php');
$lang_iso = new IsoLang();
?>
<script type="text/javascript" src="./controllersJS/menu_lang.js"> </script>
<div id="main-container">
<div id="center-block">
<!-- cette formulaire sert à choisir la langue de jeu-->
<form id="select_lang">
<h2><?php echo $lang['learning'];?>
<select name="chooseLang" size="1" id="chooseLang" onchange="myFunction('Oracle')">
<!-- ICITE, gérer le choix du niveau (si possible avec message d'aide) -->
<select name="chooseLang" size="1" id="chooseLang" onchange="changeParameters('Oracle')">
<?php
foreach (explode(';',$user->spoken_lang) as $l) {
if (strlen($l) > 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment