Commit | Line | Data |
---|---|---|
fb4277ce MG |
1 | <!DOCTYPE html> |
2 | <meta charset="UTF-8"> | |
3 | <title>Inscriere Ziua Libertatii Programelor</title> | |
4 | <script type="application/javascript"> | |
5 | function update_event_info(){ | |
6 | var event_info = document.getElementById("event_info"); | |
7 | var image = document.getElementById("image"); | |
8 | var xhr = new XMLHttpRequest(); | |
9 | xhr.open("GET", "/zlp?op=info&event=" + document.getElementById("event").value, false); | |
10 | xhr.send(); | |
11 | console.log(xhr.responseText); | |
12 | var ret = JSON.parse(xhr.responseText); | |
13 | event_info.innerHTML = "<b>" + ret.date + "</b> la <b>" + ret.locul + "</b> in <b>" + ret.sala + "</b>. Locuri ramase: <b>" + ret.locuri + "</b>. Link: <a href='" + ret.link + "'>" + ret.link + "</a>"; | |
14 | image.src = ret.image; | |
15 | } | |
16 | ||
17 | function validate(){ | |
18 | var captcha = document.getElementById("captcha"); | |
19 | if(captcha.value != 83){ | |
20 | alert("Ati completat gresit anul de lansare al proiectului GNU. Indiciu: Suntem in 2013 si proiectul GNU implineste 30 de ani."); | |
21 | return false; | |
22 | } | |
23 | } | |
24 | ||
25 | window.onload = update_event_info; | |
26 | </script> | |
27 | ||
28 | <h1>Ziua Libertăţii Programelor</h1> | |
29 | organizata de Fundatia Ceata | |
30 | <p> | |
31 | Aniversarea a 30 de ani de la lansarea proiectului GNU | |
32 | ||
33 | <form action="/zlp" method="POST" onsubmit="return validate();"> | |
34 | <input type="hidden" name="op" value="append"> | |
35 | Prenume:<br> | |
36 | <input type="text" name="prenume" required><br> | |
37 | Nume (opţional):<br> | |
38 | <input type="text" name="nume"><br> | |
39 | Adresa de poşta electronica:<br> | |
40 | <input type="email" name="email" required><br> | |
41 | Oraşul evenimentului:<br> | |
42 | <select name="oras" id="event" onchange="update_event_info();"> | |
43 | <option value="bucuresti">Bucureşti</option> | |
44 | <option value="cluj">Cluj-Napoca</option> | |
45 | <option value="chisinau">Chişinău</option> | |
46 | <option value="balti">Balţi</option> | |
47 | <option value="constanta">Constanţa</option> | |
48 | </select><br> | |
49 | Numar de participanti:<br> | |
50 | <select name="numar"> | |
51 | <option value="1">1</option> | |
52 | <option value="2">2</option> | |
53 | <option value="3">3</option> | |
54 | <option value="4">4</option> | |
55 | <option value="5">5</option> | |
56 | </select><br> | |
57 | Detalii: | |
58 | <div id="event_info"></div> | |
59 | <img id="image" style="width:200px;height:200px"> | |
60 | <p> | |
61 | <label><input type="checkbox" name="spam"> Vreau sa primesc anunturi de la Fundatia Ceata</label><br> | |
62 | Anul de lansare al proiectului GNU este 19<input type="number" name="captcha" min="0" max="99" id="captcha" required><br> | |
63 | <input type="submit" value="Trimite"> | |
64 | </form> |