2004-01-05 16:44:52 +02:00
|
|
|
<?php
|
2003-12-13 20:56:30 +02:00
|
|
|
global $site_title, $title, $sidebarentries;
|
2003-12-13 06:51:03 +02:00
|
|
|
$site_title = "The freeglut Project";
|
|
|
|
$title = $site_title . " :: The Next Generation of GLUT";
|
|
|
|
|
2003-12-13 20:56:30 +02:00
|
|
|
# 1's designate spaces in the sidebar
|
|
|
|
# Format for an entry:
|
|
|
|
# array(name=>"Name of Page", page=>"Filename/URL"),
|
|
|
|
#
|
|
|
|
$sidebarentries = array(0, # We skip this entry anyway...
|
2004-01-05 16:44:52 +02:00
|
|
|
array("name"=>"About", "page"=>"/index.php"),
|
|
|
|
array("name"=>"News", "page"=>"/news.php"),
|
|
|
|
array("name"=>"Progress", "page"=>"/progress.php"),
|
2013-04-05 13:34:28 +03:00
|
|
|
array("name"=>"Help Out", "page"=>"/help.php"),
|
2003-12-13 20:56:30 +02:00
|
|
|
1,
|
2004-01-05 16:44:52 +02:00
|
|
|
array("name"=>"Download", "page"=>"/index.php#download"),
|
2003-12-13 20:56:30 +02:00
|
|
|
1,
|
2004-01-05 16:44:52 +02:00
|
|
|
array("name"=>"Install", "page"=>"/docs/install.php"),
|
|
|
|
array("name"=>"API", "page"=>"/docs/api.php"),
|
2012-05-14 20:41:15 +03:00
|
|
|
array("name"=>"OpenGL Wikibook", "page"=>"http://en.wikibooks.org/wiki/OpenGL_Programming"),
|
2003-12-13 20:56:30 +02:00
|
|
|
1,
|
2014-01-17 15:27:15 +02:00
|
|
|
array("name"=>"Report a Bug", "page"=>"http://sourceforge.net/p/freeglut/bugs/"),
|
|
|
|
array("name"=>"Request a Feature", "page"=>"http://sourceforge.net/p/freeglut/feature-requests/"),
|
2004-01-05 16:44:52 +02:00
|
|
|
array("name"=>"Project Interface", "page"=>"http://sourceforge.net/projects/freeglut/")
|
2003-12-13 20:56:30 +02:00
|
|
|
);
|
|
|
|
|
2004-01-05 16:44:52 +02:00
|
|
|
function generateHeader($self)
|
|
|
|
{
|
2003-12-13 20:56:30 +02:00
|
|
|
global $title;
|
2004-01-05 16:44:52 +02:00
|
|
|
|
|
|
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
2004-01-05 17:59:45 +02:00
|
|
|
echo "<?xml-stylesheet href=\"http://freeglut.sourceforge.net/freeglut-style.css\" type=\"text/css\"?>\n";
|
2004-01-05 16:44:52 +02:00
|
|
|
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">";
|
|
|
|
|
|
|
|
?>
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
2004-01-05 17:59:45 +02:00
|
|
|
<link rel="stylesheet" type="text/css" href="http://freeglut.sourceforge.net/freeglut-style.css" />
|
2003-12-13 06:51:03 +02:00
|
|
|
<title><? echo $title ?></title>
|
2004-01-05 16:44:52 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<?
|
2003-12-13 20:56:30 +02:00
|
|
|
generateSideBar($self);
|
2003-12-13 06:51:03 +02:00
|
|
|
}
|
|
|
|
|
2004-01-05 16:44:52 +02:00
|
|
|
function generateFooter()
|
|
|
|
{
|
2004-01-05 17:04:25 +02:00
|
|
|
?>
|
2004-01-05 16:44:52 +02:00
|
|
|
</body>
|
|
|
|
</html>
|
2004-01-05 17:04:25 +02:00
|
|
|
<?
|
2003-12-13 06:51:03 +02:00
|
|
|
}
|
|
|
|
|
2004-01-05 16:44:52 +02:00
|
|
|
function printMenuItem($item, $current_page)
|
|
|
|
{
|
2003-12-13 20:56:30 +02:00
|
|
|
if ($item == 1)
|
2004-01-05 16:44:52 +02:00
|
|
|
echo "\t<br/>\n";
|
|
|
|
else if ($current_page == $item["page"])
|
|
|
|
echo "\t<div class=\"navbar-item\"><i>$item[name]</i></div>\n";
|
2003-12-13 20:56:30 +02:00
|
|
|
else
|
2004-01-05 16:44:52 +02:00
|
|
|
echo "\t<div class=\"navbar-item\"><a class=\"navbar-item\" href=\"$item[page]\">$item[name]</a></div>\n";
|
2003-12-13 20:56:30 +02:00
|
|
|
}
|
|
|
|
|
2004-01-05 16:44:52 +02:00
|
|
|
function generateSideBar($current_page)
|
|
|
|
{
|
2003-12-13 20:56:30 +02:00
|
|
|
global $sidebarentries;
|
2004-01-05 16:44:52 +02:00
|
|
|
|
|
|
|
# Print out the logo and title
|
|
|
|
?>
|
|
|
|
<div class="navbar-left">
|
2004-01-06 00:47:21 +02:00
|
|
|
<span class="navbar-header"><a href="/"><img src="/images/freeglut_logo.png" alt="freeglut logo" style="border: 0;" /></a></span><br/>
|
2004-01-05 16:44:52 +02:00
|
|
|
<span class="navbar-smalltext">The Free OpenGL Utility Toolkit</span><br/><br/>
|
|
|
|
<?
|
2003-12-29 21:02:34 +02:00
|
|
|
# Print out each sidebar entry one by one...
|
2003-12-13 20:56:30 +02:00
|
|
|
reset($sidebarentries);
|
2004-01-05 16:44:52 +02:00
|
|
|
while (next($sidebarentries))
|
2003-12-13 20:56:30 +02:00
|
|
|
printMenuItem(current($sidebarentries), $current_page);
|
|
|
|
|
2009-12-03 06:12:54 +02:00
|
|
|
# This allows a user to view our PHP source... it's in SVN anyway, and why not spread the love of
|
2003-12-29 21:02:34 +02:00
|
|
|
# slick web page design? ;)
|
2009-12-03 06:12:54 +02:00
|
|
|
$svn_location = "http://freeglut.svn.sourceforge.net/viewvc/freeglut/trunk/freeglut/web-src$current_page?view=markup";
|
2003-12-29 21:02:34 +02:00
|
|
|
|
|
|
|
# Print the SourceForge logo button and the "View source" link
|
2004-01-05 16:44:52 +02:00
|
|
|
?>
|
|
|
|
<br/>
|
|
|
|
<span class="navbar-header">
|
|
|
|
<a href="http://www.opengl.org/">
|
|
|
|
<img src="/images/opengl.png" alt="OpenGL.org" height="31" width="88" style="border: 0;"/></a>
|
|
|
|
</span>
|
|
|
|
<span class="navbar-header">
|
|
|
|
<a href="http://sourceforge.net/">
|
|
|
|
<img src="http://sourceforge.net/sflogo.php?group_id=1032" width="88" height="31" alt="SourceForge" style="border: 0;" /></a>
|
|
|
|
</span>
|
|
|
|
<span class="navbar-header">
|
|
|
|
<a href="http://freshmeat.net/">
|
|
|
|
<img src="/images/freshmeat.png" width="88" height="31" alt="SourceForge" style="border: 0;" /></a>
|
|
|
|
</span>
|
|
|
|
<span class="navbar-header">
|
|
|
|
<a href="http://validator.w3.org/check/referer">
|
|
|
|
<img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" style="border: 0;"/></a>
|
|
|
|
</span>
|
|
|
|
<br/><br/>
|
|
|
|
<span class="navbar-smalltext" style="font-style: normal;">
|
2009-12-03 06:12:54 +02:00
|
|
|
<? echo "\t<a href=\"$svn_location\">View PHP Source</a>"; ?>
|
2004-01-05 16:44:52 +02:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<?
|
2003-12-13 20:56:30 +02:00
|
|
|
}
|
|
|
|
|
2004-01-05 16:44:52 +02:00
|
|
|
function setPageTitle($title_inc)
|
|
|
|
{
|
2003-12-13 20:56:30 +02:00
|
|
|
global $site_title, $title;
|
2003-12-13 06:51:03 +02:00
|
|
|
$title = $site_title . " :: " . $title_inc;
|
|
|
|
}
|
|
|
|
|
2003-12-13 22:30:01 +02:00
|
|
|
?>
|