Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathieu Loiseau
GameOfWords
Commits
aa62f173
Commit
aa62f173
authored
Aug 13, 2016
by
Mathieu Loiseau
Browse files
myFunction(variable) → changeParameters(pageNot)
parent
52467e2d
Changes
6
Hide whitespace changes
Inline
Side-by-side
GoW.sql
View file @
aa62f173
...
...
@@ -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`
),
...
...
adminCards.php
View file @
aa62f173
...
...
@@ -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
);
...
...
controllers/oracle.menu.game.class.php
View file @
aa62f173
...
...
@@ -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
;
}
}
...
...
controllersJS/menu_lang.js
View file @
aa62f173
<
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
);
}
views/druid.menu.html
View file @
aa62f173
<?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) {
...
...
views/oracle.menu.html
View file @
aa62f173
<?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) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment