Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathieu Loiseau
GameOfWords
Commits
3bcaa85a
Commit
3bcaa85a
authored
Aug 21, 2016
by
Mathieu Loiseau
Browse files
minor bug corrections
parent
090183f5
Changes
5
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
3bcaa85a
...
...
@@ -48,5 +48,7 @@ enregistrements/*
sys/db.config.php
sys/config.php
/add_cards.php
/profil/*/*.jpg
/profil/*/*.png
/debug.html
/debug.txt
/profil/test1/mimas.jpg
controllers/druid.arbitrage.class.php
View file @
3bcaa85a
...
...
@@ -134,9 +134,6 @@ class druid_arbitrage
require_once
(
'./sys/load_iso.php'
);
$lang_iso
=
new
IsoLang
();
require_once
(
'./controllers/update_score_coeff.php'
);
if
(
isset
(
$this
->
card
)){
$sh
=
new
ScoreHandler
(
$this
->
druid
,
ScoreHandler
::
DRUID
,(
int
)
$this
->
enregistrement
);
}
//connexion à la BD
$db
=
db
::
getInstance
();
...
...
@@ -144,6 +141,9 @@ class druid_arbitrage
$this
->
enregistrement
=
$_POST
[
"enregistrement1"
];
$this
->
oracle
=
$_POST
[
'oracle'
];
}
if
(
isset
(
$this
->
enregistrement
)){
$sh
=
new
ScoreHandler
(
$this
->
druid
,
ScoreHandler
::
DRUID
,(
int
)
$this
->
enregistrement
);
}
// après avoir cliqué sur "au bûcher" = description vide ou fautive
if
(
isset
(
$_POST
[
'invalidate'
]))
{
...
...
controllers/hide.card.php
View file @
3bcaa85a
<?php
session_start
();
require_once
(
"../sys/db.class.php"
);
require_once
(
"../models/user.class.php"
);
$user
=
user
::
getInstance
();
if
((
$user
->
id
==
$_GET
[
'user_id'
])
&&
isset
(
$_GET
[
'card_id'
])){
if
((
$_SESSION
[
'userid'
]
==
$_GET
[
'user_id'
])
&&
isset
(
$_GET
[
'card_id'
])){
$db
=
db
::
getInstance
();
$db
->
query
(
"UPDATE `cartes` SET `dateSuppression` = CURRENT_TIMESTAMP, `idEraser` = '"
.
$
user
->
id
.
"' WHERE `cartes`.`idCarte` = '"
.
$_GET
[
'card_id'
]
.
"';"
);
$db
->
query
(
"UPDATE `cartes` SET `dateSuppression` = CURRENT_TIMESTAMP, `idEraser` = '"
.
$
_SESSION
[
'userid'
]
.
"' WHERE `cartes`.`idCarte` = '"
.
$_GET
[
'card_id'
]
.
"';"
);
if
(
$db
->
affected_rows
()
==
1
){
echo
"OK"
;
}
...
...
@@ -17,4 +16,4 @@
print_r
(
$lang
);
echo
$user
->
id
.
" ≠ "
.
$_GET
[
'user_id'
]
.
" : Problème de connexion, vous n'êtes plus vous-même…"
;
}
?>
\ No newline at end of file
?>
sys/load_iso.php
View file @
3bcaa85a
...
...
@@ -75,7 +75,7 @@ class IsoLang{
$this
->
db
->
query
(
"SELECT `iso_code`,`
$language
` FROM `langues`"
);
if
(
$this
->
db
->
affected_rows
()
>=
1
){
while
(
$tmpObj
=
$this
->
db
->
fetch_object
()){
$res
[
$tmpObj
->
iso_code
]
=
$tmpObj
->
language
;
$res
[
$tmpObj
->
iso_code
]
=
$tmpObj
->
{
$
language
}
;
}
}
else
{
...
...
views/diviner.menu.html
View file @
3bcaa85a
...
...
@@ -8,8 +8,9 @@ include('./sys/load_used_iso.php');
<!-- 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=
"saveLangue()"
>
<
!--
select name="chooseLang" size="1" id="chooseLang" onchange="saveLangue()">
<?php
//keep for when we want to have people play languages they don't speak…
foreach ($usedIsos as $short => $long) {
echo "<option value='" . $short."'" ;
if(isset($_SESSION["langDevin"]))
...
...
@@ -20,6 +21,18 @@ include('./sys/load_used_iso.php');
echo ">" . $long . "</option>";
}
?>
</select-->
<select
name=
"chooseLang"
size=
"1"
id=
"chooseLang"
onchange=
"changeParameters('Devin','lang')"
>
<?php
foreach (explode(';',$user->spoken_lang) as $l) {
if (strlen($l) > 0) {
$code = $lang_iso->language_code_for($l);
echo "<option value=" . $code ;
if (strcmp($user->langGame,$code) == 0) { echo " selected"; }
echo ">" . $l . "</option>";
}
}
?>
</select>
<?php include_once("./views/level.menu.php");
print_level_choice('Devin',$lang,$user);
...
...
Write
Preview
Supports
Markdown
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