-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
125 lines (115 loc) · 4.19 KB
/
index.html
File metadata and controls
125 lines (115 loc) · 4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<html !doctype>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" type="text/css" href="css/qdIsm.css">
</head>
<body>
<h1><span class="yellow"><a href="/index.html" style="text-decoration: none">
<div class="link">
<h2>HackToSpons</h2>
</div>
</a></span></h1>
<h2>Need a sponsor for your hackathon? Looking for hackathons to get publicity from? <a rel="nofollow" rel="noreferrer"href="https://github.com/hacktospons2/hacktospons2.github.io" target="_blank">We have the solution.</a></h2>
<form style="text-align: center" name="typeform" id="typeform">
<input type="radio" name="group_type" id="group_type_company" value="Company" > Company </input>
<input type="radio" name="group_type" id="group_type_organizer" value="Organizer" > Hackathon Organizer </input>
</form>
<p>
<form style="text-align: center">
Name:
<input type="text" name="nombre" id="nombre" style="margin: 0 auto">
<br/>
<form style="text-align: center">
Contact email:
<input type="text" name="email" id="email" style="margin: 0 auto">
<br/>
<form style="text-align: center">
Website:
<input type="text" name="website" id="website" style="margin: 0 auto">
<br/>
<form style="text-align: center">
Money requesting/sponsoring:
<input type="text" name="money" id="money" style="margin: 0 auto">
<br/>
<form style="text-align: center">
Location:
<input type="text" name="place" id="place" style="margin: 0 auto">
<br/>
<form style="text-align: center">
Availability Start Date:
<input type="text" name="startDate" id="startDate" style="margin: 0 auto">
Availability End Date:
<input type="text" name="endDate" id="endDate" style="margin: 0 auto">
</form>
<form style="text-align: center">
Email hacktospons@mail.com to remove your submission!
</form>
</p>
<script src="https://www.gstatic.com/firebasejs/3.7.3/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyBZCedSSmWw8zgbJ_IE9mJDjYbepZgsR94",
authDomain: "hacktospons-3cbeb.firebaseapp.com",
databaseURL: "https://hacktospons-3cbeb.firebaseio.com",
storageBucket: "hacktospons-3cbeb.appspot.com",
messagingSenderId: "523367268259"
};
firebase.initializeApp(config); /*global firebase*/
</script>
<form style="text-align: center">
<input type="submit" id="submit" value="submit" href="/hackathonList.html">
</form>
<script>
var nombre = document.getElementById("nombre");
var email = document.getElementById("email");
var website = document.getElementById("website");
var money = document.getElementById("money");
var place = document.getElementById("place");
var startDate = document.getElementById("startDate");
var endDate = document.getElementById("endDate");
var submit = document.getElementById("submit");
var database = firebase.database(); /*global firebase*/
var reference = database.ref();
// sending
submit.onclick = function() {
if(document.getElementById('group_type_company').checked)
reference = database.ref("companies/");
else if(document.getElementById('group_type_organizer').checked)
reference = database.ref("organizers/");
reference.push({
name: nombre.value,
email: email.value,
website: website.value,
money: money.value,
place: place.value,
startDate: startDate.value,
endDate: endDate.value
});
nombre.value = "";
email.value = "";
website.value = "";
money.value = "";
place.value = "";
startDate.value = "";
endDate.value = "";
};
clear.onclick = function() { /*global clear*/
reference.remove();
};
//receiving
reference.on("value", function(snapshot) {
var todo = snapshot.val();
list.innerHTML = "";
for (var key in todo) {
var value = todo[key];
list.innerHTML += '<li>' + value + '</li>'; /*global list*/
}
});
</script>
<form style="text-align: center" action="hackathonList.html">
<input type="submit" value="View Hackathons/Sponsors">
</form>
</body>
</html>