<?php

// 获取证书列表 
require_once ("../user_include.inc");

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

//获取参数
$page = ParamUtil::getRequestNumber("page", 0);

//每页显示条数
$rowCount = 10;

$result = array();

$offset = $page * $rowCount;

//检索数据库
$param = array();
$param['delete_flg'] = false;
$certificateList = CertificateMst::getList($param,'display_order','desc', $offset, $rowCount);
$allCount = CertificateMst::getListCount($param);

//接口返回数据
$result["allCount"] = $allCount;
$result["page"] = $page;
$result["rowCount"] = $rowCount;
$result["list"] = $certificateList;


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


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

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;
}
?>