summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes22
-rw-r--r--demos/quickstart/protected/pages/chap1/AboutPrado.page19
-rw-r--r--demos/quickstart/protected/pages/chap1/Installation.page21
-rw-r--r--demos/quickstart/protected/pages/chap1/Introduction.page7
-rw-r--r--demos/quickstart/protected/pages/chap1/config.xml5
-rw-r--r--demos/quickstart/protected/pages/chap2/Configurations.page82
-rw-r--r--demos/quickstart/protected/pages/chap2/KeyConcepts.page73
-rw-r--r--demos/quickstart/protected/pages/chap2/Templates1.page69
-rw-r--r--demos/quickstart/protected/pages/chap2/Templates2.page78
-rw-r--r--demos/quickstart/protected/pages/chap2/Templates3.page73
-rw-r--r--demos/quickstart/protected/pages/chap3/Hangman.page16
-rw-r--r--demos/quickstart/protected/pages/chap3/Hangman/Home.page74
-rw-r--r--demos/quickstart/protected/pages/chap3/Hangman/Home.php135
-rw-r--r--demos/quickstart/protected/pages/chap3/Hangman/config.xml5
-rw-r--r--demos/quickstart/protected/pages/chap3/Hangman/words.txt27
-rw-r--r--demos/quickstart/protected/pages/chap3/HelloWorld.page26
-rw-r--r--demos/quickstart/protected/pages/chap3/HelloWorld/Home.page18
-rw-r--r--demos/quickstart/protected/pages/chap3/HelloWorld/Home.php11
-rw-r--r--demos/quickstart/protected/pages/chap3/HelloWorld/config.xml5
-rw-r--r--demos/quickstart/protected/pages/chap3/HelloWorld/sequence.gifbin5557 -> 0 bytes
-rw-r--r--demos/quickstart/protected/pages/chap3/HelloWorld/sequence.vsdbin143360 -> 0 bytes
-rw-r--r--demos/quickstart/protected/pages/chap4/Overview.page15
-rw-r--r--demos/quickstart/protected/pages/chap4/Simple1.page2
23 files changed, 0 insertions, 783 deletions
diff --git a/.gitattributes b/.gitattributes
index 79c531f6..1c640d1b 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -37,28 +37,6 @@ 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/chap2/Configurations.page -text
-demos/quickstart/protected/pages/chap2/KeyConcepts.page -text
-demos/quickstart/protected/pages/chap2/Templates1.page -text
-demos/quickstart/protected/pages/chap2/Templates2.page -text
-demos/quickstart/protected/pages/chap2/Templates3.page -text
-demos/quickstart/protected/pages/chap3/Hangman.page -text
-demos/quickstart/protected/pages/chap3/Hangman/Home.page -text
-demos/quickstart/protected/pages/chap3/Hangman/Home.php -text
-demos/quickstart/protected/pages/chap3/Hangman/config.xml -text
-demos/quickstart/protected/pages/chap3/Hangman/words.txt -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/chap4/Overview.page -text
-demos/quickstart/protected/pages/chap4/Simple1.page -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/chap1/AboutPrado.page b/demos/quickstart/protected/pages/chap1/AboutPrado.page
deleted file mode 100644
index 03d9afe8..00000000
--- a/demos/quickstart/protected/pages/chap1/AboutPrado.page
+++ /dev/null
@@ -1,19 +0,0 @@
-<com:TContent ID="body" >
-<h1>What is PRADO?</h1>
-<p>
-PRADO stands for <b>P</b>HP <b>R</b>apid <b>A</b>pplication <b>D</b>evelopment
-<b>O</b>bject-oriented.
-</p>
-<p>
-PRADO is a component-based and event-driven programming framework for developing Web applications in PHP 5.
-</p>
-<p>
-PRADO stipulates a protocol of writing and using components to construct Web applications. A component is a software unit that is self-contained and can be reused with trivial customization. New components can be developed by either inheriting or composing from existing ones. Component-based programming brings great freedom in teamwork anf offers the ultimate extensibility and maintenability to the code. PRADO implements a set of elementary components that represent commonly used Web elements, such as input field, checkbox, dropdown list, etc.
-</p>
-<p>
-PRADO implements an event-driven programming scheme that allows delegation of extensible behavior to components. End-user activities, such as clicking on a submit button, changing the content in an input field, are captured as server events. Methods or functions may be attached to these events so that when the events happen, they are invoked automatically to respond to the events. Compared with the traditional Web programming in which developers have to deal with the raw POST or GET variables, event-driven programming helps developers better focus on the necessary logic and reduces significantly the low-level repetitive coding.
-</p>
-<p>
-Developing a PRADO Web application mainly involves instantiating prebuilt component types, configuring them by setting their properties, responding to their events by writing handler functions, and composing them into pages for the application. It is very similar to RAD toolkits, such as Borland Delphi and Microsoft Visual Basic, that are used to develop desktop GUI applications.
-</p>
-</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap1/Installation.page b/demos/quickstart/protected/pages/chap1/Installation.page
deleted file mode 100644
index 619d613f..00000000
--- a/demos/quickstart/protected/pages/chap1/Installation.page
+++ /dev/null
@@ -1,21 +0,0 @@
-<com:TContent ID="body" >
-<h1>Installing PRADO</h1>
-<p>
-If you are viewing this page from your own Web server, you are already done with the installation. The instructions at the end of this page, however, may still be useful for you to troubleshoot issues happened during your development based on PRADO.
-</p>
-<p>
-Installation of PRADO is very easy. Follow the following steps,
-<ol>
-<li>Go to <a href="http://www.pradosoft.com/">pradosoft.com</a> to grab a latest version of PRADO.</li>
-<li>Unpack the PRADO release file using <i>unzip</i> on Linux or <i>winzip</i> on Windows. A directory named <i>prado</i> will be created under the working directory.</li>
-<li>Copy or upload everything under the <i>prado</i> directory to the DocumentRoot directory (or a subdirectory) of the Web server.</li>
-<li>Your installation of PRADO is done and you can start to play with the demo applications included in the PRADO release via URL <i>http://web-server-address/demos/</i>. This QuickStart Tutorial is one of such applications.</li>
-</ol>
-</p>
-<p>
-If you encounter any problems with the demo applications, please use the PRADO requirement checker script to check if your server configuration fullfils the conditions required by PRADO.
-</p>
-<p>
-The minimum requirement by PRADO is that the Web server support PHP 5. PRADO has been tested with Apache Web server on Windows and Linux. Highly possibly it may also run on other platforms with other Web servers, as long as PHP 5 is supported.
-</p>
-</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap1/Introduction.page b/demos/quickstart/protected/pages/chap1/Introduction.page
deleted file mode 100644
index dc780c69..00000000
--- a/demos/quickstart/protected/pages/chap1/Introduction.page
+++ /dev/null
@@ -1,7 +0,0 @@
-<com:TContent ID="body" >
-<h1>Welcome to the PRADO QuickStart Tutorial</h1>
-<p>
-This QuickStart tutorial is meant to get you quickly started to build your
-own Web applications based on PRADO.
-</p>
-</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap1/config.xml b/demos/quickstart/protected/pages/chap1/config.xml
deleted file mode 100644
index 6806e43a..00000000
--- a/demos/quickstart/protected/pages/chap1/config.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<configuration>
- <pages MasterClass="Pages.Layout" Theme="Simple" />
-</configuration> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap2/Configurations.page b/demos/quickstart/protected/pages/chap2/Configurations.page
deleted file mode 100644
index 75a3d0aa..00000000
--- a/demos/quickstart/protected/pages/chap2/Configurations.page
+++ /dev/null
@@ -1,82 +0,0 @@
-<com:TContent ID="body" >
-<h1>Configurations</h1>
-<p>
-PRADO uses configurations to glue together components into pages and applications. There are <a href="#ac">application configurations</a>, <a href="#pfc">page folder configurations</a>, and <a href="?page=chap2.Templates1">templates</a>. Application and page folder configurations are optional if default values are used. Templates are mainly used by pages and template controls. They are optional, too.
-</p>
-<p>
-In this section, we focus on the application and page folder configurations. Templates are detailed in the next few sections.
-</p>
-
-<a name="ac" />
-<h2>Application Configurations</h2>
-<p>
-Application configurations are used to specify the global behavior of an application. This consists of specifying the paths, modules, services and parameters that will be used in an application.
-</p>
-<p>
-Application configurations are stored in an XML file which is passed as a parameter to the <code>TApplication</code> instance. The format of application configurations is shown in the following,
-<pre class="source">
-&lt;application PropertyName="PropertyValue" ...&gt;
- &lt;paths&gt;
- &lt;alias id="AliasID" path="AliasPath" /&gt;
- &lt;using namespace="Namespace" /&gt;
- &lt;/paths&gt;
- &lt;modules&gt;
- &lt;module id="ModuleID" class="ModuleClass" PropertyName="PropertyValue" ... /&gt;
- &lt;/modules&gt;
- &lt;services&gt;
- &lt;service id="ServiceID" class="ServiceClass" PropertyName="PropertyValue" ... /&gt;
- &lt;/services&gt;
- &lt;parameters&gt;
- &lt;parameter id="ParameterID" class="ParameterClass" PropertyName="PropertyValue" ... /&gt;
- &lt;/parameters&gt;
-&lt;/application&gt;
-</pre>
-<ul>
-<li>The outermost element <code>&lt;application&gt;</code> corresponds to the <code>TApplication</code> instance. The <code>PropertyName="PropertyValue"</code> pairs specify the initial values for the properties of <code>TApplication</code>.</li>
-<li>The <code>&lt;paths&gt;</code> element contains the definition of path aliases and the PHP inclusion paths for the application. Each path alias is specified via an <code>&lt;alias&gt;</code> whose <code>path</code> attribute takes an absolute path or a path relative to the directory containing the application configuration file. The <code>&lt;using&gt;</code> element specifies a particular path (in terms of namespace) to be appended to the PHP include paths when the application runs. PRADO defines two default aliases: <code>System</code> and <code>Application</code>. The former refers to the PRADO framework root directory, and the latter refers to the directory containing the application configuration file.</li>
-<li>The <code>&lt;modules&gt;</code> element contains the configurations for a list of modules. Each module is specified by a <code>&lt;module&gt;</code> element. Each module is uniquely identified by the <code>id</code> attribute and is of type <code>class</code>. The <code>PropertyName="PropertyValue"</code> pairs specify the initial values for the properties of the module.</li>
-<li>The <code>&lt;services&gt;</code> element is similar to the <code>&lt;modules&gt;</code> element. It mainly specifies the services provided by the application.</li>
-<li>The <code>&lt;parameters&gt;</code> element contains a list of application-level parameters that are accessible from anywhere in the application. You may specify component-typed parameters like specifying modules, or you may specify string-typed parameters which take a simpler format as follows,
-<pre class="source">
-&lt;parameter id="ParameterID"&gt;ParameterValue&lt;/parameter&gt;
-</pre>
-</li>
-</ul>
-By default without explicit configuration, a PRADO application when running will load a few core modules, such as <code>THttpRequest</code>, <code>THttpResponse</code>, etc. It will also provide the <code>TPageService</code> as a default service. Configuration and usage of these modules and services are covered in individual sections of this tutorial. Note, if your application takes default settings for these modules and service, you do not need to provide an application configuration. However, if these modules or services are not sufficient, or you want to change their behavior by configuring their property values, you will need an application configuration.
-</p>
-
-<a name="pfc" />
-<h2>Page Folder Configurations</h2>
-<p>
-Page folder configurations are mainly used by <code>TPageService</code> to modify or append the application configuration. As the name indicates, a page folder configuration is associated with a directory storing some page files. It is stored as an XML file named <code>config.xml</code>.
-</p>
-<p>
-When a user requests a page stored under <code>&lt;BasePath&gt;/dir1/dir2</code>, the <code>TPageService</code> will try to parse and load <code>config.xml</code> files under <code>&lt;BasePath&gt;/dir1</code> and <code>&lt;BasePath&gt;/dir1/dir2</code>. Paths, modules, and parameters specified in these configuration files will be appended or merged into the existing application configuration.
-</p>
-<p>
-The format of a page folder configuration file is as follows,
-<pre class="source">
-&lt;configuration&gt;
- &lt;paths&gt;
- &lt;alias id="AliasID" path="AliasPath" /&gt;
- &lt;using namespace="Namespace" /&gt;
- &lt;/paths&gt;
- &lt;modules&gt;
- &lt;module id="ModuleID" class="ModuleClass" PropertyName="PropertyValue" ... /&gt;
- &lt;/modules&gt;
- &lt;authorization&gt;
- &lt;allow pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="post" /&gt;
- &lt;deny pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="post" /&gt;
- &lt;/authorization&gt;
- &lt;pages PropertyName="PropertyValue" ...&gt;
- &lt;page id="PageID" PropertyName="PropertyValue" ... /&gt;
- &lt;/pages&gt;
- &lt;parameters&gt;
- &lt;parameter id="ParameterID" class="ParameterClass" PropertyName="PropertyValue" ... /&gt;
- &lt;/parameters&gt;
-&lt;/configuration&gt;
-</pre>
-The <code>&lt;paths&gt;</code>, <code>&lt;modules&gt;</code> and <code>&lt;parameters&gt;</code> are similar to those in an application configuration. The <code>&lt;authorization&gt;</code> specifies the authorization rules that apply to the current page directory and all its subdirectories. It will be explained in more detail in future sections. The <code>&lt;pages&gt;</code> element specifies the initial values for the properties of pages. Each <code>&lt;page&gt;</code> element specifies the initial property values for a particular page identified by the <code>id</code attribute. Initial property values given in the <code>&lt;pages&gt;</code> element apply to all pages in the current directory and all its subdirectories.
-</p>
-
-</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap2/KeyConcepts.page b/demos/quickstart/protected/pages/chap2/KeyConcepts.page
deleted file mode 100644
index 701633c4..00000000
--- a/demos/quickstart/protected/pages/chap2/KeyConcepts.page
+++ /dev/null
@@ -1,73 +0,0 @@
-<com:TContent ID="body" >
-<h1>Key Concepts</h1>
-
-<h2>Components</h2>
-<p>
-A component is an instance of <code>TComponent</code> or its child class. The base class <code>TComponent</code> implements the mechanism of component properties and events.
-</p>
-
-<h3>Component Properties</h3>
-<p>
-A component property can be viewed as a public variable describing a specific aspect of the component, such as the background color, the font size, etc. A property is defined by the existence of a getter and/or a setter method in the component class. For example, in <code>TControl</code>, we have
-<pre class="source">
-class TControl extends TComponent {
- public function getID() {
- ...
- }
- public function setID($value) {
- ...
- }
-}
-</pre>
-This defines a property named <code>ID</code>. Reading the property (e.g. <code>echo $component-&gt;ID;</code>) is equivalent to invoking the getter method (e.g. <code>echo $component-&gt;getID();</code>); and writing the property (e.g. <code>$component-&gt;ID='Button';</code>) is equivalent to invoking the setter method (e.g. <code>$component-&gt;setID('Button');</code>).
-</p>
-<p>
-A property is read-only if it has a getter method but no setter method. Since PHP method names are case-insensitive, property names are also case-insensitive. A component class inherits all its ancestor classes' properties.
-</p>
-
-<h3>Component Events</h3>
-<p>
-Component events are special properties that take method names as their values. Attaching (setting) a method to an event will hook up the method to the places at which the event is raised. Therefore, the behavior of a component can be modified in a way that may not be foreseen during the development of the component.
-</p>
-<p>
-A component event is defined by the existence of an <code>on</code>-method. For example, in <code>TButton</code>, we have
-<pre class="source">
-class TButton extends TWebControl {
- public function onClick($param) {
- ...
- }
-}
-</pre>
-This defines an event named <code>Click</code>, and a handler can be attached to the event using one of the following ways,
-<pre class="source">
-$button-&gt;Click=$callback;
-$button-&gt;Click-&gt;add($callback);
-$button-&gt;Click[]=$callback;
-$button-&gt;attachEventHandler('Click',$callback);
-</pre>
-where <code>$callback</code> refers to a valid PHP callback (e.g. a function name, a class method <code>array($object,'method')</code>, etc.)
-</p>
-
-<h2>Controls</h2>
-<p>
-A control is an instance of class <code>TControl</code> or its subclass. A control is a component defined in addition with user interface. The base class <code>TControl</code> defines the parent-child relationship among controls which reflects the containment relationship among user interface elements.
-</p>
-
-<h3>Parent-Child Relationship</h3>
-<p>
-A parent control is in charge of the state transition of its child controls. The rendering result of the child controls are usually used to compose the parent control's presentation.
-</p>
-<p>
-The parent-child relationship is usually established by the framework via <a href="?page=chap2.Templates1">templates</a>. In code, you may explicitly specify a control as a child of another using the following method,
-<pre class="source">
-$parent->Controls->add($child);
-</pre>
-where the property <code>Controls</code> refers to the child control collection of the parent.
-</p>
-
-<h2>Pages</h2>
-<p>
-Pages are top-most controls that have no parent (you may consider application as their container though). The presentation of pages are directly displayed to end-users.
-</p>
-
-</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap2/Templates1.page b/demos/quickstart/protected/pages/chap2/Templates1.page
deleted file mode 100644
index 6984dd50..00000000
--- a/demos/quickstart/protected/pages/chap2/Templates1.page
+++ /dev/null
@@ -1,69 +0,0 @@
-<com:TContent ID="body" >
-<h1>Templates: Part I</h1>
-<p>
-Templates are used to specify the presentational layout of controls. A template can contain static text, components, or controls that contribute to the ultimate presentation of the associated control. By default, an instance of <code>TTemplateControl</code> or its subclass may automatically load a template from a file whose name is the same as the control class name. For page templates, the file name suffix must be <code>.page</code>; for other regular template controls, the suffix is <code>.tpl</code>.
-</p>
-<p>The template format is like HTML, with a few PRADO-specifc tags, including <a href="#ct">component tags</a>, <a href="#tct">template control tags</a>, <a href="#cot">comment tags</a>, <a href="?page=chap2.Templates2#dct">dynamic content tags</a>, and <a href="?page=chap2.Templates3#dpt">dynamic property tags</a>. .
-</p>
-
-<a name="ct" />
-<h2>Component Tags</h2>
-<p>
-A component tag specifies a component as part of the body content of the template control. If the component is a control, it usually will become a child or grand child of the template control, and its rendering result will be inserted at the place where it is appearing in the template.
-</p>
-<p>
-The format of a component tag is as follows,
-<pre class="source">
-&lt;com:ComponentType PropertyName="PropertyValue" ... EventName="EventHandler" ...&gt;
-body content
-&lt;/com:ComponentType&gt;
-</pre>
-<code>ComponentType</code> can be either the class name or the dotted type name (e.g. <code>System.Web.UI.TControl</code>) of the component. <code>PropertyName</code> and <code>EventName</code> are both case-insensitive. <code>PropertyName</code> can be a property or subproperty name (e.g. <code>Font.Name</code>). Note, <code>PropertyValue</code> will be HTML-decoded when assigned to the corresponding property. Content enclosed between the opening and closing component tag are normally treated the body of the component.
-</p>
-<p>
-It is required that component tags nest properly with each other and an opening component tag be paired with a closing tag, similar to that in XML. The following shows a component tag specifying the <code>Text</code> property and <code>Click</code> event of a button control,
-<pre class="source">
-&lt;com:TButton Text="Register" Click="registerUser" />
-</pre>
-</p>
-<p>
-To deal conveniently with properties taking take big trunk of initial data, the following property initialization tag is introduced,
-<pre class="source">
-&lt;prop:PropertyName&gt;
-PropertyValue
-&lt;/prop:PropertyName&gt;
-</pre>
-It is equivalent to <code>...PropertyName="PropertyValue"...</code> in a component tag. Property initialization tags must be directly enclosed between the corresponding opening and closing component tag.
-</p>
-
-<a name="tct" />
-<h2>Template Control Tags</h2>
-A template control tag is used to configure the initial property values of the control owning the template. Its format is as follows,
-<pre class="source">
-&lt;%@ PropertyName="PropertyValue" ... %&gt;
-</pre>
-Like in component tags, <code>PropertyName</code> is case-insensitive and can be a property or subproperty name.
-</p>
-<p>
-Initial values specified via the template control tag are assigned to the corresponding properties when the template control is being constructed. Therefore, you may override these property values in a later stage, such as the <code>Init</code> stage of the control.
-</p>
-<p>
-Template control tag is optional in a template. Each template can contain at most one template control tag. You can place the template control tag anywhere in the template. It is recommended that you place it at the beginning of the template for better visibility.
-</p>
-
-<a name="cot" />
-<h2>Comment Tags</h2>
-<p>
-Comment tags are used to put comments in the template or the ultimate rendering result. There are two types of comment tags. One is like that in HTML and will be displayed to the end-users. The other only appear in a template and will be stripped out when the template is instantiated and displayed to the end-users. The format of these two comment tags is as follows,
-<pre class="source">
-&lt;!--
-Comments VISIBLE to end-users
---&gt;
-
-&lt;!
-Comments INVISIBLE to end-users
-!&gt;
-</pre>
-</p>
-
-</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap2/Templates2.page b/demos/quickstart/protected/pages/chap2/Templates2.page
deleted file mode 100644
index b257a682..00000000
--- a/demos/quickstart/protected/pages/chap2/Templates2.page
+++ /dev/null
@@ -1,78 +0,0 @@
-<com:TContent ID="body" >
-<h1>Templates: Part II</h1>
-
-<a name="dct" />
-<h2>Dynamic Content Tags</h2>
-<p>
-Dynamic content tags are introduced as shortcuts to some commonly used <a href="?page=chap2.Templates1#ct">component tags</a>. These tags are mainly used to render contents resulted from evaluating some PHP expressions or statements. They include <a href="#et">expression tags</a>, <a href="#st">statement tags</a>, <a href="#dt">databind tags</a>, <a href="#pt">parameter tags</a> and <a href="#at">asset tags</a>.
-</p>
-
-<a name="et" />
-<h3>Expression Tags</h3>
-<p>
-An expression tag represents a PHP expression that is evaluated when the template control is being rendered. The expression evaluation result is inserted at the place where the tag resides in the template. Its format is as follows,
-<pre class="source">
-&lt;%= PhpExpression %&gt;
-</pre>
-Inernally, an expression tag is represented by a <code>TExpression</code> control. Therefore, in the expression <code>$this</code> refers to the <code>TExpression</code> control. For example, the following expression tag will display the current page title at the place,
-<pre class="source">
-&lt;%= $this-&gt;Page-&gt;Title %&gt;
-</pre>
-</p>
-
-<a name="st" />
-<h3>Statement Tags</h3>
-<p>
-Statement tags are similar to expression tags, except that statement tags contain PHP statements rather than expressions. The output of the PHP statements (using for example <code>echo</code> or <code>print</code> in PHP) are displayed at the place where the statement tag resides in the template. Inernally, a statement tag is represented by a <code>TStatements</code> control. Therefore, in the statements <code>$this</code> refers to the <code>TStatements</code> control. The format of statement tags is as follows,
-<pre class="source">
-&lt;%%
-PHP Statements
-%&gt;
-</pre>
-</p>
-<p>
-The following example displays the current time in Dutch at the place,
-<pre class="source">
-&lt;%%
-setlocale(LC_ALL, 'nl_NL');
-echo strftime("%A %e %B %Y",time());
-%&gt;
-</pre>
-</p>
-
-<a name="dt" />
-<h3>Databind Tags</h3>
-<p>
-Databind tags are similar to expression tags, except that the expressions are evaluated only when a <code>dataBind()</code> call is invoked on the controls representing the databind tags. Internally, a <code>TLiteral</code> control is used to represent a databind tag and <code>$this</code> in the expression would refer to the control. The format of databind tags is as follows,
-<pre class="source">
-&lt;%# PhpExpression %&gt;
-</pre>
-</p>
-
-<a name="pt" />
-<h3>Parameter Tags</h3>
-<p>
-Parameter tags are used to insert application parameters at the place where they appear in the template. The format of parameter tags is as follows,
-<pre class="source">
-&lt;%$ ParameterName %&gt;
-</pre>
-Note, application parameters are usually defined in application configurations or page directory configurations. The parameters are evaluated when the template is instantiated.
-</p>
-
-<a name="at" />
-<h3>Asset Tags</h3>
-<p>
-Asset tags are used to publish private files and display the corresponding the URLs. For example, if you have an image file that is not Web-accessible and you want to make it visible to end-users, you can use asset tags to publish this file and show the URL to end-users so that they can fetch the published image.
-</p>
-<p>
-The format of asset tags is as follows,
-<pre class="source">
-&lt;%~ LocalFileName %&gt;
-</pre>
-where <code>LocalFileName</code> refers to a file path that is relative to the directory containing the current template file. The file path can be a single file or a directory. If the latter, the content in the whole directory will be made accessible by end-users.
-</p>
-<p>
-BE VERY CAUTIOUS when you are using asset tags as it may expose to end-users files that you probably do not want them to see.
-</p>
-
-</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap2/Templates3.page b/demos/quickstart/protected/pages/chap2/Templates3.page
deleted file mode 100644
index 328687fb..00000000
--- a/demos/quickstart/protected/pages/chap2/Templates3.page
+++ /dev/null
@@ -1,73 +0,0 @@
-<com:TContent ID="body" >
-<h1>Templates: Part III</h1>
-
-<a name="dpt" />
-<h2>Dynamic Property Tags</h2>
-<p>
-Dynamic property tags are very similar to dynamic content tags, except that they are applied to component properties. The purpose of dynamic property tags is to allow more versatile component property configuration. Note, you are not required to use dynamic property tags because what can be done using dynamic property tags can also be done in PHP code. However, using dynamic property tags bring you much more convenience at accomplishing the same tasks. The basic usage of dynamic property tags is as follows,
-<pre class="source">
-&lt;com:ComponentType PropertyName=DynamicPropertyTag ...&gt;
-body content
-&lt;/com:ComponentType&gt;
-</pre>
-where you may enclose <code>DynamicPropertyTag</code> within single or double quotes for better readability.
-</p>
-<p>
-We now introduce the available types of dynamic property tags that may be used in the above. Like dynamic content tags, we have <a href="#et">expression tags</a>, <a href="#dt">databind tags</a>, <a href="#pt">parameter tags</a> and <a href="#at">asset tags</a>. (Note, there is no statement tag here.)
-</p>
-
-<a name="et" />
-<h3>Expression Tags</h3>
-<p>
-An expression tag represents a PHP expression that is evaluated when the template is being instantiated. The expression evaluation result is assigned to the corresponding component property. The format of expression tags is as follows,
-<pre class="source">
-&lt;%= PhpExpression %&gt;
-</pre>
-In the expression, <code>$this</code> refers to the component specified by the component tag. The following example specifies a <code>TLabel</code> control whose <code>Text</code> property is initialized as the current page title when the <code>TLabel</code> control is being constructed,
-<pre class="source">
-&lt;com:TLabel Text=&lt;%= $this-&gt;Page-&gt;Title %&gt; /&gt;
-</pre>
-</p>
-<p>
-Note, unlike dynamic content tags, the expressions tags for component properties are evaluated when the components are being constructed, while for the dynamic content tags, the expressions are evaluated when the controls are being rendered.
-</p>
-
-<a name="dt" />
-<h3>Databind Tags</h3>
-<p>
-Databind tags are similar to expression tags, except that the expressions are evaluated only when a <code>dataBind()</code> call is invoked on the controls represented by the component tags. In the expression, <code>$this</code> refers to the control itself. Databind tags do not apply to all components. They can only be used for controls.
-</p>
-<p>
-The format of databind tags is as follows,
-<pre class="source">
-&lt;%# PhpExpression %&gt;
-</pre>
-</p>
-
-<a name="pt" />
-<h3>Parameter Tags</h3>
-<p>
-Parameter tags are used to assign application parameter values to the corresponding component properties. The format of parameter tags is as follows,
-<pre class="source">
-&lt;%$ ParameterName %&gt;
-</pre>
-Note, application parameters are usually defined in application configurations or page directory configurations. The parameters are evaluated when the template is instantiated.
-</p>
-
-<a name="at" />
-<h3>Asset Tags</h3>
-<p>
-Asset tags are used to publish private files and assign the corresponding the URLs to the component properties. For example, if you have an image file that is not Web-accessible and you want to make it visible to end-users, you can use asset tags to publish this file and show the URL to end-users so that they can fetch the published image.
-</p>
-<p>
-The format of asset tags is as follows,
-<pre class="source">
-&lt;%~ LocalFileName %&gt;
-</pre>
-where <code>LocalFileName</code> refers to a file path that is relative to the directory containing the current template file. The file path can be a single file or a directory. If the latter, the content in the whole directory will be made accessible by end-users.
-</p>
-<p>
-BE VERY CAUTIOUS when you are using asset tags as it may expose to end-users files that you probably do not want them to see.
-</p>
-
-</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap3/Hangman.page b/demos/quickstart/protected/pages/chap3/Hangman.page
deleted file mode 100644
index b623bad4..00000000
--- a/demos/quickstart/protected/pages/chap3/Hangman.page
+++ /dev/null
@@ -1,16 +0,0 @@
-<com:TContent ID="body" >
-<h1>Sample: Hangman Game</h1>
-<p>
-Having seen the simple "Hello World" application, we now build a more complex application called "Hangman Game". In this game, the player is asked to guess a word, a letter at a time. If he guesses a letter right, the letter will be shown in the word. The player can continue to guess as long as the number of his misses is within a prespecified bound. The player wins the game if he finds out the word within the miss bound, or he loses.
-</p>
-<p>
-To facilitate the building of this game, we show the state transition diagram of the gaming process in the following,
-</p>
-<p>
-To be continued...
-</p>
-<div class="runbar">
-<a href="?page=chap3.Hangman.Home" target="_blank">Run Sample</a>
-<a href="?page=ViewSource&amp;path=/chap3/Hangman/Home.php" target="_blank">View Source</a>
-</div>
-</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap3/Hangman/Home.page b/demos/quickstart/protected/pages/chap3/Hangman/Home.page
deleted file mode 100644
index 1cc409d3..00000000
--- a/demos/quickstart/protected/pages/chap3/Hangman/Home.page
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>Hangman Game</title>
-</head>
-
-<body>
-<com:TForm>
-<h1>Hangman Game</h1>
-
-<com:TPanel ID="IntroPanel">
-<p>This is the game of Hangman. You must guess a word, a letter at a time.
-If you make too many mistakes, you lose the game!</p>
-<com:TRadioButton ID="EasyLevel" GroupName="level" Text="Easy game; you are allowed 10 misses." /><br/>
-<com:TRadioButton ID="MediumLevel" GroupName="level" Text="Medium game; you are allowed 5 misses." /><br/>
-<com:TRadioButton ID="HardLevel" GroupName="level" Text="Hard game; you are only allowed 3 misses." /><br/>
-<com:TButton Text="Play!" Click="selectLevel" />
-<com:TLabel ID="LevelError" Text="You must choose a difficulty level!" ForeColor="red" Visible="false" />
-</com:TPanel>
-
-<com:TPanel ID="GuessPanel" Visible="false">
-<h2>Please make a guess</h2>
-<h3 style="letter-spacing: 4px;"><%= $this->Page->GuessWord %></h3>
-<p>You have made <%=$this->Page->Misses %> bad guesses
-out of a maximum of <%= $this->Page->Level %>.</p>
-<p>Guess:
-<com:TLinkButton ID="GuessA" Text="A" Click="guessWord" />
-<com:TLinkButton ID="GuessB" Text="B" Click="guessWord" />
-<com:TLinkButton ID="GuessC" Text="C" Click="guessWord" />
-<com:TLinkButton ID="GuessD" Text="D" Click="guessWord" />
-<com:TLinkButton ID="GuessE" Text="E" Click="guessWord" />
-<com:TLinkButton ID="GuessF" Text="F" Click="guessWord" />
-<com:TLinkButton ID="GuessG" Text="G" Click="guessWord" />
-<com:TLinkButton ID="GuessH" Text="H" Click="guessWord" />
-<com:TLinkButton ID="GuessI" Text="I" Click="guessWord" />
-<com:TLinkButton ID="GuessJ" Text="J" Click="guessWord" />
-<com:TLinkButton ID="GuessK" Text="K" Click="guessWord" />
-<com:TLinkButton ID="GuessL" Text="L" Click="guessWord" />
-<com:TLinkButton ID="GuessM" Text="M" Click="guessWord" />
-<com:TLinkButton ID="GuessN" Text="N" Click="guessWord" />
-<com:TLinkButton ID="GuessO" Text="O" Click="guessWord" />
-<com:TLinkButton ID="GuessP" Text="P" Click="guessWord" />
-<com:TLinkButton ID="GuessQ" Text="Q" Click="guessWord" />
-<com:TLinkButton ID="GuessR" Text="R" Click="guessWord" />
-<com:TLinkButton ID="GuessS" Text="S" Click="guessWord" />
-<com:TLinkButton ID="GuessT" Text="T" Click="guessWord" />
-<com:TLinkButton ID="GuessU" Text="U" Click="guessWord" />
-<com:TLinkButton ID="GuessV" Text="V" Click="guessWord" />
-<com:TLinkButton ID="GuessW" Text="W" Click="guessWord" />
-<com:TLinkButton ID="GuessX" Text="X" Click="guessWord" />
-<com:TLinkButton ID="GuessY" Text="Y" Click="guessWord" />
-<com:TLinkButton ID="GuessZ" Text="Z" Click="guessWord" />
-</p>
-<p><com:TLinkButton Text="Give up?" Click="giveUp" /></p>
-</com:TPanel>
-
-<com:TPanel ID="WinPanel" Visible="false">
-<h2>You Win!</h2>
-<p>The word was: <%= $this->Page->Word %>.</p>
-<p><com:TLinkButton Text="Start Again" Click="startAgain" /></p>
-</com:TPanel>
-
-<com:TPanel ID="LosePanel" Visible="false">
-<h2>You Lose!</h2>
-<p>The word was: <%= $this->Page->Word %>.</p>
-<p><com:TLinkButton Text="Start Again" Click="startAgain" /></p>
-</com:TPanel>
-</com:TForm>
-
-</body>
-</html> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap3/Hangman/Home.php b/demos/quickstart/protected/pages/chap3/Hangman/Home.php
deleted file mode 100644
index 93028573..00000000
--- a/demos/quickstart/protected/pages/chap3/Hangman/Home.php
+++ /dev/null
@@ -1,135 +0,0 @@
-<?php
-
-class Home extends TPage
-{
- const EASY_LEVEL=10;
- const MEDIUM_LEVEL=5;
- const HARD_LEVEL=3;
-
- public function selectLevel($sender,$param)
- {
- if($this->EasyLevel->Checked)
- $this->Level=self::EASY_LEVEL;
- else if($this->MediumLevel->Checked)
- $this->Level=self::MEDIUM_LEVEL;
- else if($this->HardLevel->Checked)
- $this->Level=self::HARD_LEVEL;
- else
- {
- $this->LevelError->Visible=true;
- return;
- }
-
- $this->Word=$this->generateWord();
- $this->GuessWord=str_repeat('_',strlen($this->Word));
- $this->Misses=0;
- $this->showPanel('GuessPanel');
- }
-
- public function guessWord($sender,$param)
- {
- $sender->Enabled=false;
- $letter=$sender->Text;
- $word=$this->Word;
- $guessWord=$this->GuessWord;
- $pos=0;
- $success=false;
- while(($pos=strpos($word,$letter,$pos))!==false)
- {
- $guessWord[$pos]=$letter;
- $success=true;
- $pos++;
- }
- if($success)
- {
- $this->GuessWord=$guessWord;
- if($guessWord===$word)
- $this->showPanel('WinPanel');
- }
- else
- {
- $this->Misses++;
- if($this->Misses>=$this->Level)
- $this->giveUp(null,null);
- }
- }
-
- public function giveUp($sender,$param)
- {
- $this->showPanel('LosePanel');
- }
-
- public function startAgain($sender,$param)
- {
- $this->showPanel('IntroPanel');
- $this->LevelError->Visible=false;
- for($letter=65;$letter<=90;++$letter)
- {
- $guessLetter='Guess'.chr($letter);
- $this->$guessLetter->Enabled=true;
- }
- }
-
- protected function generateWord()
- {
- $wordFile=dirname(__FILE__).'/words.txt';
- $words=preg_split("/[\s,]+/",file_get_contents($wordFile));
- do
- {
- $i=rand(0,count($words)-1);
- $word=$words[$i];
- } while(strlen($word)<5 || !preg_match('/^[a-z]*$/i',$word));
- return strtoupper($word);
- }
-
- protected function showPanel($panelID)
- {
- $this->IntroPanel->Visible=false;
- $this->GuessPanel->Visible=false;
- $this->WinPanel->Visible=false;
- $this->LosePanel->Visible=false;
- $this->$panelID->Visible=true;
- }
-
- public function setLevel($value)
- {
- $this->setViewState('Level',$value,0);
- }
-
- public function getLevel()
- {
- return $this->getViewState('Level',0);
- }
-
- public function setWord($value)
- {
- $this->setViewState('Word',$value,'');
- }
-
- public function getWord()
- {
- return $this->getViewState('Word','');
- }
-
- public function getGuessWord()
- {
- return $this->getViewState('GuessWord','');
- }
-
- public function setGuessWord($value)
- {
- $this->setViewState('GuessWord',$value,'');
- }
-
- public function setMisses($value)
- {
- $this->setViewState('Misses',$value,0);
- }
-
- public function getMisses()
- {
- return $this->getViewState('Misses',0);
- }
-}
-
-?> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap3/Hangman/config.xml b/demos/quickstart/protected/pages/chap3/Hangman/config.xml
deleted file mode 100644
index 67056f9d..00000000
--- a/demos/quickstart/protected/pages/chap3/Hangman/config.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<configuration>
- <pages MasterClass="" />
-</configuration> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap3/Hangman/words.txt b/demos/quickstart/protected/pages/chap3/Hangman/words.txt
deleted file mode 100644
index 80814580..00000000
--- a/demos/quickstart/protected/pages/chap3/Hangman/words.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-PRADO is an event-driven and component-based framework
-for Web application development in PHP 5.
-
-Components following the PRADO protocol are highly
-configurable and reusable. Properties defining
-the basic features of a component can be configured
-in specifications, templates or code.
-New components can be developed by either inheriting
-an existing component class or composing several
-components together. The work of using a component
-amounts to placing the component tag on the page template,
-configuring component properties, and writing handler
-functions to respond to component events.
-
-PRADO shares many similarities with ASP.NET and other
-RAD tools for Windows GUI development, such as Borland Delphi.
-In particular, it supports event-driven programming,
-viewstate maintenance, javascript, template, form validations, etc. \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap3/HelloWorld.page b/demos/quickstart/protected/pages/chap3/HelloWorld.page
deleted file mode 100644
index a39aed33..00000000
--- a/demos/quickstart/protected/pages/chap3/HelloWorld.page
+++ /dev/null
@@ -1,26 +0,0 @@
-<com:TContent ID="body" >
-<h1>Sample: Hello World</h1>
-<p>
-"Hello World" is the simplest <i>interactive</i> PRADO application that you can build. It displays to end-users a page with a submit button whose caption is <i>Click Me</i>. When the user clicks on the button, the button changes the caption to <i>Hello World</i>.
-</p>
-<p>
-There are many approaches that can achieve the above goal. One can submit the page to the server, examine the POST variable, and generate a new page with the button caption updated. Or one can simply use JavaScript to update the button caption upon its <i>onclick</i> event.
-</p>
-<p>
-PRADO promotes component-based and event-driven Web programming. The button is represented by a <i>TButton</i> object. It encapsulates the button caption as the <i>Text</i> property and associates the user button click action with a server-side <i>Click</i> event. Therefore, the "Hello World" task can be handled intuitively and easily. One simply needs to attach a function to the button's <i>Click</i> event. Within the function, the button's <i>Text</i> property is modified as "Hello World". The following diagram shows the above sequence,
-</p>
-<img src="<%~HelloWorld/sequence.gif%>" />
-<p>
-The code that a developer needs to write is merely the following event handler function, where <code>$sender</code> refers to the button object.
-</p>
-<pre class="source">
-public function buttonClicked($sender,$param)
-{
- $sender->Text="Hello World";
-}
-</pre>
-<div class="runbar">
-<a href="?page=chap3.HelloWorld.Home" target="_blank">Run Sample</a>
-<a href="?page=ViewSource&amp;path=/chap3/HelloWorld/Home.php" target="_blank">View Source</a>
-</div>
-</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap3/HelloWorld/Home.page b/demos/quickstart/protected/pages/chap3/HelloWorld/Home.page
deleted file mode 100644
index 158255cb..00000000
--- a/demos/quickstart/protected/pages/chap3/HelloWorld/Home.page
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>Hello World</title>
-</head>
-
-<body>
-
-<com:TForm>
-<com:TButton Text="Click Me" Click="buttonClicked" />
-</com:TForm>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap3/HelloWorld/Home.php b/demos/quickstart/protected/pages/chap3/HelloWorld/Home.php
deleted file mode 100644
index b1a7f991..00000000
--- a/demos/quickstart/protected/pages/chap3/HelloWorld/Home.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-
-class Home extends TPage
-{
- public function buttonClicked($sender,$param)
- {
- $sender->Text="Hello World";
- }
-}
-
-?> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap3/HelloWorld/config.xml b/demos/quickstart/protected/pages/chap3/HelloWorld/config.xml
deleted file mode 100644
index 67056f9d..00000000
--- a/demos/quickstart/protected/pages/chap3/HelloWorld/config.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<configuration>
- <pages MasterClass="" />
-</configuration> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap3/HelloWorld/sequence.gif b/demos/quickstart/protected/pages/chap3/HelloWorld/sequence.gif
deleted file mode 100644
index a1e51200..00000000
--- a/demos/quickstart/protected/pages/chap3/HelloWorld/sequence.gif
+++ /dev/null
Binary files differ
diff --git a/demos/quickstart/protected/pages/chap3/HelloWorld/sequence.vsd b/demos/quickstart/protected/pages/chap3/HelloWorld/sequence.vsd
deleted file mode 100644
index e8c2f5a7..00000000
--- a/demos/quickstart/protected/pages/chap3/HelloWorld/sequence.vsd
+++ /dev/null
Binary files differ
diff --git a/demos/quickstart/protected/pages/chap4/Overview.page b/demos/quickstart/protected/pages/chap4/Overview.page
deleted file mode 100644
index 7c3fbea6..00000000
--- a/demos/quickstart/protected/pages/chap4/Overview.page
+++ /dev/null
@@ -1,15 +0,0 @@
-<com:TContent ID="body" >
-<h1>Controls Overview</h1>
-<p>
-A control is an instance of class <code>TControl</code> or its subclass. A control is a component defined in addition with user interface. The base class <code>TControl</code> defines the parent-child relationship among controls which reflects the containment relationship among user interface elements.
-</p>
-<p>
-Control classes constitute one of the major part of PRADO framework. Nearly every generic HTML element can find its representation in terms of a PRADO control. Mastering these controls becomes extremely important to effectively and efficiently compose applications using PRADO.
-</p>
-<p>
-In this section, we will first introduce the ...., then....
-</p>
-<p>
-To be continued...
-</p>
-</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/chap4/Simple1.page b/demos/quickstart/protected/pages/chap4/Simple1.page
deleted file mode 100644
index a608c8d2..00000000
--- a/demos/quickstart/protected/pages/chap4/Simple1.page
+++ /dev/null
@@ -1,2 +0,0 @@
-<com:TContent ID="body" >
-</com:TContent> \ No newline at end of file