/** * function to get multilanguage strings * * This is actually a wrapper for ATK's atktext() method, for * use in templates. * * @author Ivo Jansch <*****@*****.**> * * Example: {atktext id="users.userinfo.description"} * {atktext id="userinfo.description" module="users"} * {atktext id="description" module="users" node="userinfo"} * */ function smarty_function_atktext($params, &$smarty) { if (!isset($params["id"])) { $params["id"] = $params[0]; } switch (substr_count($params["id"], ".")) { case 1: list($module, $id) = explode(".", $params["id"]); $str = atktext($id, $module, isset($params["node"]) ? $params["node"] : ''); break; case 2: list($module, $node, $id) = explode(".", $params["id"]); $str = atktext($id, $module, $node); break; default: $str = atktext($params["id"], atkArrayNvl($params, "module", ""), atkArrayNvl($params, "node", ""), atkArrayNvl($params, "lng", "")); } if (isset($params["filter"])) { $fn = $params["filter"]; $str = $fn($str); } // parse the rest of the params in the string atkimport("atk.utils.atkstringparser"); $parser = new atkStringParser($str); return $parser->parse($params); }
* @author Ivo Jansch <*****@*****.**> * * @copyright (c)2000-2004 Ibuildings.nl BV * @license http://www.achievo.org/atk/licensing ATK Open Source License * * @version $Revision: 5036 $ * $Id: top.php 6354 2009-04-15 02:41:21Z mvdam $ */ /** * @internal includes. */ $config_atkroot = "./"; include_once "atk.inc"; atksession(); atksecure(); $page =& atkNew("atk.ui.atkpage"); $ui =& atkInstance("atk.ui.atkui"); $theme =& atkInstance("atk.ui.atktheme"); $output =& atkInstance("atk.ui.atkoutput"); $page->register_style($theme->stylePath("style.css")); $page->register_style($theme->stylePath("top.css")); $vars = array("logintext" => atkText("logged_in_as", "atk"), "logouttext" => ucfirst(atkText("logout", "atk")), "logoutlink" => "app.php?atklogout=1", "logouttarget" => "_top", "centerpiece" => "", "searchpiece" => "", "title" => atkText("app_title"), "user" => atkArrayNvl(atkGetUser(), "name")); // Backwards compatible $vars[content], that is what will render when the // box.tpl is used instead of a top.tpl. This happens in old themes. $contenttpl = '<br />[logintext]: <b>[user]</b> <a href="[logoutlink]" target="[logouttarget]">[logouttext] </a> <br /><br />'; $stringparser =& atkNew("atk.utils.atkstringparser", $contenttpl); $vars["content"] = $stringparser->parse($vars); $top = $ui->renderBox($vars, "top"); $page->addContent($top); $output->output($page->render($vars["title"], true)); $output->outputFlush();
* whithin this file must be adjusted. * * @package achievo * * @author guido <*****@*****.**> * * @copyright (c) 2005 Ibuildings.nl BV * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2 * * @version $Revision: 2271 $ * $Id: test.php 2271 2007-06-27 06:17:18Z guido $ */ /** * @internal includes */ $config_atkroot = "./"; include_once "atk.inc"; // Start session atksession(); // Require ATK authentication if not running in text mode if (PHP_SAPI != "cli") { atksecure(); } // Set the maximum execution time of all tests together set_time_limit(atkconfig("test_maxexecutiontime")); // Include the Achievo extended webtestcase (features loginAchievo function) atkimport("test.achievowebtestcase"); // Let the atktestsuite run the requested tests in an appropriate format $suite =& atknew("atk.test.atktestsuite"); $suite->run(PHP_SAPI != "cli" ? "html" : "text", atkArrayNvl($_REQUEST, "atkmodule"));
atkimport("atk.menu.atkmenu"); atkimport("atk.utils.atkframeset"); $menu =& atkMenu::getMenu(); $theme =& atkinstance('atk.ui.atktheme'); $position = $menu->getPosition(); $scrolling = $menu->getScrollable() == MENU_SCROLLABLE ? FRAME_SCROLL_AUTO : FRAME_SCROLL_NO; if (isset($ATK_VARS["atknodetype"]) && isset($ATK_VARS["atkaction"])) { $destination = "dispatch.php?atknodetype=" . $ATK_VARS["atknodetype"] . "&atkaction=" . $ATK_VARS["atkaction"]; if (isset($ATK_VARS["atkselector"])) { $destination .= "&atkselector=" . $ATK_VARS["atkselector"]; } if (isset($ATK_VARS["searchstring"])) { $destination .= "&searchstring=" . $ATK_VARS["searchstring"]; } } else { if (atkArrayNvl(atkGetUser(), "name") == "administrator") { $destination = session_url(dispatch_url("pim.pim", "adminpim"), SESSION_NEW); } else { $destination = session_url(dispatch_url("pim.pim", "pim"), SESSION_NEW); } } $frame_top_height = $theme->getAttribute('frame_top_height'); $frame_menu_width = $theme->getAttribute('frame_menu_width'); $topframe =& new atkFrame($frame_top_height ? $frame_top_height : "75", "top", "top.php", FRAME_SCROLL_NO, true); $mainframe =& new atkFrame("*", "main", $destination, FRAME_SCROLL_AUTO, true); $menuframe =& new atkFrame($position == MENU_LEFT || $position == MENU_RIGHT ? $frame_menu_width ? $frame_menu_width : 190 : $menu->getHeight(), "menu", "menu.php", $scrolling); $noframes = '<p>Your browser doesnt support frames, but this is required to run ' . atktext('app_title') . "</p>\n"; $root =& new atkRootFrameset(); if (atkconfig("top_frame")) { $outer =& new atkFrameSet("*", FRAMESET_VERTICAL, 0, $noframes); $outer->addChild($topframe);
function getProperty($key, $encode = null) { if (isset($this->properties[$key . ";ENCODING=QUOTED-PRINTABLE"]) && $encode !== false) { return quoted_printable_decode($this->properties[$key . ";ENCODING=QUOTED-PRINTABLE"]); } else { return atkArrayNvl($this->properties, $key); } }