diff options
Diffstat (limited to 'demos/personal')
-rw-r--r-- | demos/personal/index.php | 28 | ||||
-rw-r--r-- | demos/personal/protected/Common/LoginPortlet.php | 36 | ||||
-rw-r--r-- | demos/personal/protected/Common/MainMenu.php | 22 | ||||
-rw-r--r-- | demos/personal/protected/Pages/Layout.php | 12 | ||||
-rw-r--r-- | demos/personal/protected/Pages/Register.php | 36 |
5 files changed, 67 insertions, 67 deletions
diff --git a/demos/personal/index.php b/demos/personal/index.php index 04695b16..1722244d 100644 --- a/demos/personal/index.php +++ b/demos/personal/index.php @@ -1,15 +1,15 @@ -<?php
-
-$basePath=dirname(__FILE__);
-$frameworkPath=$basePath.'/../../framework/prado.php';
-$assetsPath=$basePath.'/assets';
-
-if(!is_writable($assetsPath))
- die("Please make sure that the directory $assetsPath is writable by Web server process.");
-
-require_once($frameworkPath);
-
-$application=new TApplication;
-$application->run();
-
+<?php + +$basePath=dirname(__FILE__); +$frameworkPath=$basePath.'/../../framework/prado.php'; +$assetsPath=$basePath.'/assets'; + +if(!is_writable($assetsPath)) + die("Please make sure that the directory $assetsPath is writable by Web server process."); + +require_once($frameworkPath); + +$application=new TApplication; +$application->run(); + ?>
\ No newline at end of file diff --git a/demos/personal/protected/Common/LoginPortlet.php b/demos/personal/protected/Common/LoginPortlet.php index 1f5cd4f5..1b93912b 100644 --- a/demos/personal/protected/Common/LoginPortlet.php +++ b/demos/personal/protected/Common/LoginPortlet.php @@ -1,19 +1,19 @@ -<?php
-
-class LoginPortlet extends TTemplateControl
-{
- public function validateUser($sender,$param)
- {
- $authManager=$this->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());
- }
-}
-
+<?php + +class LoginPortlet extends TTemplateControl +{ + public function validateUser($sender,$param) + { + $authManager=$this->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/MainMenu.php b/demos/personal/protected/Common/MainMenu.php index a2334c03..5e1e95c0 100644 --- a/demos/personal/protected/Common/MainMenu.php +++ b/demos/personal/protected/Common/MainMenu.php @@ -1,12 +1,12 @@ -<?php
-
-class MainMenu extends TTemplateControl
-{
- public function logout($sender,$param)
- {
- $this->Application->getModule('auth')->logout();
- $this->Response->redirect($this->Service->constructUrl('Home'));
- }
-}
-
+<?php + +class MainMenu extends TTemplateControl +{ + public function logout($sender,$param) + { + $this->Application->getModule('auth')->logout(); + $this->Response->redirect($this->Service->constructUrl('Home')); + } +} + ?>
\ No newline at end of file diff --git a/demos/personal/protected/Pages/Layout.php b/demos/personal/protected/Pages/Layout.php index ba96038b..7f5e5802 100644 --- a/demos/personal/protected/Pages/Layout.php +++ b/demos/personal/protected/Pages/Layout.php @@ -1,7 +1,7 @@ -<?php
-
-class Layout extends TTemplateControl
-{
-}
-
+<?php + +class Layout extends TTemplateControl +{ +} + ?>
\ No newline at end of file diff --git a/demos/personal/protected/Pages/Register.php b/demos/personal/protected/Pages/Register.php index b699d859..26f9aa50 100644 --- a/demos/personal/protected/Pages/Register.php +++ b/demos/personal/protected/Pages/Register.php @@ -1,19 +1,19 @@ -<?php
-
-class Register extends TPage
-{
- public function checkUsername($sender,$param)
- {
- // set $param->IsValid to false if the username is already taken
- }
-
- public function createUser($sender,$param)
- {
- if($this->IsValid)
- {
- // create new user account
- }
- }
-}
-
+<?php + +class Register extends TPage +{ + public function checkUsername($sender,$param) + { + // set $param->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 |