Adrià Vilanova Martínez | 2174eb0 | 2022-12-11 14:45:01 +0100 | [diff] [blame] | 1 | <?php |
| 2 | require_once('./php/security.php'); |
| 3 | if (Security::isSignedIn()) { |
| 4 | Security::go('/main.php'); |
| 5 | } |
| 6 | ?> |
Andreu | 66ad5cf | 2019-09-18 17:15:44 +0200 | [diff] [blame] | 7 | <html> |
| 8 | <head> |
| 9 | <meta charset="UTF-8"> |
Andreu | 0d0f9fd | 2019-09-23 03:56:08 +0200 | [diff] [blame] | 10 | <title>PastanagAPP</title> |
avm99963 | db383ed | 2019-09-22 02:14:42 +0200 | [diff] [blame] | 11 | |
| 12 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
Adrià Vilanova Martínez | 71e9f87 | 2022-11-20 01:54:50 +0100 | [diff] [blame] | 13 | <link rel="manifest" href="/bin/manifest.json"> |
Andreu | 0d0f9fd | 2019-09-23 03:56:08 +0200 | [diff] [blame] | 14 | |
| 15 | <!-- Apple web app --> |
| 16 | <link rel="apple-touch-icon" href="./bin/images/icons/icon-72x72.png"> |
| 17 | <meta name="apple-mobile-web-app-title" content="PastanagAPP"> |
| 18 | <meta name="apple-mobile-web-app-capable" content="yes"> |
| 19 | <meta name="apple-mobile-web-app-status-bar-style" content="green"> |
avm99963 | db383ed | 2019-09-22 02:14:42 +0200 | [diff] [blame] | 20 | |
Andreu | 4b2fbd9 | 2019-09-22 22:30:25 +0200 | [diff] [blame] | 21 | <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" /> |
| 22 | |
Andreu | 66ad5cf | 2019-09-18 17:15:44 +0200 | [diff] [blame] | 23 | <link rel="stylesheet" href="./css/basic.css" /> |
| 24 | <link rel="stylesheet" href="./css/login.css" /> |
avm99963 | db383ed | 2019-09-22 02:14:42 +0200 | [diff] [blame] | 25 | |
Andreu | 0b2f843 | 2019-09-18 20:09:59 +0200 | [diff] [blame] | 26 | <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> |
Andreu | 543e70c | 2019-09-22 14:08:49 +0200 | [diff] [blame] | 27 | <script src="https://rawgit.com/notifyjs/notifyjs/master/dist/notify.js"></script> |
| 28 | |
| 29 | <script src="./js/utils.js"></script> |
| 30 | <script src="./js/animations.js"></script> |
Andreu | 66ad5cf | 2019-09-18 17:15:44 +0200 | [diff] [blame] | 31 | </head> |
| 32 | <body> |
| 33 | <div id="outter-container"> |
| 34 | <div id="inner-container"> |
Adrià Vilanova Martínez | 7a2e466 | 2022-12-10 22:19:53 +0100 | [diff] [blame] | 35 | <div class="header-container"> |
| 36 | <header> |
Adrià Vilanova Martínez | 467de64 | 2022-12-11 14:44:21 +0100 | [diff] [blame] | 37 | <h2>Carrot Cake</h2> |
Adrià Vilanova Martínez | 7a2e466 | 2022-12-10 22:19:53 +0100 | [diff] [blame] | 38 | <h3>Facultat de Física - Tardor 2022</h3> |
| 39 | </header> |
| 40 | <img src="/bin/images/vuit.png" class="logo"> |
| 41 | </div> |
Andreu | 03d030d | 2019-09-25 21:52:01 +0200 | [diff] [blame] | 42 | <form action="./php/login.php" method="POST"> |
Andreu | dd6cfb4 | 2019-09-22 19:52:39 +0200 | [diff] [blame] | 43 | <input type="hidden" name="user" id="user"> |
| 44 | |
| 45 | <!-- MD Search Box --> |
| 46 | <div class="md-google-search__metacontainer"> |
| 47 | <div class="md-google-search__container"> |
| 48 | <div class="md-google-search"> |
| 49 | <span class="md-google-search__search-btn"> |
Andreu | 03d030d | 2019-09-25 21:52:01 +0200 | [diff] [blame] | 50 | <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="-5px" width="34px" height="34px" viewBox="0 0 37.334 37.334" style="enable-background:new 0 0 37.334 37.334;" xml:space="preserve"> |
| 51 | <path d="M14.747735023498535,19.041818022727966 H4.063735008239746 c0,-2.1760001182556152 1.4279999732971191,-4.031000137329102 3.436000108718872,-4.767000198364258 c-0.4309999942779541,-0.43799999356269836 -0.7440000176429749,-1.1039999723434448 -0.9010000228881836,-2.1089999675750732 c-0.2070000022649765,0.041999999433755875 -0.527999997138977,-0.19499999284744263 -0.6230000257492065,-0.5559999942779541 c-0.09700000286102295,-0.367000013589859 -0.1599999964237213,-0.9599999785423279 0.04899999871850014,-1.0169999599456787 c0.06199999898672104,-0.017000000923871994 0.12700000405311584,-0.004999999888241291 0.1899999976158142,0.02800000086426735 V9.600818037986755 c0,-1.6059999465942383 -0.3779999911785126,-2.549999952316284 2.246999979019165,-2.819000005722046 l-0.023000000044703484,-0.006000000052154064 c0,0 2.069000005722046,-0.19900000095367432 2.614000082015991,-0.6890000104904175 c0,0 0.014999999664723873,0.414000004529953 0.23499999940395355,0.8679999709129333 c1.2109999656677246,0.46399998664855957 1.3630000352859497,1.5369999408721924 1.3279999494552612,2.6470000743865967 v1.0210000276565552 c0.06400000303983688,-0.032999999821186066 0.1289999932050705,-0.04500000178813934 0.19099999964237213,-0.02800000086426735 c0.20900000631809235,0.05700000002980232 0.09799999743700027,0.671999990940094 0.0020000000949949026,1.0410000085830688 c-0.09399999678134918,0.3569999933242798 -0.36500000953674316,0.5699999928474426 -0.5699999928474426,0.5320000052452087 c-0.15299999713897705,0.9570000171661377 -0.48899999260902405,1.6440000534057617 -0.9549999833106995,2.1010000705718994 C13.306735038757324,14.995816588401794 14.747735023498535,16.85381829738617 14.747735023498535,19.041818022727966 zM37.17073059082031,0.5408166646957397 v24.33300018310547 H-0.16326531767845154 V0.5408166646957397 H37.17073059082031 zM35.17073059082031,2.5408166646957397 H1.836734652519226 v20.33300018310547 h33.33399963378906 V2.5408166646957397 zM32.50373077392578,6.5408161878585815 H17.670734405517578 v2 h14.833000183105469 V6.5408161878585815 zM32.50373077392578,11.707816481590271 H17.670734405517578 v2 h14.833000183105469 V11.707816481590271 zM32.50373077392578,16.87581765651703 H17.670734405517578 v2 h14.833000183105469 V16.87581765651703 z" id="svg_3"/> |
| 52 | </svg> |
Andreu | dd6cfb4 | 2019-09-22 19:52:39 +0200 | [diff] [blame] | 53 | </span> |
| 54 | <div class="md-google-search__field-container"> |
Andreu | 2211ab2 | 2019-09-23 18:13:26 +0200 | [diff] [blame] | 55 | <input id="search-input" class="md-google-search__field" required autocomplete="off" placeholder="Introdueix el teu nom..." value="" name="search" type="text" spellcheck="false" style="outline: none;"> |
Andreu | dd6cfb4 | 2019-09-22 19:52:39 +0200 | [diff] [blame] | 56 | </div> |
| 57 | <span class="md-google-search__empty-btn" style="display: none;"> |
| 58 | <svg focusable="false" height="24px" viewBox="0 0 24 24" width="24px" xmlns="http://www.w3.org/2000/svg"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg> |
| 59 | </span> |
| 60 | </div> |
| 61 | </div> |
| 62 | |
| 63 | <div class="autocomplete-container" style="display: none;"> |
| 64 | <div id="autocomplete-list" class="autocomplete-items"></div> |
| 65 | </div> |
| 66 | </div> |
avm99963 | db383ed | 2019-09-22 02:14:42 +0200 | [diff] [blame] | 67 | |
Andreu | 20cbd1d | 2019-09-22 00:00:57 +0200 | [diff] [blame] | 68 | <input disabled required placeholder="Clau d'accés..." id="password" type="password" name="password"/> |
Andreu | 4b2fbd9 | 2019-09-22 22:30:25 +0200 | [diff] [blame] | 69 | <input type="submit" value="Entrar" id="submit" /> |
Andreu | 66ad5cf | 2019-09-18 17:15:44 +0200 | [diff] [blame] | 70 | </form> |
Andreu | 0d0f9fd | 2019-09-23 03:56:08 +0200 | [diff] [blame] | 71 | |
Adrià Vilanova Martínez | 7a2e466 | 2022-12-10 22:19:53 +0100 | [diff] [blame] | 72 | <p>Qualsevol problema, podeu contactar amb <a href="mailto:vuit@operacio236.ml">vuit@operacio236.ml</a>.</p> |
Andreu | ae44f20 | 2019-09-23 23:15:56 +0200 | [diff] [blame] | 73 | <a href="./ranking.php">Anar al rànquing</a> |
Andreu | 66ad5cf | 2019-09-18 17:15:44 +0200 | [diff] [blame] | 74 | </div> |
| 75 | </div> |
avm99963 | db383ed | 2019-09-22 02:14:42 +0200 | [diff] [blame] | 76 | |
Andreu | dd6cfb4 | 2019-09-22 19:52:39 +0200 | [diff] [blame] | 77 | <script src="./js/autocomplete.js"></script> |
Andreu | 0b2f843 | 2019-09-18 20:09:59 +0200 | [diff] [blame] | 78 | <script> |
Andreu | dd6cfb4 | 2019-09-22 19:52:39 +0200 | [diff] [blame] | 79 | fetch("./ajax/getusers.php").then(result => result.json()).then(users => { |
Andreu | dd6cfb4 | 2019-09-22 19:52:39 +0200 | [diff] [blame] | 80 | autocomplete(document.getElementById("search-input"), users, "search"); |
Andreu | 1bf9ab7 | 2019-09-22 20:27:40 +0200 | [diff] [blame] | 81 | |
Adrià Vilanova Martínez | 13cf0cd | 2022-11-20 01:02:20 +0100 | [diff] [blame] | 82 | userid = <?=isset($_SESSION['id']) ? (int)$_SESSION['id'] : -1 ?>; |
Andreu | 1bf9ab7 | 2019-09-22 20:27:40 +0200 | [diff] [blame] | 83 | username = get_user_name(users, userid); |
Andreu | 4b2fbd9 | 2019-09-22 22:30:25 +0200 | [diff] [blame] | 84 | if (userid > 0) $("#search-input").prop("placeholder", username); |
Andreu | 0b2f843 | 2019-09-18 20:09:59 +0200 | [diff] [blame] | 85 | }); |
Andreu | 0d0f9fd | 2019-09-23 03:56:08 +0200 | [diff] [blame] | 86 | |
Andreu | 543e70c | 2019-09-22 14:08:49 +0200 | [diff] [blame] | 87 | $(document).ready(function() { |
| 88 | // Notify of messages |
| 89 | if (getUrlParameter("passwordchanged")) read_message("La teva clau d'accés ha canviat", "error"); |
| 90 | if (getUrlParameter("wrongpassword")) read_message("La clau d'accés no és correcta", "error"); |
Andreu | 03d030d | 2019-09-25 21:52:01 +0200 | [diff] [blame] | 91 | if (getUrlParameter("wronguser")) read_message("El nom ha estat mal introduït", "error"); |
Andreu | 543e70c | 2019-09-22 14:08:49 +0200 | [diff] [blame] | 92 | }); |
Andreu | 0b2f843 | 2019-09-18 20:09:59 +0200 | [diff] [blame] | 93 | </script> |
Andreu | 66ad5cf | 2019-09-18 17:15:44 +0200 | [diff] [blame] | 94 | </body> |
| 95 | </html> |