diff options
| author | xue <> | 2005-12-28 18:31:03 +0000 | 
|---|---|---|
| committer | xue <> | 2005-12-28 18:31:03 +0000 | 
| commit | 930c51a6d618d487105cd46c517f36c3b1fe3b44 (patch) | |
| tree | 16a60f8fcb56dfa613c528b7abc253dcd9204751 /demos/quickstart/protected/controls/RunBar.php | |
| parent | faf4aa4f219e3bf6fdac4144112de58d2fdfd131 (diff) | |
Diffstat (limited to 'demos/quickstart/protected/controls/RunBar.php')
| -rw-r--r-- | demos/quickstart/protected/controls/RunBar.php | 23 | 
1 files changed, 23 insertions, 0 deletions
| diff --git a/demos/quickstart/protected/controls/RunBar.php b/demos/quickstart/protected/controls/RunBar.php new file mode 100644 index 00000000..0d20e0d4 --- /dev/null +++ b/demos/quickstart/protected/controls/RunBar.php @@ -0,0 +1,23 @@ +<?php
 +
 +class RunBar extends TTemplateControl
 +{
 +	public function getPagePath()
 +	{
 +		return $this->getViewState('PagePath','');
 +	}
 +
 +	public function setPagePath($value)
 +	{
 +		$this->setViewState('PagePath',$value,'');
 +	}
 +
 +	protected function onPreRender($param)
 +	{
 +		$pagePath=$this->getPagePath();
 +		$this->RunButton->NavigateUrl="?page=$pagePath";
 +		$this->ViewSourceButton->NavigateUrl="?page=ViewSource&path=/".strtr($pagePath,'.','/').'.page';
 +	}
 +}
 +
 +?>
\ No newline at end of file | 
