You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.9 KiB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  5. <meta charset="UTF-8">
  6. <title>UserInterface</title>
  7. <link rel="stylesheet" href="style.css">
  8. </head>
  9. <body>
  10. <div id = "basics">
  11. <span class="inline"><img src="https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Ftse4.mm.bing.net%2Fth%3Fid%3DOIP.ELnJq_JhiyfewhCMKOkNfwHaHa%26pid%3DApi&f=1" id="userpic" alt=""></span>
  12. <br>
  13. <span class="inline">
  14. <table>
  15. <tr>
  16. <td class="table-header"><solid>Name:</solid></td>
  17. <td id = "name"></td>
  18. <td class="table-header"><solid>TC:</solid></td>
  19. <td id = "tc"></td>
  20. </tr>
  21. <tr>
  22. <td class="table-header"><solid>Phone Number:</solid></td>
  23. <td id = "number"></td>
  24. <td class="table-header"><solid>E-Mail:</solid></td>
  25. <td id = "email"></td>
  26. </tr>
  27. <tr>
  28. <td class="table-header"><solid>Health info:</solid></td>
  29. <td id = "health"></td>
  30. </tr>
  31. </table>
  32. </span>
  33. <script>
  34. setInterval(function() {
  35. $.get("http://127.0.0.1:3000/get", function(data, status){
  36. if (status == "success") {
  37. document.getElementById("userpic").src = "https://0.0.0.0:5000" + data["avatar"];
  38. document.getElementById("name").innerHTML = data["realname"];
  39. document.getElementById("tc").innerHTML = data["TC"];
  40. document.getElementById("health").innerHTML = data["health"].join(", ");
  41. document.getElementById("number").innerHTML = data["tel"];
  42. document.getElementById("email").innerHTML = data["email"];
  43. }
  44. });
  45. }, 2000);
  46. </script>
  47. </div>
  48. </body>
  49. </html>