", $item['b']) . "

";} if (is_array($tagArray)){ $tagCode .= '

Tags

'; $tagCode .= parseTagCloud($tagArray, $collectID, 10, 18); } //////// START CODE FOR RHOMBUS (BK) if(isset($item['i']['ca'][102]['content'])) { $allRoutesArray; $responseJSON = ""; $clean_routeID = GetSQLValueString($item['i']['ca'][102]['content'], "text"); $internal_routeID = $item['i']['ca'][102]['content']; mysql_select_db($database_roadtrip_connect, $roadtrip_connect) or die("Unable to connect to roadtrip database."); // GET THE INFO $query_specificRoute = sprintf("SELECT * FROM mapIndex WHERE external_trip_id = %s LIMIT 1", $clean_routeID); $specificRoute = mysql_query($query_specificRoute, $roadtrip_connect) or die(mysql_error); $row_specificRoute = mysql_fetch_assoc($specificRoute); $totalRows_specificRoute = mysql_num_rows($specificRoute); if($totalRows_specificRoute == 1) { $storedMap = $row_specificRoute['external_trip_id']; } $query_autoWaypoints = sprintf("SELECT * FROM autoPoints WHERE external_trip_id = %s ORDER BY auto_order ASC", $clean_routeID); $autoWaypoints = mysql_query($query_autoWaypoints, $roadtrip_connect) or die(mysql_error); $row_autoWaypoints = mysql_fetch_assoc($autoWaypoints); $totalRows_autoWaypoints = mysql_num_rows($autoWaypoints); $routeDistance = $row_specificRoute['distance']; $routeQuicklink = $row_specificRoute['external_ql_id']; $routeActive = $row_specificRoute['active']; $routeApproved = $row_specificRoute['approved']; $routeFlagged = $row_specificRoute['flagged']; $routeAutopoints = array(); $swLat = NULL; $swLon = NULL; $neLat = NULL; $neLon = NULL; do{ $autoPoint = NULL; if($swLat == NULL || $row_autoWaypoints['auto_latitude'] < $swLat) $swLat = $row_autoWaypoints['auto_latitude']; else if($neLat == NULL || $row_autoWaypoints['auto_latitude'] > $neLat) $neLat = $row_autoWaypoints['auto_latitude']; if($swLon == NULL || $row_autoWaypoints['auto_longitude'] < $swLon) $swLon = $row_autoWaypoints['auto_longitude']; else if($neLon == NULL || $row_autoWaypoints['auto_longitude'] > $neLon) $neLon = $row_autoWaypoints['auto_longitude']; $autoPoint->lat = $row_autoWaypoints['auto_latitude']; $autoPoint->lng = $row_autoWaypoints['auto_longitude']; array_push($routeAutopoints, $autoPoint); //$routeAutopoints(".$row_autoWaypoints['auto_latitude'].",".$row_autoWaypoints['auto_longitude']."));\n"; } while($row_autoWaypoints = mysql_fetch_assoc($autoWaypoints)); } if($routeActive == 1) { } //////// END CODE FOR RHOMBUS // code for tabs in design, and pagination for results // extract GET data $tab = isset($_GET['tab']) ? $_GET['tab'] : ROAD_TRIP_PAGE_DEFAULT_TAB_NUMBER_TO_OPEN ; // using numbers instead of text to keep tabs general if (isset($_GET['pageno'])){ $page = $_GET['pageno']; } else if (isset($_GET['page'])){ $page = $_GET['page']; } else{ $page = PAGINATION_DEFAULT_PAGE_NUMBER; } // debug /* echo './trip.php'; var_dump($_GET); var_dump($page); exit; */ // sanitise tab requested if ( ! (($tab == '1') || ($tab == '2') || ($tab == '3') || ($tab == '4') || ($tab == '5')) ){ $tab = ROAD_TRIP_PAGE_DEFAULT_TAB_NUMBER_TO_OPEN; } // sanitise page number requested if( ! preg_match('/^\d+$/', $page)) { $page = PAGINATION_DEFAULT_PAGE_NUMBER; } // set page number and tab in SESSION for use in ./ra-content/plug-ins/yelp-api-data/ // routeId, start stop locations, etc will be set in SESSION after sanitisation in ./ra-content/templates//header.php $_SESSION['pageno'] = $page; $_SESSION['tab'] = $tab; ob_start(); echo helpfulnessAjax(); include "./ra-content/templates/$templateDir/trip.php"; $pageHTML = ob_get_contents(); ob_end_clean(); include "./ra-content/templates/$templateDir/header.php"; echo $pageHTML; include "./ra-content/templates/$templateDir/footer.php"; ?>