ataraxis-checkins Mailing List for Ataraxis
Status: Planning
Brought to you by:
klarinetking
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: <kla...@us...> - 2006-08-02 15:32:42
|
Revision: 25 Author: klarinetking Date: 2006-08-02 08:32:22 -0700 (Wed, 02 Aug 2006) ViewCVS: http://svn.sourceforge.net/ataraxis/?rev=25&view=rev Log Message: ----------- Started work on the register page. Modified Paths: -------------- core/common.inc.php core/inc/classes/class.page.php core/index.php core/login.php Modified: core/common.inc.php =================================================================== --- core/common.inc.php 2006-08-01 15:08:32 UTC (rev 24) +++ core/common.inc.php 2006-08-02 15:32:22 UTC (rev 25) @@ -48,6 +48,12 @@ $registry->register('session', $session); $user = new user($registry); +$registry->register('user', $user); $page = new page($registry); + +if ( $session->loggedOn == TRUE ) +{ + $template->assign('loggedOn', 'True'); +} ?> \ No newline at end of file Modified: core/inc/classes/class.page.php =================================================================== --- core/inc/classes/class.page.php 2006-08-01 15:08:32 UTC (rev 24) +++ core/inc/classes/class.page.php 2006-08-02 15:32:22 UTC (rev 25) @@ -30,6 +30,8 @@ $this->settings = $registry->get('settings'); $this->template = $registry->get('template'); $this->db = $registry->get('db'); + $this->session = $registry->get('session'); + $this->user = $registry->get('user'); } /** @@ -75,8 +77,13 @@ public function outputRightSidebar () { $this->template->assign(array( + 'lLogout' => '(Logout)', 'lRegister' => 'Register', - 'uRegister' => './register.php') + + 'uRegister' => './register.php', + 'uLogout' => $this->session->appendSid('./login.php?logout=true'), + + 'vUsername' => $this->user->info->username) ); $this->template->display('sidebarRight.inc.tpl'); @@ -106,17 +113,41 @@ $this->template->display('footer.inc.tpl'); } + /** + * outputAll + * + * Outputs all the pieces of the template. + * + * @access public + * @param string $pageTitle + * @param string $templateFile + */ + + public function outputAll($pageTitle, $templateFile) + { + $this->outputHeader($pageTitle); + $this->outputLeftSidebar(); + $this->outputRightSidebar(); + $this->template->display($templateFile); + $this->outputFooter(); + } + + /** + * outputMessage + * + * Easily displays a message. + * + * @access public + * @param string $message + */ + 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(); + $this->outputAll('Message', 'messageBody.inc.tpl'); } } ?> \ No newline at end of file Modified: core/index.php =================================================================== --- core/index.php 2006-08-01 15:08:32 UTC (rev 24) +++ core/index.php 2006-08-02 15:32:22 UTC (rev 25) @@ -7,24 +7,7 @@ require_once ('./common.inc.php'); -if ( $session->loggedOn == TRUE ) -{ - $template->assign('loggedOn', 'True'); -} - -$template->assign(array( - 'vUsername' => $user->info->username, - - 'lLogout' => '(Logout)', - - 'uLogout' => $session->appendSid('./login.php?logout=true')) -); - // Output the page -$page->outputHeader('Main Page'); -$page->outputLeftSidebar(); -$page->outputRightSidebar(); -$template->display('indexBody.inc.tpl'); -$page->outputFooter(); +$page->outputAll('Main Page', 'indexBody.inc.tpl'); ?> \ No newline at end of file Modified: core/login.php =================================================================== --- core/login.php 2006-08-01 15:08:32 UTC (rev 24) +++ core/login.php 2006-08-02 15:32:22 UTC (rev 25) @@ -16,7 +16,7 @@ $session->destroySession($_GET['sid']); $page->outputMessage('You have been logged out. Click <a href="./index.php">here</a> to return to the index'); } -elseif ( isset($_POST['loginUsername']) && isset($_POST['loginPassword']) ) +elseif ( isset($_POST['loginSubmit']) && !empty($_POST['loginSubmit']) && $_POST['loginSubmit'] == 'Login' ) { // @todo: clean variables later This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
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. |
|
From: <kla...@us...> - 2006-07-31 14:58:37
|
Revision: 23 Author: klarinetking Date: 2006-07-31 07:58:19 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/ataraxis/?rev=23&view=rev Log Message: ----------- Moved the page output functions to a separate class. Removed the functions.inc.php file. Modified Paths: -------------- core/common.inc.php core/inc/classes/class.session.php core/inc/template/internal/template.fetch_compile_include.php core/index.php core/login.php core/templates/header.inc.tpl core/templates/indexBody.inc.tpl Added Paths: ----------- core/inc/classes/class.page.php core/inc/config/config.inc.ini core/templates/sidebarLeft.inc.tpl core/templates/sidebarRight.inc.tpl Removed Paths: ------------- core/inc/functions.inc.php Modified: core/common.inc.php =================================================================== --- core/common.inc.php 2006-07-31 01:50:37 UTC (rev 22) +++ core/common.inc.php 2006-07-31 14:58:19 UTC (rev 23) @@ -21,6 +21,7 @@ require ($rootPath . 'inc/template/class.template.php'); require ($rootPath . 'inc/classes/class.session.php'); require ($rootPath . 'inc/classes/class.user.php'); +require ($rootPath . 'inc/classes/class.page.php'); /** * Set up basic classes @@ -48,4 +49,6 @@ $registry->register('session', $session); $user = new user($registry); + +$page = new page($registry); ?> \ No newline at end of file Added: core/inc/classes/class.page.php =================================================================== --- core/inc/classes/class.page.php (rev 0) +++ core/inc/classes/class.page.php 2006-07-31 14:58:19 UTC (rev 23) @@ -0,0 +1,100 @@ +<?php +/** + * @author Nick Ross <kla...@us...> + * @copyright Ataraxis Group 2006 + * @package core + */ + +/** + * The base page making class + * + * This class constructs the web pages. + * + * @package dbal + */ + +class page +{ + /** + * The constructor. + * + * Sets up access to the settings and template objects. + * + * @access public + * @param object $registry + */ + + + public function __construct ($registry) + { + $this->settings = $registry->get('settings'); + $this->template = $registry->get('template'); + } + + /** + * outputHeader + * + * Displays the header. + * + * @access public + * @param string $title + */ + + 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->display('header.inc.tpl'); + } + + /** + * outputLeftSidebar + * + * Displays the left sidebar. + * + * @access public + */ + + public function outputLeftSidebar () + { + $this->template->display('sidebarLeft.inc.tpl'); + } + + /** + * outputRightSidebar + * + * Displays the right sidebar. + * + * @access public + */ + + public function outputRightSidebar () + { + $this->template->display('sidebarRight.inc.tpl'); + } + + /** + * outputFooter + * + * Displays the footer + * + * @access public + */ + + public function outputFooter () + { + global $startTime; + + $endTime = microtime(); + $totalTime = $endTime - $startTime; + $totalTime = substr($totalTime, 0, 6); + + $this->template->assign(array( + 'lCopyright' => 'This system powered by the <a href="http://ataraxis.sourceforge.net" target="_blank">Ataraxis Blogging System</a>', + 'vLoadTime' => 'Load Time: ' . $totalTime . 's') + ); + + $this->template->display('footer.inc.tpl'); + } +} +?> \ No newline at end of file Modified: core/inc/classes/class.session.php =================================================================== --- core/inc/classes/class.session.php 2006-07-31 01:50:37 UTC (rev 22) +++ core/inc/classes/class.session.php 2006-07-31 14:58:19 UTC (rev 23) @@ -154,5 +154,12 @@ return; } + + public function appendSid ($url) + { + $urlDelim = (strpos($url, '?') === FALSE) ? '?' : '&'; + + return $url . $urlDelim . 'sid=' . $this->sid; + } } ?> \ No newline at end of file Added: core/inc/config/config.inc.ini =================================================================== --- core/inc/config/config.inc.ini (rev 0) +++ core/inc/config/config.inc.ini 2006-07-31 14:58:19 UTC (rev 23) @@ -0,0 +1,5 @@ +;General Configuration File + +[general] + +sitename = Ataraxis Blogging System 0.1 \ No newline at end of file Deleted: core/inc/functions.inc.php =================================================================== --- core/inc/functions.inc.php 2006-07-31 01:50:37 UTC (rev 22) +++ core/inc/functions.inc.php 2006-07-31 14:58:19 UTC (rev 23) @@ -1,41 +0,0 @@ -<?php -/** - * @author Nick Ross <kla...@us...> - * @copyright Ataraxis Group 2006 - * @package core - */ - -function appendSid ($url) -{ - global $session; - - $urlDelim = (strpos($url, '?') === FALSE) ? '?' : '&'; - - return $url . $urlDelim . 'sid=' . $session->sid; -} - -function pageHeader ($title) -{ - global $template, $settings; - - $template->assign('lTitle', $settings->get('general.sitename') . ' :: ' . $title); - $template->assign('lSiteName', $settings->get('general.sitename')); - $template->display('header.inc.tpl'); -} - -function pageFooter () -{ - global $template, $startTime; - - $endTime = microtime(); - $totalTime = $endTime - $startTime; - $totalTime = substr($totalTime, 0, 6); - - $template->assign(array( - 'lCopyright' => 'This system powered by the <a href="http://ataraxis.sourceforge.net" target="_blank">Ataraxis Blogging System</a>', - 'vLoadTime' => 'Load Time: ' . $totalTime . 's') - ); - - $template->display('footer.inc.tpl'); -} -?> \ No newline at end of file Modified: core/inc/template/internal/template.fetch_compile_include.php =================================================================== --- core/inc/template/internal/template.fetch_compile_include.php 2006-07-31 01:50:37 UTC (rev 22) +++ core/inc/template/internal/template.fetch_compile_include.php 2006-07-31 14:58:19 UTC (rev 23) @@ -17,9 +17,17 @@ } $object->_vars = array_merge($object->_vars, $_templatelite_include_vars); - array_unshift($object->_confs, $object->_confs[0]); - $_compiled_output = $object->_fetch_compile($_templatelite_include_file); - array_shift($object->_confs); + if(isset($object->_confs[0])) + { + array_unshift($object->_confs, $object->_confs[0]); + $_compiled_output = $object->_fetch_compile($_templatelite_include_file); + array_shift($object->_confs); + } + else + { + $_compiled_output = $object->_fetch_compile($_templatelite_include_file); + } + $object->_inclusion_depth--; if ($object->debugging) { Modified: core/index.php =================================================================== --- core/index.php 2006-07-31 01:50:37 UTC (rev 22) +++ core/index.php 2006-07-31 14:58:19 UTC (rev 23) @@ -7,8 +7,6 @@ require_once ('./common.inc.php'); -pageHeader('Index'); - if ( $session->loggedOn == TRUE ) { $template->assign('loggedOn', 'True'); @@ -19,10 +17,14 @@ 'lLogout' => '(Logout)', - 'uLogout' => appendSid('./login.php?logout=true')) + 'uLogout' => $session->appendSid('./login.php?logout=true')) ); +// Output the page + +$page->outputHeader('Main Page'); +$page->outputLeftSidebar(); +$page->outputRightSidebar(); $template->display('indexBody.inc.tpl'); - -pageFooter(); +$page->outputFooter(); ?> \ No newline at end of file Modified: core/login.php =================================================================== --- core/login.php 2006-07-31 01:50:37 UTC (rev 22) +++ core/login.php 2006-07-31 14:58:19 UTC (rev 23) @@ -25,7 +25,7 @@ $auth->check($username, $password); - $home = appendSid('./index.php'); + $home = $session->appendSid('./index.php'); echo "Click <a href='$home'>here</a> to go back"; } ?> \ No newline at end of file Modified: core/templates/header.inc.tpl =================================================================== --- core/templates/header.inc.tpl 2006-07-31 01:50:37 UTC (rev 22) +++ core/templates/header.inc.tpl 2006-07-31 14:58:19 UTC (rev 23) @@ -12,4 +12,7 @@ <h1> {$lSiteName} </h1> - </div> \ No newline at end of file + </div> + <div id="wrapper1"> + <div id="wrapper2"> + <div id="maincol"> \ No newline at end of file Modified: core/templates/indexBody.inc.tpl =================================================================== --- core/templates/indexBody.inc.tpl 2006-07-31 01:50:37 UTC (rev 22) +++ core/templates/indexBody.inc.tpl 2006-07-31 14:58:19 UTC (rev 23) @@ -1,34 +1,4 @@ - <div id="wrapper1"> - <div id="wrapper2"> - <div id="maincol"> - <div id="leftcol"> - <p> - What should go here? - </p> - <p> - I think maybe a blogroll - </p> - <p> - Possibly links to other pages - </p> - </div> - <div id="rightcol"> - <p> - {if $loggedOn == True} - Welcome {$vUsername}<br /> - <a href="{$uLogout}">{$lLogout}</a> - {else} - {include file="loginForm.inc.tpl"} - {/if} - </p> - <p> - Probably the archives over here, but that can change - </p> - <p> - {include file="searchForm.inc.tpl"} - </p> - </div> <div id="centercol"> <p> Main posts in here, duh Added: core/templates/sidebarLeft.inc.tpl =================================================================== --- core/templates/sidebarLeft.inc.tpl (rev 0) +++ core/templates/sidebarLeft.inc.tpl 2006-07-31 14:58:19 UTC (rev 23) @@ -0,0 +1,11 @@ + <div id="leftcol"> + <p> + What should go here? + </p> + <p> + I think maybe a blogroll + </p> + <p> + Possibly links to other pages + </p> + </div> \ No newline at end of file Added: core/templates/sidebarRight.inc.tpl =================================================================== --- core/templates/sidebarRight.inc.tpl (rev 0) +++ core/templates/sidebarRight.inc.tpl 2006-07-31 14:58:19 UTC (rev 23) @@ -0,0 +1,16 @@ + <div id="rightcol"> + <p> + {if $loggedOn == True} + Welcome {$vUsername}<br /> + <a href="{$uLogout}">{$lLogout}</a> + {else} + {include file="loginForm.inc.tpl"} + {/if} + </p> + <p> + Probably the archives over here, but that can change + </p> + <p> + {include file="searchForm.inc.tpl"} + </p> + </div> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <kla...@us...> - 2006-07-31 01:50:54
|
Revision: 22 Author: klarinetking Date: 2006-07-30 18:50:37 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/ataraxis/?rev=22&view=rev Log Message: ----------- More work on the layout. We really need to change the colours. Modified Paths: -------------- core/common.inc.php core/inc/classes/class.auth.db.php core/inc/classes/class.session.php core/inc/functions.inc.php core/index.php core/login.php core/templates/footer.inc.tpl core/templates/header.inc.tpl core/templates/indexBody.inc.tpl core/templates/loginForm.inc.tpl core/templates/stylesheet.css Added Paths: ----------- core/templates/searchForm.inc.tpl Modified: core/common.inc.php =================================================================== --- core/common.inc.php 2006-07-30 17:16:14 UTC (rev 21) +++ core/common.inc.php 2006-07-31 01:50:37 UTC (rev 22) @@ -5,6 +5,8 @@ * @package core */ +$startTime = microtime(); + $rootPath = './'; /** Modified: core/inc/classes/class.auth.db.php =================================================================== --- core/inc/classes/class.auth.db.php 2006-07-30 17:16:14 UTC (rev 21) +++ core/inc/classes/class.auth.db.php 2006-07-31 01:50:37 UTC (rev 22) @@ -41,7 +41,7 @@ public function check ($username, $password) { - $sql = "SELECT * + $sql = "SELECT `username`, `password`, `user_id` FROM `users` WHERE `username` = '$username' AND `password` = '$password' Modified: core/inc/classes/class.session.php =================================================================== --- core/inc/classes/class.session.php 2006-07-30 17:16:14 UTC (rev 21) +++ core/inc/classes/class.session.php 2006-07-31 01:50:37 UTC (rev 22) @@ -125,10 +125,10 @@ * * Destroys a previously created session. * - * @access private + * @access public */ - private function destroySession ($sid) + public function destroySession ($sid) { $sql = "DELETE FROM `sessions` WHERE (`session_id` = '$sid')"; Modified: core/inc/functions.inc.php =================================================================== --- core/inc/functions.inc.php 2006-07-30 17:16:14 UTC (rev 21) +++ core/inc/functions.inc.php 2006-07-31 01:50:37 UTC (rev 22) @@ -16,9 +16,26 @@ function pageHeader ($title) { - global $template; + global $template, $settings; - $template->assign('lTitle', $title); + $template->assign('lTitle', $settings->get('general.sitename') . ' :: ' . $title); + $template->assign('lSiteName', $settings->get('general.sitename')); $template->display('header.inc.tpl'); } + +function pageFooter () +{ + global $template, $startTime; + + $endTime = microtime(); + $totalTime = $endTime - $startTime; + $totalTime = substr($totalTime, 0, 6); + + $template->assign(array( + 'lCopyright' => 'This system powered by the <a href="http://ataraxis.sourceforge.net" target="_blank">Ataraxis Blogging System</a>', + 'vLoadTime' => 'Load Time: ' . $totalTime . 's') + ); + + $template->display('footer.inc.tpl'); +} ?> \ No newline at end of file Modified: core/index.php =================================================================== --- core/index.php 2006-07-30 17:16:14 UTC (rev 21) +++ core/index.php 2006-07-31 01:50:37 UTC (rev 22) @@ -9,6 +9,20 @@ pageHeader('Index'); +if ( $session->loggedOn == TRUE ) +{ + $template->assign('loggedOn', 'True'); +} + +$template->assign(array( + 'vUsername' => $user->info->username, + + 'lLogout' => '(Logout)', + + 'uLogout' => appendSid('./login.php?logout=true')) +); + $template->display('indexBody.inc.tpl'); -$template->display('footer.inc.tpl'); + +pageFooter(); ?> \ No newline at end of file Modified: core/login.php =================================================================== --- core/login.php 2006-07-30 17:16:14 UTC (rev 21) +++ core/login.php 2006-07-31 01:50:37 UTC (rev 22) @@ -11,13 +11,21 @@ $authFactory = new authFactory($registry); $auth = $authFactory->getAuth($registry); -// @todo: clean variables later +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"; +} +else +{ + // @todo: clean variables later -$username = $_POST['loginUsername']; -$password = md5($_POST['loginPassword']); + $username = $_POST['loginUsername']; + $password = md5($_POST['loginPassword']); -$auth->check($username, $password); + $auth->check($username, $password); -$home = appendSid('./index.php'); -echo "Click <a href='$home'>here</a> to go back"; + $home = appendSid('./index.php'); + echo "Click <a href='$home'>here</a> to go back"; +} ?> \ No newline at end of file Modified: core/templates/footer.inc.tpl =================================================================== --- core/templates/footer.inc.tpl 2006-07-30 17:16:14 UTC (rev 21) +++ core/templates/footer.inc.tpl 2006-07-31 01:50:37 UTC (rev 22) @@ -1,3 +1,16 @@ - + + <div id="footer"> + <p> + {$lCopyright} + </p> + <p> + {$vLoadTime} + </p> + <p> + <a href="{$uAdmin}">{$lAdmin}</a> + </p> + </div> + </div> + </div> </body> </html> \ No newline at end of file Modified: core/templates/header.inc.tpl =================================================================== --- core/templates/header.inc.tpl 2006-07-30 17:16:14 UTC (rev 21) +++ core/templates/header.inc.tpl 2006-07-31 01:50:37 UTC (rev 22) @@ -10,6 +10,6 @@ <body> <div id="header"> <h1> - This is the header + {$lSiteName} </h1> </div> \ No newline at end of file Modified: core/templates/indexBody.inc.tpl =================================================================== --- core/templates/indexBody.inc.tpl 2006-07-30 17:16:14 UTC (rev 21) +++ core/templates/indexBody.inc.tpl 2006-07-31 01:50:37 UTC (rev 22) @@ -1,3 +1,4 @@ + <div id="wrapper1"> <div id="wrapper2"> <div id="maincol"> @@ -3,25 +4,33 @@ <div id="leftcol"> <p> - This is the left column + What should go here? </p> + <p> + I think maybe a blogroll + </p> + <p> + Possibly links to other pages + </p> </div> <div id="rightcol"> <p> -{include file="loginForm.inc.tpl"} - + {if $loggedOn == True} + Welcome {$vUsername}<br /> + <a href="{$uLogout}">{$lLogout}</a> + {else} + {include file="loginForm.inc.tpl"} + {/if} </p> + <p> + Probably the archives over here, but that can change + </p> + <p> + {include file="searchForm.inc.tpl"} + </p> </div> - <div id="centercol"> <p> - This is the center column + Main posts in here, duh </p> </div> - </div> - <div id="footer"> - <p> - This is the footer - </p> - </div> - </div> - </div> \ No newline at end of file + </div> \ No newline at end of file Modified: core/templates/loginForm.inc.tpl =================================================================== --- core/templates/loginForm.inc.tpl 2006-07-30 17:16:14 UTC (rev 21) +++ core/templates/loginForm.inc.tpl 2006-07-31 01:50:37 UTC (rev 22) @@ -1,6 +1,6 @@ - <form action="login.php" method="POST"> - <b>Username</b><input type="text" name="loginUsername"><br /> - <b>Password</b><input type="password" name="loginPassword"><br /> - <input type="submit" name="loginSubmit" value="Login"> - <input type="reset" name="loginReset" value="Reset"> - </form> \ No newline at end of file +<form action="login.php" method="POST"> + <b>Username</b><input type="text" name="loginUsername"><br /> + <b>Password</b><input type="password" name="loginPassword"><br /> + <input type="submit" name="loginSubmit" value="Login"> + <input type="reset" name="loginReset" value="Reset"> +</form> \ No newline at end of file Added: core/templates/searchForm.inc.tpl =================================================================== --- core/templates/searchForm.inc.tpl (rev 0) +++ core/templates/searchForm.inc.tpl 2006-07-31 01:50:37 UTC (rev 22) @@ -0,0 +1,5 @@ +<form action="search.php" method="POST"> + <b>Search Query</b><input type="text" name="searchQuery"><br /> + <input type="submit" name="searchSubmit" value="Search"> + <input type="reset" name="searchReset" value="Reset"> +</form> \ No newline at end of file Modified: core/templates/stylesheet.css =================================================================== --- core/templates/stylesheet.css 2006-07-30 17:16:14 UTC (rev 21) +++ core/templates/stylesheet.css 2006-07-31 01:50:37 UTC (rev 22) @@ -127,5 +127,5 @@ margin: 0; padding: 1% 0; text-align: center; - color: #CCC; + color: #FFFFFF; } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <kla...@us...> - 2006-07-30 17:16:29
|
Revision: 21 Author: klarinetking Date: 2006-07-30 10:16:14 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/ataraxis/?rev=21&view=rev Log Message: ----------- A start on a tableless layout for Ataraxis. Colours need to be changed. Modified Paths: -------------- core/templates/footer.inc.tpl core/templates/header.inc.tpl core/templates/indexBody.inc.tpl core/templates/loginForm.inc.tpl Added Paths: ----------- core/templates/images/ core/templates/images/leftcolor_bg.gif core/templates/images/rightcolor_bg.gif core/templates/stylesheet.css Modified: core/templates/footer.inc.tpl =================================================================== --- core/templates/footer.inc.tpl 2006-07-30 02:26:21 UTC (rev 20) +++ core/templates/footer.inc.tpl 2006-07-30 17:16:14 UTC (rev 21) @@ -1,3 +1,3 @@ - + </body> </html> \ No newline at end of file Modified: core/templates/header.inc.tpl =================================================================== --- core/templates/header.inc.tpl 2006-07-30 02:26:21 UTC (rev 20) +++ core/templates/header.inc.tpl 2006-07-30 17:16:14 UTC (rev 21) @@ -1,5 +1,15 @@ -<html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> - <title>{$lTitle}</title> + <title> + {$lTitle} + </title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link href="./templates/stylesheet.css" rel="stylesheet" type="text/css" /> </head> - <body> \ No newline at end of file + <body> + <div id="header"> + <h1> + This is the header + </h1> + </div> \ No newline at end of file Added: core/templates/images/leftcolor_bg.gif =================================================================== (Binary files differ) Property changes on: core/templates/images/leftcolor_bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: core/templates/images/rightcolor_bg.gif =================================================================== (Binary files differ) Property changes on: core/templates/images/rightcolor_bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: core/templates/indexBody.inc.tpl =================================================================== --- core/templates/indexBody.inc.tpl 2006-07-30 02:26:21 UTC (rev 20) +++ core/templates/indexBody.inc.tpl 2006-07-30 17:16:14 UTC (rev 21) @@ -1,14 +1,28 @@ - <table width="100%" cellspacing="0" cellpadding="0" border="0"> - <tr> - <td width="80%"> - Main page content - </td> - <td> - Sidebar - - <br /><br /> - - {include file="loginForm.inc.tpl"} - </td> - </tr> - </table> \ No newline at end of file + <div id="wrapper1"> + <div id="wrapper2"> + <div id="maincol"> + <div id="leftcol"> + <p> + This is the left column + </p> + </div> + <div id="rightcol"> + <p> +{include file="loginForm.inc.tpl"} + + </p> + </div> + + <div id="centercol"> + <p> + This is the center column + </p> + </div> + </div> + <div id="footer"> + <p> + This is the footer + </p> + </div> + </div> + </div> \ No newline at end of file Modified: core/templates/loginForm.inc.tpl =================================================================== --- core/templates/loginForm.inc.tpl 2006-07-30 02:26:21 UTC (rev 20) +++ core/templates/loginForm.inc.tpl 2006-07-30 17:16:14 UTC (rev 21) @@ -1,6 +1,6 @@ -<form action="login.php" method="POST"> -<input type="text" name="loginUsername"><br /> -<input type="password" name="loginPassword"><br /> -<input type="submit" name="loginSubmit" value="Login"> -<input type="reset" name="loginReset" value="Reset"> -</form> \ No newline at end of file + <form action="login.php" method="POST"> + <b>Username</b><input type="text" name="loginUsername"><br /> + <b>Password</b><input type="password" name="loginPassword"><br /> + <input type="submit" name="loginSubmit" value="Login"> + <input type="reset" name="loginReset" value="Reset"> + </form> \ No newline at end of file Added: core/templates/stylesheet.css =================================================================== --- core/templates/stylesheet.css (rev 0) +++ core/templates/stylesheet.css 2006-07-30 17:16:14 UTC (rev 21) @@ -0,0 +1,131 @@ +/** + * Ataraxis CSS Stylesheet + * Borrowed from: http://www.manisheriar.com/ + */ + +body +{ + background: #E5E5E5; + text-align: center; + margin: 10px; + padding: 0; + font: normal 0.8em/1.2em Verdana, Arial, Sans-Serif; + color: #000000; +} + +a +{ + color: #FFF; + text-decoration: none; + border-bottom: 1px dotted; +} + +a:hover +{ + border-bottom: 1px solid; + color:#000000; +} + +#wrapper1 +{ + position: relative; + text-align: center; + width: 100%; + background: #FFF url("./images/rightcolor_bg.gif") repeat-y top right; +} + +#wrapper2 +{ + position: relative; + text-align: center; + width: 100%; + background: url("./images/leftcolor_bg.gif") repeat-y top left; +} + +#header +{ + background: #BB62AB; + padding: 10px; + margin: 0; + text-align: center; + color: #FFF; +} + +#header h1 +{ + font-size: 200%; +} + +#header a:hover +{ + color: #7A2875; +} + +#maincol +{ + position: relative; + margin: 0; + padding: 10px; +} + +#leftcol +{ + position: relative; + top: -10px; + left: -10px; + float: left; + width: 220px; /* for IE5/WIN */ + voice-family: "\"}\""; + voice-family: inherit; + width: 200px; /* actual value */ + margin: 0, 0, -10px, 0; + padding: 10px; + background: #ECB9E8; + z-index: 100; +} + +#rightcol +{ + position: relative; + top: -10px; + right: -10px; + float: right; + width: 220px; /* for IE5/WIN */ + voice-family: "\"}\""; + voice-family: inherit; + width: 200px; /* actual value */ + margin: 0, 0, -10px, 0; + padding: 10px; + background: #D7C4FA; + z-index: 99; +} + +#centercol +{ + position: relative; + padding: 0, 240px; +} + +#centercol a +{ + color: #666; +} + +#centercol a:hover +{ + border-bottom: 1px solid; + color: #9343B9; +} + +#footer +{ + position: relative; + top: 1px; + background: #7A2875; + width: 100%; + clear: both; + margin: 0; + padding: 1% 0; + text-align: center; + color: #CCC; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <kla...@us...> - 2006-07-30 02:26:34
|
Revision: 20 Author: klarinetking Date: 2006-07-29 19:26:21 -0700 (Sat, 29 Jul 2006) ViewCVS: http://svn.sourceforge.net/ataraxis/?rev=20&view=rev Log Message: ----------- Started templating the index page. Modified Paths: -------------- core/inc/functions.inc.php core/index.php Added Paths: ----------- core/templates/footer.inc.tpl core/templates/header.inc.tpl core/templates/indexBody.inc.tpl Modified: core/inc/functions.inc.php =================================================================== --- core/inc/functions.inc.php 2006-07-29 22:58:32 UTC (rev 19) +++ core/inc/functions.inc.php 2006-07-30 02:26:21 UTC (rev 20) @@ -13,4 +13,12 @@ return $url . $urlDelim . 'sid=' . $session->sid; } + +function pageHeader ($title) +{ + global $template; + + $template->assign('lTitle', $title); + $template->display('header.inc.tpl'); +} ?> \ No newline at end of file Modified: core/index.php =================================================================== --- core/index.php 2006-07-29 22:58:32 UTC (rev 19) +++ core/index.php 2006-07-30 02:26:21 UTC (rev 20) @@ -7,13 +7,8 @@ require_once ('./common.inc.php'); -if ( $session->loggedOn == FALSE ) -{ - $template->display('loginForm.inc.tpl'); -} -else -{ - $url = appendSid('./login.php'); - echo "<a href='$url'>Home</a>"; -} +pageHeader('Index'); + +$template->display('indexBody.inc.tpl'); +$template->display('footer.inc.tpl'); ?> \ No newline at end of file Added: core/templates/footer.inc.tpl =================================================================== --- core/templates/footer.inc.tpl (rev 0) +++ core/templates/footer.inc.tpl 2006-07-30 02:26:21 UTC (rev 20) @@ -0,0 +1,3 @@ + + </body> +</html> \ No newline at end of file Added: core/templates/header.inc.tpl =================================================================== --- core/templates/header.inc.tpl (rev 0) +++ core/templates/header.inc.tpl 2006-07-30 02:26:21 UTC (rev 20) @@ -0,0 +1,5 @@ +<html> + <head> + <title>{$lTitle}</title> + </head> + <body> \ No newline at end of file Added: core/templates/indexBody.inc.tpl =================================================================== --- core/templates/indexBody.inc.tpl (rev 0) +++ core/templates/indexBody.inc.tpl 2006-07-30 02:26:21 UTC (rev 20) @@ -0,0 +1,14 @@ + <table width="100%" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td width="80%"> + Main page content + </td> + <td> + Sidebar + + <br /><br /> + + {include file="loginForm.inc.tpl"} + </td> + </tr> + </table> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <kla...@us...> - 2006-07-29 22:58:40
|
Revision: 19 Author: klarinetking Date: 2006-07-29 15:58:32 -0700 (Sat, 29 Jul 2006) ViewCVS: http://svn.sourceforge.net/ataraxis/?rev=19&view=rev Log Message: ----------- Modified Paths: -------------- core/index.php Modified: core/index.php =================================================================== --- core/index.php 2006-07-29 20:29:20 UTC (rev 18) +++ core/index.php 2006-07-29 22:58:32 UTC (rev 19) @@ -11,4 +11,9 @@ { $template->display('loginForm.inc.tpl'); } +else +{ + $url = appendSid('./login.php'); + echo "<a href='$url'>Home</a>"; +} ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |