-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpdfs.php
80 lines (69 loc) · 1.75 KB
/
pdfs.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
<?php include("login.php"); ?>
<?php
print_r($_GET);
echo '
<table border="1">
<tr>
<th align="center" rowspan="2" width="30">No</th>
<th align="center" rowspan="2" width="120">Kode Barang</th>
<th align="center" rowspan="2" width="350">Nama Barang</th>
<th align="center" colspan="2" width="140">Permintaan</th>
</tr>
<tr>
<th align="center">Jumlah</th>
<th align="center">Satuan </th>
</tr>
';
$i = 0; $no = 1;
foreach ($_SESSION['data'][$_GET['id']] as $key => $value) {
if ($value['Status'] == '1') {
echo '
<tr>
<th align="center">'.$no.'</th>
<th align="center">'.$value['Kode_Barang'].'</th>
<th align="center">'.$value['Jenis_Barang'].'</th>
<th align="center">'.$value['Jml_Disetujui'].'</th>
<th align="center">'.$value['Keterangan'].'</th>
</tr>
';
$no++;
}
$i++;
}
echo '
</table>';
$pdf->writeHTML($tbl, true, false, false, false, '');
?>
<!--
$tbl = '
<table border="1">
<tr>
<th align="center" rowspan="2" width="30">No</th>
<th align="center" rowspan="2" width="120">Kode Barang</th>
<th align="center" rowspan="2" width="350">Nama Barang</th>
<th align="center" colspan="2" width="140">Permintaan</th>
</tr>
<tr>
<th align="center">Jumlah</th>
<th align="center">Satuan </th>
</tr>
';
$i = 0; $no = 1;
foreach ($_SESSION['data'][$_GET['id']] as $key => $value) {
if ($value['Status'] == '1') {
$tbl .= '
<tr>
<th align="center">'.$no.'</th>
<th align="center">'.$value['Kode_Barang'].'</th>
<th align="center">'.$value['Jenis_Barang'].'</th>
<th align="center">'.$value['Jml_Disetujui'].'</th>
<th align="center">'.$value['Keterangan'].'</th>
</tr>
';
$no++;
}
$i++;
}
$tbl .='
</table>';
$pdf->writeHTML($tbl, true, false, false, false, ''); -->