summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/controls
diff options
context:
space:
mode:
authorxue <>2005-12-28 18:31:03 +0000
committerxue <>2005-12-28 18:31:03 +0000
commit930c51a6d618d487105cd46c517f36c3b1fe3b44 (patch)
tree16a60f8fcb56dfa613c528b7abc253dcd9204751 /demos/quickstart/protected/controls
parentfaf4aa4f219e3bf6fdac4144112de58d2fdfd131 (diff)
Diffstat (limited to 'demos/quickstart/protected/controls')
-rw-r--r--demos/quickstart/protected/controls/RunBar.php23
-rw-r--r--demos/quickstart/protected/controls/RunBar.tpl4
2 files changed, 27 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
diff --git a/demos/quickstart/protected/controls/RunBar.tpl b/demos/quickstart/protected/controls/RunBar.tpl
new file mode 100644
index 00000000..14e57fc3
--- /dev/null
+++ b/demos/quickstart/protected/controls/RunBar.tpl
@@ -0,0 +1,4 @@
+<div class="runbar">
+<com:THyperLink ID="RunButton" Target="_blank" Text="Run Sample" />
+<com:THyperLink ID="ViewSourceButton" Target="_blank" Text="View Source" />
+</div> \ No newline at end of file