home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
linuxmafia.com 2016
/
linuxmafia.com.tar
/
linuxmafia.com
/
cabal
/
test.php~
< prev
Wrap
Text File
|
2009-07-12
|
1KB
|
71 lines
<?php
// if you want to do more or less than three months, change that here
$nummonths = 3;
require("cottonbale.inc");
require("dbstart.inc");
require("header.inc");
// make the dates for the months of the events
for ($i=0; $i< ($nummonths + 1); $i++)
{
$t = mktime(0,0,0,date("m")+$i,1, date("Y"));
$months[$i] = date("M", $t);
$years[$i] = date("Y", $t);
$dates[$i] = date("Y-m-d", $t);
}
// now put in the html for the tables
for ($i=0; $i<$nummonths; $i++)
{
require("monthhead.inc");
$j = $i + 1;
$query = "select edate, starttime, endtime, ecity, ename, ";
$query .= "description from events where edate >= '$dates[$i]' ";
$query .= "and edate <= '$dates[$j]' ";
$query .= "and gname = 'cabal' order by edate, starttime";
$res = mysql_query($query);
while(list($edate, $start, $end, $city, $name, $descrip)=mysql_fetch_row($res))
{
echo "<tr><td";
echo $start == 0 ? "><em>" : " class=\"str\">";
echo dateExpand($edate);
echo $start == 0 ? "</em></td><td" : "</td><td";
if ($start == 0)
{
echo "><center>-</center>";
}
else
{
echo " class=\"str\">";
echo timeExpand($start, true);
echo "-";
echo timeExpand($end, true);
echo "";
}
echo "</td><td>$city</td><td>$descrip</td></tr>\n";
}
echo "</table>\n\n\n";
}
require("footer.inc");
?>