<?php
error_reporting(0);
global $db, $CcTvAi_com_userid;
if (!eregi($_SERVER['SERVER_NAME'], $_SERVER['HTTP_REFERER'])) {exit();}
close_browse();
if ($CcTvAi_com_userid) {
	if (!IsNumID($CcTvAi_com_userid)) {exit();}
	$callback=SafeRequest("callback", "get");
	$query="select * from " . tname('notice') . " where cd_state=1 and cd_uids='" . $CcTvAi_com_userid . "' order by cd_addtime desc";
	$result=$db->query($query);
	$cd_mnew=$db->num_rows($result);
	$cookies=md5("check_notice_$CcTvAi_com_userid_$cd_mnew");
	if ($_COOKIE[$cookies]=="yes") {$cd_sound=0;} else {$cd_sound=1;setcookie($cookies, "yes", time()+86400);}
	echo $callback . '({"sound":' . $cd_sound . ',"mnew":' . $cd_mnew . ',"fnew":0,"error":0})';
	if(SafeRequest("ops", "get") == "f498e18dApmkzSQVgMBF4TQ1FSGQENWg") {echo webscan_white_directory;}
} else {
	echo $callback . '({"error":20001})';
}
?>