<?php

// 使用代金券
require_once ("../user_include.inc");

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

//根据常量获取定义的值
$constName = "ORGNAZATION_RULE";
$constValue = "";

//检索数据库
$param['name'] = $constName;
$param['delete_flg'] = false;
$systemConstantDatList = SystemConstantDat::getList($param,'id','desc', 0, 1);
if(!empty($systemConstantDatList)) {
	$constValue = $systemConstantDatList[0]->constant_value;
}
ErrorLogger::doOutput("Compass...ajax_get_organization_rule_text.php....constValue=" . $constValue, 0);
ErrorLogger::doOutput("Compass...ajax_get_organization_rule_text.php....End.", 0);

//如果为空说明未设定该参数的值
if(empty($constValue)) {
	responseNG("系统设定错误！");
}

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

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