summaryrefslogtreecommitdiff
path: root/demos/blog-tutorial/samples/day2/blog
diff options
context:
space:
mode:
Diffstat (limited to 'demos/blog-tutorial/samples/day2/blog')
-rw-r--r--demos/blog-tutorial/samples/day2/blog/index.php42
-rw-r--r--demos/blog-tutorial/samples/day2/blog/protected/database/PostRecord.php54
-rw-r--r--demos/blog-tutorial/samples/day2/blog/protected/database/UserRecord.php54
-rw-r--r--demos/blog-tutorial/samples/day2/blog/protected/layouts/MainLayout.php12
-rw-r--r--demos/blog-tutorial/samples/day2/blog/protected/pages/Contact.php58
5 files changed, 110 insertions, 110 deletions
diff --git a/demos/blog-tutorial/samples/day2/blog/index.php b/demos/blog-tutorial/samples/day2/blog/index.php
index 7ccffe49..bffafde2 100644
--- a/demos/blog-tutorial/samples/day2/blog/index.php
+++ b/demos/blog-tutorial/samples/day2/blog/index.php
@@ -1,22 +1,22 @@
-<?php
-
-// The following directory checks may be removed if performance is required
-$basePath=dirname(__FILE__);
-$frameworkPath=$basePath.'/../../../../../framework/prado.php';
-$assetsPath=$basePath.'/assets';
-$runtimePath=$basePath.'/protected/runtime';
-
-if(!is_file($frameworkPath))
- die("Unable to find prado framework path $frameworkPath.");
-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();
-
+<?php
+
+// The following directory checks may be removed if performance is required
+$basePath=dirname(__FILE__);
+$frameworkPath=$basePath.'/../../../../../framework/prado.php';
+$assetsPath=$basePath.'/assets';
+$runtimePath=$basePath.'/protected/runtime';
+
+if(!is_file($frameworkPath))
+ die("Unable to find prado framework path $frameworkPath.");
+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/blog-tutorial/samples/day2/blog/protected/database/PostRecord.php b/demos/blog-tutorial/samples/day2/blog/protected/database/PostRecord.php
index 25702727..3407c09b 100644
--- a/demos/blog-tutorial/samples/day2/blog/protected/database/PostRecord.php
+++ b/demos/blog-tutorial/samples/day2/blog/protected/database/PostRecord.php
@@ -1,28 +1,28 @@
-<?php
-/**
- * Auto generated by prado-cli.php on 2007-04-07 10:44:20.
- */
-class PostRecord extends TActiveRecord
-{
- const TABLE='posts';
-
- public $post_id;
- public $author_id;
- public $create_time;
- public $title;
- public $content;
- public $status;
-
- public $author;
-
- public static $RELATIONS=array
- (
- 'author' => array(self::BELONGS_TO, 'UserRecord'),
- );
-
- public static function finder($className=__CLASS__)
- {
- return parent::finder($className);
- }
-}
+<?php
+/**
+ * Auto generated by prado-cli.php on 2007-04-07 10:44:20.
+ */
+class PostRecord extends TActiveRecord
+{
+ const TABLE='posts';
+
+ public $post_id;
+ public $author_id;
+ public $create_time;
+ public $title;
+ public $content;
+ public $status;
+
+ public $author;
+
+ public static $RELATIONS=array
+ (
+ 'author' => array(self::BELONGS_TO, 'UserRecord'),
+ );
+
+ public static function finder($className=__CLASS__)
+ {
+ return parent::finder($className);
+ }
+}
?> \ No newline at end of file
diff --git a/demos/blog-tutorial/samples/day2/blog/protected/database/UserRecord.php b/demos/blog-tutorial/samples/day2/blog/protected/database/UserRecord.php
index 2051e5de..021f8b09 100644
--- a/demos/blog-tutorial/samples/day2/blog/protected/database/UserRecord.php
+++ b/demos/blog-tutorial/samples/day2/blog/protected/database/UserRecord.php
@@ -1,28 +1,28 @@
-<?php
-/**
- * Auto generated by prado-cli.php on 2007-04-07 10:44:25.
- */
-class UserRecord extends TActiveRecord
-{
- const TABLE='users';
-
- public $username;
- public $email;
- public $password;
- public $role;
- public $first_name;
- public $last_name;
-
- public $posts=array();
-
- public static $RELATIONS=array
- (
- 'posts' => array(self::HAS_MANY, 'PostRecord'),
- );
-
- public static function finder($className=__CLASS__)
- {
- return parent::finder($className);
- }
-}
+<?php
+/**
+ * Auto generated by prado-cli.php on 2007-04-07 10:44:25.
+ */
+class UserRecord extends TActiveRecord
+{
+ const TABLE='users';
+
+ public $username;
+ public $email;
+ public $password;
+ public $role;
+ public $first_name;
+ public $last_name;
+
+ public $posts=array();
+
+ public static $RELATIONS=array
+ (
+ 'posts' => array(self::HAS_MANY, 'PostRecord'),
+ );
+
+ public static function finder($className=__CLASS__)
+ {
+ return parent::finder($className);
+ }
+}
?> \ No newline at end of file
diff --git a/demos/blog-tutorial/samples/day2/blog/protected/layouts/MainLayout.php b/demos/blog-tutorial/samples/day2/blog/protected/layouts/MainLayout.php
index 253d6c03..c966ba85 100644
--- a/demos/blog-tutorial/samples/day2/blog/protected/layouts/MainLayout.php
+++ b/demos/blog-tutorial/samples/day2/blog/protected/layouts/MainLayout.php
@@ -1,7 +1,7 @@
-<?php
-
-class MainLayout extends TTemplateControl
-{
-}
-
+<?php
+
+class MainLayout extends TTemplateControl
+{
+}
+
?> \ No newline at end of file
diff --git a/demos/blog-tutorial/samples/day2/blog/protected/pages/Contact.php b/demos/blog-tutorial/samples/day2/blog/protected/pages/Contact.php
index b6ce575e..77d7374a 100644
--- a/demos/blog-tutorial/samples/day2/blog/protected/pages/Contact.php
+++ b/demos/blog-tutorial/samples/day2/blog/protected/pages/Contact.php
@@ -1,30 +1,30 @@
-<?php
-
-class Contact extends TPage
-{
- /**
- * Event handler for the OnClick event of the submit button.
- * @param TButton the button triggering the event
- * @param TEventParameter event parameter (null here)
- */
- public function submitButtonClicked($sender, $param)
- {
- if ($this->IsValid) // check if input validation is successful
- {
- // obtain the user name, email, feedback from the textboxes
- $name = $this->Name->Text;
- $email = $this->Email->Text;
- $feedback = $this->Feedback->Text;
-
- // send an email to administrator with the above information
- $this->mailFeedback($name, $email, $feedback);
- }
- }
-
- protected function mailFeedback($name, $email, $feedback)
- {
- // implementation of sending the feedback email
- }
-}
-
+<?php
+
+class Contact extends TPage
+{
+ /**
+ * Event handler for the OnClick event of the submit button.
+ * @param TButton the button triggering the event
+ * @param TEventParameter event parameter (null here)
+ */
+ public function submitButtonClicked($sender, $param)
+ {
+ if ($this->IsValid) // check if input validation is successful
+ {
+ // obtain the user name, email, feedback from the textboxes
+ $name = $this->Name->Text;
+ $email = $this->Email->Text;
+ $feedback = $this->Feedback->Text;
+
+ // send an email to administrator with the above information
+ $this->mailFeedback($name, $email, $feedback);
+ }
+ }
+
+ protected function mailFeedback($name, $email, $feedback)
+ {
+ // implementation of sending the feedback email
+ }
+}
+
?> \ No newline at end of file