-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsignup3.php
454 lines (406 loc) · 16.6 KB
/
signup3.php
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
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
<?php
$signup=0;
if(isset($_POST['signup']))
{
$player_name=addslashes($_POST['player_name']);
$mobile=addslashes($_POST['mobile']);
$place=addslashes($_POST['place']);
$city=addslashes($_POST['city']);
$place=$place.", ".$city;
include "connect.php";
$usr_chk=mysqli_query($conn, "SELECT * FROM players where pid='$mobile';");
if(mysqli_num_rows($usr_chk) > 0)
{
$signup=3; //user already exists
}
else
{
$query="insert into players (pid, pin, player_name, place, status, points) values ('$mobile','0000','$player_name','$place',1,100)";
if(!mysqli_query($conn, $query))
{
$signup=2;
}
else
{
$signup=1;
}
}
}
?>
<!doctype html>
<html class="fixed">
<head>
<?php include "head.php"; ?>
<style>
.err
{
color:red;
font-size:10px;
font-weight:bold;
}
</style>
</head>
<body>
<!-- start: page -->
<section class="body-sign body-locked">
<div class="center-sign">
<div class="panel card-sign">
<div class="card-body">
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method='post' autocomplete="off" onsubmit='return register();'>
<div class="current-user text-center">
<img src="img/full_logo.jpg" alt="BO HOUSIE" class="rounded-circle user-image" />
<h2 class="user-name text-dark m-0" style='font-size:24px;'>NEW PLAYER SIGNIN</h2>
<p class="user-email m-0">Exclusive for Customers of Bhimavaram Online</p>
</div>
<?php
if($signup == 1)
{
echo "<center><h3 style='color:green;'><b>ACCOUNT CREATED SUCCESSFULLY!</b><BR>We will send you the login credentials to your WhatsApp / SMS.</h3></center>";
}
if($signup == 2)
{
// echo $query;
echo "<center><h3 style='color:red;'>ERROR CREATING ACCOUNT. CONTACT ADMIN @ 9010972333!</h3></center>";
}
if($signup == 3)
{
echo "<center><h3 style='color:red;'><b>USER ALREADY EXISTS!</b><br>WhatsApp to 9010872333 for Assistance.</h3></center>";
}
if($signup == 0)
{
?>
<div class="form-group mb-3">
<div class="input-group">
<input id="player_name" name="player_name" type="text" class="form-control" placeholder="Full Name" autocomplete="off" REQUIRED />
<span class="input-group-append">
<span class="input-group-text">
<i class="fas fa-user"></i>
</span>
</span>
</div>
<div id='name_err' class='err'></div>
</div>
<div class="form-group mb-3">
<div class="input-group">
<input id="mobile" name="mobile" type="number" class="form-control" placeholder="Your WhatsApp No." autocomplete="off" REQUIRED />
<span class="input-group-append">
<span class="input-group-text">
<i class="fas fa-phone"></i>
</span>
</span>
</div>
<div id='mobile_err' class='err'></div>
</div>
<!-- <div class="form-group mb-3">
<div class="input-group">
<input id="place" name="place" type="text" class="form-control form-control-lg" placeholder="Branch" autocomplete="off" REQUIRED />
<span class="input-group-append">
<span class="input-group-text">
<i class="fas fa-map-signs"></i>
</span>
</span>
</div>
<div id='place_err' class='err'></div>
</div> -->
<div class="form-group mb-3">
<div class="input-group">
<input id="place" name="place" type="text" class="form-control form-control" placeholder="Area / Locality" autocomplete="off" REQUIRED />
<span class="input-group-append">
<span class="input-group-text">
<i class="fas fa-map-signs"></i>
</span>
</span>
</div>
<div id='place_err' class='err'></div>
</div>
<div class="form-group mb-3">
<div class="input-group">
<input id="city" name="city" type="text" class="form-control form-control" placeholder="City / Town" autocomplete="off" REQUIRED />
<span class="input-group-append">
<span class="input-group-text">
<i class="fas fa-map-marker-alt"></i>
</span>
</span>
</div>
<div id='city_err' class='err'></div>
</div>
<!--
<div class="form-group mb-3">
<div class="input-group">
<input id="pin" name="pin" type="number" class="form-control form-control-lg" placeholder="4 Digit PIN (for Login)" MAXLENGTH='4' value='' autocomplete="off" REQUIRED/>
<span class="input-group-append">
<span class="input-group-text">
<i class="fas fa-th-large"></i>
</span>
</span>
</div>
<div id='pin_err' class='err'></div>
</div>
<div class="form-group row">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<div class="checkbox-custom">
<input type="checkbox" name="bvrm" id="bvrm">
<label for="w1-bvrm">I live in / belong to Bhimavaram.</label>
</div>
</div>
</div>
-->
<div class="form-group row">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<div class="checkbox-custom">
<input type="checkbox" name="cterms" id="cterms" CHECKED required>
<label for="w1-terms">I agree to the terms & conditions. <a class="mb-1 mt-1 mr-1 modal-basic" href="#terms">Read</a></label>
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<p class="mt-1 mb-3">
<!-- <a href="index.php">LOGIN HERE</a> -->
</p>
</div>
<div class="col-6">
<button type="submit" class="btn btn-primary pull-right">REGISTER ACCOUNT</button>
</div>
</div>
<input name="signup" type="hidden" value='1'>
</form>
<?php
}
?>
</div>
</div>
</div>
</section>
<!-- end: page -->
<div id="terms" class="modal-block modal-block-info mfp-hide">
<section class="card">
<header class="card-header">
<h2 class="card-title">Terms & Conditions</h2>
</header>
<div class="card-body">
<div class="modal-wrapper">
<div class="modal-text">
<p align='justify'>The Bhimavaram Online Housie Software is a product of <a href='http://www.mcr.org.in' target='_new'>MCR Web Solutions, Bhimavaram</a> primarily created for the people of Bhimavaram and for the customers of <a href='https://www.bhimavaram.online' target='_new'>Bhimavaram Online</a>, although anyone from any place can join the game.
The product has been designed purely for entertainment & fun and will not encourage any sort of gambling or fraud.</p>
<h4>Privacy / Terms & Conditions</h4>
<ul>
<li>The details collected (Name, Place & Mobile Number) are kept confidential. <b>We will not disclose or share your details to any third-party.</b></li>
<li>The game is only intended purely for entertainment and will not allow any of the players to involve in gambling or fraud.</li>
<li>By accepting these terms & conditions, <b>you have agreed to get game alerts / updates / notification messages (of Bhimavaram Online alone) via SMS or WhatsApp.</b>
If you don’t want to receive notifications from us, you can anytime ask us to stop notifications by sending us a message via WhatsApp to +91 92 93 94 0004.</li>
<li>Prizes for the games will be decided by the admin and the sponsors and are subjected to change based on the availability, and need.</li>
<li>Players need to have sufficient points in their wallet to play the game. The same can be purchased from Bhimavaram Online.</li>
<li>No objectionable or offensive information should be posted. Nothing should be related to abusive, threatening, racial, sexual, or obscene.</li>
<li>Your account shall not be used to cheat or hack the game by any means.</li>
<li>The admin reserves the right to delete or modify the comments or information of the players if found to be involved in fraud or wrong practices while playing.</li>
<li>Bhimavaram Online reserves the final right of decision in any game to ensure a clean and smooth organization.</li>
</ul>
</div>
</div>
</div>
<footer class="card-footer">
<div class="row">
<div class="col-md-12 text-right">
<button class="btn btn-info modal-dismiss">OK</button>
</div>
</div>
</footer>
</section>
</div>
<script src="vendor/jquery/jquery.js"></script>
<script src="vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
<script src="vendor/popper/umd/popper.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.js"></script>
<script src="vendor/magnific-popup/jquery.magnific-popup.js"></script>
<script src="vendor/jquery-placeholder/jquery-placeholder.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="js/theme.js"></script>
<script src="js/examples/examples.modals.js"></script>
<!-- Theme Custom -->
<!-- Theme Initialization Files -->
<script src="js/theme.init.js"></script>
<script type="text/javascript">
function register()
{
var player_name=document.getElementById('player_name').value;
var pid=document.getElementById('mobile').value;
var place=document.getElementById('place').value;
var city=document.getElementById('city').value;
//var pin=document.getElementById('pin').value;
document.getElementById('name_err').innerHTML="";
document.getElementById('mobile_err').innerHTML="";
document.getElementById('place_err').innerHTML="";
document.getElementById('city_err').innerHTML="";
//document.getElementById('pin_err').innerHTML="";
if(!(/^[A-z .]{3,20}$/.test(player_name)))
{
document.getElementById('name_err').innerHTML="Please enter a valid name!";
return false;
}
if(pid == "")
{
document.getElementById('mobile_err').innerHTML="Please fill your 10 digit mobile number!";
return false;
}
else if(!(/^[0-9]{10}$/.test(pid)))
{
document.getElementById('mobile_err').innerHTML="Please enter a valid 10 digit mobile number!";
return false;
}
if(place == "")
{
document.getElementById('place_err').innerHTML="Please Select Your Department!";
return false;
}
if(!(/^[A-z ]{3,20}$/.test(city)))
{
document.getElementById('city_err').innerHTML="Please enter a valid city name!";
return false;
}
/* if(!(/^[0-9]{4}$/.test(pin)))
{
document.getElementById('pin_err').innerHTML="Please enter a valid 4 digit PIN!";
return false;
}
if(document.getElementById('terms').checked == false)
{
document.getElementById('merr').innerHTML="Please Select Terms & Conditions Checkbox!";
document.getElementById('merr').scrollIntoView();
}
if(mobile == "")
{
document.getElementById('mobile_err').innerHTML="Please enter a mobile number!";
}
else if(!(/^[0-9]{10}$/.test(mobile)))
{
document.getElementById('mobile_err').innerHTML="Please enter a valid mobile number [Only 10 Digits]!";
}
if(area == "-")
{
document.getElementById('area_err').innerHTML="Please select your residence area!";
document.getElementById('area').scrollIntoView();
window.scrollBy(1100, -100);
flag++;
}
if(name == "")
{
document.getElementById('name_err').innerHTML="Please enter your name!";
document.getElementById('name').scrollIntoView();
window.scrollBy(1000, -100);
flag++;
}
if(gross == "")
{
document.getElementById('gross_err').innerHTML="Please enter your prediction of Saaho Day 1 Gross Collection in Bhimavaram!";
document.getElementById('gross').scrollIntoView();
window.scrollBy(900, -100);
flag++;
}
if(flag == 0)
{
if(confirm("Note: Your submission can not be changed later.\nOnly one submission is allowed for one mobile number."))
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==1)
{
document.getElementById("otp_box").innerHTML="<span style='color:green;'>Submitting your answers...</span>";
}
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("otp_box").innerHTML=xmlhttp.responseText;
//document.getElementById('poll_result').scrollIntoView();
//setTimeout(function () {document.getElementById('ferr').style.display='none'}, 5000);
}
}
//alert("code/saaho/submit_quiz.php?names=" + names + "&language=" + language + "&mno=" + mno + "&sujeeth=" + sujeeth + "&actor=" + actor + "&languages=" + languages + "&sorder=" + sorder + "&budget=" + budget + "&dual=" + dual + "&gross=" + gross + "&name=" + name + "&area=" + area + "&mobile=" + mobile);
xmlhttp.open("GET","code/saaho/submit_quiz.php?names=" + names + "&language=" + language + "&mno=" + mno + "&sujeeth=" + sujeeth + "&actor=" + actor + "&languages=" + languages + "&sorder=" + sorder + "&budget=" + budget + "&dual=" + dual + "&gross=" + gross + "&name=" + name + "&area=" + area + "&mobile=" + mobile, true);
//xmlhttp.send();
alert("Prediction Poll Closed");
}
}
*/
return true;
}
function verify_otp()
{
var flag=0;
var otp=document.getElementById('otp').value;
var mbl=document.getElementById('mbl').value;
if(otp.trim() == "" || otp.length != 4)
{
document.getElementById('otp_err').innerHTML="Please enter a valid OTP!";
//document.getElementById('otp').scrollIntoView();
flag++;
}
if(flag == 0)
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==1)
{
document.getElementById("otp_box2").innerHTML="<span style='color:green;'>Verifying your OTP...</span>";
}
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
if(xmlhttp.responseText == '1')
{
document.getElementById('mbox').innerHTML="<div style='color:green; font-size:18px; text-align:center; margin-top:50px;'><b>Your Quiz Answers have been submitted successfully!</b><br>Thank you for your participation in Bhimavaram Online SAAHO Contest 2019.<br><span style='color:blue;'></span></div><div style='color:blue; text-align:center;' id='refresh'><a href='#' onclick='reload(); return false;'>Refresh</a></div>";
document.getElementById('hd').scrollIntoView();
}
else
document.getElementById("otp_err").innerHTML=xmlhttp.responseText;
//document.getElementById('poll_result').scrollIntoView();
//setTimeout(function () {document.getElementById('ferr').style.display='none'}, 5000);
}
}
xmlhttp.open("GET","code/saaho/complete_prediction.php?otp=" + otp + "&mobile=" + mbl, true);
xmlhttp.send();
}
}
function resend_otp(mbl2)
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==1)
{
document.getElementById("rsend").innerHTML="<span style='color:green;'>Resendng OTP...</span>";
}
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("rsend").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","code/saaho/resend_otp.php?mobile=" + mbl2, true);
xmlhttp.send();
}
</script>
</body>
</html>