/** * default constructor * initializes the page search dir, page name and GET & POST variables * must be called explicitely by the inheriting classes */ function __construct() { ob_start(); $this->start_time = microtime(); $this->pageSearchDir = "{$this->home}/Pages"; SALog::open(); SAUrl::setApplicationObject($this); SAPageHandler::setApplicationObject($this); SARequest::setApplicationObject($this); SARequest::init(); SARequest::detectPageName(); SARequest::detectGETParameters(); $this->gp = $_GET + $_POST; session_name(SA_SESSION_NAME); session_start(); try { SARequest::checkValidity(); } catch (URLManipulationException $e) { SALog::log($e->getMessage(), SA_LOG_ERROR); $this->forward($this->errorPageName); } catch (Exception $e) { $this->resign($e->getMessage(), 1); } SALog::log("application initialized successfully", SA_LOG_NOTICE); }
function display() { $this->setContents('_TITLE_', 'Welcome to my site'); $this->setContents(PAGE_DEFAULT_REGION, '<h1>Welcome friend</h1>'); $this->appendContents(PAGE_DEFAULT_REGION, '<a href="' . SAUrl::Url('nested/index', array(APPLICATION_EVENTS_VAR_NAME => 'update')) . '">Click me</a>'); parent::display(); }
function build($page, $params) { if (ENCRYPT_URLS) { $url = SAUrl::buildEncrypted($page, $params); } else { $url = SAUrl::buildSimple($page, $params); } return $url; }
/** * default constructor * initializes the page search dir, page name and GET & POST variables * must be called explicitely by the inheriting classes */ function __construct() { $this->start_time = microtime(); $this->pageSearchDir = "{$this->home}/Pages"; SALog::open(); SAUrl::setApplicationObject($this); SAPageHandler::setApplicationObject($this); SARequest::setApplicationObject($this); SARequest::init(); SARequest::detectPageName(); SARequest::detectGETParameters(); $this->gp = $_GET + $_POST; session_name(SAE_SESSION_NAME); session_start(); SALog::log("application initialized successfully", SA_LOG_NOTICE); }
function smarty_function_saurl($params, &$smarty) { $pageName = $params['page']; $port = $params['port'] ? $params['port'] : 80; $secure = $params['secure'] ? $params['secure'] : false; $events = $params['events']; if ($events) { $app = $smarty->get_template_vars('app'); $params[$app->getGPEventsName()] = $events; } unset($params['port']); unset($params['secure']); unset($params['page']); unset($params['events']); return SAUrl::url($pageName, $params, $port, $secure); }
function SApplication() { $this->_updateMeStatic(); if (ENABLE_PROFILING) { include_once 'Benchmark/Timer.php'; $this->_timer =& new Benchmark_Timer(); $this->_timer->start(); } parent::PEAR(); $u = SAURL::restore(); if (PEAR::isError($u)) { if ($u->getCode() == URL_MANIPULATION) { HTTP_Header::redirect(SAUrl::Url(APPLICATION_401_PAGE)); exit; } } }
this.rootDocument = autFrameDocument; var domViewer = window.open(getDocumentBase(document) + 'domviewer/domviewer.html'); return false; } </script> </head> <body onLoad="start();"> <table class="layout"> <form action="" name="controlPanel"> <!-- Suite, Test, Control Panel --> <tr class="selenium"> <td width="25%" height="30%" ><iframe name="testSuiteFrame" id="testSuiteFrame" src="<?php echo SAUrl::Url('tests', array($this->app->getGPEventsName() => 'suite')); ?> " application="yes"></iframe></td> <td width="50%" height="30%" ><iframe name="testFrame" id="testFrame" application="yes"></iframe></td> <td width="25%"> <table class="layout"> <tr class="selenium"> <th width="25%" height="1" class="header"> <h1><a href="http://selenium.thoughtworks.com" title="The Selenium Project">Selenium</a> TestRunner</h1> </th> </tr> <tr> <td width="25%" height="30%" id="controlPanel">
" class="linkbottom">Home</a></td> <td width="20%" align="center"><a href="<?php echo SAUrl::Url('contact'); ?> " class="linkbottom">Contact us</a></td> <td width="20%" align="center"><a href="<?php echo SAUrl::Url('cart'); ?> " class="linkbottom">Shopping Cart</a></td> <td width="20%" align="center"><a href="<?php echo SAUrl::Url('checkout'); ?> " class="linkbottom">Checkout</a></td> <td width="20%" align="center"><a href="<?php echo SAUrl::Url('account'); ?> " class="linkbottom">Members</a></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td valign="bottom" height="10"> <table width="100%" class="mainlinebottom" cellpadding="0" cellspacing="0"> <tr>
protected function boxCategories($node) { $aCPath = $this->cPath; do { $cat = DB_DataObject::factory('categories_description'); $cat->language_id = $_COOKIE['language']; $cat->get($id = $node['id']); $cPath = $this->getCategoryPath($node); $products_in_category = 0; $this->productsInCategory($id, $products_in_category); ?> <tr> <td> </td> <td class="box" onmouseover="this.style.backgroundColor = 'white'" onmouseout="this.style.backgroundColor = '#DDD7C9'"> <a href="<?php echo SAUrl::Url('default', array('cPath' => $cPath)); ?> "><div><?php echo str_repeat(' ', $node['level']); ?> <img src="images/arrow.gif" border="0"/> <?php echo $node['id'] == $aCPath[$node['level']] ? '<b>' : ''; echo $cat->categories_name . ($products_in_category ? " ({$products_in_category})" : ''); ?> </div></a> </td> </tr> <?php if ($this->tree->hasChildren($node['id']) && $node['id'] == $aCPath[$node['level']]) { $this->boxCategories($this->tree->getChild($node['id']), $aCPath); } } while ($node = $this->tree->getNext($node['id'])); }
function smarty_function_sabasehref($params, &$smarty) { return SAUrl::baseHref(); }
function load() { $this->setContents('_TITLE_', 'Nested page'); $this->setContents(PAGE_DEFAULT_REGION, '<a href="' . SAUrl::Url('index') . '">Back</a>'); $this->appendContents(PAGE_DEFAULT_REGION, '<h1>This is a nested page</h1>'); }