 |
 |
 |
 |
$dbName="victoriabc";
mysql_connect("localhost","mfallen","pdYtfH");
$thisfile="main.php4?area=110";
?>
if($com=="checkinfo"){
$oldtime=time() - 86400;
$oldate = Date("Y-m-d", $oldtime);
$try=mysql($dbName, "delete from calendar where dateend<'$oldate'");
$smonth=$smonth;
$sday=$sday;
$syear=$syear;
?>
| Category
| Title
| Location
| Start Date
| End Date
| More Info
|
$checksdate = mktime(0,0,0,$smonth,$sday,$syear);
$checkedate = mktime(0,0,0,$emonth,$eday,$eyear);
if($checkedate<=883641600){
$checkedate=$checksdate;
}
$ra=mysql(victoriabc, "select * from calendar order by datestart");
$ra_c=mysql_numrows($ra);
$ra_i=0; $mcheck=0;
while($ra_i<$ra_c){
$sdate=mysql_result($ra, $ra_i, "datestart");
$edate=mysql_result($ra, $ra_i, "dateend");
$nyear=substr($sdate,0,4);
$nmonth=substr($sdate,5,2);
$nday=substr($sdate,8,2);
$ndate = mktime(0,0,0,$nmonth,$nday,$nyear);
$oyear=substr($edate,0,4);
$omonth=substr($edate,5,2);
$oday=substr($edate,8,2);
$odate = mktime(0,0,0,$omonth,$oday,$oyear);
if($checkedate>=$ndate){
if($checksdate<=$odate){
$mid=mysql_result($ra, $ra_i, id);
$mtitle=stripslashes(mysql_result($ra, $ra_i, "xname"));
$mloc=stripslashes(mysql_result($ra, $ra_i, "location"));
$mcateg=mysql_result($ra, $ra_i, "categ");
$startdate=date("F dS, Y", mktime(0,0,0,$nmonth,$nday,$nyear));
$enddate=date("F dS, Y", mktime(0,0,0,$omonth,$oday,$oyear));
$xdate=mktime(0,0,0,$omonth,$oday,$oyear);
if($mcateg=="Events"){
$mcol="99CC99";
} elseif($mcateg=="Festivals"){
$mcol="FF99CC";
} elseif($mcateg=="Galleries"){
$mcol="FF9966";
} elseif($mcateg=="Theatres"){
$mcol="FFCC99";
} elseif($mcateg=="Sports"){
$mcol="33CCFF";
} elseif($mcateg=="Music"){
$mcol="99CCFF";
} elseif($mcateg=="Other"){
$mcol="FFCC00";
}
if($categ=="All" || $mcateg==$categ){
?>
" valign="top">
|
echo "$mcateg"; ?>
|
echo "$mtitle"; ?>
|
echo "$mloc"; ?>
|
echo "$startdate";
?>
|
if($xdate>=883641600){
echo "$enddate";
}
?>
|
echo "";
?>
|
}
}
}
$ra_i++;
}
?>
If you have an event you would like to include here,
please e-mail complete info including admission prices, if applicable, to
calendar@victoriabc.com
This calendar brought to you by Internet Vacations BC Ltd www.victoriabc.com and www.bctravel.com
$todaydate = time();
$nextdate = time()+604800;
$mtoday = Date("M d, Y");
$nextweek = Date("M d, Y", $nextdate);
?>
What's happening this week ( echo "$mtoday to $nextweek"; ?>)
|
Category
|
Title
|
Location
|
Start Date
|
End Date
|
More Info
|
$ra=mysql(victoriabc, "select * from calendar order by datestart");
$ra_c=mysql_numrows($ra); $ra_i=0;
$mcheck=0;
while($ra_i<$ra_c){
$sdate=mysql_result($ra, $ra_i, "datestart");
$edate=mysql_result($ra, $ra_i, "dateend");
$nyear=substr($sdate,0,4);
$nmonth=substr($sdate,5,2);
$nday=substr($sdate,8,2);
$ndate = mktime(0,0,0,$nmonth,$nday,$nyear);
$oyear=substr($edate,0,4); $omonth=substr($edate,5,2);
$oday=substr($edate,8,2);
$odate = mktime(0,0,0,$omonth,$oday,$oyear);
if($nextdate>=$ndate){
if($todaydate<=$odate){
$mid=mysql_result($ra, $ra_i, id);
$mtitle=stripslashes(mysql_result($ra, $ra_i, "xname"));
$mloc=stripslashes(mysql_result($ra, $ra_i, "location"));
$mcateg=mysql_result($ra, $ra_i, "categ");
$startdate=date("F dS, Y", mktime(0,0,0,$nmonth,$nday,$nyear));
$enddate=date("F dS, Y", mktime(0,0,0,$omonth,$oday,$oyear));
$xdate=mktime(0,0,0,$omonth,$oday,$oyear);
if($mcateg=="Events"){
$mcol="99CC99"; elseif($mcateg=="Festivals"){
$mcol="FF99CC";
} elseif($mcateg=="Galleries"){
$mcol="FF9966";
} elseif($mcateg=="Theatres"){
$mcol="FFCC99";
} elseif($mcateg=="Sports"){
$mcol="33CCFF";
} elseif($mcateg=="Music"){
$mcol="99CCFF";
} elseif($mcateg=="Other"){
$mcol="FFCC00";
}
?>
" valign="top">
|
echo "$mcateg"; ?>
|
echo "$mtitle"; ?>
|
echo "$mloc"; ?>
|
echo "$startdate"; ?>
|
if($xdate>=883641600){ echo "$enddate"; }
?>
|
echo "";
?>
|
}
}
$ra_i++;
}?>
}
?>
|
|
 |
 |
 |
 |
|