From 55c4ac1bfe565f1ca7f537fdd8b7a201be28e581 Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 10 Nov 2005 12:47:19 +0000 Subject: Initial import of prado framework --- demos/controls/protected/pages/HomePage.php | 14 ++++++++++++++ demos/controls/protected/pages/HomePage.tpl | 12 ++++++++++++ demos/controls/protected/pages/LoginPage.php | 15 +++++++++++++++ demos/controls/protected/pages/LoginPage.tpl | 6 ++++++ demos/controls/protected/pages/PlainPage.tpl | 1 + demos/controls/protected/pages/config.xml | 12 ++++++++++++ demos/controls/protected/pages/private/MemberPage.php | 12 ++++++++++++ demos/controls/protected/pages/private/MemberPage.tpl | 8 ++++++++ demos/controls/protected/pages/private/config.xml | 10 ++++++++++ 9 files changed, 90 insertions(+) create mode 100644 demos/controls/protected/pages/HomePage.php create mode 100644 demos/controls/protected/pages/HomePage.tpl create mode 100644 demos/controls/protected/pages/LoginPage.php create mode 100644 demos/controls/protected/pages/LoginPage.tpl create mode 100644 demos/controls/protected/pages/PlainPage.tpl create mode 100644 demos/controls/protected/pages/config.xml create mode 100644 demos/controls/protected/pages/private/MemberPage.php create mode 100644 demos/controls/protected/pages/private/MemberPage.tpl create mode 100644 demos/controls/protected/pages/private/config.xml (limited to 'demos/controls/protected/pages') diff --git a/demos/controls/protected/pages/HomePage.php b/demos/controls/protected/pages/HomePage.php new file mode 100644 index 00000000..4cfc3b0a --- /dev/null +++ b/demos/controls/protected/pages/HomePage.php @@ -0,0 +1,14 @@ +BackColor==='') + $sender->BackColor='blue'; + else + $sender->BackColor=''; + } +} + +?> \ No newline at end of file diff --git a/demos/controls/protected/pages/HomePage.tpl b/demos/controls/protected/pages/HomePage.tpl new file mode 100644 index 00000000..fdef6fdd --- /dev/null +++ b/demos/controls/protected/pages/HomePage.tpl @@ -0,0 +1,12 @@ + + + + +
+ (requires membership)
+
+ +
+ | + +
\ No newline at end of file diff --git a/demos/controls/protected/pages/LoginPage.php b/demos/controls/protected/pages/LoginPage.php new file mode 100644 index 00000000..3a3b8432 --- /dev/null +++ b/demos/controls/protected/pages/LoginPage.php @@ -0,0 +1,15 @@ +Application->AuthManager; + if($manager->login($this->username->Text,$this->password->Text)) + $this->Application->Response->redirect($this->Application->Request->Items['ReturnUrl']); + else + $this->error->Text='login failed'; + } +} + +?> \ No newline at end of file diff --git a/demos/controls/protected/pages/LoginPage.tpl b/demos/controls/protected/pages/LoginPage.tpl new file mode 100644 index 00000000..cbbd683b --- /dev/null +++ b/demos/controls/protected/pages/LoginPage.tpl @@ -0,0 +1,6 @@ + +Username:
+Password:
+ + +
\ No newline at end of file diff --git a/demos/controls/protected/pages/PlainPage.tpl b/demos/controls/protected/pages/PlainPage.tpl new file mode 100644 index 00000000..7591d700 --- /dev/null +++ b/demos/controls/protected/pages/PlainPage.tpl @@ -0,0 +1 @@ +This is a page without explicitly defined page class. \ No newline at end of file diff --git a/demos/controls/protected/pages/config.xml b/demos/controls/protected/pages/config.xml new file mode 100644 index 00000000..224a058c --- /dev/null +++ b/demos/controls/protected/pages/config.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/demos/controls/protected/pages/private/MemberPage.php b/demos/controls/protected/pages/private/MemberPage.php new file mode 100644 index 00000000..61fd113d --- /dev/null +++ b/demos/controls/protected/pages/private/MemberPage.php @@ -0,0 +1,12 @@ +Application->AuthManager->logout(); + $this->Application->Response->redirect($this->Application->Service->constructUrl('home')); + } +} + +?> \ No newline at end of file diff --git a/demos/controls/protected/pages/private/MemberPage.tpl b/demos/controls/protected/pages/private/MemberPage.tpl new file mode 100644 index 00000000..cf92f22c --- /dev/null +++ b/demos/controls/protected/pages/private/MemberPage.tpl @@ -0,0 +1,8 @@ + +Congratulations, Application->User->Name%> />!
+<%= + $this->Application->User->Name; +%> +You have reached this member-only area. + +
\ No newline at end of file diff --git a/demos/controls/protected/pages/private/config.xml b/demos/controls/protected/pages/private/config.xml new file mode 100644 index 00000000..ecfb6b00 --- /dev/null +++ b/demos/controls/protected/pages/private/config.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3