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
require_once("./controllers/traces.handler.class.php");
$th = new TracesHandler();
$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
$tmpRecording = new Recording($this->recording_id);
$this->oracle = $tmpRecording->get_oracle_id();
......@@ -68,7 +66,7 @@ class diviner_result
private function display()
{
//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');
return true;
}
......
......@@ -80,7 +80,7 @@ class diviner_timeout
}
$th->augur_loss($this->partieID, $this->rec->get_id(), $duration);
//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;
}
......
......@@ -137,7 +137,7 @@ class druid_arbitrage
//could change $this->invalidate to validate…
$th->druid_validate($this->enregistrement, !$this->invalidate(), $this->revoke);
//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');
}
return true;
......
......@@ -59,7 +59,7 @@ class oracle_alea_exist
else{
array_push($this->errors,'noCardBD');
//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;
}
return $res;
......
......@@ -45,11 +45,11 @@ class oracle_result
{
if ( isset($_POST['submit_form']) )
{ //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{
//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;
......
......@@ -12,14 +12,17 @@
$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 = mysqli_fetch_assoc($res);
$resultat = 'err';
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