[Ataraxis-checkins] SF.net SVN: ataraxis: [24] core
Status: Planning
Brought to you by:
klarinetking
|
From: <kla...@us...> - 2006-08-01 15:08:44
|
Revision: 24 Author: klarinetking Date: 2006-08-01 08:08:32 -0700 (Tue, 01 Aug 2006) ViewCVS: http://svn.sourceforge.net/ataraxis/?rev=24&view=rev Log Message: ----------- Just a few changes. Modified Paths: -------------- core/common.inc.php core/inc/classes/class.page.php core/inc/classes/class.session.php core/login.php core/templates/sidebarRight.inc.tpl core/templates/stylesheet.css Added Paths: ----------- core/templates/messageBody.inc.tpl Modified: core/common.inc.php =================================================================== --- core/common.inc.php 2006-07-31 14:58:19 UTC (rev 23) +++ core/common.inc.php 2006-08-01 15:08:32 UTC (rev 24) @@ -13,7 +13,6 @@ * Include required files */ -require ($rootPath . 'inc/functions.inc.php'); require ($rootPath . 'inc/classes/class.factory.log.php'); require ($rootPath . 'inc/classes/class.factory.dbal.php'); require ($rootPath . 'inc/classes/class.registry.php'); Modified: core/inc/classes/class.page.php =================================================================== --- core/inc/classes/class.page.php 2006-07-31 14:58:19 UTC (rev 23) +++ core/inc/classes/class.page.php 2006-08-01 15:08:32 UTC (rev 24) @@ -29,6 +29,7 @@ { $this->settings = $registry->get('settings'); $this->template = $registry->get('template'); + $this->db = $registry->get('db'); } /** @@ -42,8 +43,11 @@ public function outputHeader ($title) { - $this->template->assign('lTitle', $this->settings->get('general.sitename') . ' :: ' . $title); - $this->template->assign('lSiteName', $this->settings->get('general.sitename')); + $this->template->assign(array( + 'lTitle' => $this->settings->get('general.sitename') . ' :: ' . $title, + 'lSiteName' => $this->settings->get('general.sitename')) + ); + $this->template->display('header.inc.tpl'); } @@ -56,7 +60,7 @@ */ public function outputLeftSidebar () - { + { $this->template->display('sidebarLeft.inc.tpl'); } @@ -69,7 +73,12 @@ */ public function outputRightSidebar () - { + { + $this->template->assign(array( + 'lRegister' => 'Register', + 'uRegister' => './register.php') + ); + $this->template->display('sidebarRight.inc.tpl'); } @@ -96,5 +105,18 @@ $this->template->display('footer.inc.tpl'); } + + public function outputMessage ($message) + { + $this->template->assign(array( + 'lMessage' => $message) + ); + + $this->outputHeader('Message'); + $this->outputLeftSidebar(); + $this->template->display('messageBody.inc.tpl'); + $this->outputRightSidebar(); + $this->outputFooter(); + } } ?> \ No newline at end of file Modified: core/inc/classes/class.session.php =================================================================== --- core/inc/classes/class.session.php 2006-07-31 14:58:19 UTC (rev 23) +++ core/inc/classes/class.session.php 2006-08-01 15:08:32 UTC (rev 24) @@ -155,6 +155,15 @@ return; } + /** + * appendSid + * + * Appends the SID on to the end of the URL to keep sessions alive. + * + * @access public + * @param string $url + */ + public function appendSid ($url) { $urlDelim = (strpos($url, '?') === FALSE) ? '?' : '&'; Modified: core/login.php =================================================================== --- core/login.php 2006-07-31 14:58:19 UTC (rev 23) +++ core/login.php 2006-08-01 15:08:32 UTC (rev 24) @@ -14,9 +14,9 @@ if ( isset($_GET['logout']) && !empty($_GET['logout']) && $_GET['logout'] == 'true') { $session->destroySession($_GET['sid']); - echo "Click <a href='./index.php'>here</a> to go back"; + $page->outputMessage('You have been logged out. Click <a href="./index.php">here</a> to return to the index'); } -else +elseif ( isset($_POST['loginUsername']) && isset($_POST['loginPassword']) ) { // @todo: clean variables later @@ -25,7 +25,10 @@ $auth->check($username, $password); - $home = $session->appendSid('./index.php'); - echo "Click <a href='$home'>here</a> to go back"; + $page->outputMessage('You have been logged on. Click <a href="' . $session->appendSid('./index.php') . '">here</a> to go back'); } +else +{ + $page->outputMessage('This page has been accessed incorrectly. Please return to the <a href="./index.php">Index</a>'); +} ?> \ No newline at end of file Added: core/templates/messageBody.inc.tpl =================================================================== --- core/templates/messageBody.inc.tpl (rev 0) +++ core/templates/messageBody.inc.tpl 2006-08-01 15:08:32 UTC (rev 24) @@ -0,0 +1,7 @@ + + <div id="centercol"> + <p> + {$lMessage} + </p> + </div> + </div> \ No newline at end of file Modified: core/templates/sidebarRight.inc.tpl =================================================================== --- core/templates/sidebarRight.inc.tpl 2006-07-31 14:58:19 UTC (rev 23) +++ core/templates/sidebarRight.inc.tpl 2006-08-01 15:08:32 UTC (rev 24) @@ -5,6 +5,7 @@ <a href="{$uLogout}">{$lLogout}</a> {else} {include file="loginForm.inc.tpl"} + <a href="{$uRegister}">{$lRegister}</a> {/if} </p> <p> Modified: core/templates/stylesheet.css =================================================================== --- core/templates/stylesheet.css 2006-07-31 14:58:19 UTC (rev 23) +++ core/templates/stylesheet.css 2006-08-01 15:08:32 UTC (rev 24) @@ -104,6 +104,7 @@ { position: relative; padding: 0, 240px; + text-align: left; } #centercol a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |