<meta name="viewport" content="width=device-width, initial-scale=1">
<!doctype html>
<html>
<head>
<title>IBS</title>
  <!-- <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> --> <!-- old version, doesnt work in localhost --> 
  
    <link rel="stylesheet" type="text/css" href="css/layout.css">
    <link rel="stylesheet" type="text/css" href="css/stylesheet.css">
    <link rel="stylesheet" type="text/css" href="css/easyui.css">
    <link rel="stylesheet" type="text/css" href="css/icon.css">
    <script type="text/javascript" src="js/ui.core.js"></script>
    <script type='text/javascript' src="js/jquery.autocomplete.js"></script>
    <script type="text/javascript" src="js/ui.datepicker.js"></script>
    <script type="text/javascript" src="js/jquery.PrintArea.js"></script>
	<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="js/clock.js"></script>
    <script type="text/javascript" src="js/jquery_notification_v.1.js"></script>
	<script type="text/javascript">    
    //fungsi displayTime yang dipanggil di bodyOnLoad dieksekusi tiap 1000ms = 1detik
    function tampilkanwaktu(){
        //buat object date berdasarkan waktu saat ini
        var waktu = new Date();
        //ambil nilai jam, 
        //tambahan script + "" supaya variable sh bertipe string sehingga bisa dihitung panjangnya : sh.length
        var sh = waktu.getHours() + ""; 
        //ambil nilai menit
        var sm = waktu.getMinutes() + "";
        //ambil nilai detik
        var ss = waktu.getSeconds() + "";
        //tampilkan jam:menit:detik dengan menambahkan angka 0 jika angkanya cuma satu digit (0-9)
        document.getElementById("clock").innerHTML = (sh.length==1?"0"+sh:sh) + "." + (sm.length==1?"0"+sm:sm) + "." + (ss.length==1?"0"+ss:ss);
    }
</script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

<link href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css" />

<script src="https://code.jquery.com/jquery-1.12.3.js"></script>
<script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('#contoh-tabel').DataTable();
} );
</script>
<style>
.tes{margin-top:5px;}
</style>
<script>
setInterval(function(){
     $(".berkedip").toggle();
},150);
</script>

<style type="text/css">
.classname {
	-moz-box-shadow:inset 0px 1px 0px 0px #cae3fc;
	-webkit-box-shadow:inset 0px 1px 0px 0px #cae3fc;
	box-shadow:inset 0px 1px 0px 0px #cae3fc;
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #79bbff), color-stop(1, #4197ee) );
	background:-moz-linear-gradient( center top, #79bbff 5%, #4197ee 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#79bbff', endColorstr='#4197ee');
	background-color:#79bbff;
	-webkit-border-top-left-radius:20px;
	-moz-border-radius-topleft:20px;
	border-top-left-radius:20px;
	-webkit-border-top-right-radius:20px;
	-moz-border-radius-topright:20px;
	border-top-right-radius:20px;
	-webkit-border-bottom-right-radius:20px;
	-moz-border-radius-bottomright:20px;
	border-bottom-right-radius:20px;
	-webkit-border-bottom-left-radius:20px;
	-moz-border-radius-bottomleft:20px;
	border-bottom-left-radius:20px;
	text-indent:0;
	border:1px solid #469df5;
	display:inline-block;
	color:#ffffff;
	font-family:Verdana;
	font-size:10px;
	font-weight:bold;
	font-style:normal;
	height:15px;
	line-height:15px;
	width:50px;
	text-decoration:none;
	text-align:center;
	text-shadow:1px 1px 0px #287ace;
}
.classname:hover {
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #4197ee), color-stop(1, #79bbff) );
	background:-moz-linear-gradient( center top, #4197ee 5%, #79bbff 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4197ee', endColorstr='#79bbff');
	background-color:#4197ee;
}.classname:active {
	position:relative;
	top:1px;
}

    tbody > tr:nth-child(2n+1) > td, tbody > tr:nth-child(2n+1) > th {
        background-color: #ededed;
    }
    table{
        width: 95%;
        margin: auto;
        border-collapse: collapse;
        box-shadow: darkgrey 3px;
    }
    thead tr {
        background-color: #36c2ff;
    }
	
</style>
<style type="text/css">
.timbul {
	-moz-box-shadow:inset 0px 1px 0px 0px #fce2c1;
	-webkit-box-shadow:inset 0px 1px 0px 0px #fce2c1;
	box-shadow:inset 0px 1px 0px 0px #fce2c1;
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #3a0cf0), color-stop(1, #176157) );
	background:-moz-linear-gradient( center top, #3a0cf0 5%, #176157 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#3a0cf0', endColorstr='#176157');
	background-color:#3a0cf0;
	-webkit-border-top-left-radius:10px;
	-moz-border-radius-topleft:10px;
	border-top-left-radius:10px;
	-webkit-border-top-right-radius:10px;
	-moz-border-radius-topright:10px;
	border-top-right-radius:10px;
	-webkit-border-bottom-right-radius:10px;
	-moz-border-radius-bottomright:10px;
	border-bottom-right-radius:10px;
	-webkit-border-bottom-left-radius:10px;
	-moz-border-radius-bottomleft:10px;
	border-bottom-left-radius:10px;
	text-indent:0px;
	border:2px solid #ed5197;
	display:inline-block;
	color:#dcdeed;
	font-family:Arial Black;
	font-size:12px;
	font-weight:bold;
	font-style:normal;
	height:25px;
	line-height:25px;
	width:100px;
	text-decoration:none;
	text-align:center;
	text-shadow:0px 1px 0px #cc9f52;
}
.timbul:hover {
	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #176157), color-stop(1, #3a0cf0) );
	background:-moz-linear-gradient( center top, #176157 5%, #3a0cf0 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#176157', endColorstr='#3a0cf0');
	background-color:#176157;
}.timbul:active {
	position:relative;
	top:1px;
}</style>

</head>

<body onload="tampilkanwaktu();setInterval('tampilkanwaktu()', 1000);">
<div class="panel-header" fit="true" style="height:30px;padding-top:8px;padding-right:15px;width=60%;">
		
		<div style="float:right"  color="#fff">
		<?php

$hari = date('l');
/*$new = date('l, F d, Y', strtotime($Today));*/
if ($hari=="Sunday") {
	echo "Minggu, ";
}elseif ($hari=="Monday") {
	echo "Senin, ";
}elseif ($hari=="Tuesday") {
	echo "Selasa, ";
}elseif ($hari=="Wednesday") {
	echo "Rabu, ";
}elseif ($hari=="Thursday") {
	echo("Kamis, ");
}elseif ($hari=="Friday") {
	echo "Jum'at, ";
}elseif ($hari=="Saturday") {
	echo "Sabtu, ";
}
$tgl =date('d-m-Y : ');
echo $tgl;
 
?>
<span id="clock"></span> 
</div>
</div>

<div class="container tes">
<div class="row">
<div class="col-md-50">
<table id="contoh-tabel" class="table table-striped table-bordered"cellspacing="0">
        <thead>
           <tr>     
		    <th>Nobukti</th>
		    <th>Tgl</th>
		    <th>IdPromo</th>
            <th>Mulai</th>
			<th>Akhir</th>
			<th>MinOrder</th>
			<th>MaxDisc</th>
			<th>Diskon</th>
			<th>Area</th>
			<th>Status</th>
			<th>Action</th>		
						
		</tr>	
        </thead>
        
<tbody>
<?php
foreach ($listjob->result() as $sql10): 

if ($sql0 >0 ){

$no = 1; // Untuk penomoran tabel, di awal set dengan 1
while($data = mysqli_fetch_array($sql0)){
	$custno=$data['nobukti'];
	$tgl1=$data['tgl'];
	//$_SESSION['jabat1']=$jabat1;

		if ($data['stat']=='0') {
				echo "<tr >";
				echo "<td align='center'><a href='formjob.php?id=$custno' >".$data['nobukti']."</td>";
				echo "<td align='center'>".$data['tgl']."</td>";				
				echo "<td align='center'>".$data['kdslm']."</td>";
				echo "<td >".$data['custname']."</td>";
				echo "<td >".$data['alamat1']."</td>";
				echo "<td >".$data['telp']."</td>";
				echo "<td align='center'>".number_format($data['netto'])."</td>";
				echo "<td align='center'>".number_format($data['iuran'])."</td>";
				echo "<td align='center'>".number_format($data['bulan'])."</td>";
				echo "<td align='center'>".$data['kstat']."</td>";				
				echo "<td align='center'><a href='formjob.php?id=$custno' ><font color='blue'>Edit</font></td>";
				echo "</tr>";
				}
		else {

				echo "<tr >";
				echo "<td align='center'><a href='formjob.php?id=$custno' >".$data['nobukti']."</td>";
				echo "<td align='center'>".$data['tgl']."</td>";				
				echo "<td align='center'>".$data['kdslm']."</td>";
				echo "<td >".$data['custname']."</td>";
				echo "<td >".$data['alamat1']."</td>";
				echo "<td >".$data['telp']."</td>";
				echo "<td align='center'>".number_format($data['netto'])."</td>";
				echo "<td align='center'>".number_format($data['iuran'])."</td>";
				echo "<td align='center'>".number_format($data['bulan'])."</td>";
				echo "<td align='center'>".$data['kstat']."</td>";				
				echo "<td align='center'><a href='formjob.php?id=$custno'><font color='blue'>Detail</font></td>";
				echo "</tr>";
		}			
	}

	$no++; // Tambah 1 setiap kali looping
}
   endforeach
 
	?>

        </tbody>  
</table>
</div>
</div>
</div>
</body>
</html>

