-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfront.php
107 lines (99 loc) · 2.32 KB
/
front.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
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
*{
padding:0px;
margin:0px;
}
body{
font-family: tahoma;
}
@media screen{
.card{
width: 5cm;
height: 7cm;
background: #eee;
text-align: center;
}
.foto{
margin-top: 60px;
width: 2cm;
height: 2.2cm;
}
label{
display: block;
}
.nama{
font-size: 13px;
margin: 5px 0px;
font-weight: bold;
}
.unit{
font-size: 11px;
margin: 10px 0px;
}
}
@media print{
button{
display: none;
}
.card{
width: 3.7cm;
height: 7cm;
background-color: #eee;
text-align: center;
}
.foto{
margin-top: 60px;
width: 2cm;
height: 2.2cm;
}
label{
display: block;
}
.nama{
font-size: 9px;
margin: 5px 0px;
font-weight: bold;
}
.unit{
font-size: 9px;
margin: 10px 0px;
}
}
</style>
</head>
<body>
<?php
include("config/koneksi.php");
$tanggungan=$_GET['status'];
$kode=$_GET['id_pasien'];
if($tanggungan=='pasien'){
$query=mysql_query("SELECT * FROM pasien, pegawai WHERE pasien.kodePasien='$kode' AND pasien.id_pegawai=pegawai.id_pegawai");
$r=mysql_fetch_array($query);
?>
<div class="card">
<img src="foto_pasien/<?php echo $r['foto_pasien']; ?>" class="foto">
<label class="nama"><?php echo $r['nama_pegawai'] ?></label>
<label class="unit"><?php echo $r['unit'] ?></label>
<img alt="testing" src="barcode/barcode.php?text=<?php echo $kode; ?>&print=true" />
</div>
<?php
}
else{
$query=mysql_query("SELECT * FROM tanggungan, pegawai_kel WHERE tanggungan.kodeTanggungan='$kode' AND tanggungan.id_kpeg=pegawai_kel.id_kpeg");
$r=mysql_fetch_array($query);
?>
<div class="card">
<img src="foto_tanggungan/<?php echo $r['foto_tanggungan']; ?>" class="foto">
<label class="nama"><?php echo $r['nama_kpeg'] ?></label>
<label class="unit">Status : Tanggungan</label>
<img alt="testing" src="barcode/barcode.php?text=<?php echo $kode; ?>&print=true" />
</div>
<?php
}
?>
<button onclick="window.print()">Print</button>
</body>
</html>