website/parts/menu.inc
Jeff Teunissen 9e6f75ccbd Update for PHP 7.x
PHP 7 doesn't like the old short tags we were using (it's possible to re-enable
them, but won't be for version 8, so we might as well switch now), and the old
MySQL APIs are now gone entirely, replaced with something different.

This should make everything work at least as well as it used to.

Also, one file used to be checked in with CRLF line endings. ??
2022-04-27 13:14:47 -04:00

80 lines
2.7 KiB
PHP

<!-- begin menu -->
<DIV class="menu" id="menu">
<?php
function menuSectionHeader ($name)
{
echo "<!-- menuSectionHeader(" . $name . ') -->' .
'<SPAN class="menuTitle">' . $name . '<SPAN class="nodisplay">:</SPAN></SPAN>' .
'<SPAN class="nodisplay"> [ </SPAN>';
}
function menuSectionFooter ()
{
echo "\n";
}
function menuItemLink ($name, $url, $desc, $last)
{
global $currPage;
if ($last) {
$chr = ' ]';
$final = '<BR>';
} else {
$chr = ' | ';
$final = '';
}
if ($name == $currPage) {
echo '<SPAN class="menuItem"><A class="selected" href="' . $url . '">' . $desc . '</A></SPAN>';
} else {
echo '<SPAN class="menuItem"><A href="' . $url . '">' . $desc . '</A></SPAN>';
}
echo "<SPAN class=\"nodisplay\">$chr</SPAN>$final";
}
function searchMenu ()
{
menuSectionHeader ("Search");
echo '<FORM action="search.php" method="POST">'
.' <SELECT name="type_of_search">'
.' <OPTION value="news">News</OPTION>'
.' <OPTION value="site">Site</OPTION>'
// .' <OPTION value="bugs">Bug Tracker</OPTION>'
// .' <OPTION value="patches">Patches</OPTION>'
.' </SELECT>'
.' <INPUT type="checkbox" name="exact" value="1" checked>&nbsp;Require Exact Match'
.' <INPUT type="hidden" name="forum_id" value="">'
.' <INPUT type="hidden" name="is_bug_page" value="">'
.' <INPUT type="hidden" name="group_id" value="882">'
.' <INPUT type="text" name="words" size="15" value="">'
.' <INPUT type="submit" name="Search" value="Search">'
.'</FORM>';
menuSectionFooter ();
}
// Project
menuSectionHeader ("Project");
menuItemLink ("home", "/", "Home", FALSE);
menuItemLink ("shots", "/screenshots.php", "Screen Shots", FALSE);
menuItemLink ("files", "/files.php", "Downloads", FALSE);
menuItemLink ("docs", "/doxygen/", "Documentation", FALSE);
menuItemLink ("lists", "/lists.php", "Mailing Lists", FALSE);
menuItemLink ("news", "/old_news.php", "News Archive", TRUE);
menuSectionFooter ();
// Developers
menuSectionHeader ("Developers");
menuItemLink ("plans", "/plan.php", "Developer Plans", FALSE);
menuItemLink ("devtools", "/devtools.php", "Developer Tools", FALSE);
menuItemLink ("cvs", "https://sourceforge.net/p/quake/_list/git?source=navbar", "Browse Git Trees", FALSE);
menuItemLink ("bugs", "https://sourceforge.net/p/quake/bugs/", "Bug Tracker", FALSE);
menuItemLink ("patches", "https://sourceforge.net/p/quake/patches/", "Patch Manager", FALSE);
menuItemLink ("progress", "/progress.php", "Progress", TRUE);
menuSectionFooter ();
// searchMenu ();
?>
<SPAN class="centered"><A class="sfLogo" href="http://sourceforge.net/projects/quake/"><IMG src="http://sflogo.sourceforge.net/sflogo.php?group_id=882&amp;type=2" width="125" height="37" alt="SourceForge Logo"></A></SPAN>
</DIV>
<!-- end menu -->