-
Notifications
You must be signed in to change notification settings - Fork 0
/
Edit.php
144 lines (137 loc) · 4.77 KB
/
Edit.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
<?php
include("constant.php");
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Brilliance GPS Tracking</title>
<!-- slider start -->
<!-- slider end -->
<link rel="stylesheet" href="css/style.css">
<!--[if lt IE 9]>
<script type="text/javascript" src="html5.js"></script>
<![endif]-->
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="pngfix1.js"></script>
<![endif]-->
<!-- Menu start --------------->
<link href="menu/quickmenu0.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="menu/quickmenu0.js"></script>
<!-- Menu End --------------->
</head>
<body>
<header>
<div id="wrap">
<div class="logo"><img src="images/logo.png" border="0"></div>
<div class="topmenu">
<ul>
<li><a> </a></li>
<li><a href="change-password.php">Change Password</a> |</li>
<li><a href="index.php"><img src="images/logout.png" width="16" height="16" border="0" align="absmiddle"> Logout</a></li>
</ul>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</header>
<nav>
<ul id="qm0" class="qmmc" >
<li><a href="admin.php">Dashboard</a></li>
<li><a href="#">Product</a>
<ul>
<li><a href="add-category.php">Add category</a></li>
<li><a href="add-sub-category.php">Add Sub category</a></li>
<li><a href="product.php">Add Product</a></li>
</ul>
</li>
</ul>
</nav>
<?php
$id=$_GET['id'];
$query="SELECT * From tbl_category2 where id='$id'";
$res=mysqli_query($con,$query);
while ($row=mysqli_fetch_array($res)) {
?>
<form action="catupdate.php" method="post" enctype="multipart/form-data">
<div id="wrap">
<div class="clear" style="height:5px;"></div>
<div id="wrap2">
<h1>Add category</h1>
<br>
<div class="form-raw">
<div class="form-name">category Name</div>
<div class="form-txtfld">
<input type="hidden" name="id" value="<?php echo $row['id']; ?>">
<input type="text" name="category_name" active value="<?php echo $row['category_name']; ?>">
</div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<div class="form-raw">
<div class="form-name">Active</div>
<div class="form-txtfld">
<input type="checkbox" name="Active" <?php if($row['Active']=="Active"){
echo "checked='checked'";
} ?> >
</div>
<div class="clear"></div>
</div>
<div class="form-raw">
<div class="form-name"> </div>
<div class="form-txtfld" style="width:290px;">
<input type="submit" class="btn" name="submit">
</div>
</div>
</div>
</form>
<?php
}
?>
<div class="clear"> </div>
</div>
<div id="wrap3">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="admintable">
<tr>
<th width="59" align="left" valign="middle">Sr.No.</th>
<th width="752" align="left" valign="middle">category_name Name</th>
<th width="77" align="left" valign="middle">Status</th>
<th width="54" align="left" valign="middle">Edit</th>
<th width="71" align="left" valign="middle">Remove</th>
</tr>
<?php
$i=1;
$query="SELECT * From tbl_category2 ";
$res=mysqli_query($con,$query);
while ($row=mysqli_fetch_array($res)) {
?>
<tbody>
<tr>
<td align="left" valign="top"><?= $i++?></td>
<td align="left" valign="top"><?php echo $row['category_name']; ?></td>
<td align="left" valign="top"><strong><?php echo $row['Active']; ?></strong></td>
<td align="left" valign="top"><a href="Edit.php?id=<?= $row['id'];?>">Edit</a></td>
<td align="center" valign="top"><a href="Remove.php?id=<?= $row['id'];?>"><img src="images/icon-bin.jpg" alt="" width="25" height="25" border="0" align="absmiddle" /></a></td>
</tr>
</tbody>
<?php
}
?>
</table>
<div class="clear"> </div>
</div>
<div class="clear"></div>
<footer>
<footer class="whitefoter">
<div class="whitefooter-cont">
<div style="float:left;">Copyright © Brilliance GPS Tracking. All Rights Reserved.</div>
<a href="https://www.akswebsoft.com/" target="_blank" style="float:right;">
<img src="images/akslogo.png" alt="AKS Websoft Consulting Pvt. Ltd." title="AKS Websoft Consulting Pvt. Ltd."></a>
<div class="clear"></div>
</div>
</footer>
</footer>
</body>
</html>