Mid & North Coast Accommodations & Attractions

Useful Links - Accommodations & Attractions
Mid & North Coast

=1){ usort($final,'cmpi'); //determine how many records to show in each row //get total size of descriptions $DescriptionSize = 0; $ColSize = 0; for ($c=0; $c < $num; $c++) { $DescriptionSize = $DescriptionSize + strlen($final[$c][Description]); } $Average = $DescriptionSize/$num; for ($c=0; $c < $num; $c++) { //display results $ColSize = $ColSize + strlen($final[$c][Description]); if($ColSize+($ColOffset*$Average) >= $DescriptionSize/2){ //we've reached about halfway $iCol=1; }else{ //we're still on the first column $iCol=0; } $aCol[$iCol] = $aCol[$iCol] . "\n

"; $aCol[$iCol] = $aCol[$iCol] . "".$final[$c][Title].""; //$aCol[$iCol] = $aCol[$iCol] . "
(Added:".(strtotime($final[$c][Added])).", Today:".($today).", Today minus offset:".($today-((($dateNew*24)*60)*60)).")"; if(strtotime($final[$c][Added])>=($today-((($dateNew*24)*60)*60))){ //display a new image $aCol[$iCol] = $aCol[$iCol] . " \"Added"; } $aCol[$iCol] = $aCol[$iCol] . "\n
".$final[$c][Description]."

"; } echo "\n

"; echo "\n"; echo "\n"; echo "\n\n
"; echo "\n\n\n".$aCol[0].""; echo "\n\n\n".$aCol[1]."
"; }else{ //no records found echo "

Like to add a Link?

\n"; echo "

Please let BC Ferries know and we'll be glad to consider it!

\n"; echo "\n\n"; } // compare function function cmpi($a, $b){ global $sort_field; return strcmp($a[Title], $b[Title]); } /* //ADO Version for PHP5 only // Set the query we'll be using on the file. $adoQuery = "SELECT * from " . $csvFile; // Create the ADO connection and ADO recordset $adoConn = new COM("ADODB.Connection") or die("Can't start ADO"); $recordSet = new COM("ADODB.RecordSet") or die("Can't create record set"); // Open the connection and set parameters for the query $adoConn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" . $csvPath . ";Extended Properties=\"text;HDR=YES;FMT=Delimited\""); // Execute the query against the connection (results are stored in the recordset!) $recordSet->Open($adoQuery, $adoConn); // Count the number of field returned in the recordset (allows us to iterate through) $intFieldCount = $recordSet->Fields->Count; // Tabularise the data returned echo ''."\n\t\n"; // I have included a TH for a record count field too! for ($i=0; $i< $intFieldCount; $i++) { echo "\t'."\n\t\t\n"; for ($i=0; $i< $intFieldCount; $i++) { echo "\t\t'."\n"; $j++; $recordSet->MoveNext(); } echo '
Record No.".ucfirst($recordSet->Fields[$i]->Name).""."\n"; } $j = 1; // Set a counter to show record numbers in the record count field. while (!$recordSet->EOF) { echo "\t".'
$j".$recordSet->Fields[$i]->Value.""."\n"; } echo "\t".'
'."\n"; // End tabularising data // Free resources $adoConn->Close(); unset($adoConn); unset($recordSet); */ ?>

(These links relate to our Northern Vancouver Island, Inside Passage, Central Coast and the Queen Charlotte Islands services. See also Travel, Tourism and Community Directories.)

Add your own link?           Report a broken link?

The above links are not endorsements. They are provided for information purposes only.

Transportation Services Links || Vancouver Island Links || Gulf Islands Links
Mainland-Sunshine Coast Links || Mid & North Coast Links 
Travel & Tourism Links || More Links
Useful Links Index