  <head>
      
      <script>
if ( window.history.replaceState ) {
  window.history.replaceState( null, null, window.location.href );
}
</script>  
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <title>WIP | Control System</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="shortcut icon" href="img/lgo1.png">
  <!--Sweetalert Plugin --->
  <script src="bower_components/sweetalert/sweetalert.js"></script>
  <!-- AdminLTE App -->
  <script src="dist/js/adminlte.min.js"></script>
  <!-- jQuery 3 -->
  <script src="bower_components/jquery/dist/jquery.min.js"></script>
  <!-- Bootstrap 3.3.7 -->
  <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
  <!-- Bootstrap -->
  <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
  <!-- daterange picker -->
  <link rel="stylesheet" href="bower_components/bootstrap-daterangepicker/daterangepicker.css">
  <!-- bootstrap datepicker -->
  <link rel="stylesheet" href="bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
  <!-- bootstrap timepicker -->
  <link rel="stylesheet" href="plugins/timepicker/bootstrap-timepicker.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="bower_components/Ionicons/css/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/AdminLTE.min.css">

  <link rel="stylesheet" href="dist/css/skins/skin-blue.min.css">

  <!-- Google Font -->
  <link rel="stylesheet"
        href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">

  <!-- DataTables -->
  <link rel="stylesheet" href="bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
  <!-- datepicker js -->
  <script src="bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
  <!-- bootstrap datepicker -->
  <script src="bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
  <!-- iCheck for checkboxes and radio inputs -->
  <link rel="stylesheet" href="plugins/iCheck/all.css">
  <!-- iCheck 1.0.1 -->
  <script src="plugins/iCheck/icheck.min.js"></script>
  <!-- bootstrap time picker -->
  <script src="plugins/timepicker/bootstrap-timepicker.min.js"></script>
<script src="dist/js/date_time.js"></script>     
  <!-- chart Js -->
  <script src="chartjs/dist/Chart.min.js"></script>
  
  
  <style>
      
   

    .container1 {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

  </style>

</head>
<?php
    include_once'db/connect_db.php';
    
    
?>


  <!-- Content Wrapper. Contains page content -->
  
    <!-- Main content -->
                  <header class="main-header"  style="background-color: #f1f1f1;">
        <nav class="navbar navbar-static-top ">
   <div class="row" >
                 <!-- ./col --------------------------------------------------------------------------------------------->        
              
                         
                  <div class="col-lg-1container1 col-xs-1" >
                       <img src="img/lgo1.png" class="user-image" alt="User Image" width="50" hight="50">
                      
                     
                 </div>
                  <div class="col-lg-6 col-xs-6">
                   
                      <p> <h3>Wip Control System </h3> </p>
                     
                 </div>
                  <div class="col-lg-4 col-xs-4">
                   
		    <a><h3>
                        <b><span id="date_time" class="pull-right"></span></b>
                            <script type="text/javascript">window.onload = date_time('date_time');</script>
                        </h3>
                    </a>
            
                  <!-- Tasks Menu -->
	
                  <!-- Tasks Menu -->
	
         
            
                     
                 </div>
                 
                
                 
                 
      </div>
         
             
        
            <!-- Navbar Right Menu -->
        
       
        </nav>
      </header>
     <section class="content container-fluid"  >
        
    
  
        <form action="" method="POST">
            <!-- Registration Form -->
           <div class="d-flex justify-content-center"  >
            <!-- Registered Table -->
            <div class="col-md-10" >
            <div class="box">
                
    
                <div class="box-header with-border">
                     <a href="index.php" class="btn btn-warning">Back</a>
                <h3 class="box-title">Line Setting</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <div style="overflow-x:auto;">
                        
                        
                                <table class="table table-bordered table-striped" id="myRegister">
                            <thead>
                                <tr>
                                    <th style="width:30;">No</th>
                                    <th style="width:100;">Name</th>
                                    <th style="width:100;">Upper Limit</th>                                
                                    <th style="width:100;">Lower Limit</th>                                    
                                       <th style="width:20;">Upper Limit Colour</th>                                    
                                    <th style="width:20;">Middle Level Colour</th>                                                                      
                                    <th style="width:20;">Lower Level Colour</th>
                                    <th style="width:100;"><center>Edit</center></th>
                        
                        
                                </tr>

                            </thead>
                            <tbody>
                                
                                      <?php
                                $no = 1;
                                $select = $pdo2->prepare("SELECT obj,l1,l2,c1,c2,c3,lid FROM setting");
                                $select->execute();
                                while($row=$select->fetch(PDO::FETCH_OBJ)){
                                ?>
                                    <tr>
                                    <td ><?php echo $no++; ?></td>
                                    <td > <?php echo $row->obj; ?></td>
                                                                    
                                    
                                    <td ><?php echo $row->l1; ?></td>
                                   <td><?php echo $row->l2; ?></td>
                                    <td style="background-color: <?php echo $row->c1;  ?> "></td>
                                                             
                                 
                                      <td style="background-color: <?php echo $row->c2; ?> " ></td>
                                    
                                 
                                                                     
                                    <td style="background-color: <?php echo $row->c3; ?>"></td>
                                    <td> <center>
                                        
                                        
                                        
                                        
                                        <a href="editsetting.php?id=<?php echo $row->lid; ?>"
                        class="btn btn-info btn-sm" name="btn_edit"><i class="fa fa-pencil"></i></a>
                                    </center></td>
                                <?php  } ?>
                 
                            </tbody>
                        </table>
                        
                        
                        
                        
                        
                        
                  
                    </div>
                </div>
                <!-- /.box-body -->
                
                 
                
                
                
            </div>
            <!-- /.box -->
            </div>
            
          
            
          </div>
          
            
            
        </form>
         
         
            
    
     </section>
    <!-- /.content -->
    
    
     <div class="row">
                 <!-- ./col --------------------------------------------------------------------------------------------->        
              
         <div class="col-lg-12"  style="background-color: #f1f1f1;">    
                  <div class="col-lg-4 col-xs-4">
                  
                      
                     
                 </div>
                  <div class="col-lg-4 col-xs-4">
                      <center>
                  <a>
                        <strong>Copyright &copy; 2022 <a href="">BUILDTECK asia</a>.</strong> 
                        
                    </a>
                      </center>
                 </div>
                  <div class="col-lg-4 col-xs-4">
                   
		  
            
                  <!-- Tasks Menu -->
	
                  <!-- Tasks Menu -->
	
         
            
                     
                 </div>
                 
              </div>    
                 
                 
      </div>
    
    
    
    
    
    
    
    
    

  <!-- /.content-wrapper -->

  <script>
  $(document).ready( function () {
      $('#myRegister').DataTable();
  } );
  </script>

