/
category.php
executable file
·78 lines (77 loc) · 3.33 KB
/
category.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
<?php
require_once "session.php";
require_once "header.php";
require_once "functions/category_function.php";
$obj = new categoryfunction();
?>
<div class="container">
<div class="container align_center align_height">
<span class="sports">CATEGORY</span>
</div><!--end container-->
<div class="container align_margin">
<div class="col-md-8">
<div class="col-md-6"></div>
<div class="col-md-6 align_margin">
<form id="category_form" name="categories_form" role="form">
<div class="align_margin">
<label>Enter the Category Name</label><br>
<input type="text" class="sportsname" name="category_name" data-validation-error-msg="Please enter the category name" data-validation="required">
<input type="hidden" name="category_add" value="1">
</div>
<!-- <button type="button" class="btn btn-primary align_right clear category_submit_act">Submit</button> -->
<input type="submit" class="btn btn-primary align_right clear category_submit_act" value="Submit">
</form>
</div>
<div class="container table-position">
<table class="table state_table" id="category_table">
<thead>
<tr class="row_color">
<th class="align_center">SLNO</th>
<th class="align_center">Category Name</th>
<th class="align_center">Action</th>
</tr>
</thead>
<tbody>
<?php
$data = $obj->categoryselectfunction();
$i=1;
foreach( $data as $eachrecord ) {
?>
<tr class="align_center delete_color">
<td><?php echo $i; ?></td>
<input class="category_id" value="<?php echo $eachrecord ['categories_id']; ?>" type="hidden">
<td class="category_name"><?php echo $eachrecord ['categories_name']; ?></td>
<td>
<span class="edit_state">Edit</span>
<span class="delete_state" data-value="<?php echo $eachrecord ['categories_id']; ?>">Delete</span>
</td>
</tr>
<?php $i++; } ?>
</tbody>
</table>
</div>
</div>
</div><!-- end container-->
</div>
<div class="popup_fade cancel_btn"></div><!--popup_fade-->
<div class="container">
<div class="state_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">
<form name="category_update" id="category_update_form">
<div class="align_margin">
<label>Enter the Category Name</label><br>
<input type="text" class="sportsname category_update_name" name="category_name" data-validation-error-msg="Please enter the category name" data-validation="required">
<input type="hidden" class="category_update_id" name="category_id">
<input type="hidden" name="category_update" value="1">
</div><!--align_margin-->
<!-- <button type="button" class="btn btn-primary align_right clear category_update_act">Submit</button> -->
<input type="submit" class="btn btn-primary align_right clear category_update_act" value="Submit">
</form>
</div><!--tate-content-->
</div><!--state_div-->
</div><!--container-->
<?php require_once "footer.php" ?>