<?php
session_start();
include_once('../../config/#Config.php');
if(!$_SESSION['UserName']){
die('<script>window.location.href=\''.$config['site']['url'].'index.php\';</script>');
} else {
$get_AD = mysqli_query($conn, "Select * From config_admin WHERE Account = '".$_SESSION['UserName']."'");
if(!mysqli_num_rows($get_AD)){
	die('Không đủ quyền.');
}
$gettt = mysqli_query($conn, "Select * From config_server WHERE ID = '".$_POST['id']."'");
if(mysqli_num_rows($gettt)){
	$row = mysqli_fetch_array($gettt, MYSQLI_ASSOC);
 echo '<div class="modal-body">
			<label>Server ID</label>
            <div class="form-group pass_show"> 
                <input type="text" value="'.$row['ServerID'].'"  id="edit_mc_a" class="form-control"> 
            </div> 
			<label>Tên Máy Chủ</label>
            <div class="form-group pass_show"> 
                <input type="text" value="'.$row['ServerName'].'"  id="edit_mc_b" class="form-control"> 
            </div> 
			<label>IP Máy Chủ</label>
            <div class="form-group pass_show"> 
                <input type="text" value="'.$row['IPdata'].'"  id="edit_mc_b" class="form-control"> 
            </div> 
			<label>Tên Data</label>
            <div class="form-group pass_show"> 
                <input type="text" value="'.$row['Databases'].'"  id="edit_mc_c" class="form-control"> 
            </div> 
			<label>IP Gate</label>
            <div class="form-group pass_show"> 
                <input type="text" value="'.$row['IpJson'].'"  id="edit_mc_d" class="form-control"> 
            </div> 
			<label>Port Gojxhttp</label>
            <div class="form-group pass_show"> 
                <input type="text" value="'.$row['PortJson'].'"  id="edit_mc_e" class="form-control"> 
            </div> </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-danger" onClick="edit_maychu(\''.$_POST['id'].'\');">Sửa Ngay</button>
        </div>';
} else {
	die('Máy chủ này không tồn tại.');
}
}
?>
		   