home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
linuxmafia.com 2016
/
linuxmafia.com.tar
/
linuxmafia.com
/
cabal
/
cottonbale.inc
< prev
next >
Wrap
Text File
|
2009-07-12
|
733b
|
52 lines
<?
// change these functions to represent date/time differently
function dateExpand($adate)
{
$d = explode('-', $adate);
$t = mktime(0, 0, 0, $d[1], $d[2], $d[0]);
$date = date("D. M. j", $t);
return $date;
};
?>
<?
function timeExpand($atime, $addap=false) // time as in 1800
{
$rem = $atime % 100;
$hr = (int) ($atime / 100);
$pm = $hr > 12 ? 1 : 0;
$hr = $hr > 12 ? $hr - 12 : $hr;
$hour = (string)$hr;
if ($rem > 0)
{
$hour = $hour . ':' . (string)$rem;
}
if ($addap)
{
$p = $atime < 1200 ? "a" : "p";
$hour = $hour . $p;
}
return $hour;
};
?>
<?
function rowcolor($count)
{
$i = $count % 2;
$fg = ($i == 0 ? "lightsteelblue" : "CCCCCC" );
return $fg;
};
?>