-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbutton.php
156 lines (154 loc) · 6.51 KB
/
button.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
<!-- Delete -->
<div class="modal fade" id="del<?php echo $row['user_id']; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<center><h4 class="modal-title" id="myModalLabel">Delete</h4></center>
</div>
<div class="modal-body">
<?php
$del=mysqli_query($conn,"select * from buyers where user_id='".$row['user_id']."'");
$drow=mysqli_fetch_array($del);
?>
<div class="container-fluid">
<h5><center>Are you sure to delete <strong><?php echo ucwords($drow['fname'].' '.$row['lname']); ?></strong> from the list? This method cannot be undone.</center></h5>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> Cancel</button>
<a href="delete.php?id=<?php echo $row['user_id']; ?>" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> Delete</a>
</div>
</div>
</div>
</div>
<!-- /.modal -->
<!-- Edit -->
<div class="modal fade" id="edit<?php echo $row['user_id']; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<center><h4 class="modal-title" id="myModalLabel">Edit</h4></center>
</div>
<div class="modal-body">
<?php
$edit=mysqli_query($conn,"select * from buyers where user_id='".$row['user_id']."'");
$erow=mysqli_fetch_array($edit);
?>
<div class="container-fluid">
<form method="POST" action="edit.php?id=<?php echo $erow['user_id']; ?>">
<div class="row">
<div class="col-lg-2">
<label class="control-label" style="float: left; top:7px;">Quantity:</label>
</div>
<div class="col-lg-10">
<input type="text" class="form-control" name="qty" value="<?php echo $erow['qty']; ?>">
</div>
</div>
<div style="height:20px;"></div>
<p align="center">INFORMATION</p>
<div class="row">
<div class="col-lg-2">
<label class="control-label" style="float: left; top:7px;">Firstname:</label>
</div>
<div class="col-lg-10">
<input type="text" name="fname" class="form-control" value="<?php echo $erow['fname']; ?>">
</div>
</div>
<div style="height:10px;"></div>
<div class="row">
<div class="col-lg-2">
<label class="control-label" style="float: left; top:7px;">Middlename:</label>
</div>
<div class="col-lg-10">
<input type="text" name="mname" class="form-control" value="<?php echo $erow['mname']; ?>">
</div>
</div>
<div style="height:10px;"></div>
<div class="row">
<div class="col-lg-2">
<label class="control-label" style="float: left; top:7px;">Lastname:</label>
</div>
<div class="col-lg-10">
<input type="text" name="lname" class="form-control" value="<?php echo $erow['lname']; ?>">
</div>
</div>
<div style="height:27px;"></div>
<p align="center">ADDRESS</p>
<div class="row">
<div class="col-lg-2">
<label class="control-label" style="float: left; top:7px;">Region:</label>
</div>
<div class="col-lg-10">
<input type="text" name="region" class="form-control" value="<?php echo $erow['region']; ?>">
</div>
</div>
<div style="height:10px;"></div>
<div class="row">
<div class="col-lg-2">
<label class="control-label" style="float: left; top:7px;">Province:</label>
</div>
<div class="col-lg-10">
<input type="text" name="province" class="form-control" value="<?php echo $erow['province']; ?>">
</div>
</div>
<div style="height:10px;"></div>
<div class="row">
<div class="col-lg-2">
<label class="control-label" style="float: left; top:7px;">City/Municipality:</label>
</div>
<div class="col-lg-10">
<input type="text" name="city" class="form-control" value="<?php echo $erow['city']; ?>">
</div>
</div>
<div style="height:10px;"></div>
<div class="row">
<div class="col-lg-2">
<label class="control-label" style="float: left; top:7px;">Barangay:</label>
</div>
<div class="col-lg-10">
<input type="text" name="brgy" class="form-control" value="<?php echo $erow['brgy']; ?>">
</div>
</div>
<div style="height:10px;"></div>
<div class="row">
<div class="col-lg-2">
<label class="control-label" style="float: left; top:7px;">Street:</label>
</div>
<div class="col-lg-10">
<input type="text" name="street" class="form-control" value="<?php echo $erow['street']; ?>">
</div>
</div>
<div style="height:10px;"></div>
<div class="row">
<!-- Product name here -->
<div class="col-lg-10">
<input type="hidden" class="form-control" name="product_name" value="<?php echo $erow['product_name']; ?>">
</div>
</div>
<div style="height:10px;"></div>
<div class="row">
<!-- Product Desc -->
<div class="col-lg-10">
<input type="hidden" class="form-control" name="product_desc" value="<?php echo $erow['product_desc']; ?>">
</div>
</div>
<div style="height:10px;"></div>
<div class="row">
<!-- Price -->
<div class="col-lg-10">
<input type="hidden" class="form-control" name="price" value="25.10">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> Cancel</button>
<button type="submit" class="btn btn-warning"><span class="glyphicon glyphicon-check"></span> Save</button>
</div>
</form>
</div>
</div>
</div>
<!-- /.modal -->