website/lib/table.php
Jeff Teunissen 06ed1cd973 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. :)
2000-04-28 04:12:18 +00:00

129 lines
2.6 KiB
PHP

<?
/*
table.php
Table function library
Copyright (C) 2000 Contributors of the QuakeForge Project
Please see the file "AUTHORS" for a list of contributors
This program 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.
This program 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 this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA.
*/
/*
tableBoxHeader
Begin a bordered table
*/
function tableBoxHeader( $bgColor, $borderColor )
{
echo '<TABLE cellSpacing="0" cellPadding="1" width="100%" border="0" bgColor="' . $borderColor . '">' .
' <TR>' .
' <TD>' .
' <TABLE cellSpacing="1" cellPadding="2" width="100%" border="0" bgColor="' . $bgColor . '">';
}
/*
tableBoxFooter
Finish an opened bordered table
*/
function tableBoxFooter()
{
echo ' </TABLE>' .
' </TD>' .
' </TR>' .
'</TABLE>';
}
/*
tableHeader
Begin an unbordered table
*/
function tableHeader( $width, $bgColor )
{
echo '<TABLE cellSpacing="0" cellPadding="0" width="' . $width . '" border="0" bgColor="' . $bgColor . '">';
}
/*
tableFooter
Close an unbordered table
*/
function tableFooter()
{
echo '</TABLE>';
}
/*
*/
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 )
{
echo '<TH colSpan="' . $cols . '" width="' . $width . '" bgColor="' . $bgColor . '">' .
' <IMG src="/img/blank.gif" height="' . $height . '" width="' . $width . '" border="0" alt="">' .
'</TH>';
}
/*
tableTitle
Display a colored title in a BoxTable.
*/
function tableTitle($name, $cols, $bgColor)
{
echo ' <TR bgColor="' . $bgColor . '" align="center">' .
' <TH colspan="' . $cols . '">' .
' <SPAN class="titlebar">' . $name . '</SPAN>' .
' </TH>' .
' </TR>';
}
?>