<% require("/var/www/webhosts-script/www.tartanowners.org/private/phpheaders/main.phtml"); if (isset($mystic)) { $view = 'MYS'; $go = 'Go'; $ord = 'w'; } if($ord=='' || $ord == 'modified') { $order['harbor_info.record_modification'] = $gTONEDBSortDesc; $order['harbor_info.id'] = $gTONEDBSortDesc; } elseif($ord == 'boatname') { $order['harbor_info.boat_name'] = $gTONEDBSortAsc; $order['harbor_info.record_modification'] = $gTONEDBSortDesc; } elseif($ord == 'harbor') { $order['harbor_info.harbor'] = $gTONEDBSortAsc; $order['harbor_info.record_modification'] = $gTONEDBSortDesc; } elseif($ord == 'category') { $order['harbor_info.category'] = $gTONEDBSortAsc; $order['harbor_info.record_modification'] = $gTONEDBSortDesc; } elseif($ord == 'activity') { $order['harbor_info.activity'] = $gTONEDBSortAsc; $order['harbor_info.record_modification'] = $gTONEDBSortDesc; } elseif($ord == 'n') { $order['harbor_info.lat'] = $gTONEDBSortDesc; } elseif($ord == 's') { $order['harbor_info.lat'] = $gTONEDBSortAsc; } elseif($ord == 'e') { $order['harbor_info.lon'] = $gTONEDBSortDesc; } elseif($ord == 'w') { $order['harbor_info.lon'] = $gTONEDBSortAsc; } if($val && $filter) unset($filter); if($filter) { if(strlen($filter) < 2) { unset($filter); } else { $url_forward[] = 'filter=' . urlencode($filter); $where[]['(']=''; $where[]['harbor_info.category']=array( 'op' => ' like ', 'val' => "%$filter%" ); $where[]['harbor_info.activity']=array( 'op' => ' like ', 'val' => "%$filter%", 'prec' => ' or ' ); $where[][')']=''; } } if($val) { if(strlen($val) < 2) { unset($val); } else { $url_forward[] = 'val=' . urlencode($val); $where[]['(']=''; $where[]['harbor_info.comment']=array( 'op' => ' like ', 'val' => "%$val%" ); $where[]['harbor_info.harbor']=array( 'op' => ' like ', 'val' => "%$val%", 'prec' => ' or ' ); $where[]['harbor_info.boat_name']=array( 'op' => ' like ', 'val' => "%$val%", 'prec' => ' or ' ); $where[]['harbor_info.activity']=array( 'op' => ' like ', 'val' => "%$val%", 'prec' => ' or ' ); $where[][')']=''; } } if($action=='date') { $url_forward[] ='action=date&val=' . $val; if($ord == 'created') { $where[]['harbor_info.record_creation']=array( 'op' => '>=', 'val' => $val ); } else { $where[]['harbor_info.record_modification']=array( 'op' => '>=', 'val' => $val ); } } $result_harborinfo = TONEHarborInfoGetResult('', $order, $where); if($result_harborinfo < 0) { $rows = false; } else { $rows = true; } if($debug) $url_forward[] ='debug=' . $debug; if(count($url_forward)) $forward = TONETextMakeFromList($url_forward, '', '&', false, '', false); # search term highlighter function highlight($search, $text_in, $hl_start='', $hl_end=''){ $subject = TONETextDisplay($text_in, true, false); $search = TONETextDisplay($search, false, false); $srchlen = strlen($search); if ($srchlen < 2 || strlen($subject) <= $srchlen){ $text_out = $subject; } else { $text_out = ''; $find = $subject; while ($find = stristr($find,$search)){ $srchtxt = substr($find,0,$srchlen); $text_out .= substr($subject,0,strlen($subject)-strlen($find)) . $hl_start . $srchtxt . $hl_end; $find = substr($find,$srchlen); $subject = $find; } $text_out .= $subject; } return $text_out; } # map functions $mapvars['GLK'] = array (43.250,-82.900,9.9); $mapvars['MCM'] = array (44.050,-68.875,2.6); $mapvars['SCM'] = array (43.059,-70.709,2.6); $mapvars['CCB'] = array (42.119,-70.729,1.5); $mapvars['CCI'] = array (41.599,-70.596,1.5); $mapvars['RIS'] = array (41.536,-71.286,1.0); $mapvars['LIS'] = array (41.000,-72.900,2.5); $mapvars['ELI'] = array (41.095,-72.405,1.1); $mapvars['WLI'] = array (40.900,-73.450,1.3); $mapvars['NYC'] = array (39.875,-74.351,2.6); $mapvars['CBY'] = array (38.500,-76.000,4.0); $mapvars['UCB'] = array (39.250,-76.050,1.3); $mapvars['LCB'] = array (38.550,-76.250,1.3); $mapvars['GSC'] = array (33.423,-79.204,12); $mapvars['FLA'] = array (27.335,-84.267,12); $mapvars['SCA'] = array (33.400,-117.95,2.6); $mapvars['MYS'] = array (41.335,-71.984,0.2); if ($view && isset($go)) { $lat = $mapvars[$view][0]; $lon = $mapvars[$view][1]; $wid = $mapvars[$view][2]; unset($view); } $expand = ($lat && $lon && $wid) ? 1 : 0; if (!$expand) { $lat = 37; $lon = -96; $wid = 50; } if (!$op) $op = 'in'; $maxwid = 50; $minwid = 0.05; $ht = $wid * 26 / 50; $ref_lat = 24; if ($mapimg_x || $mapimg_y) { $xoffset = $mapimg_x / 399; $yoffset = $mapimg_y / 229; $lat = $lat + ($ht / 2) - ($ht * $yoffset); $xscalar = $wid * cos(deg2rad($ref_lat)) / cos(deg2rad($lat)); $lon = $lon - ($xscalar / 2) + ($xscalar * $xoffset); $lat = round($lat,3); $lon = round($lon,3); if ($op == "in") { $wid /= 3; $ht /= 3; } if ($op == "out") { $wid *= 3; $ht *= 3; } $wid = round($wid,3); $ht = round($ht,3); } # set up zoom bar $maxzoom = ($wid >= $maxwid) ? 1 : 0; $minzoom = ($wid <= $minwid) ? 1 : 0; if ($minzoom || $maxzoom) { $wid = ($maxwid * $maxzoom) + ($minwid * $minzoom); $ht = $wid * 26 / 50; } $zwht = ''; $zgrn = ''; for ($i=$maxwid; $i>$minwid; $i /= 3) { $zimg[] = ($wid < $i) ? $zgrn : $zwht; } $zimg[] = ($minzoom) ? $zgrn : $zwht; $zimgsrc = implode('',$zimg); # page forwards and status messages $enc_filter = urlencode($filter); $enc_val = urlencode($val); $ord_fwd = ($ord) ? '&ord=' . $ord : ''; $map_fwd = "lat=$lat&lon=$lon&wid=$wid&op=$op&label=$label&filter=$enc_filter&val=$enc_val"; $sort_lbl['n'] = 'North to South'; $sort_lbl['s'] = 'South to North'; $sort_lbl['e'] = 'East to West'; $sort_lbl['w'] = 'West to East'; # get map image $murl = "http://www.tartanowners.org/maps/ttxhn.php?"; $ttx = "ttx=$lat:$lon:$wid:$label:$enc_filter:$enc_val"; $murl .= $ttx; $mapimgsrc = "http://tiger.census.gov/cgi-bin/mapgen?"; $imgparams = "lat=$lat&lon=$lon&wid=$wid&ht=$ht&iht=230&iwd=400"; $mapimgsrc .= $imgparams; $mapimgsrc .= "&murl=$murl"; $mtechsrc = "http://mapserver.maptech.com/bp/mapserver/index.cfm?type=0&scale=40000&zoom=50"; %> Tartan Owners Harbor Notes

Tartan Owners Harbor Notes

These harbor notes are provided by owners based on their local knowledge or experience. They include information about a local harbor, cove or anchorage, navigation, anchoring, shoreside features and activities, transit notes, etc.

Click the map or harbor to zoom on a locale.
  • Notes auto-expand when map is zoomed. Click:
    for nautical chart.
    for print view.
View, Filter or Find then "Go"
 
Notes: <%=($filter || $val) ? '= ' . $filter . TONETextDisplay($val, false, false) : 'All Categories';%>
Order: <%=(!$ord) ? 'Most Recent' : $sort_lbl[$ord];%>
Zoom:
<%=($minzoom) ? " disabled" : "";%>>in <%=($maxzoom) ? " disabled" : "";%>>out >pan
Zoom Level:
- <%=$zimgsrc;%> +
Map Labels:
>activity >off
<% if (!$expand): %> <% if($rows): $count=1; while($the_harborinfo = mysql_fetch_object($result_harborinfo)): $color = ($count % 2) ? '#ffffff' : '#f5f5f5'; $hbr_wid = ($wid >= 2) ? 0.2 : 0.05; $hbr_fwd = "lat=$the_harborinfo->lat&lon=$the_harborinfo->lon&wid=$hbr_wid&ord=$ord&label=$label&op=$op&filter=$enc_filter&val=$enc_val"; %> <% $count++; endwhile; endif; %>
Harbor Category Activity Experience Boat Name
<%=TONETextDisplay($the_harborinfo->harbor);%> <%=$the_harborinfo->category;%> <%=$the_harborinfo->activity;%> <%=$the_harborinfo->experience;%> <%=$the_harborinfo->boat_name;%>
<% endif; %> <% if ($expand): %> <% if($rows): $count=1; while($the_harborinfo = mysql_fetch_object($result_harborinfo)): $color = ($count % 2) ? '#ffffff' : '#f5f5f5'; $mtech_fwd = "&lat=$the_harborinfo->lat&lon=$the_harborinfo->lon"; $mtech_fwd .= "&icon=crosshair_red_16_16_-8_-8|$the_harborinfo->lat|$the_harborinfo->lon||^$the_harborinfo->activity"; $coords = round($the_harborinfo->lat,3) . ', ' . round($the_harborinfo->lon,3); $y = (229 / $ht) * ($lat - $the_harborinfo->lat) + (229 / 2); $xscalar_hbr = $wid * cos(deg2rad($ref_lat)) / cos(deg2rad($the_harborinfo->lat)); $x = (399 / $xscalar_hbr) * ($the_harborinfo->lon - $lon) + (399 / 2); $centered = ($x >= 190 && $x <= 210 && $y >= 105 && $y <= 125) ? 1 : 0; $visible = ($x >= 0 && $x <= 399 && $y >= 0 && $y <= 229) ? 1 : 0; if ($centered) $color = '#CCCCFF'; if ($visible): $hbr_wid = ($wid >= 2) ? 0.2 : 0.05; $hbr_fwd = "lat=$the_harborinfo->lat&lon=$the_harborinfo->lon&wid=$hbr_wid&ord=$ord&label=$label&op=$op&filter=$enc_filter&val=$enc_val"; %> <% $count++; endif; endwhile; endif; %>
Display Nautical Chart
Printer Friendly View
Click for Photo Category
Harbor
Coordinates
Activity
Boat Name
Experience
Comment
Date

<%=TONEItemHasPhoto($the_harborinfo->image_id, $the_harborinfo->imagepre_id);%>
 
<%=$the_harborinfo->category;%>
<%=TONETextDisplay($the_harborinfo->harbor);%>
<%=$coords;%>
<%=$the_harborinfo->activity;%>
<%=$the_harborinfo->boat_name;%>
<%=$the_harborinfo->experience;%>
<%=highlight($val, $the_harborinfo->comment);%>
(Last Entry: <%=date("m-d-y", $the_harborinfo->record_modification);%>)
<% endif; %>
Owner Actions:

Click To Print This List 

 

Note: Active Owner Profile required to access these features.