-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
executable file
·195 lines (191 loc) · 7.46 KB
/
index.html
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<title>Sandbox</title>
<link rel="stylesheet" type="text/css" href="index.css">
<meta http-equiv="Refresh" content="900">
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
</head>
<body>
<div class="container-fluid">
<div class="jumbotron">
<h1>Technology Sandbox</h1>
</div>
</div>
<div class="container-fluid">
<div class="row buttonrow">
<div class="col-lg-12 signup" align="center">
<a href="fullcalendar-3.8.1\fullcalendar-scheduler-1.9.2\calender.html"> <button class="btn" role="button" id="buttonsignup">Sign-Up</button></a>
<!-- <div id="formsignup">
Name:<br>
<input type="text" name="name" id="name" placeholder="Name" /><br>
Email:<br>
<input type="email" name="lastname" id="email" placeholder="[email protected]" /><br>
Print Length(in hours):<br>
<input type="number" name="printlength" id="printlen" placeholder="4" /><br>
<button onclick="submitup()" class="btn" role="button" id="submitupbutton">Submit</button>
</div> -->
</div>
<!-- <div class="col-lg-4 checkin" align="center">
<button onclick="check()" class="btn" role="button" id="buttoncheckin">Check-In</button>
<div id="formcheck">
Reason for visit:<br>
<input type="radio" name="reason" id='r1' value="Signing up for print"> Sign up to print <br>
<input type="radio" name="reason" id='r2' value="starting print"> Start print <br>
<input type="radio" name="reason" id='r3' value="picking up print"> Pick-up print <br>
<input type="radio" name="reason" id='r4' value="tech lending"> Tech Lending <br>
<button onclick="submitcheckfunct()" class="btn" role="button" id="submitcheck">Submit</button>
</div>
</div>
<div class="col-lg-4 checkq" align="center">
<button onclick="checkqueue()" class="btn" role="button" id="buttoncheckq">Check-Queue</button>
</div>
</div>
<div class="row calender">
<div class="col-lg-6 checkq2" align="center">
<div id="editque">
<iframe id="editspread" src="https://docs.google.com/spreadsheets/d/11Gy-D8wxOhNPoZno8j8JZ4BAXQZ2t2iO3Cvvu1K4N6o/edit?usp=sharing?widget=true&headers=false"></iframe>
</div>
</div>
<div class="col-lg-6 checkq" align="center">
<div id="checkque">
<iframe id="spread" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSh-4NFtencp2sc4XZDRkxRZLdAZjLWRbLWYQ5ThjqXIyNGTqT6x5bHOGWvB96e6LJxl9Vdc7tw29Ya/pubhtml?widget=true&headers=false"></iframe>
</div>
</div>
</div> -->
<script src="https://www.gstatic.com/firebasejs/4.9.0/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyD7WKW8wD07hQ4fTA_gUT3xHFCUVOGqR4E",
authDomain: "sandbox-ui.firebaseapp.com",
databaseURL: "https://sandbox-ui.firebaseio.com",
projectId: "sandbox-ui",
storageBucket: "sandbox-ui.appspot.com",
messagingSenderId: "1064917041181"
};
firebase.initializeApp(config);
</script>
<script type="text/javascript">
var reason;
var cin=document.getElementById("checkin");
// var x = document.getElementById("formsignup");
// x.style.display = "none";
// var a = document.getElementById("buttonsignup");
// a.style.display = "none";
// var b = document.getElementById("buttoncheckq");
// b.style.display = "none";
// var y = document.getElementById("formcheck");
// y.style.display = "none";
var z = document.getElementById("spread");
z.style.display = "none";
var edit = document.getElementById("editspread");
edit.style.display = "none"
var originalState = $("formcheck").clone();
function signin() {
var x = document.getElementById("formsignup");
if (x.style.display == "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
};
function check() {
var y = document.getElementById("formcheck");
if (y.style.display == "none") {
y.style.display = "block";
} else {
y.style.display = "none";
}
};
function checkqueue() {
var z = document.getElementById("spread");
if (z.style.display == "none") {
z.style.display = "block";
} else {
z.style.display = "none";
}
};
function signin() {
// var name=document.getElementById("name").value;
// var res = name.split(" ");
// var email=document.getElementById("email").value;
// var println=document.getElementById("printlen").value;
// var domain = email.substring(email.lastIndexOf("@") +1);
// console.log(domain)
// console.log(res)
// if(name==""&&email==""&&println==""){
// alert("Must enter information!")
// }
// else if(name==""){
// alert("Must enter a name!")
// }
// else if(res[1]==""||res[1]==undefined){
// alert("Must enter a last name!")
// }
// else if(email==""){
// alert("Must enter an email address!")
// }
// else if(domain!="wit.edu"){
// alert("Must be a wit.edu email account!")
// }
// else if(println==""){
// alert("Must enter a print length!")
// }
// else{
// var database = firebase.database();
// var firebaseRef=firebase.database().ref('sandbox-ui/users').push();
// firebaseRef.child("Name").set(name);
// firebaseRef.child("Email").set(email);
// firebaseRef.child("Print Length").set(println);
// console.log(name);
// console.log(email);
// console.log(println);
// console.log(reason);
// var edit = document.getElementById("editspread");
// if (edit.style.display == "none") {
// edit.style.display = "block";
// }
// else {
// edit.style.display = "none";
// }
//}
};
function submitcheckfunct() {
if (document.getElementById('r1').checked||document.getElementById('r2').checked||document.getElementById('r3').checked||document.getElementById('r4').checked){
// var a = document.getElementById("buttonsignup");
// if (a.style.display == "none") {
// a.style.display = "block";
// }
// var b = document.getElementById("buttoncheckq");
// if (b.style.display == "none") {
// b.style.display = "block";
// }
if (document.getElementById('r1').checked) {
reason = document.getElementById('r1').value;
}
else if (document.getElementById('r2').checked) {
reason = document.getElementById('r2').value;
}
else if (document.getElementById('r3').checked) {
reason = document.getElementById('r3').value;
}
else if (document.getElementById('r4').checked) {
reason = document.getElementById('r4').value;
}
var database = firebase.database();
var firebaseRef=firebase.database().ref('sandbox-ui/reason').push();
firebaseRef.child("Reason for Visit").set(reason);
console.log(reason);
}
else{
alert("Must pick a reason!");
}
};
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"> </script>
</body>
</html>