 <?
/**
 * 用户管理
 * $Id: user_list.php
 * @author taocy
 * @package manager.public_html
 */

// 底层包含
require_once("manager_include.inc");

// 登录检查
require_once("check_login.inc");

// 不做权限检查
if (!checkAuthority("ADMIN,MANAGER,STAFF")) {
	// エラー表示
	$layout_pages = array();
	$layout_pages["footer"] = "footer.inc";
	$layout_pages["top"] = "menu.inc";
	$layout_pages["middle"] = "error.inc";
	$message = "权限不足，请联系系统管理员。";
	require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
	exit;
}

//取得参数
$status = ParamUtil::getRequestString("status", "APPLY");

$param = array();

//退回操作的话，会逻辑删除本条记录
if($status == "BACK") {
	$param["delete_flg"] = true;
	$param["status"] = $status;
} else {
	$param["delete_flg"] = false;
	$param["status"] = $status;
}
$user_use_coupon_list = UserUseCouponDat::getList($param, "id", "desc");
$total_count = count($user_use_coupon_list);

//使用代金券状态列表
$coupon_status_list = CouponStatus::getList();

// 页面
$_SCRIPT_FILE = array("scripts/validators.js", "scripts/user_list.js");
$layout_pages = array();
$layout_pages["top"] = "menu.inc";
$layout_pages["menu_clicked"] = "li_user";
$layout_pages["middle"] = "user_use_coupon_list.inc";
require_once(MANAGER_TEMPLATE_DIR_PATH . "/layout/topmenutopsub_layout.inc");
exit;
?>