-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmedicines.php
162 lines (130 loc) · 5.48 KB
/
medicines.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
<?php
include("newconn.php");
$conn = OpenCon();
echo "Connected Successfully";
$search_sql="SELECT Name,Price from medicines";
$search_query=mysqli_query($conn,$search_sql);
if(mysqli_num_rows($search_query)!=0){
$search_rs=mysqli_fetch_assoc($search_query);
}
$search_sql1="SELECT * from discounttable";
$search_query1=mysqli_query($conn,$search_sql1);
if(mysqli_num_rows($search_query1)!=0){
$search_rs1=mysqli_fetch_assoc($search_query1);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>APP-Les</title>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:400,700"
/>
<!-- https://fonts.google.com/specimen/Roboto -->
<link rel="stylesheet" href="css/fontawesome.min.css" />
<!-- https://fontawesome.com/ -->
<link rel="stylesheet" href="css/bootstrap.min.css" />
<!-- https://getbootstrap.com/ -->
<link rel="stylesheet" href="css/templatemo-style.css">
<!--
Product Admin CSS Template
https://templatemo.com/tm-524-product-admin
-->
</head>
<body id="reportsPage">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container h-100">
<a class="navbar-brand" href="index.php">
<h1 class="tm-site-title mb-0">APP-les</h1>
</a>
<button class="navbar-toggler ml-auto mr-0" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars tm-nav-icon"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mx-auto h-100">
<li class="nav-item">
<a class="nav-link active" href="index.php">
<i class="fas fa-tachometer-alt"></i>
Dashboard
<span class="sr-only">(current)</span>
</a>
</li>
</ul>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link d-block" href="login.php">
<b>Logout</b>
</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container mt-5">
<div class="row tm-content-row">
<div class="col-sm-12 col-md-12 col-lg-8 col-xl-8 tm-block-col">
<div class="tm-bg-primary-dark tm-block tm-block-products">
<div class="tm-product-table-container">
<table class="table table-hover tm-table-small tm-product-table">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Price</th>
<th scope="col">PharmEasy</th>
<th scope="col">Practo</th>
<th scope="col">NetMeds</th>
<th scope="col">MediBuddy</th>
</tr>
</thead>
<tbody>
<?php if(mysqli_num_rows($search_query)!=0){
do{?>
<tr>
<td class="tm-product-name"><?php echo $search_rs['Name']; ?> </td>
<td><?php echo $search_rs['Price']; ?></td>
<td><?php echo $search_rs['Price']-(($search_rs1['pharmeasy']/100)*$search_rs['Price']); ?> </td>
<td><?php echo $search_rs['Price']-(($search_rs1['practo']/100)*$search_rs['Price']); ?></td>
<td><?php echo $search_rs['Price']-(($search_rs1['netmeds']/100)*$search_rs['Price']); ?></td>
<td><?php echo $search_rs['Price']-(($search_rs1['medibuddy']/100)*$search_rs['Price']);?></td>
</tr>
<?php }while($search_rs=mysqli_fetch_assoc($search_query));
}
else {
echo "No Results Found";
} ?>
</tbody>
</table>
</div>
<!-- table container -->
</div>
</div>
<!-- table container -->
</div>
</div>
</div>
</div>
<footer class="tm-footer row tm-mt-small">
<div class="col-12 font-weight-light">
<p class="text-center text-white mb-0 px-4 small">
Copyright © <b>2019</b> All rights reserved.
</p>
</div>
</footer>
<script src="js/jquery-3.3.1.min.js"></script>
<!-- https://jquery.com/download/ -->
<script src="js/bootstrap.min.js"></script>
<!-- https://getbootstrap.com/ -->
<script>
$(function() {
$(".tm-product-name").on("click", function() {
window.location.href = "edit-product.html";
});
});
</script>
</body>
</html>