2000-03-19 06:15:10 +00:00
|
|
|
<?
|
|
|
|
/*
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
2000-05-10 22:38:21 +00:00
|
|
|
have ('table');
|
|
|
|
|
2000-03-19 06:15:10 +00:00
|
|
|
/*
|
|
|
|
tableBoxHeader
|
2000-04-28 04:12:18 +00:00
|
|
|
|
2000-03-19 06:15:10 +00:00
|
|
|
Begin a bordered table
|
|
|
|
*/
|
2000-11-13 17:55:00 +00:00
|
|
|
function tableBoxHeader ($bgColor, $borderColor)
|
2000-03-19 06:15:10 +00:00
|
|
|
{
|
|
|
|
echo '<TABLE cellSpacing="0" cellPadding="1" width="100%" border="0" bgColor="' . $borderColor . '">' .
|
|
|
|
' <TR>' .
|
|
|
|
' <TD>' .
|
2000-04-28 04:12:18 +00:00
|
|
|
' <TABLE cellSpacing="1" cellPadding="2" width="100%" border="0" bgColor="' . $bgColor . '">';
|
2000-03-19 06:15:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
tableBoxFooter
|
2000-04-28 04:12:18 +00:00
|
|
|
|
2000-03-19 06:15:10 +00:00
|
|
|
Finish an opened bordered table
|
|
|
|
*/
|
2000-11-13 17:55:00 +00:00
|
|
|
function tableBoxFooter ()
|
2000-03-19 06:15:10 +00:00
|
|
|
{
|
|
|
|
echo ' </TABLE>' .
|
|
|
|
' </TD>' .
|
|
|
|
' </TR>' .
|
|
|
|
'</TABLE>';
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2000-04-28 04:12:18 +00:00
|
|
|
tableHeader
|
|
|
|
|
|
|
|
Begin an unbordered table
|
2000-03-19 06:15:10 +00:00
|
|
|
*/
|
2000-11-13 17:55:00 +00:00
|
|
|
function tableHeader ($width, $bgColor)
|
2000-03-19 06:15:10 +00:00
|
|
|
{
|
2000-04-28 04:12:18 +00:00
|
|
|
echo '<TABLE cellSpacing="0" cellPadding="0" width="' . $width . '" border="0" bgColor="' . $bgColor . '">';
|
2000-03-19 06:15:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2000-04-28 04:12:18 +00:00
|
|
|
tableFooter
|
|
|
|
|
|
|
|
Close an unbordered table
|
2000-03-19 06:15:10 +00:00
|
|
|
*/
|
2000-11-13 17:55:00 +00:00
|
|
|
function tableFooter ()
|
2000-03-19 06:15:10 +00:00
|
|
|
{
|
|
|
|
echo '</TABLE>';
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*/
|
2000-11-13 17:55:00 +00:00
|
|
|
function tableColumnStart ($align, $colSpan)
|
2000-04-28 04:12:18 +00:00
|
|
|
{
|
|
|
|
echo '<TD align="' . $align . '" colSpan="' . $colSpan . '">';
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*/
|
2000-11-13 17:55:00 +00:00
|
|
|
function tableColumnEnd ()
|
2000-04-28 04:12:18 +00:00
|
|
|
{
|
|
|
|
echo '</TD>';
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*/
|
2000-11-13 17:55:00 +00:00
|
|
|
function tableRowStart ($vAlign)
|
2000-04-28 04:12:18 +00:00
|
|
|
{
|
|
|
|
echo '<TR vAlign="' . $vAlign . '">';
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*/
|
2000-11-13 17:55:00 +00:00
|
|
|
function tableRowEnd ()
|
2000-04-28 04:12:18 +00:00
|
|
|
{
|
|
|
|
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)
|
2000-03-19 06:15:10 +00:00
|
|
|
{
|
|
|
|
echo '<TH colSpan="' . $cols . '" width="' . $width . '" bgColor="' . $bgColor . '">' .
|
2000-04-07 17:36:58 +00:00
|
|
|
' <IMG src="/img/blank.gif" height="' . $height . '" width="' . $width . '" border="0" alt="">' .
|
2000-03-19 06:15:10 +00:00
|
|
|
'</TH>';
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
tableTitle
|
2000-04-28 04:12:18 +00:00
|
|
|
|
|
|
|
Display a colored title in a BoxTable.
|
2000-03-19 06:15:10 +00:00
|
|
|
*/
|
2000-11-13 17:55:00 +00:00
|
|
|
function tableTitle ($name, $cols, $bgColor)
|
2000-03-19 06:15:10 +00:00
|
|
|
{
|
|
|
|
echo ' <TR bgColor="' . $bgColor . '" align="center">' .
|
|
|
|
' <TH colspan="' . $cols . '">' .
|
2000-11-13 17:55:00 +00:00
|
|
|
' <SPAN class="titleBar">' . $name . '</SPAN>' .
|
2000-03-19 06:15:10 +00:00
|
|
|
' </TH>' .
|
|
|
|
' </TR>';
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|