-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.php
111 lines (103 loc) · 5.16 KB
/
register.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
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>Register</title>
<?php require_once("./resources/header_links.php");?>
</head>
<body class="animsition">
<div class="page-wrapper">
<div class="page-content--bge5">
<div class="container">
<div class="login-wrap">
<div class="login-content">
<div class="login-logo">
<a href="./login.php">
<img style="height:auto; width:179px ;" src="images/icon/logo_.png" alt="logo">
</a>
</div>
<?php
if (isset($_SESSION['error']) && !isset($_SESSION['reg'])) {
?>
<div class="alert alert-danger">
<?php
if ($_SESSION['error']=='SPS') {
echo "Sponser ID not Valid";
}
elseif($_SESSION['error']=='Mobile')
{
echo "Mobile Number is already used";
}
else
{
echo "Something went Wrong Try again";
}
?>
</div>
<?php
unset($_SESSION['error']);
}
if (isset($_SESSION['reg'])) {
?>
<div class="alert alert-success">
<?php
echo "Agent ID : {$_SESSION['agent_id']} <br> Name : {$_SESSION['Name']}";
unset($_SESSION['agent_id']);
unset($_SESSION['Name']);
?>
</div>
<?php
unset($_SESSION['reg']);
unset($_SESSION['error']);
}
?>
<div class="login-form">
<form action="./request_handler.php" method="post">
<div class="form-group">
<!-- <label>Sponsor ID</label> -->
<input class="au-input au-input--full" type="text" name="sps_id" id="sps_id" value="<?php if(isset($_GET['sps_id'])) { echo($_GET['sps_id']); } ?>" placeholder="Sponsor ID" pattern="[0-9]{6}">
</div>
<div class="form-group">
<!-- <label>Full name</label> -->
<input class="au-input au-input--full" type="text" name="username" placeholder="Full name" required>
</div>
<div class="form-group">
<!-- <label>Mobile</label> -->
<input class="au-input au-input--full" type="phone" name="user_mob" placeholder="Mobile" required>
</div>
<div class="form-group">
<!-- <label>Email</label> -->
<input class="au-input au-input--full" type="password" name="user_password" placeholder="Password" required>
</div>
<div class="login-checkbox">
<label>
<input type="checkbox" name="aggree" required>Agree the terms and policy
</label>
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit" name="register_btn">register</button>
</form>
<div class="register-link">
<p>
Already have account?
<a href="./login.php">Sign In</a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php require_once("./resources/footer_links.php")?>
</body>
</html>
<!-- end document-->