Interests
//get main categories (without parents) and make a vertical menu with them
$query_rs = "SELECT * FROM tbl_trip_planner_categories where categoryid_parent=0 order by title_menu asc;";
$rs = mysql_query($query_rs, $conn) or die(mysql_error());
if($rs && mysql_num_rows($rs)> 0){
while ($row_rs = mysql_fetch_assoc($rs)){
echo ' - '.ucfirst($row_rs["title_menu"])."
\n";
}
}
mysql_free_result($rs);
?>

if($tripid . "" != ""){
if(isset($_SESSION["_tripid"]) && $_SESSION["_tripid"] . "" != ""){
?>

}
else{
?>

}
}
?>

if(isset($_SESSION["_tripid"]) && $_SESSION["_tripid"] . "" != ""){
?>

}
?>
if($message . "" != "") {
echo '
'.$message.'
';
}
if($forgotpassword){
?>
Please fill the following fields for retrieving a Trip Plan
}
if($retrievetrip){
//display retrieve trip form
?>
Please fill the following fields for retrieving a Trip Plan
}
if($tripid . "" != ""){
if($savetrip){
//display save trip form
?>
Please fill the following fields for saving the Trip Plan
}
if($trip_name . "" != "") {
?>
SAVED TRIP PLAN: = $trip_name ?>
}
$query_rs = "SELECT tbl_trip_planner_interests.* FROM tbl_trip_planner_interests
inner join tbl_trip_planner_objects on tbl_trip_planner_interests.interestid=tbl_trip_planner_objects.interestid
where tbl_trip_planner_objects.tripid=$tripid order by tbl_trip_planner_objects.objectid asc;";
$rs = mysql_query($query_rs, $conn) or die(mysql_error());
if($rs && mysql_num_rows($rs) > 0){
while ($row_rs = mysql_fetch_assoc($rs)){
//title
echo '
'.$row_rs["title"]."
";
echo '
';
//contact details
echo ''.str_replace("\n", "
", $row_rs["text_contact"]) . "";
if(strpos(strtolower($row_rs["link"]), "http://") === 0) {
echo "
".$row_rs["link"]."\n";
}
echo "\n";
echo '
'.$row_rs["text_description"]."
\n";
}//while
}
else{
if(!$savetrip && !$retrievetrip){
echo '
There are no objects of interest in your Trip Plan
';
}
}
mysql_free_result($rs);
}
else{
if(!$savetrip && !$retrievetrip){
echo '
There are no objects of interest in your Trip Plan