-
Notifications
You must be signed in to change notification settings - Fork 0
/
province_manage.php
123 lines (69 loc) · 2.9 KB
/
province_manage.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
<?php require_once("top.php"); ?>
<?php require_once("connection.php"); restrict(1,1,1,1); ?>
<?php
$province = mysqli_query($con, "SELECT * FROM province");
$row_province = mysqli_fetch_assoc($province);
?>
<div class="card card-body col-lg-8 offset-lg-2 mt-3" style="padding:0">
<div class="card card-header ">
<div class="text-right">
<a href="province_add.php" class="btn btn-outline-primary pull-right " ><span class="glyphicon glyphicon-plus"> Add Province </span></a>
</div>
<h1> Province Manage <small style="color:red"><?php echo date("F Y D"); ?></small></h1>
</div>
<div class="card card-body">
<!-- if add province -->
<?php if(isset($_GET["add"])){ ?>
<br>
<div class="alert alert-success alert-dismissable col-lg-10 col-lg-offset-1" style="font-size:20px; color:tomato; text-align:center">
<button class="close " area-hidden="true" data-dismiss="alert" style="font-size:30px; color:red">X</button>
Success ! ولایت اضافه شو</div>
<?php } ?>
<!-- if edit province -->
<?php if(isset($_GET["edit"])){ ?>
<br>
<div class="alert alert-success alert-dismissable col-lg-10 col-lg-offset-1" style="font-size:20px; color:tomato; text-align:center">
<button class="close " area-hidden="true" data-dismiss="alert" style="font-size:30px; color:red">X</button>
Success ! ولایت تغیر شو</div>
<?php } ?>
<!-- message orror -->
<?php if(isset($_GET["error"])) { ?>
<h3 class="alert alert-danger alert-dismissable text-center" >
<button class="close" area-hidden="true" data-dismiss="alert">× </button>
Error: ولایت تغیر نه شو مهربانی وکړئ بیا کوشش وکړئ
</h3>
<?php } ?>
<table class="table table-striped table-hover">
<?php if ($row_province > 0 ) { ?>
<thead class="alert alert-success">
<tr>
<th class="text-center" >Province ID</th>
<th >Province Name</th>
<th >Edit</th>
</tr>
</thead>
<tbody>
<?php do { ?>
<tr>
<th class="text-center" ><?php echo $row_province["province_id"]; ?> </th>
<th ><?php echo $row_province["province_name"]; ?> </th>
<th >
<a href="province_edit.php?province_id=<?php echo $row_province["province_id"]; ?>" >
<span class="glyphicon glyphicon-edit"> Edit </span>
</a>
</th>
</tr>
<?php } while($row_province = mysqli_fetch_assoc($province)); ?>
<?php } else { ?>
<div class="text-center ">
<br>
<br>
<br>
<h1 class="text-center label label-success well-lg" style="font-size:18px"> هیڅ ولایت تر اوسه شتون نه لری </h1>
</div>
<?php } ?>
</tbody>
</table>
</div>
</div>
<?php require_once("footer.php"); ?>