Ejemplo n.º 1
0
 /**
  * Completely Hardcoded. Eww.
  *
  * Formats links to all of the possible control panel areas, taking into
  * account the level of the current user, and the permissions allowed with
  * respect to that level.
  *
  * @return String The control panel menu
  */
 function showPanel()
 {
     $c = new StringBuffer();
     $c->append("\n<ul>\n");
     $c->append($this->link('news&page=edit', $this->lang->message('showPanel', 'articles'), 1));
     $c->append($this->link('news&page=add', $this->lang->message('showPanel', 'articles:add'), 1));
     $c->append($this->link('category&page=add', $this->lang->message('showPanel', 'categories'), 3));
     $c->append($this->link('template&page=main', $this->lang->message('showPanel', 'template'), 3));
     $c->append($this->link('user&page=add', $this->lang->message('showPanel', 'users:add'), 2));
     $c->append($this->link('user&page=remove', $this->lang->message('showPanel', 'users:edit'), 3));
     $c->append($this->link('comments&page=viewPosts', $this->lang->message('showPanel', 'comments'), 2));
     $c->append($this->link('configuration&page=edit', $this->lang->message('showPanel', 'configuration'), 3));
     $c->append($this->link('user&page=edit', $this->lang->message('showPanel', 'profile'), 1));
     $c->append($this->link('logout', $this->lang->message('showPanel', 'logout'), 1));
     $c->append("\n</ul>\n");
     $replacer = $this->template->setMethod('panel');
     $replacer->addVariable('menu', $c->toString());
     return $this->template->createViewer($replacer);
 }