Location: PHPKode > projects > TVEz - Media Library > tvez-0.2.1/html/nav/topnav.php
<?php
# ------------------------------------------------------------------------------
#
# This file contains the top frame
#
# ------------------------------------------------------------------------------
#
# Copyright (C) 2003 Christian Eheim and Alex Pachikov
#                                                                               
# This file is part of TVEz (tvez.sourceforge.net).
#                                                                               
# TVEz 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.
#                                                                               
# TVEz 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 TVEz; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#                                                                               
# ------------------------------------------------------------------------------
#
# Created on 02/12/2003 by Christian Eheim (hide@address.com)
#
# LAST MODIFIED:
# $Date: 2004/07/07 03:33:30 $
# $Revision: 1.6 $
# $Author: pachikov $
#
# ------------------------------------------------------------------------------
require "nav/nav.inc";

// Test for older versions of Netscape
// and spit out a simpler version of the menu
// What other browsers don't work?
if ( ($BROWSER->Name == "Netscape" && $BROWSER->Major<6) || $BROWSER->PDA) {
	echo '
	<table height="32" border="0" cellpadding="0" cellspacing="0" width="100%">
	  <tr valign="bottom" align="right">
		<td class="bottomborder" align="left" width="150">
&nbsp;<font size="+2"><b><a href="index.php" target="_top">TVEz</a></b></font>
		</td>
		<td class="bottomborder" align="right">
	';
		foreach ($nav as $key => $value) {
			echo "<a href=\"tvez.php?content=$value\">".$key."</a>&nbsp;&nbsp;";
		}
	echo '
		</td>
	  </tr>
	</table>
	';
}
// Otherwise, print the pretty header
// Does not work quite right in Netscape 6 either (image repeat?)
else { 
echo '
<table height="32" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
	<td valign="bottom">
    <!-- Extra table needed for netscape -->
    <table width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td class="bottomborder" align="left">
&nbsp;<font size="+2"><b><a href="index.php" target="_top">TVEz</a></b></font>
	</td>
';
    foreach ($nav as $key => $value) {
        echo '    <td class="menulinks" height="24" width="109" align="center" valign="bottom" ';
        if ($value == $maincontent)
            echo "style=\"border-bottom-width: 0px; background-image: URL('nav/images/tab_pressed.gif'); background-repeat: no-repeat;\" onclick=\"javascript:document.location='tvez.php?content=$value'\">";
        else
            echo "style=\"background-image: URL('nav/images/tab.gif'); background-repeat: no-repeat;\" onMouseOver=\"javascript:switch_bg(this, 1);\" onMouseOut=\"javascript:switch_bg(this, 0);\" onclick=\"javascript:document.location='tvez.php?content=$value'\" class=\"bottomborder\">";
                                                                                     
        echo "<a href=\"tvez.php?content=$value\" onmouseover=\"javascript:body.style.cursor='hand';\" onmouseout=\"javascript:body.style.cursor='default';\" onclick=\"javascript:document.location='tvez.php?content=$value'\">$key</a></td>\n";
    }
 
echo '
			</tr>
		</table>
		</td>
	</tr>
</table>
';
}
?>

Return current item: TVEz - Media Library