Location: PHPKode > projects > LySite > lysite/header.php
<?php
/*----------------------------------------------------------

       LySite
       Brad Landis (hide@address.com)

   Copyright (C) 2005 Brad Landis

   This program is free software; you can redistribute it
   and/or modify it under the terms of the GNU General
   Public License as published by the Free Software
   Foundation; either version 2 of the License, or (at your
   option) any later version.

   This program is distributed in the hope that it will be
   useful, but WITHOUT ANY WARRANTY; without even the
   implied warranty of MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.  See the GNU General Public License
   for more details.
   
   You should have received a copy of the GNU General Public
   License along with this program; if not, write to the
   Free Software Foundation, Inc., 51 Franklin Street, Fifth
   Floor, Boston, MA  02110-1301, USA.

----------------------------------------------------------*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<?php
if(!isset($subtitle))
	echo "<title>".SITE_TITLE." | ".SITE_SUBTITLE."</title>\n";
else
	echo "<title>".$subtitle." | ".SITE_TITLE."</title>\n";
?>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="style_print.css" media="print">
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=UTF-8">
</head>
<body>
<table id='header' style='vertical-align: middle;'>
<tr><td><a href='index.php' title='CDS - Christian Devotional Songs for the Youth'><img src="header.jpg" alt='CDS (Christian Devotional Songs for the Youth)'></a>
<td><form action='index.php' method='get' id='search'>
<p id='search'><input type='text' name='search'><input type='submit' value='Search'></p>
</form>
</table>
</div>
<div id='top_links'>
<span>
<a href='index.php' title='Go to the CDS Homepage'>Home</a>
</span>
<span>
<?php
echo "<a href='songs.php' title='A List of All the Songs in Our Collection'>Songs</a>\n";
if(OPT_ALBUMS == true)
	echo "<a href='albums.php' title='A List of the Albums the Songs Can Be Heard On'>Albums</a>\n";
if(OPT_CATEGORIES == true)
	echo "<a href='categories.php' title='View songs by category'>Categories</a>\n";
if(OPT_FAVORITES == true)
	echo "<a href='favs.php' title='All of the songs you have marked to be your favorite'>Favorites</a>\n";
if(OPT_ATTACHMENTS == true)
	echo "<a href='attachments.php' title='List of available attachments'>Attachments</a>\n";
?>
</span>
</div>
<table>
<?php
if(is_logged_in()) {
	$iconlist[] = "||<form action='login.php'><button type='submit' title='Edit Account Settings'><img src='icon/user_settings.jpg'><span>Settings</span></button></form>\n<form action='login.php'><button type='submit' name='logout' title='Logout'><img src='icon/user_logout.jpg'><span>Logout</span></button></form>";
	if(is_admin_user()) {
		$iconlist[] = "<form action='admin.php'><button type='submit' title='Admin'><img src='icon/site_settings.jpg'><span>Admin</span></button></form>";
	}
} else {
	$iconlist[] = "||<form action='login.php'><button type='submit' title'Login'><img src='icon/user_login.jpg'><span>Login/Register</span></button></form>";
}
if(isset($iconlist)) {
	echo "<tr><td id='iconlist'>";
	$j = false;
	foreach($iconlist as $i) {
		if(substr($i,0,2) == "||") echo ($j?" <img src='icon/divider.jpg'> ":"").substr($i,2)."\n";
		else echo $i."\n";
		$j = true;
	}
}
?>
<tr><td style='vertical-align: top;'>
<?php
if($notice)
	notice($notice);
else if(isset($_GET['notice']))
	notice($_GET['notice']);
?>
Return current item: LySite