protected function getLeft() { $items = MenuDB::getMainMenu(); $mainmenu = new MainMenu(); $mainmenu->uri = $this->url_active; $mainmenu->items = $items; //меню левое $user_panel = ""; if ($this->auth_user) { //панель пользователя для авторизированного $user_panel = new UserPanel(); $user_panel->user = $this->auth_user; $user_panel->uri = $this->url_active; $user_panel->addItem("Редактировать профиль", URL::get("editprofile", "user")); $user_panel->addItem("Выход", URL::get("logout")); } else { $user_panel = ""; } return $user_panel . $mainmenu; }
protected function getLeft() { $items = MenuDB::getMainMenu(); $mainmenu = new MainMenu(); $mainmenu->uri = $this->url_active; $mainmenu->items = $items; if ($this->auth_user) { $user_panel = new UserPanel(); $user_panel->user = $this->auth_user; $user_panel->uri = $this->url_active; $user_panel->addItem("Редактировать профиль", URL::get("editprofile", "user")); $user_panel->addItem("Выход", URL::get("logout")); } else { $user_panel = ""; } $poll_db = new PollDB(); $poll_db->loadRandom(); if ($poll_db->isSaved()) { $poll = new Poll(); $poll->action = URL::get("poll", "", array("id" => $poll_db->id)); $poll->title = $poll_db->title; $poll->data = PollDataDB::getAllOnPollID($poll_db->id); } else { $poll = ""; } return $user_panel . $mainmenu . $poll; }