<?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-th"></i> Master Diamonds Categorization in Types</h1>
</div>

 <!--  <ol class="breadcrumb">
<li><a href="add_user.php">Add Diamonds Categorization in Types</a></li>
 <li><a href="#">Bread</a></li>
  <li><a href="#">Crumbs</a></li>
  <li class="active">Example</li>
</ol>-->
   <div class="main-content">
            <div class="widget">
              <h3 class="section-title first-title"><i class="icon-table"></i> Log Diamonds Categorization in Types</h3>
              <div class="widget-content-white glossed">
                <div class="padded">
                <table class="table table-striped table-bordered table-hover">
                  <thead>
                    <tr>
                      <th>Diamonds Categorization in Types</th>
                      <th>Keterangan</th>
                      <th>Price</th>
                      <th>Price Before</th>
                      <th>User Update</th>
                      <th>Date Update</th>
                    </tr>
                  </thead>
                  <tbody>
                        <?php
						$diamonds = $_REQUEST['diamonds'];
						$sql = mysql_query("select *,DATE_FORMAT(date_update, '%d %M %Y %T') AS your_date from log_diamonds
						where diamonds = '$diamonds'
						order by date_update");
						while($fetch = mysql_fetch_array($sql))
						{
								$id_diamonds = $fetch['id_diamonds'];
								$diamonds = $fetch['diamonds'];
								
					?>
                    
                        <tr class="gradeX">
                            <td><?php echo $fetch['diamonds']; ?></td>
                            <td><?php echo $fetch['keterangan']; ?></td>
                            <td align="right"><?php  echo number_format($fetch['price'], 0, ',', ','); ?></td>
                            <td align="right"><?php  echo number_format($fetch['price_before'], 0, ',', ','); ?></td>
                            <td><?php echo $fetch['user_update']; ?></td>
                            <td><?php echo $fetch['your_date']; ?></td>
                       <?php
						}
						?>
                  </tbody>
                </table>
                  <input type="button" value=" Back " class="btn btn-default" onClick="document.location='master_diamonds.php'" />
                </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>