[Ataraxis-checkins] SF.net SVN: ataraxis: [20] core
Status: Planning
Brought to you by:
klarinetking
|
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. |