/
athletes.php
executable file
·265 lines (256 loc) · 13.7 KB
/
athletes.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
<?php require_once "session.php";
require_once "header.php";
require_once 'functions/states_function.php';
require_once 'functions/district_function.php';
require_once 'functions/athletes_functions.php';
require_once 'functions/sports_function.php';
$statesFunction = new statesFunction();
$districtFunction = new districtFunction();
$sportsfunction = new sportsfunction();
$athleteFunction = new athletesFunction();
?>
<div class="container">
<div class="container align_center align_height">
<span class="sports">ADD ATHLETES</span>
</div><!--end container-->
<div class="container">
<div class="col-xs-12 col-md-11">
<div class="col-md-4 hidden-xs"></div>
<div class="col-xs-12 col-md-7 align_margin">
<form name="athletes_form" id="athlete_form">
<div class="form-group">
<label>Athlete Name</label><br>
<input type="text" class="adjust_width" name="athlete_name" data-validation-error-msg="Please Enter the name of the Athelete" data-validation="required">
</div>
<div class="form-group" style="margin-left: -15px;">
<label for="date" class="fl" style="position: relative; left: 15px;">Date Of Birth</label><br>
<input class="athlete_date_pick" type="text">
<!-- <select class="form-control classic dob_align fl" id="date" name="athlete_dobday" data-validation-error-msg="Please Select the Date" data-validation="required">
<option value="">Date</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<select class="form-control classic dob_align fl" id="month" name="athlete_dobmonth" data-validation-error-msg="Please Select the Month" data-validation="required">
<option value="">Month</option>
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
</select>
<select class="form-control classic dob_align fl" id="year" name="athlete_dobyear" data-validation-error-msg="Please Select the Year" data-validation="required">
<option value="">Years</option>
<option value="1991">1991</option>
<option value="1992">1992</option>
<option value="1993">1993</option>
</select> -->
</div>
<div class="form-group">
<label>Mobile Number</label><br>
<input type="text" id="athletes_mobile1" class="adjust_width" name="athlete_mobile" data-validation-error-msg="Please Enter the value that must contain 10 numbers" data-validation="length" data-validation-length="10">
</div>
<div class="form-group">
<label for="sel1">Gender</label>
<select class="form-control adjust_width classic" id="sel1" name="athlete_gender" data-validation-error-msg="Please Select the Gender" data-validation="required">
<option value=""> Gender</option>
<option value="Female">Female</option>
<option value="Male">Male</option>
</select>
</div>
<div class="form-group">
<label for="sel2">State</label>
<select class="form-control adjust_width classic athlete_state_act" id="sel2" name="athlete_state" data-validation-error-msg="Please Select the State" data-validation="required">
<option value="">State</option>
<?php
$query = $statesFunction->statesSelect();
while ($row = mysql_fetch_array($query)) {
?>
<option value="<?php echo $row['states_id']; ?>"><?php echo $row['states_name']; ?></option>
<?php } ?>
</select>
</div>
<div class="form-group">
<label for="sel3">District</label>
<select class="form-control adjust_width classic athlete_district_act" id="sel3" name="athlete_district" data-validation-error-msg="Please Select the District" data-validation="required">
<option value=""> District</option>
<?php
$query = $districtFunction->districtSelect();
while ($row = mysql_fetch_array($query)) {
?>
<option value="<?php echo $row['district_id']; ?>"><?php echo $row['district_name']; ?></option>
<?php } ?>
</select>
</div>
<div class="align_height align_margin">
<label>Address</label><br>
<textarea class="area_width" name="athlete_address" data-validation-error-msg="please Enter the Address" data-validation="required"></textarea>
</div>
<div class="form-group">
<label>Taluka</label><br>
<input type="text" class="adjust_width" name="athlete_taluka" data-validation-error-msg="Please Enter the name of the Taluka" data-validation="required">
</div>
<div class="form-group">
<label for="sel1">Sports</label>
<select class="form-control adjust_width classic" id="sel1" name="athlete_sports" data-validation-error-msg="Please Select the Sports" data-validation="required">
<option value="">Sports</option>
<?php
$query = $sportsfunction->sportsSelect();
while ($row = mysql_fetch_array($query)) {
?>
<option value="<?php echo $row['sports_id']; ?>"><?php echo $row['sports_name']; ?></option>
<?php } ?>
</select>
</div>
<div class="col-md-9 schedule_btn">
<!-- <button type="button" class="btn btn-primary align_right clear add_athletes_act">Submit</button> -->
<input type="reset" class="btn btn-primary align_right clear" value="Cancel">
<input type="submit" class="btn btn-primary align_right test-submit clear add_athletes_act" value="Submit">
</div>
</form>
</div>
<div class="container table-position">
<table class="table athletes_table">
<thead>
<tr class="row_color">
<th class="align_center">SLNO</th>
<th class="align_center">Athlete Name</th>
<th class="align_center">Gender</th>
<th class="align_center">D.O.B</th>
<th class="align_center">Address</th>
<th class="align_center">Action</th>
</tr>
</thead>
<tbody>
<?php
$query = $athleteFunction->athleteSelect();
$i=1;
while ($row = mysql_fetch_array($query)) {
?>
<tr class="align_center delete_color">
<input type='hidden' class="t_athlete_id" name='athlete_id' value="<?php echo $row['athlete_id']; ?>">
<td class="t_athlete_s_id"><?php echo $i; ?></td>
<td class="t_athlete_name"><?php echo $row['athlete_name']; ?></td>
<td class="t_athlete_gender"><?php echo $row['athlete_gender']; ?></td>
<td class="t_athlete_dob"><?php echo date("d/m/Y", strtotime($row['athlete_dob'])); ?></td>
<td class="t_athlete_address"><?php echo $row['athlete_address']; ?></td>
<td>
<span class="edit_state" onclick="editfunction(<?php echo $row['athlete_id'] ?>)">Edit</span>
<span class="delete_state" data-value="<?php echo $row['athlete_id'] ?>">Delete</span>
</td>
</tr>
<?php $i++;} ?>
</tbody>
</table>
</div>
</div>
</div><!-- end container-->
<!-- <div class="container align_center">
<ul class="pagination">
<li><a href="#" class="align_left_icon"><i class="fa fa-angle-double-left"></i></a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#" class="align_right_icon"><i class="fa fa-angle-double-right"></i></a></li>
</ul>
</div> --><!-- end container-->
</div><!-- end container-->
<div class="popup_fade cancel_btn"></div><!--popup_fade-->
<div class="container">
<div class="athletes_div">
<code class="close_btn cancel_btn"> </code>
<div class="edit_title">
<span class="del_txt">EDIT</span>
</div><!--edit_title-->
<div class="container state-content col-md-12">
<div class="col-xs-12 col-md-12 align_margin">
<form name="edit_athletes_form" id="edit_athletes_form">
<input type="hidden" class="statesid" name="edit_athlete_id">
<div class="form-group">
<label>Athlete Name</label><br>
<input type="text" class="adjust_width" name="edit_athlete_name" data-validation-error-msg="Please Enter the name of the Athelete" data-validation="required">
</div>
<div class="form-group align-day" style="margin-left: -15px;">
<label for="date" class="fl" style="position: relative; left: 15px;">Date Of Birth</label><br>
<input class="popup_athlete_datepick" type="text">
<!-- <select class="form-control classic dob_align1 fl" id="date1" name="edit_athlete_dobday" data-validation-error-msg="Please Select the Date" data-validation="required">
<option value="">Date</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<select class="form-control classic dob_align2 fl" id="month" name="edit_athlete_dobmonth" data-validation-error-msg="Please Select the Month" data-validation="required">
<option value="" value="">Month</option>
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
</select>
<select class="form-control classic dob_align3 fl" id="year" name="edit_athlete_dobyear" data-validation-error-msg="Please Select the Year" data-validation="required">
<option value="">Years</option>
<option value="1991">1991</option>
<option value="1992">1992</option>
<option value="1993">1993</option>
</select> -->
</div>
<div class="form-group">
<label>Mobile Number</label><br>
<input id="ahtlete_mobile" type="text" class="adjust_width" name="edit_athlete_mobile" data-validation-error-msg="Please Enter the value that must contain 10 numbers" data-validation="length" data-validation-length="10">
</div>
<div class="form-group">
<label for="sel1">Gender</label>
<select class="form-control adjust_width classic" id="sel1" name="edit_athlete_gender" data-validation-error-msg="Please Select the Gender" data-validation="required">
<option value=""></option>
<option value="Female">Female</option>
<option value="Male">Male</option>
</select>
</div>
<div class="form-group">
<label for="sel1">State</label>
<select class="form-control adjust_width classic athlete_state_act" id="sel1" name="edit_athlete_state" data-validation-error-msg="Please Select the State" data-validation="required">
<option value="">State</option>
<?php
$query = $statesFunction->statesSelect();
while ($row = mysql_fetch_array($query)) {
?>
<option value="<?php echo $row['states_id']; ?>"><?php echo $row['states_name']; ?></option>
<?php } ?>
</select>
</div>
<div class="form-group">
<label for="sel1">District</label>
<select class="form-control adjust_width classic athlete_district_act" id="sel1" name="edit_athlete_district" data-validation-error-msg="Please Select the District" data-validation="required">
<option value=""> District</option>
</select>
</div>
<div class="align_height align_margin">
<label>Address</label><br>
<textarea class="area_width_athlete" name="edit_athlete_address" data-validation-error-msg="Please Enter the Address" data-validation="required"></textarea>
</div>
<div class="form-group">
<label>Taluka</label><br>
<input type="text" class="adjust_width" name="edit_athlete_taluka" data-validation-error-msg="Please Enter the Taluka" data-validation="required">
</div>
<div class="form-group">
<label for="sel1">Sports</label>
<select class="form-control adjust_width classic" id="sel1" name="edit_athlete_sports" data-validation-error-msg="Please Select the Sport" data-validation="required">
<option value=""> Sports</option>
<?php
$query = $sportsfunction->sportsSelect();
while ($row = mysql_fetch_array($query)) {
?>
<option value="<?php echo $row['sports_id']; ?>"><?php echo $row['sports_name']; ?></option>
<?php } ?>
</select>
</div>
<div class="col-md-10 schedule_btn">
<!-- <button type="button" class="btn btn-primary align_right clear edit_athletes_act">Submit</button>
<button type="button" class="btn btn-primary align_right clear">Clear</button> -->
<input type="reset" class="btn btn-primary align_right clear reset_form edit_athlete_clear" value="Cancel">
<input type="submit" class="btn btn-primary align_right test-submit clear edit_athletes_act" value="Submit">
</div>
</form>
</div>
</div><!--state-content-->
</div><!--test_battery_div-->
</div><!--container-->
<?php require_once "footer.php" ?>