ob_start();
require_once("define.php");
autoLoad("cropImage.php");
autoLoad("class.SubTravelTheme.php");
autoLoad("class.Tour.php");
autoLoad("class.Destination.php");
$id = 2;
$objTour = new Tour();
$objSubTheme = new SubTravelTheme();
$objDestination=new Destination();
$rsDirectory=$objTour->displayDirectory();
$rsSubtheme=$objSubTheme->subThemesWithImage($id);
$rsIt=$objTour->displaySubThemeItinerary($id);
$rsdestination=$objDestination->displayAll();
$largeImg="";$mediumImg="";$smallImg="";
if(!empty($rsSubtheme) && (mysql_num_rows($rsSubtheme)>0)){
mysql_data_seek($rsSubtheme,0);
$rowSubtheme=mysql_fetch_array($rsSubtheme);
}
$pageTitle = $rowSubtheme["sub_theme_name"];
$pagedesc=html_entity_decode($rowSubtheme["sub_theme_overview"]);
if($rowSubtheme["large_img_url"]!=""){
$largeImg=$rowSubtheme["large_img_url"];
}
if($rowSubtheme["medium_img_url"]!=""){
$mediumImg=$rowSubtheme["medium_img_url"];
}
if($rowSubtheme["small_img_url"]!=""){
$smallImg=$rowSubtheme["small_img_url"];
}
if(!empty($rsdestination)&& mysql_num_rows($rsdestination)){
while($rowdest=mysql_fetch_array($rsdestination)){
$arrdest[$rowdest["id"]]=$rowdest["name"];
}
}
function replaceCityCode($str){
global $arrdest;
$arrtemp = explode(",",$str);
foreach($arrtemp as $k =>$v){
if($v!="")
$arrtemp[$k]= " ".$arrdest[$v];
}
$strNew = implode(" |", $arrtemp);
if(substr($strNew, 0, 3)==" | "){
$strNew = substr($strNew, 2);
}
return $strNew;
}
$fbsharepath=$_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
$allTags = $objTour->displayAllTag();
$arrTags=array();
if(!empty($allTags)&& mysql_num_rows($allTags)){
while($rowTag=mysql_fetch_array($allTags)){
$arrTags[$rowTag["id"]]["tag"]=$rowTag["tag"];
$arrTags[$rowTag["id"]]["page_url"]=$rowTag["page_url"];
}
}
function getTagList($tour_tag){
$arrtemp=array(); global $arrTags; $strTag="";
if (strpos($tour_tag,",") !== false) {
$arrtemp = explode(",",$tour_tag);
}else{
$arrtemp[0]=$tour_tag;
}
if(count($arrtemp)>0){
$ct=1;
foreach($arrtemp as $k=>$v){
$strTag.="".$arrTags[$v]["tag"]."";
if($ct%2==0){
$strTag.="
";
}
$ct++;
}
}
return $strTag;
}
$tripCount="";
$count=mysql_num_rows($rsIt);
if($count>0){
if($count>1){
$tripCount=" [ ".$count." Trips ]";
}else{
$tripCount=" [ ".$count." Trip ]";
}
}
$_SESSION["galleryPath"]=$_SERVER["PHP_SELF"];
?>