-
Notifications
You must be signed in to change notification settings - Fork 1
/
register.php
158 lines (154 loc) · 9.8 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
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
<?php
session_start();
if (isset($_GET['order']) == 'false') {
$_SESSION['order'] = "false";
} elseif (isset($_GET['order']) == 'true') {
$_SESSION['order'] = "true";
}
include("includes/template_frontend/page_link_config.php");
define("SITE_KEY", "6Ld0MsgUAAAAAKLP-PtUC-vpBXz_sXkOWJRP-Kha");
?>
<!DOCTYPE html>
<html>
<head>
<?php include("includes/template_frontend/head_tag_contents.php"); ?>
<style>
label {
margin-top: 10px;
}
.card-body {
padding: 0.5rem;
}
</style>
</head>
<body>
<div class="modalx" style="display: none;"></div>
<?php include("includes/template_frontend/navigation.php"); ?>
<div class="container margin-top" style="width:100%; max-width:800px">
<div class="row ">
<div class="col">
<div class="card bg-light shadow-lg p-3 mb-5 mt-5">
<div class="card-header">
<h2 align="center"><b>ลงทะเบียน</b></h2>
</div>
<div class="card-body">
<form id="register" action="" method="">
<div class="form-row">
<div class="col-md-6">
<!-- <label for="username" class="control-label col-sm">Username: </label> -->
<div class="col-sm-12 input-group">
<div class="input-group-prepend">
<div class="input-group-text ipt">
<i class="far fa-user"></i>
</div>
</div>
<input type="text" class="form-control ipf" id="username_register" name="username_register" placeholder="Username" autofocus required>
</div>
</div>
<div class="col-md-6">
<!-- <label for="site" class="control-label col-sm">ชื่อสถานที่ตั้ง: </label> -->
<div class="col-sm-12 input-group">
<div class="input-group-prepend">
<div class="input-group-text ipt">
<i class="fas fa-location-arrow"></i>
</div>
</div>
<input type="text" class="form-control ipf" id="site" name="site" placeholder="ชื่อสถานที่ตั้ง" required>
</div>
</div>
<!-- <div class="col-md-6">
<label for="password" class="control-label col-sm">Password: </label>
<div class="col-sm-12 input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<i class="fas fa-key"></i>
</div>
</div>
<input type="password" class="form-control" placeholder="Password" id="password_register" name="password_register"
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="ต้องมีตัวเลขอย่างน้อยหนึ่งตัวและตัวพิมพ์ใหญ่และตัวพิมพ์เล็กหนึ่งตัวอย่างน้อย 8 ตัวอักษรขึ้นไป" required>
</div>
</div> -->
</div>
<div class="form-row">
<div class="col-md-6">
<!-- <label for="fullname" class="control-label col-sm">ชื่อ-สกุล: </label> -->
<div class="col-sm-12 input-group">
<div class="input-group-prepend">
<div class="input-group-text ipt">
<i class="fas fa-id-badge"></i>
</div>
</div>
<input type="text" class="form-control ipf" id="fullname" name="fullname" placeholder="ชื่อ-สกุล" required>
</div>
</div>
<div class="col-md-6">
<!-- <label for="email" class="control-label col-sm">E-mail Address: </label> -->
<div class="col-sm-12 input-group">
<div class="input-group-prepend">
<div class="input-group-text ipt">
<i class="fas fa-envelope-square"></i>
</div>
</div>
<input type="email" class="form-control ipf" id="email" name="email" placeholder="อีเมล" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$" title="ใช้ตัวพิมพ์เล็กและรูปแบบที่ถูกต้อง" required>
</div>
</div>
</div>
<div class="form-row">
<div class="col-md-6">
<!-- <label for="number" class="control-label col-sm">หมายเลขโทรศัพท์: </label> -->
<div class="col-sm-12 input-group">
<div class="input-group-prepend">
<div class="input-group-text ipt">
<i class="fas fa-phone-square"></i>
</div>
</div>
<input type="text" class="form-control ipf" id="number" name="number" placeholder="หมายเลขโทรศัพท์" pattern=".{9,}[0-9]" title="ต้องเป็นตัวเลขเท่านั้น" required>
</div>
</div>
<div class="col-md-6">
<!-- <label for="address" class="control-label col-sm">ที่อยู่: </label> -->
<div class="col-sm-12 input-group">
<div class="input-group-prepend">
<div class="input-group-text ipt">
<i class="fas fa-at"></i>
</div>
</div>
<textarea id="address" name="address" class="form-control ipf" placeholder="ที่อยู่" required></textarea>
</div>
</div>
</div>
<div class="form-row">
<div class="col-12">
<div class="col-sm-12">
<div class="g-recaptcha" id="g-recaptcha" data-sitekey="<?php echo SITE_KEY ?>"></div>
</div>
</div>
</div>
<div class="form-row">
<div class="col-md-6">
<div class="col-sm-12">
<hr />
<?php
if (isset($_SESSION['register']) != '') { ?>
<button type="submit" id="registerBtn" name="registerBtn" class="btn btn-dark-cus" disabled>สมัครสมาชิก</button>
<?php } else { ?>
<button type="submit" id="registerBtn" name="registerBtn" class="btn btn-dark-cus">สมัครสมาชิก</button>
<?php } ?>
<button type="reset" name="reset" class="btn btn-success-cus">รีเซ็ต</button>
<button type="bottom" class="btn btn-danger-cus" onclick="window.history.back()">ยกเลิก</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php include("includes/template_frontend/footer.php"); ?>
<?php include("includes/template_frontend/bottom_tag_contents.php"); ?>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script src="js/main_site/register.js"></script>
<script src="js/main_site/backtotop.js"></script>
</body>
</html>