September 8, 2010, 10:44 pm

How this web site works

This web site is software driven. Each page is comprised of three sections, the call to the header, the body, and the call to the footer. The header and footer are common to all pages in the site. All the menu and navigation is handled by the code in the "header.php" To put in a new page, only the main content of the page needs to be created. For example, here is the main page:
<?
include "header.php";
?>
<H1><FONT  COLOR="<?echo $color_light_text;?>">The Sound Chicks</FONT></H1>
  <IMG SRC="http://paloaltophoto.com/photo/images/4998.jpg" border="1">

  

  
  <P>The Sound Chicks are a cappella singing group is not only easy on the eyes, but sing beautifully.  They sing traditional folk songs in a variety of languages.
  For booking information, please send email to <IMG SRC="email.gif"></P>
<?
include "footer.php";
?>

The header is driven by a text file that describes the menu, the name of the logo file (the music score gif above the menu tabs), and the menu colors. The header.php file does a lot of stuff and is all php code. It does not need to be modified and takes care of all the lighting of the menus and such. The actuall stuff it writes out it gets from the text file. To add a menu item, just add it to the header.txt file and it will show up. Here is the header.txt file for this site:
logo	#282828	#888888
index.php	Home
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=361028392	MySpace
rates.php	Rates
music.php	Sample Music
about.php	About this web page
contact.php	Contact
http://paloaltophoto.com	Allen Edwards Photography

The footer file includes the text that is at the bottom of each page. Here is the footer file:
<hr><center>
<font size="3">&copy; <a href="http://www.paloaltophoto.com">Allen Edwards</a> and The Sound Chicks 2007</font>
<br><br><br>
</body>
</html>

Just for kicks, here it the code for the page you are reading:
<?
include 'header.php';
?>

<H3><FONT  COLOR="<?echo $color_light_text;?>">How this web site works</font></H3>
<div align='left'>
This web site is software driven.  Each page is comprised of three sections, the 
call to the header, the body, and the call to the footer.  The header and footer 
are common to all pages in the site.  All the menu and navigation is handled by 
the code in the "header.php" To put in a new page, only the main content of the 
page needs to be created.  For example, here is the main page:

<br>
<pre>
<?
$stuff = file_get_contents("index.php");
$stuff = htmlentities($stuff);
echo $stuff;
?>
</pre>


<hr>

The header is driven by a text file that describes the menu, the name of the 
logo file (the music score gif above the menu tabs), and the menu colors.  The 
header.php file does a lot of stuff and is all php 
code.  It does not need to be modified and takes care of all the lighting of the menus 
and such.  The actuall stuff it writes out it gets from the text file.  To add a menu item, just
add it to the header.txt file and it will show up.  Here is the header.txt file for this site:
<pre>
<?
$stuff = file_get_contents("header.txt");
$stuff = htmlentities($stuff);
echo $stuff;
?>
</pre>
<hr>
The footer file includes the text that is at the bottom of each page.  Here is the footer file:
<pre>
<?
$stuff = file_get_contents("footer.php");
$stuff = htmlentities($stuff);
echo $stuff;
?>
</pre>
<hr>
Just for kicks, here it the code for the page you are reading:
<pre>
<?
$stuff = file_get_contents("about.php");
$stuff = htmlentities($stuff);
echo $stuff;
?>
</pre>
<hr>
For more information, use the contact page to send me a note.

<br><br>
<? include "footer.php";
?>

For more information, use the contact page to send me a note.


© Allen Edwards and The Sound Chicks 2007