/** * Add header text * * @param Zend_Controller_Response_Abstract $response */ protected function addHeader($response) { $config = Zend_Registry::get('config'); $homepage = T_("Homepage"); $identity = Zend_Auth::getInstance()->getIdentity(); $loggedAs = !($identity === null) ? T_("Logged as") . " " . $identity['username'] : ""; $menu = new USVN_Menu(USVN_MENUS_DIR, $this->getRequest(), $identity); $header = <<<EOF <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> \t<head> \t <title>{$config->site->title}</title> \t\t<meta http-equiv="Content-Type"\tcontent="text/html; charset=utf-8" /> \t\t<link rel="icon" href="{$config->url->base}/{$config->site->ico}" type="image/x-icon" /> \t\t<link type="text/css" rel="stylesheet" media="screen" href="{$config->url->base}/medias/usvn/stylesheets/new.css" /> \t\t<script type="text/javascript" src="{$config->url->base}/js/"></script> \t</head> \t<body> \t\t<div id="usvn_page"> \t\t\t<div id="usvn_header"> \t\t\t\t<a id="usvn_logo" href="{$config->url->base}/"> \t\t\t\t\t<img src="{$config->url->base}/{$config->site->logo}" alt="{$homepage}" /> \t\t\t\t</a> \t\t\t</div> \t\t\t<div id="menu"> EOF; $header .= $this->buildMenu($menu->getTopMenu(), 'usvn_menu'); $header .= $this->buildMenu($menu->getSubMenu(), 'usvn_submenu'); $header .= $this->buildMenu($menu->getSubSubMenu(), 'usvn_subsubmenu'); $header .= "</div><div id=\"usvn_content\">"; $body = $response->getBody(true); $response->setBody($header); foreach ($body as $text) { $response->appendBody($text); } }