From 8d156610be187427d43f4d033b258f060f8968ad Mon Sep 17 00:00:00 2001
From: xue <>
Date: Fri, 9 Feb 2007 19:02:43 +0000
Subject: reorganize personal demo.
---
demos/personal/protected/Common/LoginPortlet.php | 19 +++
demos/personal/protected/Common/LoginPortlet.tpl | 44 +++++++
demos/personal/protected/Common/MainMenu.php | 12 ++
demos/personal/protected/Common/MainMenu.tpl | 15 +++
demos/personal/protected/Pages/Home.page | 22 +---
demos/personal/protected/Pages/Layout.php | 5 -
demos/personal/protected/Pages/Layout.tpl | 66 ++++------
demos/personal/protected/Pages/Links.page | 116 +++++++++---------
demos/personal/protected/Pages/Register.page | 149 ++++++++++++++++-------
demos/personal/protected/Pages/Register.php | 19 +++
demos/personal/protected/Pages/Resume.page | 126 +++++++++----------
demos/personal/protected/Pages/UserLogin.page | 19 +--
demos/personal/protected/application.xml | 12 +-
demos/personal/themes/White/Default.css | 9 +-
14 files changed, 380 insertions(+), 253 deletions(-)
create mode 100644 demos/personal/protected/Common/LoginPortlet.php
create mode 100644 demos/personal/protected/Common/LoginPortlet.tpl
create mode 100644 demos/personal/protected/Common/MainMenu.php
create mode 100644 demos/personal/protected/Common/MainMenu.tpl
create mode 100644 demos/personal/protected/Pages/Register.php
(limited to 'demos/personal')
diff --git a/demos/personal/protected/Common/LoginPortlet.php b/demos/personal/protected/Common/LoginPortlet.php
new file mode 100644
index 00000000..1f5cd4f5
--- /dev/null
+++ b/demos/personal/protected/Common/LoginPortlet.php
@@ -0,0 +1,19 @@
+Application->getModule('auth');
+ if(!$authManager->login($this->Username->Text,$this->Password->Text))
+ $param->IsValid=false;
+ }
+
+ public function loginButtonClicked($sender,$param)
+ {
+ if($this->Page->IsValid)
+ $this->Response->redirect($this->Application->getModule('auth')->getReturnUrl());
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/demos/personal/protected/Common/LoginPortlet.tpl b/demos/personal/protected/Common/LoginPortlet.tpl
new file mode 100644
index 00000000..82f9c045
--- /dev/null
+++ b/demos/personal/protected/Common/LoginPortlet.tpl
@@ -0,0 +1,44 @@
+
+ Login to Site
+
+
+
+
+
+
+
+
+
+
+
+
+
+ or
+
+
\ No newline at end of file
diff --git a/demos/personal/protected/Common/MainMenu.php b/demos/personal/protected/Common/MainMenu.php
new file mode 100644
index 00000000..a2334c03
--- /dev/null
+++ b/demos/personal/protected/Common/MainMenu.php
@@ -0,0 +1,12 @@
+Application->getModule('auth')->logout();
+ $this->Response->redirect($this->Service->constructUrl('Home'));
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/demos/personal/protected/Common/MainMenu.tpl b/demos/personal/protected/Common/MainMenu.tpl
new file mode 100644
index 00000000..7e3e59f1
--- /dev/null
+++ b/demos/personal/protected/Common/MainMenu.tpl
@@ -0,0 +1,15 @@
+HOME |
+RESUME |
+LINKS |
+ALBUMS |
+REGISTER |
+
+
diff --git a/demos/personal/protected/Pages/Home.page b/demos/personal/protected/Pages/Home.page
index 2c374229..2ae46032 100644
--- a/demos/personal/protected/Pages/Home.page
+++ b/demos/personal/protected/Pages/Home.page
@@ -1,27 +1,9 @@
diff --git a/demos/personal/protected/Pages/Layout.php b/demos/personal/protected/Pages/Layout.php
index f5009542..ba96038b 100644
--- a/demos/personal/protected/Pages/Layout.php
+++ b/demos/personal/protected/Pages/Layout.php
@@ -2,11 +2,6 @@
class Layout extends TTemplateControl
{
- public function logout($sender,$param)
- {
- $this->Application->getModule('auth')->logout();
- $this->Response->redirect($this->Service->constructUrl('Home',null,false));
- }
}
?>
\ No newline at end of file
diff --git a/demos/personal/protected/Pages/Layout.tpl b/demos/personal/protected/Pages/Layout.tpl
index 8236be4c..3ffb5306 100644
--- a/demos/personal/protected/Pages/Layout.tpl
+++ b/demos/personal/protected/Pages/Layout.tpl
@@ -1,60 +1,44 @@
+
+
- About the Links
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod
- tincidunt ut laoreet dolore magna erat volutpat.
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod
- tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis
- nostrud exercitation consequat. esse molestie consequat, vel willum.
- Top 5
-
- - Linked site name
+About the Links
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod
+tincidunt ut laoreet dolore magna erat volutpat.
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod
+tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis
+nostrud exercitation consequat. esse molestie consequat, vel willum.
+Top 5
+
+ - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
- - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
-
- Cool Site Designs
-
- - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+
+Cool Site Designs
+
+ - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
- - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
-
- Photo Sites
-
- - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+
+Photo Sites
+
+ - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
- - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
-
- Resources
-
- - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+
+Resources
+
+ - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
- - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+ - Linked site name
- - A description of the web site goes here.
- - Linked site name
- - A description of the web site goes here.
-
+ - A description of the web site goes here.
+ - Linked site name
+ - A description of the web site goes here.
+
\ No newline at end of file
diff --git a/demos/personal/protected/Pages/Register.page b/demos/personal/protected/Pages/Register.page
index 090d9e65..e8dd2d6f 100644
--- a/demos/personal/protected/Pages/Register.page
+++ b/demos/personal/protected/Pages/Register.page
@@ -5,46 +5,113 @@
Request an Account
- Accounts will be activated pending the approval of the Administrator.
-
+
+Accounts will be activated pending the approval of the Administrator.
+
+
+
+Username
+
+
+
+
+
+
+
+
+Full name
+
+
+
+
+
+Password
+
+
+
+
+
+
+
+Re-type Password
+
+
+
+
+
+
+Email Address
+
+
+
+
+
+
+
+Personal Website
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demos/personal/protected/Pages/Register.php b/demos/personal/protected/Pages/Register.php
new file mode 100644
index 00000000..b699d859
--- /dev/null
+++ b/demos/personal/protected/Pages/Register.php
@@ -0,0 +1,19 @@
+IsValid to false if the username is already taken
+ }
+
+ public function createUser($sender,$param)
+ {
+ if($this->IsValid)
+ {
+ // create new user account
+ }
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/demos/personal/protected/Pages/Resume.page b/demos/personal/protected/Pages/Resume.page
index 06ed845c..d34f105b 100644
--- a/demos/personal/protected/Pages/Resume.page
+++ b/demos/personal/protected/Pages/Resume.page
@@ -1,80 +1,80 @@
Your Name Here
- resume 1/23/04
- 555-555-1212 fax
- 555-555-1212 voice
- someone@example.com
- www.example.com
- City, State Country
+resume 1/23/04
+555-555-1212 fax
+555-555-1212 voice
+someone@example.com
+www.example.com
+City, State Country
-
- Objective
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Experience
- 1999 - 2004 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Sed diam nonummy nibh euismod
+
+Objective
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+Experience
+1999 - 2004 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+ Sed diam nonummy nibh euismod
-
- - Ttincidunt ut laoreet dolore magna aliquam erat volutpat.
- - Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.
- - Duis autem veleum iriure dolor in hendrerit in vel willum.
-
- 1995 - 1999 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+
+ - Ttincidunt ut laoreet dolore magna aliquam erat volutpat.
+ - Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.
+ - Duis autem veleum iriure dolor in hendrerit in vel willum.
+
+1995 - 1999 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Sed diam nonummy nibh euismod
-
- - Ttincidunt ut laoreet dolore magna aliquam erat volutpat.
- - Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.
- - Duis autem veleum iriure dolor in hendrerit in vel willum.
-
- 1993 - 1995 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+ Sed diam nonummy nibh euismod
+
+ - Ttincidunt ut laoreet dolore magna aliquam erat volutpat.
+ - Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.
+ - Duis autem veleum iriure dolor in hendrerit in vel willum.
+
+1993 - 1995 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Sed diam nonummy nibh euismod
-
- - Ttincidunt ut laoreet dolore magna aliquam erat volutpat.
- - Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.
- - Duis autem veleum iriure dolor in hendrerit in vel willum.
-
- 1987 - 1993 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+ Sed diam nonummy nibh euismod
+
+ - Ttincidunt ut laoreet dolore magna aliquam erat volutpat.
+ - Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.
+ - Duis autem veleum iriure dolor in hendrerit in vel willum.
+
+1987 - 1993 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Sed diam nonummy nibh euismod
-
- - Ttincidunt ut laoreet dolore magna aliquam erat volutpat.
- - Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.
- - Duis autem veleum iriure dolor in hendrerit in vel willum.
-
- Education
+ Sed diam nonummy nibh euismod
+
+ - Ttincidunt ut laoreet dolore magna aliquam erat volutpat.
+ - Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.
+ - Duis autem veleum iriure dolor in hendrerit in vel willum.
+
+Education
- 1984 - 1987 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Sed diam nonummy nibh euismod
-
- - Ttincidunt ut laoreet dolore magna aliquam erat volutpat.
- - Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.
-
+1984 - 1987 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+Sed diam nonummy nibh euismod
+
+ - Ttincidunt ut laoreet dolore magna aliquam erat volutpat.
+ - Ut wisi enim ad minim veniam, quis nostrud exercitation consequat.
+
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
\ No newline at end of file
diff --git a/demos/personal/protected/Pages/UserLogin.page b/demos/personal/protected/Pages/UserLogin.page
index 8fb6019b..b87aa8fb 100644
--- a/demos/personal/protected/Pages/UserLogin.page
+++ b/demos/personal/protected/Pages/UserLogin.page
@@ -1,18 +1,5 @@