New "parts" of web pages...use include() in PHP to bring these into the

pages.
This commit is contained in:
Jeff Teunissen 2000-03-06 08:12:43 +00:00
parent b3a7f72f33
commit c5f56b1791
7 changed files with 249 additions and 0 deletions

10
parts/copyright.php Normal file
View file

@ -0,0 +1,10 @@
<TABLE width="100%" border="0" cellSpacing="0" cellPadding="2" bgColor="#4b4f66">
<TR>
<TD align="center">
<SPAN class="titlebar">
Copyright &copy; 1999,2000 contributors of the QuakeForge Project.<BR>
<A class="maintitlebar" href="copyright.php">Additional Copyright and Trademark Acknowledgements</A>
</SPAN>
</TD>
</TR>
</TABLE>

7
parts/head.php Normal file
View file

@ -0,0 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<LINK REL="StyleSheet" HREF="/styles/quakeforge.css" TYPE="text/css">
<TITLE><?PHP echo $sitename . ': ' . $pagename; ?></TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">

90
parts/library.php Normal file
View file

@ -0,0 +1,90 @@
<?php
/* Array functions */
// Search array for data
function inArray( $needle, $haystack )
{
$found = false;
for ( $ptr = 0 ; $ptr < count ( $haystack ) ; $ptr++ ) {
if ( $haystack[$ptr] == $needle ) {
$found = true;
}
}
return $found;
}
/* Sections */
function isFocused( $name, $newname )
{
return ( strToLower( $name ) == strToLower( $newname ) ) ? 1 : 0;
}
function iconLink ( $url, $img, $desc, $border )
{
echo '<TD><A class="tabs" href="' . $url . '"><IMG src="' . $img . '" alt="' . $desc . '" border="' . $border . '" width="24" height="24"></A></TD>';
}
/* Menu functions */
// Create a Menu item
function menuItemLink( $url, $desc )
{
echo '<A CLASS="menus" HREF="' . $url . '">' . $desc . '</A><BR>';
}
// Create a Menu Section header
function menuSectionHeader( $name, $fgColor , $bgColor )
{
echo "\n<!-- menuSectionHeader(" . $name . ') -->';
echo '<TABLE cellSpacing="0" cellPadding="3" width="100%" border=0 bgColor="' . $bgColor . '">';
echo ' <TR bgColor="' . $color . '">';
echo ' <TD align="center">';
echo ' <IMG src="http://images.sourceforge.net/blank.gif" height="1" width="135" alt="" border="0"><BR>';
echo ' <SPAN class="titlebar"><FONT color="' . $fgColor . '">' . $name . '</FONT></SPAN>';
echo ' </TD>';
echo ' </TR>';
echo ' <TR align="right" bgColor="#4b4f66">';
echo ' <TD>';
}
// Create a Menu Section footer
function menuSectionFooter()
{
echo ' </TD>' .
' </TR>' .
'</TABLE>';
}
/* Table functions */
//
function tableBoxHeader( $name, $cols, $fgColor, $bgColor, $intBgColor )
{
echo '<TABLE cellSpacing="0" cellPadding="1" width="100%" border="0" bgColor="' . $bgColor . '">' .
' <TR>' .
' <TD>' .
' <TABLE cellspacing="1" cellpadding="2" width="100%" border="0" bgcolor="' . $intBgColor . '">' .
' <TR bgColor="' . $bgColor . '" align="center">' .
' <TD colspan="' . $cols . '">' .
' <SPAN class="titlebar">' . $name . '</SPAN>' .
' </TD>' .
' </TR>';
}
function tableBoxFooter()
{
echo ' </TABLE>' .
' </TD>' .
' </TR>' .
'</TABLE>';
}
function tableNewsItem( $date, $user, $text )
{
echo '<TR><TD><DL><DT>Posted on ' . $date . ' by ' . $user . '</DT>' .
' <DD>' . $text . '</DD>' .
'</DL></TD></TR>';
}
function tableSpacer( $height, $width, $cols, $bgColor )
{
echo '<TD colSpan="' . $cols . '" width="' . $width . '" bgColor="' . $bgColor . '">';
echo ' <IMG src="/img/misc/blank.gif" height="' . $height . '" width="' . $width . '" border="0" alt="">';
echo '</TD>';
}
?>

66
parts/menu.php Normal file
View file

@ -0,0 +1,66 @@
<!-- menus -->
<TD bgColor="#4b4f66">
<?php
function qfMenu() {
menuSectionHeader( "QuakeForge", 'white', '#737B9C');
menuItemLink( "/", "Homepage" );
menuItemLink( "/news.php", "News Archive" );
menuItemLink( "http://sourceforge.net/project/filelist.php?group_id=882", "Downloads" );
menuItemLink( "http://sourceforge.net/bugs/?group_id=882", "Bug Tracking" );
menuItemLink( "http://sourceforge.net/mail/?group_id=882", "Mailing Lists" );
// menuItemLink( "http://sourceforge.net/support/?group_id=882", "Tech Support" );
menuSectionFooter();
}
function develMenu() {
menuSectionHeader( "Developers", 'white', '#737B9C');
menuItemLink( "/devtools.php", "Developer Tools" );
menuItemLink( "http://sourceforge.net/cvs/?group_id=882", "CVS Repository" );
menuItemLink( "http://sourceforge.net/patch/?group_id=882", "Patch Manager" );
menuItemLink( "http://sourceforge.net/pm/?group_id=882", "Task Manager" );
menuSectionFooter();
}
function sfMenu() {
menuSectionHeader( "SourceForge", 'white', '#737B9C');
menuItemLink( "http://sourceforge.net/", "Homepage" );
menuItemLink( "http://sourceforge.net/snippet/", "Code Snippet Library" );
menuItemLink( "http://sourceforge.net/softwaremap/", "Software Map" );
menuItemLink( "http://sourceforge.net/new/", "New Releases" );
menuItemLink( "http://sourceforge.net/docs/site/", "Site Documentation" );
menuItemLink( "http://sourceforge.net/top/", "Top Projects" );
menuItemLink( "http://sourceforge.net/mirrors/", "Other Site Mirrors" );
menuSectionFooter();
}
function searchMenu() {
menuSectionHeader( "Search", 'white', '#737B9C');
echo "<CENTER>";
echo "<FONT SIZE=\"-2\">";
echo "<FORM action=\"/search/\" method=\"POST\">\n";
echo " <SELECT name=\"type_of_search\">\n";
echo " <OPTION value=\"bugs\">Bug Tracking</OPTION>\n";
echo " <OPTION value=\"lists\">Mailing Lists</OPTION>\n";
echo " <OPTION value=\"news\">News</OPTION>\n";
echo " <OPTION value=\"patches\">Patches</OPTION>\n";
echo " </SELECT>\n";
echo " <BR>\n";
echo " <INPUT TYPE=\"CHECKBOX\" NAME=\"exact\" VALUE=\"1\" CHECKED> Require Exact Match\n";
echo " <BR>\n";
echo " <INPUT TYPE=\"HIDDEN\" NAME=\"forum_id\" VALUE=\"\">\n";
echo " <INPUT TYPE=\"HIDDEN\" NAME=\"is_bug_page\" VALUE=\"\">\n";
echo " <INPUT TYPE=\"HIDDEN\" NAME=\"group_id\" VALUE=\"882\">\n";
echo " <INPUT TYPE=\"text\" NAME=\"words\" SIZE=\"15\" VALUE=\"\">\n";
echo " <BR>\n";
echo " <INPUT TYPE=\"submit\" NAME=\"Search\" VALUE=\"Search\">\n";
echo " </FORM>\n";
menuSectionFooter();
}
qfMenu();
develMenu();
// sfMenu();
searchMenu();
?>
</TD>

18
parts/titletable.php Normal file
View file

@ -0,0 +1,18 @@
<!-- top title table -->
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0 bgcolor="" valign="center">
<TR valign="top" bgcolor="#4b4f66">
<TD>
<A href="/contest.php"><IMG src="/img/logos/nologo.gif" hspace=2 vspace=0 border=0 width="70" height="70"></A>
</TD>
<TD width="99%"><!-- right of logo -->
<a href="http://sourceforge.net/"><IMG src="http://sourceforge.net/sflogo.php?group_id=882&type=1" align="right" alt="SourceForge" hspace=20 vspace=20 border=0 width="88" height="31"></A>
&nbsp;<BR>
<SPAN class="mainTitle"><?PHP echo "$sitename" ?></SPAN>
</TD>
<!-- right of logo -->
</TR>
<TR>
<TD bgcolor="black" colspan=2><IMG src="images/blank.gif" alt="" height=2 vspace=0></TD>
</TR>
</TABLE>
<!-- end top title table -->

42
parts/topmain.php Normal file
View file

@ -0,0 +1,42 @@
<?php
function textBar($pagename)
{
echo '&nbsp;<BR>' .
'<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">' .
' <TR>' .
' <TD align="left">' .
' <FONT size="+2"><B>' . $pagename . '</B></FONT>' .
' </TD>';
}
function iconBar( $focused ) {
echo '<TABLE border="0" cellSpacing="0" cellPadding="2" bgColor="white">' .
'<TR>';
tableSpacer( 1, 1, 1, "white");
iconLink('http://sourceforge.net/project/?group_id=882', '/img/icons/anvil.png', 'SF Page', isFocused($focused, 'summary'));
iconLink('/', '/img/icons/home.png', 'Home', isFocused($focused, 'home'));
iconLink('http://sourceforge.net/bugs/?group_id=882', '/img/icons/bugs.png', 'Bugs', isFocused($focused, 'bugs'));
iconLink('http://sourceforge.net/support/?group_id=882', '/img/icons/support.png', 'Support', isFocused($focused, 'support'));
iconLink('http://sourceforge.net/patch/?group_id=882', '/img/icons/patch.png', 'Patches', isFocused($focused, 'patch'));
iconLink('http://sourceforge.net/mail/?group_id=882', '/img/icons/mail.png', 'Lists', isFocused($focused, 'mail'));
iconLink('http://sourceforge.net/pm/?group_id=882', '/img/icons/tasks.png', 'Tasks', isFocused($focused, 'tasks'));
iconLink('http://sourceforge.net/survey/?group_id=882', '/img/icons/survey.png', 'Surveys', isFocused($focused, 'survey'));
iconLink('/news.php', '/img/icons/news.png', 'News', isFocused($focused, 'news'));
iconLink('http://sourceforge.net/cvs/?group_id=882', '/img/icons/cvs.png', 'CVS', isFocused($focused, 'cvs'));
iconLink('http://sourceforge.net/project/filelist.php?group_id=882', '/img/icons/download.png', 'Downloads', isFocused($focused, 'download'));
echo '</TD></TR></TABLE>';
}
textBar($pagename);
echo ' <TD align="right">';
iconBar($focused);
echo ' </TD>';
echo ' </TR>';
echo ' <TR>';
tableSpacer( 1, 4, 1, "black");
echo ' </TR>';
echo ' <TR>';
tableSpacer( 2, 1, 2, "white");
echo ' </TR>';
echo '</TABLE>';
?>

16
parts/topstrip.php Normal file
View file

@ -0,0 +1,16 @@
<!-- top strip -->
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2 bgcolor="737b9c">
<TR>
<TD>
<SPAN class=maintitlebar>&nbsp;&nbsp;
<A class=maintitlebar href="/"><B>Home</B></A> |
<A class=maintitlebar href="/about.php"><B>About</B></A> |
<A class=maintitlebar href="/partners.php"><B>Partners</B></A> |
<A class=maintitlebar href="/contact.php"><B>Contact Us</B></A>
</TD>
<TD ALIGN="right">
<A class=maintitlebar href="http://sourceforge.net/"><B>SourceForge member</B></a>&nbsp;
</TD>
</TR>
</TABLE>
<!-- end top strip -->