mirror of
https://git.code.sf.net/p/quake/website
synced 2024-11-30 16:01:24 +00:00
table.php: Added table{Row,Column}{Begin,End}() functions, just for
completeness. titletable.php: Changed color usage so that we can change theme at will, when we want to. :) parts/*amble.php: Cool New Stuff to allow even simpler maintenance of individual PHP source files...you will only have to maintain stuff that's "native" to the page. As always, backward compatibility is kept...but it's much better now. :)
This commit is contained in:
parent
b788e93c70
commit
06ed1cd973
4 changed files with 75 additions and 12 deletions
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
tableBoxHeader
|
tableBoxHeader
|
||||||
|
|
||||||
Begin a bordered table
|
Begin a bordered table
|
||||||
*/
|
*/
|
||||||
function tableBoxHeader( $bgColor, $borderColor )
|
function tableBoxHeader( $bgColor, $borderColor )
|
||||||
|
@ -36,12 +36,12 @@
|
||||||
echo '<TABLE cellSpacing="0" cellPadding="1" width="100%" border="0" bgColor="' . $borderColor . '">' .
|
echo '<TABLE cellSpacing="0" cellPadding="1" width="100%" border="0" bgColor="' . $borderColor . '">' .
|
||||||
' <TR>' .
|
' <TR>' .
|
||||||
' <TD>' .
|
' <TD>' .
|
||||||
' <TABLE cellspacing="1" cellpadding="2" width="100%" border="0" bgcolor="' . $bgColor . '">';
|
' <TABLE cellSpacing="1" cellPadding="2" width="100%" border="0" bgColor="' . $bgColor . '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
tableBoxFooter
|
tableBoxFooter
|
||||||
|
|
||||||
Finish an opened bordered table
|
Finish an opened bordered table
|
||||||
*/
|
*/
|
||||||
function tableBoxFooter()
|
function tableBoxFooter()
|
||||||
|
@ -53,13 +53,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
tableHeader
|
||||||
|
|
||||||
|
Begin an unbordered table
|
||||||
*/
|
*/
|
||||||
function tableHeader( $cols, $bgColor )
|
function tableHeader( $width, $bgColor )
|
||||||
{
|
{
|
||||||
echo '<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0" bgColor="' . $bgColor . '">';
|
echo '<TABLE cellSpacing="0" cellPadding="0" width="' . $width . '" border="0" bgColor="' . $bgColor . '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
tableFooter
|
||||||
|
|
||||||
|
Close an unbordered table
|
||||||
*/
|
*/
|
||||||
function tableFooter()
|
function tableFooter()
|
||||||
{
|
{
|
||||||
|
@ -68,6 +74,37 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
|
function tableColumnStart( $align, $colSpan )
|
||||||
|
{
|
||||||
|
echo '<TD align="' . $align . '" colSpan="' . $colSpan . '">';
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
function tableColumnEnd()
|
||||||
|
{
|
||||||
|
echo '</TD>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
function tableRowStart( $vAlign )
|
||||||
|
{
|
||||||
|
echo '<TR vAlign="' . $vAlign . '">';
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
function tableRowEnd()
|
||||||
|
{
|
||||||
|
echo '</TR>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
tableSpacer
|
||||||
|
|
||||||
|
Display a scaled transparent spacer image inside a table heading
|
||||||
|
*/
|
||||||
function tableSpacer( $height, $width, $cols, $bgColor )
|
function tableSpacer( $height, $width, $cols, $bgColor )
|
||||||
{
|
{
|
||||||
echo '<TH colSpan="' . $cols . '" width="' . $width . '" bgColor="' . $bgColor . '">' .
|
echo '<TH colSpan="' . $cols . '" width="' . $width . '" bgColor="' . $bgColor . '">' .
|
||||||
|
@ -77,8 +114,8 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
tableTitle
|
tableTitle
|
||||||
|
|
||||||
Display a
|
Display a colored title in a BoxTable.
|
||||||
*/
|
*/
|
||||||
function tableTitle($name, $cols, $bgColor)
|
function tableTitle($name, $cols, $bgColor)
|
||||||
{
|
{
|
||||||
|
|
8
parts/postamble.php
Normal file
8
parts/postamble.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<? tableSpacer( 1, 9, 1, "black"); ?>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TABLE>
|
||||||
|
<? include("parts/copyright.php"); ?>
|
||||||
|
</TR>
|
||||||
|
</TABLE>
|
||||||
|
</HTML>
|
18
parts/preamble.php
Normal file
18
parts/preamble.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<? // Preamble
|
||||||
|
$sitename = "The QuakeForge Project";
|
||||||
|
require("parts/library.php"); // Load function library
|
||||||
|
require("parts/head.php"); // Load the HEAD and open BODY
|
||||||
|
require("parts/topstrip.php"); // Display top strip
|
||||||
|
require("parts/titletable.php"); // Display main title w/ logos
|
||||||
|
?>
|
||||||
|
<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0">
|
||||||
|
<TR vAlign="top">
|
||||||
|
<?
|
||||||
|
include("parts/menu.php"); // Import left-side menus
|
||||||
|
tableSpacer( 1, 9, 1, "black"); // Separate content from menus
|
||||||
|
?>
|
||||||
|
<TD width="100%">
|
||||||
|
<?
|
||||||
|
include( "parts/topmain.php" ); // Display content top table
|
||||||
|
?>
|
||||||
|
<P>
|
|
@ -1,14 +1,14 @@
|
||||||
<!-- top title table -->
|
<!-- top title table -->
|
||||||
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0 bgcolor="" valign="center">
|
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0 bgcolor="" valign="center">
|
||||||
<TR vAlign="top" bgColor="#4b4f66">
|
<TR vAlign="top" bgColor="<? echo $menuBgColor ?>">
|
||||||
<? tableSpacer( 3, 0, 4, "#4b4f66"); ?>
|
<? tableSpacer( 3, 0, 4, $menuBgColor); ?>
|
||||||
</TR>
|
</TR>
|
||||||
<TR valign="top" bgcolor="#4b4f66">
|
<TR valign="top" bgcolor="<? echo $menuBgColor ?>">
|
||||||
<? tableSpacer( 0, 1, 1, "#4b4f66"); ?>
|
<? tableSpacer( 0, 1, 1, $menuBgColor); ?>
|
||||||
<TD>
|
<TD>
|
||||||
<IMG src="/img/logos/qf-logo.png" alt="QuakeForge" hSpace=0 vSpace=0 border=0 width="70" height="70">
|
<IMG src="/img/logos/qf-logo.png" alt="QuakeForge" hSpace=0 vSpace=0 border=0 width="70" height="70">
|
||||||
</TD>
|
</TD>
|
||||||
<? tableSpacer( 0, 5, 1, "#4b4f66"); ?>
|
<? tableSpacer( 0, 5, 1, $menuBgColor); ?>
|
||||||
<TD width="99%"><!-- right of logo -->
|
<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>
|
<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>
|
||||||
<BR>
|
<BR>
|
||||||
|
|
Loading…
Reference in a new issue