-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile_sr.php
223 lines (191 loc) · 7.39 KB
/
profile_sr.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
<?php
include('auth.php');
require('db.php');
$var1 = $_SESSION['skid'];
$sql = "SELECT * from `Shopkeeper` where skid= '$var1'" ;
$query = mysqli_query($db, $sql);
$row = mysqli_fetch_assoc($query);
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<div class="container">
<div class="main-body">
<!-- Breadcrumb -->
<nav aria-label="breadcrumb" class="main-breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="">User profile</a></li>
<a href = "logout.php" class="ml-auto"> Logout </a>
</ol>
</nav>
<!-- /Breadcrumb -->
<div class="row gutters-sm">
<div class="col-md-4 mb-3">
<div class="card h">
<div class="card-body">
<div class="d-flex flex-column align-items-center text-center">
<?php if($row['gender']=="M"){ ?>
<img src="https://bootdey.com/img/Content/avatar/avatar7.png" alt="Admin" class="rounded-circle" width="150">
<?php }else{ ?>
<img src="https://bootdey.com/img/Content/avatar/avatar8.png" alt="Admin" class="rounded-circle" width="150">
<?php } ?>
<div class="mt-3">
<h4><?php echo $row['skname']; ?></h4>
<p class="text-secondary mb-1">Shopkeeper ID</p>
<p class="text-muted font-size-sm"><?php echo $row['skid']; ?></p>
<!-- <button class="btn btn-primary">Follow</button>
<button class="btn btn-outline-primary">Message</button> -->
</div>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class="card mb-3">
<div class="card-body">
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Full Name</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $row['skname']; ?>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Gender</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $row['gender']; ?>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Address</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $row['address']; ?>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Phone</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $row['contact']; ?>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Date of Birth</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $row['dob']; ?>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-6">
<a class="btn btn-info " href="profile_update.php">Update</a>
</div>
<div class="col-sm-6">
<a class="btn btn-info "href="profile_password_update.php">Change Password</a>
</div>
</div>
</div>
</div>
<div class="row gutters-sm">
<div class="col-sm-6 mb-3">
<div class="card h-100">
<div class="card-body">
<h6 class="d-flex align-items-center mb-3">My Shop 1</h6>
<div class="progress mb-3" style="height: 5px">
<div class="progress-bar bg-primary" role="progressbar" style="width: 80%" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 mb-3">
<div class="card h-100">
<div class="card-body">
<h6 class="d-flex align-items-center mb-3"> My Shop 2</h6>
<div class="progress mb-3" style="height: 5px">
<div class="progress-bar bg-primary" role="progressbar" style="width: 80%" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</div>
<br/>
<div class="center">
<h1>Status</h1>
<table id = "users">
<tr>
<th>Shop-Id</th>
<th>Shop Name</th>
<th>Address</th>
<th>Status</th?>
<th>License Start</th>
<th>License End</th>
<th>Pending Charges</th>
</tr>
<?php
$query = "SELECT * FROM Shop WHERE skid=$var1";
$result = mysqli_query($db, $query);
while($row = mysqli_fetch_assoc($result)){
?>
<tr>
<td><?php echo $row['sid'];?></td>
<td><?php echo $row['sname'];?></td>
<td><?php echo $row['address'];?></td>
<td><?php echo $row['approval'];?></td>
<td><?php if($row['approval'] === 'Approved'){ echo $row['licensestart']; }else{ echo '-';} ?></td>
<td><?php if($row['approval'] === 'Approved'){ echo $row['licenseend']; }else{ echo '-';} ?></td>
<td><?php echo $row['charges'];?></td>
</tr>
<?php
}
?>
</table>
<br/>
<br/>
<h2>License Expiry Alert</h2>
<h5>(Expiring within 7 days)</h5>
<table id = "status">
<tr>
<th>Shop-Id</th>
<th>Shop Name</th>
<th>Address</th>
<th>License End</th>
</tr>
<?php
$query = "SELECT * FROM Shop WHERE DATEDIFF(licenseend,current_date) <10 and id='$id'";
$result = mysqli_query($db, $query);
while($row = mysqli_fetch_assoc($result)){
?>
<tr>
<td><?php echo $row['sid'];?></td>
<td><?php echo $row['sname'];?></td>
<td><?php echo $row['address'];?></td>
<td><?php echo $row['licenseend'];?></td>
</tr>
<?php
}
?>
</table>
</div>
</div>
</div>
</div>
</div>
</body>
</html>