<?
						
						$query = "SELECT * FROM produk where kode LIKE 'BYR%' and nama LIKE '%$prod%' order by harga_jual asc";
						$exe = mysqli_query($conn,$query);
						$no = 1;
						while($record = mysqli_fetch_array($exe)){
                            
                            
                            $level=0;
							$kode_p = $record['kode'];
							$nominal = $record['nominal'].".000";
							$nama = $record['nama'];
							$harga_tetap = $record['harga_tetap'];
			                $harga_awal = $record['harga_jual'];
							$harga = $record['harga_jual'];
							//$pesan = $record['pesan'];
							$oprator = $record['kode_operator'];
							$gangguan = $record['gangguan'];
							$kosong = $record['kosong'];
							$catatan = $record['catatan'];
							$level1=(float)$level;
							$hitung=$harga+$markup;
							if ($harga_tetap==1)
			                {
			                    $hitung=$harga_awal;
			                 }   
							$harga1=number_format($hitung,0,',','.');
						
							if ($kosong == 0 && $gangguan == 0)
							{
								$status ='Open';
								echo "<tbody><tr><td><center>$no</center></td><td><center>$kode_p</center></td><td><center>$keterangan$nama</center></td><td><center>$harga1</center></td><td><center><font style='color:blue;'>$status</font></center></td></tr></tbody>";	
							}
							else if ($kosong == 1 && $gangguan == 0)
							{
								$status ='Kosong';
								echo "<tbody><tr><td><center>$no</center></td><td><center>$kode_p</center></td><td><center>$keterangan$nama</center></td><td><center>$harga1</center></td><td><center><font style='color:red;'>$status</font></center></td></tr></tbody>";
							}
							else if ($kosong == 0 && $gangguan == 1)
							{
								$status ='Gangguan';
								echo "<tbody><tr><td><center>$no</center></td><td><center>$kode_p</center></td><td><center>$keterangan$nama</center></td><td><center>$harga1</center></td><td><center><font style='color:red;'>$status</font></center></td></tr></tbody>";
							}
							else 
							{
								$status ='Close';
								echo "<tbody><tr><td><center>$no</center></td><td><center>$kode_p</center></td><td><center>$keterangan$nama</center></td><td><center>$harga1</center></td><td><center><font style='color:red;'>$status</font></center></td></tr></tbody>";
							}
							$no++;
						}
						?>