-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_supplier-a.php
129 lines (121 loc) · 4.08 KB
/
data_supplier-a.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
<?php
session_start();
if(empty($_SESSION['username'])){
header('location:login.php');
}elseif($_SESSION['level']!=1){
header('location:index-p.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="./css/data-p_style.css">
<title>SMKlinik | Data Supplier</title>
</head>
<body>
<header>
<div class="container">
<div id="logo">
<img src="./img/ini_logo.png" alt="Logo">
<a href="index-a.php"><span class="hightlight">Klinik</span> Cahaya</a>
</div>
<div id="profil">
<img src="./img/pp.png" alt="Profil">
<h4>ADMIN</h4>
</div>
</div>
</header>
<section id="sidemenu">
<div class="container">
<ul>
<li class="main">Data
<ul>
<li><a href="data_pasien-a.php">Data Pasien</a></li>
<li><a href="data_dokter-a.php">Data Dokter</a></li>
<li><a href="data_pegawai-a.php">Data Pegawai</a></li>
<li><a href="data_apoteker-a.php">Data Apoteker</a></li>
<li><a href="data_bahan-a.php">Data Bahan</a></li>
<li><a href="data_obat-a.php">Data Obat</a></li>
<li><a href="data_supplier-a.php">Data Supplier</a></li>
</ul>
</li>
<li class="main"><a href="data_rm-a.php">Rekam Medis</a></li>
<li class="main">Biaya
<ul>
<li><a href="data_administrasi-a.php">Administrasi</a></li>
<li><a href="berobat.php">Berobat</a></li>
</ul>
</li>
<li class="main"><a href="data_order-a.php">Order</a></li>
<li id="logout"><a href="logout-action.php">Logout</a></li>
</ul>
</div>
</section>
<section id="content">
<div class="container">
<div class="title">
<h2>Data Supplier</h2>
</div>
<div class="button">
<a href="add-supplier.php"><button type="button" name="tambah">Tambah</button></a>
<form class="search" action="" method="post">
<input class="submit" type="submit" name="cariB" value="Cari">
<input class="text" type="text" name="cari" placeholder=" Masukkan Nama">
</form>
</div>
<br>
<div class="table">
<table border=1px>
<tr>
<th>No.</th>
<th>ID Supplier</th>
<th>Nama</th>
<th>Deskripsi</th>
<th>Telepon</th>
<th>Alamat</th>
<th>Kota</th>
<th>Opsi</th>
</tr>
<?php
include('connect.php');
$cari = empty($_POST['cariB']) ? '' : $_POST['cariB'];
$inputan = empty($_POST['cari']) ? '' : $_POST['cari'];
if (isset($cari)) {
if ($inputan != "") {
$sql = mysqli_query($connect,"SELECT * FROM tb_supplier WHERE nama like '%$inputan%'");
}else{
$sql = mysqli_query($connect,"SELECT * FROM tb_supplier");
}
}else{
$sql = mysqli_query($connect,"SELECT * FROM tb_supplier");
}
$no = 1;
while ($data = mysqli_fetch_array($sql)) {
?>
<tr>
<td><?php echo $no++; ?></td>
<td><?php echo $data['id_supplier']; ?></td>
<td><?php echo $data['nama']; ?></td>
<td><?php echo $data['deskripsi']; ?></td>
<td><?php echo $data['telp']; ?></td>
<td><?php echo $data['alamat']; ?></td>
<td><?php echo $data['kota']; ?></td>
<td>
<a class="edit" href="update-supplier.php?id=<?php echo $data['id_supplier'] ?>">Edit</a> |
<a class="hapus" href="delete-supplier.php?id=<?php echo $data['id_supplier'] ?>">Hapus</a>
</td>
</tr>
<?php }
?>
</table>
</div>
</div>
</section>
<footer>
<div class="container">
<p>Klinik Cahaya || Copyright © 2019</p>
</div>
</footer>
</body>
</html>