/** * Create user admin template * @param array $contentMain - template content data * @param bool $noMenusAndInfo - don't show user info * @return Template */ public function tpl($contentMain, $noMenusAndInfo = false) { // configure main template $this->ssp->pageTitleAdd("Member admin"); if ($this->id != "" and !$noMenusAndInfo) { $name = $this->getName($this->id); $this->ssp->pageTitleAdd($name); $contentMain["displayName"] = $name; } if (isset($contentMain["title"])) { $this->ssp->pageTitleAdd($contentMain["title"]); } // generate menu if ($this->generateMenus and !$noMenusAndInfo) { $menu = new MenuGen(); $path = $this->cfg->userAdminScript; $url = $_SERVER['REQUEST_URI']; $menu->add($path . "/chInfo", $this->session->t("Change Info"), strpos($url, "chInfo") !== false); $menu->sv("title={$this->session->t('Change user information')}"); $menu->add($path . "/chPswd", $this->session->t("Change Password"), strpos($url, "chPswd") !== false); $menu->sv("title={$this->session->t('Change user password')}"); $menu->add($path . "/chEmail", $this->session->t("Change Email"), strpos($url, "chEmail") !== false); $menu->sv("title={$this->session->t('Change user email')}"); $menu->add($path . "/info/" . $this->id, $this->session->t("Basic Info"), strpos($url, "info") !== false); $menu->sv("title={$this->session->t('Show basic information')}"); $menu->add("", ""); if ($this->admin) { $menu->add($path . "/advInfo", $this->session->t("Advanced Info"), strpos($url, "advInfo") !== false); $menu->sv("title={$this->session->t('Show advanced information')}"); $menu->add($path . "/chAdv", $this->session->t("Change Advanced"), strpos($url, "chAdv") !== false); $menu->sv("title={$this->session->t('Change advanced information')}"); $menu->add($path . "/joinEmail", $this->session->t("Send Joining Email"), strpos($url, "joinEmail") !== false); $menu->sv("title={$this->session->t('Send a joinup email to the user')}"); $menu->add($path . "/email", $this->session->t("Email Member"), strpos($url, "email") !== false); $menu->sv("title={$this->session->t('Email the member')}"); $menu->add("", ""); } $menu->add("useradminhelp.php", $this->session->t("Help")); $menu->sv("target=_blank"); $contentMain["menu"] = $menu->cMenu(); } $tpl = $this->ssp->tpl($contentMain, $this->templateFile, $this->generateMenus); return $tpl; }
/** * Configue the main template * @param array $contentMain - template content data * @return Template */ public function tpl($contentMain) { // configure main template $this->ssp->pageTitleAdd("User admin"); if (isset($contentMain["title"])) { $this->ssp->pageTitleAdd($contentMain["title"]); } $url = $_SERVER['REQUEST_URI']; $menu = new MenuGen(); $menu->add($this->cfg->userLister . '/filterChange', $this->session->t("Modify Search"), $url === '/sspadmin/filterChange'); if ($this->cfg->adminCheck) { if (!($this->filter->userAdminPending == 1 and $this->filter->creationFinished == 1)) { $menu->add($this->cfg->userLister . '/filterAdminPending', $this->session->t("List Admin Pending"), $url === '/sspadmin/filterAdminPending'); } } $menu->add($this->cfg->userLister . '/filterNormal', $this->session->t("Defualt Listing"), $url === '/sspadmin/filterNormal'); $menu->add('userlisterhelp.php', $this->session->t("Help")); $menu->sv("target=help"); $contentMain["menu"] = $menu->cMenu(); $tpl = $this->ssp->tpl($contentMain); return $tpl; }