CONTROL_PM::ctl_show PHP Метод

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

*============编辑管理员界面============ 返回提示
public ctl_show ( )
    function ctl_show()
    {
        if (!isset($this->adminLogged["admin_allow"]["pm"]["browse"]) && !$this->is_super) {
            return array("alert" => "x110301");
        }
        $_num_pmId = fn_getSafe(fn_get("pm_id"), "int", 0);
        if ($_num_pmId < 1) {
            return array("alert" => "x110211");
        }
        $_arr_pmRow = $this->mdl_pm->mdl_read($_num_pmId);
        if ($_arr_pmRow["alert"] != "y110102") {
            return $_arr_pmRow;
        }
        $_arr_pmRow["toUser"] = $this->mdl_user->mdl_read($_arr_pmRow["pm_to"]);
        $_arr_pmRow["fromUser"] = $this->mdl_user->mdl_read($_arr_pmRow["pm_from"]);
        $this->tplData["pmRow"] = $_arr_pmRow;
        $this->obj_tpl->tplDisplay("pm_show.tpl", $this->tplData);
        return array("alert" => "y110102");
    }

Usage Example

Пример #1
0
//验证是否已登录
include_once BG_PATH_CONTROL . "admin/ctl/pm.class.php";
//载入短信控制器
$ctl_pm = new CONTROL_PM();
//初始化短信
switch ($GLOBALS["act_get"]) {
    case "send":
        $arr_pmRow = $ctl_pm->ctl_send();
        //发送
        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: