CONTROL_PM::ctl_list PHP Метод

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

*============列出管理员界面============ 无返回
public ctl_list ( )
    function ctl_list()
    {
        if (!isset($this->adminLogged["admin_allow"]["pm"]["browse"]) && !$this->is_super) {
            return array("alert" => "x110301");
        }
        $_arr_search = array("key" => fn_getSafe(fn_get("key"), "txt", ""), "type" => fn_getSafe(fn_get("type"), "txt", ""), "status" => fn_getSafe(fn_get("status"), "txt", ""), "pm_from" => fn_getSafe(fn_get("pm_from"), "int", 0), "pm_to" => fn_getSafe(fn_get("pm_to"), "int", 0));
        $_num_pmCount = $this->mdl_pm->mdl_count($_arr_search);
        $_arr_page = fn_page($_num_pmCount);
        //取得分页数据
        $_str_query = http_build_query($_arr_search);
        $_arr_pmRows = $this->mdl_pm->mdl_list(BG_DEFAULT_PERPAGE, $_arr_page["except"], $_arr_search);
        foreach ($_arr_pmRows as $_key => $_value) {
            $_arr_pmRows[$_key]["toUser"] = $this->mdl_user->mdl_read($_value["pm_to"]);
            $_arr_pmRows[$_key]["fromUser"] = $this->mdl_user->mdl_read($_value["pm_from"]);
        }
        $_arr_tpl = array("query" => $_str_query, "pageRow" => $_arr_page, "search" => $_arr_search, "pmRows" => $_arr_pmRows);
        $_arr_tplData = array_merge($this->tplData, $_arr_tpl);
        $this->obj_tpl->tplDisplay("pm_list.tpl", $_arr_tplData);
        return array("alert" => "y110302");
    }

Usage Example

Пример #1
0
        //发送
        if ($arr_pmRow["alert"] != "y110303") {
            header("Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $arr_pmRow["alert"]);
            exit;
        }
        break;
    case "show":
        $arr_pmRow = $ctl_pm->ctl_show();
        //显示
        if ($arr_pmRow["alert"] != "y110102") {
            header("Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $arr_pmRow["alert"]);
            exit;
        }
        break;
    case "bulk":
        $arr_pmRow = $ctl_pm->ctl_bulk();
        //群发
        if ($arr_pmRow["alert"] != "y110102") {
            header("Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $arr_pmRow["alert"]);
            exit;
        }
        break;
    default:
        $arr_pmRow = $ctl_pm->ctl_list();
        //列出
        if ($arr_pmRow["alert"] != "y110302") {
            header("Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $arr_pmRow["alert"]);
            exit;
        }
        break;
}