Пример #1
0
 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 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);
}
Пример #3
0
 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;
         }
     }
 }
Пример #4
0
        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">
Пример #5
0
" 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>
Пример #6
0
    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>
              &nbsp;
            </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('&nbsp;&nbsp;', $node['level']);
            ?>
<img src="images/arrow.gif" border="0"/>&nbsp;<?php 
            echo $node['id'] == $aCPath[$node['level']] ? '<b>' : '';
            echo $cat->categories_name . ($products_in_category ? "&nbsp;({$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']));
    }
Пример #7
0
 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>');
 }