Fix per les cookies que no funcionen
diff --git a/ajax/getusers.php b/ajax/getusers.php
index 7d9f52e..181ca56 100644
--- a/ajax/getusers.php
+++ b/ajax/getusers.php
@@ -3,12 +3,15 @@
require '../php/utils.php';
$users = get_users(0, false);
+ $users_alive = [];
+
foreach ($users as &$user) {
if ($user["mort"]) continue;
- $user["nopassword"] = $user["md5password"] == "" ? "nopassword" : "";
+ $user["nopassword"] = ($user["md5password"] == "" ? "nopassword" : "");
unset($user["md5password"]);
+ array_push($users_alive, $user);
}
- echo json_encode($users);
+ echo json_encode($users_alive);
?>
diff --git a/ajax/victiminfo.php b/ajax/victiminfo.php
index e2c7ce6..44a3c88 100644
--- a/ajax/victiminfo.php
+++ b/ajax/victiminfo.php
@@ -12,7 +12,11 @@
<td><img id="victim_img" src="https://picsum.photos/id/<?=$victim->id?>/200/200" /></td>
<td>
<div id="victim_name"><?=$victim->nomcomplet?></div>
- <div id="victim_curs_i_grau"><span id="victim_curs"><?=$victim->curs?></span>-<span id="victim_grau"><?=$victim->grau?></span></div>
+ <div id="victim_curs_i_grau">
+ <span id="victim_curs"><?=$victim->nomcurs()?></span>
+ -
+ <span id="victim_grau"><?=$victim->nomgrau()?></span>
+ </div>
<div id="butons" class="options">
<button id="win" onclick="js: send_request(user, 'REQ KILL');">L'he matat</button>
</div>