-
Notifications
You must be signed in to change notification settings - Fork 0
/
services.php
174 lines (113 loc) · 4.83 KB
/
services.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
<?php include "header.php";?>
<div class="bg1">
<img src="img/slider/bg1.jpg">
</div>
<div class="h1"><center><h1 style="color:#a51349"> OUR SERVICES</h1></center></div>
<div class="container">
<div class="row">
<?php
$ret=mysqli_query($con,"select * from services");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="flip-box">
<div class="flip-box-inner">
<div class="flip-box-front">
<img src="images/<?php echo $row['image']; ?>" style="height:183px;width:300px;border-radius: 15%;">
<h3 style="color:#fdc00a"><?php echo $row['service_name']; ?></h3>
<?php
if($row['discount']>0){ ?>
<h6 style="color:#fdc00a">Discount <?php echo $row['discount']; ?> %</h6>
<?php
}
?>
</div>
<div class="flip-box-back"></br></br>
<h2 style="color:#040404"><?php echo $row['service_name']; ?></h2>
<?php
if($row['discount']>0){
?>
<h3 style="color:red"><Del> <?php echo $row['price'];?>Tk</h3>
<h3 style="color:green"><?php echo $row['price'] - ($row['discount'] * $row['price'])/100; ?> Tk</h3>
<?php
}
else{?>
<h3 style="color:green"><?php echo $row['price']; ?> Tk</h3>
<?php
}
?>
<a href="details.php?id=<?php echo $row['service_id'] ;?>" class="btn btn-success"> Details</a>
<a href="appointment.php?id=<?php echo $row['service_id'] ;?>" class="btn btn-success"> Place Appointment</a>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
<!-- <div class="container">
<div class="row">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Service name</th>
<th>Category</th>
<th>Discount</th>
<th>Price</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
include"db.php";
$product_query = "SELECT * FROM services ";
$run_query = mysqli_query($con,$product_query);
$sl=0;
if(mysqli_num_rows($run_query) > 0){
while($row = mysqli_fetch_array($run_query)){
$sl++;
$service_id = $row['service_id'];
$service_name = $row['service_name'];
$category_name = $row['category_name'];
$price = $row['price'];
$dicount = $row['discount'];
$image=$row['image'];
$dis = ($dicount*$price)/100;
$price1 = $price - $dis;
?>
<tr>
<td><b><?php echo $sl; ?></td>
<td><?php echo $service_name; ?></td>
<td><?php echo $category_name;?></td>
<td><?php echo $dicount; ?>%</td>
<td>
<?php
if($dis > 0)
{ ?>
<strike style="color:red;"> <?php echo $price; ?> </strike>Tk  
<b style="color:green;"> <?php echo $price1; ?> </b> Tk
<?php
}
?>
<?php
if($dis == 0)
{ ?>
<b style="color:green;"> <?php echo $price; ?> </b> Tk
<?php
}
?>
</td>
<td> <a href="appointment.php?id=<?php echo $service_id ;?>" class="btn btn-success"> Place Appointment</a> </td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div> -->
<br> <br>
<?php include"footer.php";?>