<?php
include 'common.php';

function ServerStateOK()
{
	$response = "CHECK_SERVER_STATE_OK";
	$error = "";
	$new_login_key = "";
	//$url = "market://details?id=com.mshare.lydia";
	$url = "https://www.quantumchain.ai";

	$isXmlHttpRequest = (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) ?
	(strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') ? true : false: false;
	($isXmlHttpRequest) ? header('Content-type: application/json') : header('Content-type: text/plain');

	echo json_encode(array('result'=>$response,'login_key'=>$new_login_key,'url'=>$url,'error'=>$error));
}


///////////////////////////////////////////////
//현재 캐릭터 선택씬에서 게임 시작 누르면 호출한다.
///////////////////////////////////////////////

$version = $_GET['version'];
$lang = $_GET['lang'];



/* if($version != '1.0.2'){
	$response = "Please download new version";
	$error = "";
	$new_login_key = "";
	$url = "https://www.quantumchain.ai";

	$isXmlHttpRequest = (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) ?
	(strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') ? true : false: false;
	($isXmlHttpRequest) ? header('Content-type: application/json') : header('Content-type: text/plain');

	echo json_encode(array('result'=>$response,'login_key'=>$new_login_key,'url'=>$url,'error'=>$error));
	exit;
}
 */
 


if (CheckServerMaintenance())
	{
		//if (CheckServerVersion($version)) //클라이언트 버전에 맞는 게임서버로 접속하기 때문에 버전체크를 해줄 필요가 없다
		{
			ServerStateOK();
		}
	}
?>