function ctl_belong()
{
if (!isset($this->adminLogged["admin_allow"]["app"]["edit"]) && !$this->is_super) {
return array("alert" => "x050303");
}
$_num_appId = fn_getSafe(fn_get("app_id"), "int", 0);
$_str_key = fn_getSafe(fn_get("key"), "txt", "");
$_str_keyBelong = fn_getSafe(fn_get("key_belong"), "txt", "");
if ($_num_appId < 1) {
return array("alert" => "x050203");
}
$_arr_appRow = $this->mdl_app->mdl_read($_num_appId);
if ($_arr_appRow["alert"] != "y050102") {
return $_arr_appRow;
}
$_arr_search = array("app_id" => $_num_appId, "key" => $_str_key, "key_belong" => $_str_keyBelong);
$_num_userCount = $this->mdl_user->mdl_count($_arr_search);
$_arr_page = fn_page($_num_userCount);
//取得分页数据
$_str_query = http_build_query($_arr_search);
$_arr_userRows = $this->mdl_user->mdl_list(BG_DEFAULT_PERPAGE, $_arr_page["except"], $_arr_search);
$_arr_searchView = array("key" => $_str_keyBelong, "app_id" => $_num_appId);
$_arr_userViews = $this->mdl_user->mdl_list_view($_arr_searchView);
$_arr_tpl = array("query" => $_str_query, "pageRow" => $_arr_page, "search" => $_arr_search, "userRows" => $_arr_userRows, "userViews" => $_arr_userViews, "appRow" => $_arr_appRow);
$_arr_tplData = array_merge($this->tplData, $_arr_tpl);
$this->obj_tpl->tplDisplay("app_belong.tpl", $_arr_tplData);
return array("alert" => "y050302");
}