|
Maine Coastal Program

The Maine Coastal Program works to sustain Maine's coastal resources and maritime economy (more about
MCP).
New & Noteworthy:
Maine Coastlinks Goes Online
The popular Maine Coastlinks directory, containing information on organizations involved in coastal issues throughout Maine, is now available online.
|
|
# Process Calendar:
# First figure out if I'm in a division:
$lDivQuery = mysql_query ("select * from divisions") or trigger_error("MySQL error # ".mysql_errno().": ".mysql_error(), E_USER_ERROR);
$reldir = substr ($HTTP_SERVER_VARS['PHP_SELF'], strlen ($siteroot));
$div = 0;
while ($lDivData = mysql_fetch_assoc ($lDivQuery)) {
if (substr ($reldir, 1, strlen($lDivData['directory'])) == $lDivData['directory']) {
$div = $lDivData['id'];
break;
}
}
$sql = "select *, unix_timestamp(begin) as ts_begin from calendar where active='on' and begin>='" . date ('Y-m-d') . "'";
if ($div > 0) {
$sql .= " and division_id=" . $div;
}
$sql .= " order by begin limit 3";
$lEventQuery = mysql_query ($sql) or trigger_error("MySQL error # ".mysql_errno().": ".mysql_error(), E_USER_ERROR);
if (mysql_num_rows ($lEventQuery) > 0) {?>
}?>
|