<?php
header("content-type:text/html;charset=utf-8");
include "../hexin.php";
$yhsl=$_SESSION["yhsl"];
if(empty($zh))
{
}
else
{
$fh=duqu("../shuoju/fenghao/".$zh.".txt");
$jy=duqu("../shuoju/jinyan/".$zh.".txt");
$cczh=duqu("../shuoju/chuchang/chuchang.txt");
file_put_contents("../shuoju/ziliao/".$zh."/zhuangtai.txt",json_encode(array("shebei"=>"".$sbxx."","shijian"=>"".date("YmdHis",strtotime("+1 minute")).""),JSON_UNESCAPED_UNICODE));
$zxrs=post("http://".$ym."/cl/cl.php","zh=".$zh."&mm=".$mm."&nr=在线人数");

if($cczh!="0"&&$_SESSION["cczh"]!=$cczh)
{
$_SESSION["cczh"]=$cczh;
$ccnc=duqu("../shuoju/ziliao/".$cczh."/nicheng.txt");
}
else
{
$cczh="false";
$ccnc="false";
}

if($fh=="1"||$fh>date("YmdHis"))
{
echo json_encode(array("code"=>"1","yonghu"=>"".$yhsl."","renshuo"=>"".$zxrs."","chuchang"=>"".$cczh."","chuchangnc"=>"".$ccnc."","msg"=>"下线通知！"),JSON_UNESCAPED_UNICODE);
}
else if($jy>date("YmdHis"))
{
$sj=post("http://".$ym."/cl/qita/sj.php","sj=".date("YmdHis")."&sj1=".$jy."");
echo json_encode(array("code"=>"2","yonghu"=>"".$yhsl."","renshuo"=>"".$zxrs."","chuchang"=>"".$cczh."","chuchangnc"=>"".$ccnc."","msg"=>"".$sj.""),JSON_UNESCAPED_UNICODE);
}
else
{
echo json_encode(array("code"=>"0","yonghu"=>"".$yhsl."","renshuo"=>"".$zxrs."","chuchang"=>"".$cczh."","chuchangnc"=>"".$ccnc."","msg"=>"正常"),JSON_UNESCAPED_UNICODE);
}
}
?>