<?php
session_start();
include_once('../../config/#Config.php');
if(!$_SESSION['UserName']){
die('<script>window.location.href=\''.$config['site']['url'].'index.php\';</script>');
}
$get_AD = mysqli_query($conn, "Select * From config_admin WHERE Account = '".$_SESSION['UserName']."'");
if(!mysqli_num_rows($get_AD)){
	die('Không đủ quyền.');
}
					  $get_AA = mysqli_query($conn, "Select * From config_setting WHERE ID = 1");
					  if(mysqli_num_rows($get_AA)){
						  $row = mysqli_fetch_array($get_AA, MYSQLI_ASSOC);
					  }
?>
<?php include 'menu.php'; ?>
                  <h4 class="card-title">Quản lý lịch sử Tổng bộ</h4>
                  <div class="bd-example">
  <div class="btn-group dropup show">
    <select class="form-control" id="chonMayChu" onChange="Setttime();">
							<?php
							    $get_Maychu = mysqli_query($conn, "Select * From config_server");
    if (mysqli_num_rows($get_Maychu)) {
		while($row = mysqli_fetch_array($get_Maychu, MYSQLI_ASSOC)){
		echo '<option value="'.$row['ServerID'].'">'.$row['ServerName'].'</option>';
	}
	}
		?>	
    </select>
  </div>
</div>
				  <label style="font-size:13px">Tên tài khoản</label>
				  <input type="text" class="form-control" id="idnhanvat"/>
				  <br />
				  <button type="button" class="btn btn-outline-primary" style="float:right" onClick="get_infotk();">Xem Lịch sử tài khoản</button>
				  <button type="button" class="btn btn-outline-primary" style="float:right" onClick="loadLogsAdmin();">Xem Lịch sử ADMINCP</button>
				  <br/><br/>
                  <div class="table-responsive">
                  <hr>
                  <div id="sotrang"></div>
                    <table class="table table-dark">
                      <thead id="tentable">
                        <tr>
                          <th>
                            #
                          </th>
                          <th>
                            Tài khoản
                          </th>
                          <th>
                            Nội dung
                          </th>
						  <th>
                            Vật phẩm
                          </th>
						  <th>
                            Thời Gian
                          </th>
                        </tr>
                      </thead>
                      <tbody id="noidung">

                      </tbody>
                    </table>
                </div>
<script>
  $(document).ready(function(){
    loadLogsAdmin();
  });
</script>				  
		   