CONTROL_APP::ctl_list PHP Метод

ctl_list() публичный Метод

*============列出管理员界面============ 无返回
public ctl_list ( )
    function ctl_list()
    {
        if (!isset($this->adminLogged["admin_allow"]["app"]["browse"]) && !$this->is_super) {
            return array("alert" => "x050301");
        }
        $_arr_search = array("key" => fn_getSafe(fn_get("key"), "txt", ""), "status" => fn_getSafe(fn_get("status"), "txt", ""));
        $_num_appCount = $this->mdl_app->mdl_count($_arr_search);
        $_arr_page = fn_page($_num_appCount);
        //取得分页数据
        $_str_query = http_build_query($_arr_search);
        $_arr_appRows = $this->mdl_app->mdl_list(BG_DEFAULT_PERPAGE, $_arr_page["except"], $_arr_search);
        $_arr_tpl = array("query" => $_str_query, "pageRow" => $_arr_page, "search" => $_arr_search, "appRows" => $_arr_appRows);
        $_arr_tplData = array_merge($this->tplData, $_arr_tpl);
        $this->obj_tpl->tplDisplay("app_list.tpl", $_arr_tplData);
        return array("alert" => "y050302");
    }

Usage Example

Пример #1
0
        $arr_appRow = $ctl_app->ctl_show();
        if ($arr_appRow["alert"] != "y190102") {
            header("Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $arr_appRow["alert"]);
            exit;
        }
        break;
    case "form":
        //创建、编辑表单
        $arr_appRow = $ctl_app->ctl_form();
        if ($arr_appRow["alert"] != "y190102") {
            header("Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $arr_appRow["alert"]);
            exit;
        }
        break;
    case "belong":
        //用户授权
        $arr_appRow = $ctl_app->ctl_belong();
        if ($arr_appRow["alert"] != "y190302") {
            header("Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $arr_appRow["alert"]);
            exit;
        }
        break;
    default:
        //列出
        $arr_appRow = $ctl_app->ctl_list();
        if ($arr_appRow["alert"] != "y190302") {
            header("Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $arr_appRow["alert"]);
            exit;
        }
        break;
}