From da3e4e99d6a2e3b2c9591d969cb63d61a6114eee Mon Sep 17 00:00:00 2001
From: xue <>
Date: Sat, 24 Dec 2005 17:14:39 +0000
Subject:
---
.gitattributes | 10 +++-
demos/quickstart/protected/pages/DetailPage.php | 55 -----------------
demos/quickstart/protected/pages/ViewSource.page | 16 +++++
demos/quickstart/protected/pages/ViewSource.php | 66 +++++++++++++++++++++
.../quickstart/protected/pages/chap3/Hangman.page | 6 ++
.../protected/pages/chap3/HelloWorld.page | 26 ++++++++
.../protected/pages/chap3/HelloWorld/Home.page | 18 ++++++
.../protected/pages/chap3/HelloWorld/Home.php | 11 ++++
.../protected/pages/chap3/HelloWorld/config.xml | 5 ++
.../protected/pages/chap3/HelloWorld/sequence.gif | Bin 0 -> 5557 bytes
.../protected/pages/chap3/HelloWorld/sequence.vsd | Bin 0 -> 143360 bytes
11 files changed, 157 insertions(+), 56 deletions(-)
delete mode 100644 demos/quickstart/protected/pages/DetailPage.php
create mode 100644 demos/quickstart/protected/pages/ViewSource.page
create mode 100644 demos/quickstart/protected/pages/ViewSource.php
create mode 100644 demos/quickstart/protected/pages/chap3/Hangman.page
create mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld.page
create mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld/Home.page
create mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld/Home.php
create mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld/config.xml
create mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld/sequence.gif
create mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld/sequence.vsd
diff --git a/.gitattributes b/.gitattributes
index 5494b5cb..95735c4b 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -23,15 +23,23 @@ demos/quickstart/index.php -text
demos/quickstart/protected/.htaccess -text
demos/quickstart/protected/application.xml -text
demos/quickstart/protected/pages/Construction.page -text
-demos/quickstart/protected/pages/DetailPage.php -text
demos/quickstart/protected/pages/Layout.php -text
demos/quickstart/protected/pages/Layout.tpl -text
demos/quickstart/protected/pages/TopicList.php -text
demos/quickstart/protected/pages/TopicList.tpl -text
+demos/quickstart/protected/pages/ViewSource.page -text
+demos/quickstart/protected/pages/ViewSource.php -text
demos/quickstart/protected/pages/chap1/AboutPrado.page -text
demos/quickstart/protected/pages/chap1/Installation.page -text
demos/quickstart/protected/pages/chap1/Introduction.page -text
demos/quickstart/protected/pages/chap1/config.xml -text
+demos/quickstart/protected/pages/chap3/Hangman.page -text
+demos/quickstart/protected/pages/chap3/HelloWorld.page -text
+demos/quickstart/protected/pages/chap3/HelloWorld/Home.page -text
+demos/quickstart/protected/pages/chap3/HelloWorld/Home.php -text
+demos/quickstart/protected/pages/chap3/HelloWorld/config.xml -text
+demos/quickstart/protected/pages/chap3/HelloWorld/sequence.gif -text
+demos/quickstart/protected/pages/chap3/HelloWorld/sequence.vsd -text
demos/quickstart/protected/pages/config.xml -text
demos/quickstart/themes/Simple/style.css -text
docs/application.xml -text
diff --git a/demos/quickstart/protected/pages/DetailPage.php b/demos/quickstart/protected/pages/DetailPage.php
deleted file mode 100644
index afd81272..00000000
--- a/demos/quickstart/protected/pages/DetailPage.php
+++ /dev/null
@@ -1,55 +0,0 @@
-Request->Items['src'])===null)
- $this->_file=$this->determineFile($this->Request->Items['tpl'],false);
- else
- $this->_file=$this->determineFile($id,true);
- }
-
- protected function determineFile($id,$isSrcFile)
- {
- $basePath=dirname(__FILE__).'/controls';
-
- $xml=new TXmlDocument;
- $xml->loadFromFile($basePath.'/config.xml');
- $pages=$xml->getElementByTagName('pages')->getElementsByTagName('page');
- $fileName='';
- foreach($pages as $page)
- {
- if($page->Attributes['id']===$id)
- {
- if($isSrcFile)
- $fileName=$basePath.'/'.$page->Attributes['class'].'.php';
- else if($page->Attributes['TemplateFile']!==null)
- {
- $fileName=$page->Attributes['TemplateFile'];
- if(($pos=strrpos($fileName,'.'))!==false)
- $fileName=substr($fileName,$pos+1);
- $fileName=$basePath.'/'.$fileName.'.tpl';
- }
- else
- $fileName=$basePath.'/'.$page->Attributes['class'].'.tpl';
- break;
- }
- }
- if(empty($fileName) || !is_file($fileName))
- throw new THttpException(500,"File not exists!");
- return $fileName;
- }
-
- protected function render($writer)
- {
- $contents=file_get_contents($this->_file);
- $writer->write(highlight_string($contents,true));
- }
-}
-
-?>
\ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ViewSource.page b/demos/quickstart/protected/pages/ViewSource.page
new file mode 100644
index 00000000..3732771a
--- /dev/null
+++ b/demos/quickstart/protected/pages/ViewSource.page
@@ -0,0 +1,16 @@
+
+
+
+