-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.php
115 lines (108 loc) · 4.33 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
<?php
session_start();
// Check if Session Exists
if(isset($_SESSION['ifitness_id'])) {
header("Location: index.php");
}
// Config and Register Controller
include_once "app/config/conn.php";
include "app/controller/registerController.php";
// Page Options
$pageOpt = array(
"title" => "FitConnect . Register",
'navName' => "",
'cssIncludes' => "",
"jsIncludes" => "
<script type='text/javascript' src='lib/jquery-validation/dist/jquery.validate.min.js' /></script>",
);
?>
<!DOCTYPE html>
<head>
<?php include_once "app/views/meta.php"; ?>
</head>
<div id='fixed-bg'> </div>
<!-- -->
<div id='main-content'>
<div class='view' style='margin: 0'>
<!-- Register Intro -->
<div class='homepage-info vert-center'>
<img src='assets/img/logos/fitconnect-logo-text.png' alt='logo' class='full-logo'/>
<br /> <big> Find, Connect, Train! </big> <br />
<a href='#' class='custom-btn small-button dark-color model-popup'
data-content='about' data-title='About FitConnect'> Find Out More </a>
</div>
<!-- Register Form-->
<form action='' method='post' name='register' id='register-form' class="pure-form pure-form-stacked modulated-box vert-center">
<h1> Register an account </h1>
<fieldset>
<?php if(isset($feedback)) {
echo "<div class='feedback-msg ".$feedback['type']."'>".$feedback['message']."</div>";
} ?>
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-2 l-cell">
<label for="u_name">First Name *<span></span></label>
<input type='text' name='u_name' id='u_name' required/>
</div>
<div class="pure-u-1 pure-u-md-1-2 r-cell">
<label for="u_surname">Surname<span></span></label>
<input type='text' name='u_surname' id='u_surname'/>
</div>
<!-- -->
<div class="pure-u-1 pure-u-md-1-1" >
<label for="u_surname">Gender *<span></span> </label>
<input type='hidden' name='u_gender' id='u_gender' required/>
<div class='c-align'>
<div class='click-tile gender-tile tooltip left-tooltip' data-gender='1' style='margin-right: 20px' title="Male">
<i class="fa fa-male"></i>
</div>
<div class='click-tile gender-tile tooltip right-tooltip' data-gender='2' title="Female">
<i class="fa fa-female"></i>
</div>
</div>
</div>
<!-- -->
<div class="pure-u-1 pure-u-md-1-1">
<label for="u_username">Username *<span></span> </label>
<input type='text' name='u_username' id='u_username' required />
</div>
<!-- -->
<div class="pure-u-1 pure-u-md-1-1">
<label for="u_password">Password *<span></span></label>
<input type='password' name='u_password' id='u_password' required />
</div>
<!--
<div class="pure-u-1 pure-u-md-1-1">
<label for="u_email">Email<span></span></label>
<input type='text' name='u_email' id='u_email'/>
</div>
-->
<input type='submit' name='register' id='register' />
</div>
</fieldset>
</form>
</div>
</div>
<?php include_once "app/views/scripts.php"; ?>
<script>
$( document ).ready(function() {
$("#register-form").validate({
ignore: "",
errorPlacement: function () { },
errorClass: "bob",
highlight: function (element, errorClass, validClass) {
$(element).parent().find('label').addClass("error");
},
unhighlight: function (element, errorClass, validClass) {
$(element).parent().find('label').removeClass("error");
}
});
$('.click-tile.gender-tile').click(function(){
var genderVal = $(this).data('gender');
$('#u_gender').val(genderVal);
$('.gender-tile').removeClass('active');
$(this).addClass('active');
});
});
</script>
</body>
</html>