<?php
session_name("AUTHENUSER");
session_start();
$USERNAME = $_SESSION['SES_USERNAME'];
if(!session_name("AUTHENUSER"))
	{
?>
						<script language="javascript">
						 alert("Waktu Login telah habis.Silahkan Login Kembali");
						document.location="index.php";
						</script>
<?php
	}
if(!$USERNAME)
	{
?>
						<script language="javascript">
						 alert("Harap Login Dahulu.");
						document.location="index.php";
						</script>
<?php
	}
	?>
	<?php include "common/config.php";
	include "include/head.php"; ?>
   
<body>
<?php include "include/head2.php"; ?>
<?php include "include/leftmenu.php"; ?>
<?php include "include/top.php"; ?>
  <h1><i class="icon-bar-chart"></i> Order Form Progress</h1>
</div>
   <div class="main-content">
            <div class="widget">
              <h3 class="section-title first-title"><i class="icon-table"></i> Listing Order Form Progress</h3>
              <div class="widget-content-white glossed">
                <div class="padded">
                <table class="table table-striped table-bordered table-hover">
                  <thead>
                     <tr>
                         	 <th>Order Form ID</th>
                              <th>Name Customer</th>
                            <th>Tanggal Order Form</th>
                             <th>Sales Name</th>
                             <th>Engraving Details</th>
                            <th>Description</th>
                             <th>Status</th>
                             <th>Details</th>
                        </tr>
                  </thead>
                  <tbody>
                     <?php
						$sql = mysql_query("select * from  orderform
						where status_orderform = 1 and status in ('input','in progress') order by id_orderform");
						while($fetch = mysql_fetch_array($sql))
						{
								$id_orderform = $fetch['id_orderform'];
								$kode_orderform = $fetch['kode_orderform'];
								$kode_stock = $fetch['kode_stock'];
								$status = $fetch['status'];
								list($y, $m, $d)=split ("[-]",$fetch['orderform_date']);
								$orderform_date=$d."-".$m."-".$y;
					?>
                        <tr class="gradeX">
                          	<td><?php echo $fetch['kode_orderform'];?></td>
                            <td><?php echo $fetch['nama'];?></td>
                            <td><?php echo $orderform_date;?></td>
                            <td><?php echo $fetch['user_update'];?></td>
                            <td><?php echo $fetch['details'];?></td>
                            <td><?php echo $fetch['description'];?></td>
                            <td><?php echo $fetch['status'];?></td>
                              <td class="actions aligncenter"><a href="edit_orderform2.php?id_orderform=<?php echo $id_orderform; ?>" class="edit">Edit</a></td>
                        </tr>
                        <?php
						}
						?>
                  </tbody>
                </table>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

    </div>
  </div>
</div>       

<?php include "include/foot.php"; ?>
<script src='assets/js/for_pages/dashboard.js'></script>
</body>

</html>