/** * Grabs the THEME template directory unless layout is not * operational */ public static function getTplDir($module) { if ($module == 'core') { return PHPWS_SOURCE_DIR . 'core/templates/'; } if (!class_exists('Layout')) { return PHPWS_SOURCE_DIR . "mod/{$module}/templates/"; } $theme = Layout::getThemeDirRoot() . Layout::getTheme(); return sprintf('%s/templates/%s/', $theme, $module); }
public static function getThemeDir() { Layout::checkSettings(); $themeDir = Layout::getTheme(); //return PHPWS_SOURCE_DIR . "themes/$themeDir/"; return "themes/{$themeDir}/"; }
/** * Returns a menu and its links for display */ public function view($admin = false) { $key = Key::getCurrent(); if ($key && $key->isDummy(true)) { return; } $theme_tpl_dir = \PHPWS_Template::getTplDir('menu') . 'menu_layout/'; $menu_tpl_dir = PHPWS_SOURCE_DIR . 'mod/menu/templates/menu_layout/'; $theme_path = $theme_tpl_dir . $this->template . '/'; $menu_path = $menu_tpl_dir . $this->template . '/'; if (is_file($theme_path . 'menu.tpl')) { $file = $theme_path . 'menu.tpl'; $path = $theme_path; $http = 'themes/' . Layout::getTheme() . '/templates/menu/menu_layout/' . $this->template . '/'; } elseif (is_file($menu_path . 'menu.tpl')) { $file = $menu_path . 'menu.tpl'; $path = $menu_path; $http = 'mod/menu/templates/menu_layout/' . $this->template . '/'; } else { $this->template = 'basic'; $this->save(); $path = $menu_tpl_dir . 'basic/'; $http = 'mod/menu/templates/menu_layout/basic/'; $file = $path . '/menu.tpl'; } $this->parseIni($path); if ($this->_style) { $style = $http . 'style.css'; Layout::addToStyleList($style); } $tpl['TITLE'] = $this->getTitle(); $tpl['LINKS'] = $this->displayLinks($admin); $tpl['MENU_ID'] = sprintf('menu-%s', $this->id); $content = PHPWS_Template::process($tpl, 'menu', $file, true); return $content; }
$anuncio = $anuncioDAO->getAnuncioPorId($id); $key['local'] = "ABQIAAAAdYDULndWHw73mv6IA5TzQxRMtg-kJ86tYRuSzULgUSI7o9IM_xTBnZ5iDcBkLKVAq13VtrFrxJwhxA"; $key['online'] = "ABQIAAAAdYDULndWHw73mv6IA5TzQxRQnSlT4KQ-GYzt3qGqXg8vKTdKzBSXAZnS0UBwi2weHwDkS7HX_OEF6Q"; ?> <!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"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title><?php echo utf8_encode($anuncio->getNome()); ?> </title> <?php echo $layout->getTheme(""); ?> <link rel="shortcut icon" href="<?php echo $layout->image_path; ?> icones/favicon.ico" > <script type="text/javascript" src="<?php echo $layout->image_path; ?> js/jquery.js"></script> <script type="text/javascript" src="<?php echo $layout->image_path; ?> js/funcoes.js"></script> <script> $(document).ready(function(){