blob: 4dd8d4ae80a23a1be41dc0208be41e26ca6a545a [file] [log] [blame]
Andreu66ad5cf2019-09-18 17:15:44 +02001<html>
2 <head>
3 <meta charset="UTF-8">
4 <title>Pàgina de l'usuari</title>
5 <link rel="stylesheet" href="./css/basic.css" />
6 <link rel="stylesheet" href="./css/main.css" />
7
8 <script src="./js/utils.js"></script>
9 <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
10
11 <?php require 'login.php'; ?>
12 <script>
13 if (<?=$user->mort?>) alert("Venga niño, pitjor que el Condom, MORT.");
14 else {
15 let dead = false
16 let killed = false
17 if(<?=$user->requested?> == 1) dead = confirm("El teu assassí ha dit que t'ha matat, és veritat?");
18 if(<?=$user->requested?> == 2) killed = confirm("En/na <?=$victim->nom()?> ha dit que l'has matat, és veritat?");
19 if (dead) send_request(<?=$user->id?>, 3);
20 if (killed) send_request(<?=$victim->id?>, 4);
21 }
22 </script>
23 </head>
24 <body>
25 <div id="outter-container">
26 <div id="inner-container">
27 <h2>Hola <name id="user_name"><?=$user->nom()?></name>,</h2>
28 <h3>La teva víctima és:</h3>
29
30 <div class="victima">
31 <img width="300px" src="./imgs/<?=$victim->id?>.png" />
32 <h2 id="victim_name"><?=$victim->nomcomplet?></h2>
33 <h3><span id="victim_curs"><?=$victim->curs?></span>-<span id="victim_grau"><?=$victim->grau?></span></h3>
34 </div>
35 </div>
36 </div>
37 <div id="butons">
38 <button id="win" onclick="js: send_request(<?=$victim->id?>,1);">L'he matat</button>
39 <button id="lose" onclick="js: send_request(<?=$user->id?>,2);">M'han matat</button>
40 </div>
41
42 <script>
43
44 </script>
45 </body>
46</html>