-
Notifications
You must be signed in to change notification settings - Fork 1
/
sign.html
400 lines (239 loc) · 8.24 KB
/
sign.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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
<!DOCTYPE html>
<html>
<head>
<title>Authentication - Bandipur House</title>
<meta name="google-signin-client_id" content="https://174519711144-bvmmh2ggu2c8k1ao7htvceeaqp54p3t1.apps.googleusercontent.com">
<meta name="viewport" content="width=device-width,;initial-scale=1.0">
<script src="https://apis.google.com/js/platform.js" async defer></script>
<link rel="stylesheet" href="./style.css">
<style>
body {
padding-top: 100px;
padding-bottom: 100px;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
background: url("bg.jpg") no-repeat center ;
}
h2{
color: red;
font-size: 12px;
}
.footer {
position: fixed;
right: 0;
bottom: 0;
width: 50%;
background-color: black;
color: white;
text-align: center;
}
.header {
position: fixed;
right: 0;
top: 0;
width: 100%;
height : 50px;
color: white;
text-align: right;
}
.center {
margin: auto;
width: 50%;
padding: 10px;
border-radius: 10px;
}
.card {
padding: 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: 0.3s;
width: 80%;
border-radius: 25px;
background-color: #ffffff;
}
.card:hover {
box-shadow: 0 10px 20px 0 rgba(0,0,0,0.2);
}
.container {
padding: 2px 16px;
}
.avatar {
vertical-align: middle;
width: 50px;
height: 50px;
border-radius: 50%;
}
.thing {
padding: 1rem;
width: 100%;
height: 100%;
box-shadow: 0 15px 30px 0 rgba(0,0,0,0.11),
0 5px 15px 0 rgba(0,0,0,0.08);
background-color: #ffffff;
border-radius: 25px;
border-left: 0 solid #00ff99;
transition: border-left 300ms ease-in-out, padding-left 300ms ease-in-out;
}
.thing > :first-child {
margin-top: 0;
}
.thing > :last-child {
margin-bottom: 0;
}
.heading {
color: #fff;
}
.gg {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 1.5rem;
background-color: #0099ff;
border-radius: 25px;
transition: 1s;
}
.gg:hover {
padding : 0.5rem;
}
img {
border-radius: 100px;
}
</style>
</head>
<body oncontextmenu="return false" onkeydown="return false;" onmousedown="return false;">
<center>
<div style="width: 80%">
<div class="card1" data-tilt data-tilt-scale="1" data-tilt-startY="40">
<div id = "i"><img style="width:150px" src = 'https://iconsplace.com/wp-content/uploads/_icons/ff0000/256/png/error-icon-14-256.png'></div>
<h1 style="font-family: 'Monaco'; color: white"> Bandipur House</h1>
<br>
<p id = "si" style="color: white">Sign in to Continue</p>
<div id = "sign" class="g-signin2" data-onsuccess="onSignIn()"></div>
<div class="header"><button id = "o" onclick="signOut();">Sign out</button></div>
<h2 id = "warn" style=" visibility : hidden;">Open this site only from the official website</h2>
<h6 id = "warn1" style=" visibility : hidden;">Techinical Team</h6>
<center id = "s">
<div class = "card" id = "m" style="visibility : hidden;" >
<h3 id = "he"></h3>
<div class = "center">
<center>
<div style="display : flex; flex-direction : row; width: 100%;">
<div class = "center"><img id = "imgg" class="avatar"></img></div>
<div style="width: 100%;">
<p id = "info" style = "color: black;"></p>
<p id = "test" style = "font-size: 14px;color: black;" ></p></div>
</div>
<div class = "card" style = "width:100%;" >
<p id = "info1">You Belong to Group : </p>
</div>
</center>
</div>
</div>
<br>
<div id = "bot" style = "border : 2px, black; visibility :hidden;">
<div class = "gg">
<div class="thing">
<div style="padding: 20px">
<p style = "color: black;" id = "g">grp</p>
<h5 style = "color: blue; word-wrap: break-word;" >[email protected]</h5>
<div class="card">
<p id = "tt">Join the Offical Telegram Group : </p>
<button id = "but">Telegram</button>
</div></div>
</div>
</div>
</div>
</div>
</center>
</div>
</center>
<script src="https://www.gstatic.com/firebasejs/8.6.8/firebase.js"></script>
<script>
window.alert("Entered Script");
document.getElementById("bot").style.visibility = "hidden";
document.getElementById("m").style.visibility = "hidden";
document.getElementById("o").style.visibility = "hidden";
var firebaseConfig = {
apiKey: "AIzaSyB-JgzYvrruZ5aVNkAUcJktNg4n6WqdtCo",
authDomain: "lof-fnunho.firebaseapp.com",
databaseURL: "https://lof-fnunho.firebaseio.com",
projectId: "lof-fnunho",
storageBucket: "lof-fnunho.appspot.com",
messagingSenderId: "174519711144",
appId: "1:174519711144:web:b7a2234ef431c7d1c5599d"
};
document.addEventListener('contextmenu', event => event.preventDefault());
if (window.name != "login-erjbewwewbewgw"){
window.alert("Inside if statement");
document.getElementById("s").remove();
alert1();
}
else{
window.alert("Inside else statement");
document.getElementById("i").remove();
}
document.getElementById("he").innerHTML = "Signed out";
function onSignIn(googleUser) {
window.alert("Signed in");
var profile = googleUser.getBasicProfile();
var flag = "f";
var link = "";
if (profile.getEmail().includes("@student.onlinedegree.iitm.ac.in")){
var head = profile.getEmail().split("@")[0];
document.getElementById("o").style.visibility = "visible";
document.getElementById('test').innerHTML = head;
document.getElementById('he').innerHTML = "Signed in";
document.getElementById('info').innerHTML = "";
document.getElementById('imgg').src = profile.getImageUrl();
document.getElementById('info').innerHTML = profile.getName();
firebase.initializeApp(firebaseConfig);
var rootRef = firebase.database().ref();
var urlRef = rootRef.child("0/" + head);
var lin = rootRef.child("0/1link");
urlRef.on("value", function(snapshot) {
if(snapshot.val() == null || snapshot.val() == "null"){
window.alert("Sorry, you cannot access this portal, Either you don't belong to Bandipur House or banned from using the portal. Please contact WebAdmin for more information. ");
}
else{
document.getElementById("sign").style.visibility = "hidden";
document.getElementById("si").style.visibility = "hidden";
flag = "t";
document.getElementById('info1').innerHTML = "Group : <b>" + snapshot.val() + "</b>";
document.getElementById('g').innerHTML = "In case you haven't connected with the Group Leader of " + snapshot.val() + " please contact the WebAdmin at " ;
document.getElementById("bot").style.visibility = "visible";
document.getElementById("m").style.visibility = "visible";
if (flag == "t"){
lin.on("value", function(snapshot) {
document.getElementById("but").onclick = function() {
location.replace(snapshot.val()) ;
}
});
}
}
});
}
else{
window.alert("Sign in with your Student Mail...");
signOut();
}
}
function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log('User signed out.');
} );
document.getElementById('test').innerHTML = "";
document.getElementById('he').innerHTML = "Signed out";
document.getElementById('info').innerHTML = "Sign in to Continue";
document.getElementById('imgg').src = '';
document.getElementById("bot").style.visibility = "hidden";
document.getElementById("m").style.visibility = "hidden";
document.getElementById("o").style.visibility = "hidden";
}
function alert1() {
document.getElementById("warn").style.visibility = "visible";
document.getElementById("warn1").style.visibility = "visible";
}
</script>
</body>
</html>