<?php
require $_SERVER['DOCUMENT_ROOT'].'/hethong/config.php';
$now = time();
?>
<!-- Khoá Host hết hạn -->
<?php
$check_host1 = $ketnoi->query("SELECT * FROM lich_su_tao_web WHERE status ='hoatdong' ");
while ($host1 = $check_host1->fetch_array()) {
        if(($now-$host1['ngayhet'])>29200){
            $id_host1 = $host1['id'];
            $ketnoi->query("UPDATE lich_su_tao_web SET status = 'hethan' WHERE id = '$id_host1'");
        }else{
            $ketnoi->query("UPDATE lich_su_tao_web SET status = 'hoatdong' WHERE id = '$id_host1'");
        }
    }
?>