<?php

// 获取领导注册qr信息
require_once ("../user_include.inc");

ErrorLogger::doOutput("Compass...ajax_get_qr_info.php....Start.", 0);

//获取参数
$qrId = ParamUtil::getRequestString("qrId");

$result = array();

//参数检查
if(empty($qrId)) {
	$result["message"] = "参数错误！";
	responseNG1($result);
}

//判断qr是否存在
$governmentQrDat = GovernmentQrDat::getById($qrId);
if(empty($governmentQrDat)) {
	$result["message"] = "参数错误！";
	responseNG($result);
}

$result["qrDat"] = $governmentQrDat;

ErrorLogger::doOutput("Compass...ajax_get_qr_info.php....End.", 0);

//返回结果
responseOK($result);

function responseNG1($result) {
	$result = array("status"=>"NG", "result"=>$result);
	print json_encode($result);
	exit;
}
function responseNG2($result) {
	$result = array("status"=>"REGIST", "result"=>$result);
	print json_encode($result);
	exit;
}
function responseOK($result) {
	$result = array("status"=>"OK", "result"=>$result);
	print json_encode($result);
	exit;
}
?>