Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 27bc247a authored by Mathieu Loiseau's avatar Mathieu Loiseau
Browse files

recupScore a.k.a the old notification system

parent 20d92be3
...@@ -52,8 +52,6 @@ class diviner_result ...@@ -52,8 +52,6 @@ class diviner_result
require_once("./controllers/traces.handler.class.php"); require_once("./controllers/traces.handler.class.php");
$th = new TracesHandler(); $th = new TracesHandler();
$th->augur_win($this->recording_id, $this->duration); $th->augur_win($this->recording_id, $this->duration);
//for dynamic notification don't want to take the time to understand them…
$_SESSION["notif"]["notification_error"]["Devin"] = 'diviner_timeout';
//used in view //used in view
$tmpRecording = new Recording($this->recording_id); $tmpRecording = new Recording($this->recording_id);
$this->oracle = $tmpRecording->get_oracle_id(); $this->oracle = $tmpRecording->get_oracle_id();
...@@ -68,7 +66,7 @@ class diviner_result ...@@ -68,7 +66,7 @@ class diviner_result
private function display() private function display()
{ {
//for dynamic notification don't want to take the time to understand them… //for dynamic notification don't want to take the time to understand them…
$_SESSION["notif"]["notification_done"]["Devin"] = 'points'; $_SESSION["notif"]["notification_done"]["devin"] = 'points';
include('./views/diviner.result.html'); include('./views/diviner.result.html');
return true; return true;
} }
......
...@@ -80,7 +80,7 @@ class diviner_timeout ...@@ -80,7 +80,7 @@ class diviner_timeout
} }
$th->augur_loss($this->partieID, $this->rec->get_id(), $duration); $th->augur_loss($this->partieID, $this->rec->get_id(), $duration);
//for dynamic notification don't want to take the time to understand them… //for dynamic notification don't want to take the time to understand them…
$_SESSION["notif"]["notification_error"]["Devin"] = 'diviner_timeout'; $_SESSION["notif"]["notification_error"]["devin"] = 'diviner_timeout';
return false; return false;
} }
......
...@@ -137,7 +137,7 @@ class druid_arbitrage ...@@ -137,7 +137,7 @@ class druid_arbitrage
//could change $this->invalidate to validate… //could change $this->invalidate to validate…
$th->druid_validate($this->enregistrement, !$this->invalidate(), $this->revoke); $th->druid_validate($this->enregistrement, !$this->invalidate(), $this->revoke);
//for dynamic notification don't want to take the time to understand them… //for dynamic notification don't want to take the time to understand them…
$_SESSION["notif"]["notification_done"]["Druide"] = 'pointsDruide'; $_SESSION["notif"]["notification_done"]["druide"] = 'pointsDruide';
header('Location: index.php?page.home.html'); header('Location: index.php?page.home.html');
} }
return true; return true;
......
...@@ -59,7 +59,7 @@ class oracle_alea_exist ...@@ -59,7 +59,7 @@ class oracle_alea_exist
else{ else{
array_push($this->errors,'noCardBD'); array_push($this->errors,'noCardBD');
//for dynamic notification don't want to take the time to understand them… //for dynamic notification don't want to take the time to understand them…
$_SESSION["notif"]["notification_error"]["Oracle"] = 'noCardBD'; $_SESSION["notif"]["notification_error"]["oracle"] = 'noCardBD';
$res = false; $res = false;
} }
return $res; return $res;
......
...@@ -45,11 +45,11 @@ class oracle_result ...@@ -45,11 +45,11 @@ class oracle_result
{ {
if ( isset($_POST['submit_form']) ) if ( isset($_POST['submit_form']) )
{ //for dynamic notification don't want to take the time to understand them… { //for dynamic notification don't want to take the time to understand them…
$_SESSION["notif"]["notification_done"]["Oracle"] = 'pointsOracle'; $_SESSION["notif"]["notification_done"]["oracle"] = 'pointsOracle';
} }
else{ else{
//for dynamic notification don't want to take the time to understand them… //for dynamic notification don't want to take the time to understand them…
$_SESSION["notif"]["notification_error"]["Oracle"] = 'giveUpOracle'; $_SESSION["notif"]["notification_error"]["oracle"] = 'giveUpOracle';
} }
return true; return true;
......
...@@ -12,14 +12,17 @@ ...@@ -12,14 +12,17 @@
$langue = $_SESSION["langDevin"]; $langue = $_SESSION["langDevin"];
} }
$roleUt = "score".$role; $roleUt = "score_".$role;
$sql = 'SELECT '.$roleUt.' FROM `score` WHERE `userid`="'.$user->id.'" AND langue="'.$lang_iso->french_for($langue).'"'; $sql = 'SELECT `'.$roleUt.'` FROM `stats` WHERE `userid`="'.$user->id.'" AND langue="'.$lang_iso->french_for($langue).'"';
$res = $db->query($sql); $resultat = 'err';
$resultat = mysqli_fetch_assoc($res); if($db->query($sql)){
$resultat = $db->fetch_assoc($res);
$resultat = $resultat[$roleUt];
}
return $resultat[$roleUt]; return $resultat;
} }
?> ?>
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