Exemplo n.º 1
0
 public function init()
 {
     //$this->setLayout(null);
     $this->setTemplate(null);
     ob_start();
     phpinfo();
     $info = ob_get_contents();
     ob_end_clean();
     $info = '<p><a href="' . SA_Url::url('/default') . '">Back</a></p>' . $info;
     $this->setContents(CONTENT_FOR_LAYOUT, $info);
 }
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 SA_Url::url($pageName, $params, $port, $secure);
}
Exemplo n.º 3
0
<html>
<head>
	<base href="<?php 
echo SA_Url::baseHref();
?>
">
	<style>
		body {
			margin-top: 5px;
			margin-left: 5px;
		}
	</style>
</head>
<body>
<h1>Congratulations, SA is up and running!</h1>
<div><b>Page name</b>: <?php 
echo $this->getName();
?>
</div>
<div><b>Layout</b>: <?php 
echo $this->app->getApplicationDirectory() . 'layouts/' . $this->getLayout();
?>
</div>
<div><b>Page class</b>: <?php 
echo get_class($this);
?>
</div>
<div><b>Find me in</b>: <?php 
echo $this->app->getApplicationDirectory() . 'pages/' . $this->getName() . '.php';
?>
</div>
function smarty_function_sabasehref($params, &$smarty)
{
    return SA_Url::baseHref();
}