website/lib/table.php

132 lines
2.7 KiB
PHP
Raw Normal View History

<?
/*
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.
*/
have ('table');
/*
tableBoxHeader
Begin a bordered table
*/
2000-11-13 17:55:00 +00:00
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
*/
2000-11-13 17:55:00 +00:00
function tableBoxFooter ()
{
echo ' </TABLE>' .
' </TD>' .
' </TR>' .
'</TABLE>';
}
/*
tableHeader
Begin an unbordered table
*/
2000-11-13 17:55:00 +00:00
function tableHeader ($width, $bgColor)
{
echo '<TABLE cellSpacing="0" cellPadding="0" width="' . $width . '" border="0" bgColor="' . $bgColor . '">';
}
/*
tableFooter
Close an unbordered table
*/
2000-11-13 17:55:00 +00:00
function tableFooter ()
{
echo '</TABLE>';
}
/*
*/
2000-11-13 17:55:00 +00:00
function tableColumnStart ($align, $colSpan)
{
echo '<TD align="' . $align . '" colSpan="' . $colSpan . '">';
}
/*
*/
2000-11-13 17:55:00 +00:00
function tableColumnEnd ()
{
echo '</TD>';
}
/*
*/
2000-11-13 17:55:00 +00:00
function tableRowStart ($vAlign)
{
echo '<TR vAlign="' . $vAlign . '">';
}
/*
*/
2000-11-13 17:55:00 +00:00
function tableRowEnd ()
{
echo '</TR>';
}
/*
tableSpacer
Display a scaled transparent spacer image inside a table heading
*/
2000-11-13 17:55:00 +00:00
function tableSpacer ($width, $height, $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.
*/
2000-11-13 17:55:00 +00:00
function tableTitle ($name, $cols, $bgColor)
{
echo ' <TR bgColor="' . $bgColor . '" align="center">' .
' <TH colspan="' . $cols . '">' .
2000-11-13 17:55:00 +00:00
' <SPAN class="titleBar">' . $name . '</SPAN>' .
' </TH>' .
' </TR>';
}
?>