diff options
Diffstat (limited to 'demos/personal')
| -rw-r--r-- | demos/personal/index_php.php | 13 | ||||
| -rw-r--r-- | demos/personal/protected/Pages/Layout.tpl | 2 | ||||
| -rw-r--r-- | demos/personal/protected/Pages/Settings.page | 2 | ||||
| -rw-r--r-- | demos/personal/protected/Pages/config.php | 16 | ||||
| -rw-r--r-- | demos/personal/protected/application.php | 41 | ||||
| -rw-r--r-- | demos/personal/protected/application.xml | 3 | 
6 files changed, 75 insertions, 2 deletions
| diff --git a/demos/personal/index_php.php b/demos/personal/index_php.php new file mode 100644 index 00000000..cf57d82d --- /dev/null +++ b/demos/personal/index_php.php @@ -0,0 +1,13 @@ +<?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('protected',false,TApplication::CONFIG_TYPE_PHP); +$application->run();
\ No newline at end of file diff --git a/demos/personal/protected/Pages/Layout.tpl b/demos/personal/protected/Pages/Layout.tpl index 3ffb5306..d650a689 100644 --- a/demos/personal/protected/Pages/Layout.tpl +++ b/demos/personal/protected/Pages/Layout.tpl @@ -8,7 +8,7 @@  <div class="header">
  <h1>Your Name Here</h1>
 -<h2>My Personal Site</h2>
 +<h2><%$siteName%></h2>
  <div class="mainmenu">
  <com:MainMenu />
 diff --git a/demos/personal/protected/Pages/Settings.page b/demos/personal/protected/Pages/Settings.page index 48dfde96..f461fa13 100644 --- a/demos/personal/protected/Pages/Settings.page +++ b/demos/personal/protected/Pages/Settings.page @@ -1,4 +1,4 @@ -<com:TContent ID="main" >
 +<com:TContent ID="content" >
  Welcome, <com:TLabel Text=<%= $this->User->Name %> />!
  This page contains site settings accessible only to site admin.
  </com:TContent>
\ No newline at end of file diff --git a/demos/personal/protected/Pages/config.php b/demos/personal/protected/Pages/config.php new file mode 100644 index 00000000..7a42d866 --- /dev/null +++ b/demos/personal/protected/Pages/config.php @@ -0,0 +1,16 @@ +<?php +return array( +	'authorization' => array( +		array( +			'action' => 'deny', +			'pages' => 'Settings', +			'users' => '?', +		), +	), +	'pages' => array( +		'properties' => array( +			'MasterClass' => 'Application.Pages.Layout', +			'Theme' => 'White', +		), +	), +);
\ No newline at end of file diff --git a/demos/personal/protected/application.php b/demos/personal/protected/application.php new file mode 100644 index 00000000..0d9cadd4 --- /dev/null +++ b/demos/personal/protected/application.php @@ -0,0 +1,41 @@ +<?php +return array( +	'application' => array( +		'id' => 'personal', +		'mode' => 'Debug', +	), +	'paths' => array( +		'using'=>array('Application.common.*'), +	), +	'modules' => array(	 +	), +	'services' => array( +		'page' => array( +			'class' => 'TPageService', +			'properties' => array( +				'basePath' => 'Application.Pages', +			), +			'modules' => array( +				'users' => array( +					'class' => 'System.Security.TUserManager', +					'properties' => array( +						'passwordMode' => 'Clear', +					), +					'users' => array( +						array('name'=>'demo','password'=>'demo'), +					), +				), // users +				'auth' => array( +					'class' => 'System.Security.TAuthManager', +					'properties' => array( +						'userManager' => 'users', +						'loginPage' => 'UserLogin', +					), +				), +			), +		), +	), +	'parameters' => array( +		'siteName' => 'My Personal Site (PHP Config)', +	) +);
\ No newline at end of file diff --git a/demos/personal/protected/application.xml b/demos/personal/protected/application.xml index d2affe24..b67df94a 100644 --- a/demos/personal/protected/application.xml +++ b/demos/personal/protected/application.xml @@ -33,4 +33,7 @@        </modules>
      </service>
    </services>
 +  <parameters>
 +	<parameter id="siteName" value="My Personal Site" />
 +  </parameters>
  </application>
\ No newline at end of file | 
