summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2006-04-02 00:34:32 +0000
committerxue <>2006-04-02 00:34:32 +0000
commit87aaba0aa45ea3ead27966923fa5702817731e7d (patch)
tree9faf6bc41bdbceb9ce3381d465f0b48fdbc979c3
parent2f36ce50b85cf0d02174464356e6636d14f4c19a (diff)
Added hello world demo.
-rw-r--r--.gitattributes4
-rw-r--r--demos/helloworld/index.php18
-rw-r--r--demos/helloworld/protected/.htaccess1
-rw-r--r--demos/helloworld/protected/pages/Home.page16
-rw-r--r--demos/helloworld/protected/pages/Home.php11
-rw-r--r--index.html4
6 files changed, 53 insertions, 1 deletions
diff --git a/.gitattributes b/.gitattributes
index 66ceb15b..1756a7c7 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -34,6 +34,10 @@ demos/composer/themes/PradoSoft/pradoheader.gif -text
demos/composer/themes/PradoSoft/propertydef.gif -text
demos/composer/themes/PradoSoft/style.css -text
demos/composer/themes/Simple/style.css -text
+demos/helloworld/index.php -text
+demos/helloworld/protected/.htaccess -text
+demos/helloworld/protected/pages/Home.page -text
+demos/helloworld/protected/pages/Home.php -text
demos/personal/index.php -text
demos/personal/protected/Pages/Home.page -text
demos/personal/protected/Pages/Home.php -text
diff --git a/demos/helloworld/index.php b/demos/helloworld/index.php
new file mode 100644
index 00000000..43c0b436
--- /dev/null
+++ b/demos/helloworld/index.php
@@ -0,0 +1,18 @@
+<?php
+
+$basePath=dirname(__FILE__);
+$frameworkPath=$basePath.'/../../framework/prado.php';
+$assetsPath=$basePath.'/assets';
+$runtimePath=$basePath.'/protected/runtime';
+
+if(!is_writable($assetsPath))
+ die("Please make sure that the directory $assetsPath is writable by Web server process.");
+if(!is_writable($runtimePath))
+ die("Please make sure that the directory $runtimePath is writable by Web server process.");
+
+require_once($frameworkPath);
+
+$application=new TApplication;
+$application->run();
+
+?> \ No newline at end of file
diff --git a/demos/helloworld/protected/.htaccess b/demos/helloworld/protected/.htaccess
new file mode 100644
index 00000000..e0198322
--- /dev/null
+++ b/demos/helloworld/protected/.htaccess
@@ -0,0 +1 @@
+deny from all
diff --git a/demos/helloworld/protected/pages/Home.page b/demos/helloworld/protected/pages/Home.page
new file mode 100644
index 00000000..97702e67
--- /dev/null
+++ b/demos/helloworld/protected/pages/Home.page
@@ -0,0 +1,16 @@
+<html>
+
+<head>
+<title>Hello World Demo - Prado</title>
+</head>
+
+<body>
+
+<com:TForm>
+
+<com:TButton Text="Click me" OnClick="buttonClicked" />
+
+</com:TForm>
+
+</body>
+</html> \ No newline at end of file
diff --git a/demos/helloworld/protected/pages/Home.php b/demos/helloworld/protected/pages/Home.php
new file mode 100644
index 00000000..432c2ee7
--- /dev/null
+++ b/demos/helloworld/protected/pages/Home.php
@@ -0,0 +1,11 @@
+<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ $sender->Text="Hello World!";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/index.html b/index.html
index 939a4ce6..01b0e598 100644
--- a/index.html
+++ b/index.html
@@ -7,7 +7,7 @@
<body>
<h1>PRADO Framework for PHP 5 </h1>
-<p>Version 3.0b, March 6, 2006<br>
+<p>Version 3.0RC1, April 2, 2006<br>
Copyright&copy; 2004-2006 by <a href="http://www.pradosoft.com/">PradoSoft</a><br>
All Rights Reserved.
@@ -49,8 +49,10 @@ PRADO has been tested with Apache 2.0 on both Windows XP and RedHat Linux.
</ul>
<h2>Included Demos</h2>
<ul>
+ <li><a href="demos/helloworld/index.php">Hello World</a></li>
<li><a href="demos/quickstart/index.php">Prado QuickStart Tutorial</a></li>
<li><a href="demos/composer/index.php">Prado Component Writer</a></li>
+ <li><a href="demos/peronsal/index.php">Personal Website</a> (incomplete)</li>
</ul>
<h2>Documentation</h2>