<div id="RTEContent">Hi Guys,<br> <br> I've thought about going with something like this (see below). <br> <br> My main index has two sets of includes, the action pages that talk to the Db are included at the top of my page, before other output, so I can use the header redirect. The other pages that include html/ output are included in the content div.<br> <br> Does that look ok?<br> <br> Thanks again<br> <br> Matt<br> <br> ----------------------------index.php-----------------------------------<br> <?php<br> // db functions<br> include_once "common_db.php";<br> // include action pages before other output to enable redirect<br> $page = (!empty($_GET['page'])) ? $_GET['page'] : null ;<br> switch ($page){<br> case 'addeventaction':<br> include('addeventaction.php');<br> break;<br> }<br> ?><br> <html><br> <head><br> <style media="all" type="text/css"><br> #menu{<br> width:25%;<br> float:left;}<br>
#content{<br> width:75%;<br> float:left;}<br> .horiz li{<br> display: inline;<br> }<br> </style> <br> </head><br> <body> <br> <div id="menu"> <br> <ul> <br> <li><a href="index.php?page=addevent">add event</a></li> <br> <li><a href="index.php?page=test">add event</a></li> <br> <li>link</li> <br> <li>link</li> <br> <li>link</li> <br> <li>link</li> <br> </ul> <br> </div> <br> <div id="content"> <br> <?php<br> // include other pages that dont use redirects<br> $page = (!empty($_GET['page'])) ? $_GET['page'] : null ;<br> switch ($page){<br> case 'addevent':<br> include('addevent.php');<br> break;<br> default:<br> include("welcome.php");<br> }
<br> ?><br> </div> <br> </body><br> </html><br> <br> <br> <br><br><b><i>Greg Morley <greg.morley@hyperreality.net></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <meta content="text/html;charset=us-ascii" http-equiv="Content-Type"><title></title> <font size="-1"><font face="Verdana">Not exactly on-target with this, but related to the theme of the current thread:<br> <br> "Defining CSS constants using PHP" : <a class="moz-txt-link-freetext" href="http://tylerhall.ws/css/constants/">http://tylerhall.ws/css/constants/</a> (via digg.com)<br> <br> Pretty useful.<br> <br> Greg.<br> <br> <br> <br> </font></font><br> David Goodwin wrote: <blockquote cite="mid20051209213630.GA8098@codepoets.co.uk" type="cite"> <pre wrap="">Joe Beard wrote :<br> </pre> <blockquote type="cite"> <pre wrap=""> My current site has just one skin.php file
which contains header,<br>footer and body functions, which I can then supply content to, or<br>alter to become page specific, so a general file takes on the form:<br><br>include("/functions/skin.php");<br>page_header();<br>page_body_title("This is a Page");<br>page_body_content("Some content here");<br>page_footer();<br><br>but this means I can then call the functions for different purposes,<br>for example 90% of my site doesn't use frames, but I have a cgiirc<br>forum, so that page has frames that contain the page_header() function<br>with arguments to return just the side bar for example.<br> </pre> </blockquote> <pre wrap=""><!----><br>I used nearly exactly the same with a previous employer's website; <br>although I defined e.g. $title before calling page_header() (perhaps I<br>should have passed $title as an argument in instead?) to provide custom<br>titles etc for pages.<br><br>I found it worked quite well, at least from a code reuse point
of<br>view....<br><br>David.<br><br> </pre> </blockquote> _______________________________________________<br>Phpwm mailing list<br>Phpwm@mailman.lug.org.uk<br>http://mailman.lug.org.uk/mailman/listinfo/phpwm<br></blockquote><br></div><p>
                <hr size=1><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="http://us.rd.yahoo.com/mail/uk/taglines/default/messenger/*http://uk.messenger.yahoo.com
">Yahoo! Messenger</a>
<font color="red">NEW</font> - crystal clear PC to PC
<a href="http://us.rd.yahoo.com/mail/uk/taglines/default/messenger/*http://uk.messenger.yahoo.com
">calling worldwide with voicemail
</a></font>