Andreu | 66ad5cf | 2019-09-18 17:15:44 +0200 | [diff] [blame] | 1 | <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> |
Andreu | 57f3ca9 | 2019-09-18 19:40:42 +0200 | [diff] [blame^] | 13 | if (<?=$user->mort?>) document.write("Venga niño, pitjor que el Condom, MORT."); |
Andreu | 66ad5cf | 2019-09-18 17:15:44 +0200 | [diff] [blame] | 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?"); |
Andreu | 57f3ca9 | 2019-09-18 19:40:42 +0200 | [diff] [blame^] | 19 | if (dead) send_request(<?=$user->id?>, 3); // confirm death |
| 20 | else send_request(<?=$user->id?>, 5); // deny death |
| 21 | if (killed) send_request(<?=$victim->id?>, 4); // confirm kill |
| 22 | else send_request(<?=$user->id?>, 5); // deny kill |
Andreu | 66ad5cf | 2019-09-18 17:15:44 +0200 | [diff] [blame] | 23 | } |
| 24 | </script> |
| 25 | </head> |
| 26 | <body> |
| 27 | <div id="outter-container"> |
| 28 | <div id="inner-container"> |
| 29 | <h2>Hola <name id="user_name"><?=$user->nom()?></name>,</h2> |
| 30 | <h3>La teva víctima és:</h3> |
| 31 | |
| 32 | <div class="victima"> |
| 33 | <img width="300px" src="./imgs/<?=$victim->id?>.png" /> |
| 34 | <h2 id="victim_name"><?=$victim->nomcomplet?></h2> |
| 35 | <h3><span id="victim_curs"><?=$victim->curs?></span>-<span id="victim_grau"><?=$victim->grau?></span></h3> |
| 36 | </div> |
| 37 | </div> |
| 38 | </div> |
| 39 | <div id="butons"> |
| 40 | <button id="win" onclick="js: send_request(<?=$victim->id?>,1);">L'he matat</button> |
| 41 | <button id="lose" onclick="js: send_request(<?=$user->id?>,2);">M'han matat</button> |
| 42 | </div> |
| 43 | |
| 44 | <script> |
| 45 | |
| 46 | </script> |
| 47 | </body> |
| 48 | </html> |