<?php
include "inc_config.php";
$url = explode("/",$HTTP_SERVER_VARS[REQUEST_URI]);
$which_page = $url[1];
$name = $url[2];
$letter = $url[3];

$destination = urldecode($req_destination);

function  get_countries_desc($countries)
{
	if($countries != "ALL" && $countries != "")
	{
		// create array from string
		$countries_array=explode(",", $countries);
		// get name of acountries
		$country_count=0;
		foreach($countries_array as $country_code)
		{
			$sql_countries = "SELECT * from countries WHERE country_code='$country_code'";
			if($mysql_result=mysql_query($sql_countries))
			{
				$row=mysql_fetch_array($mysql_result);
				if($country_count == 0)
					$this_destination.=$row[country_name];
				else
					$this_destination.=", ".$row[country_name];
				
				$country_count ++;
			}
		}
	}
	else
		$this_destination = "ALL";
	
	return $this_destination;
}

function displayurl($url)
{
	$pos = strpos($url, '/');
	if ($pos === false)
		return $url;
	else
		return substr($url, 0, $pos);
}

if($name=="name")
{
	//get tourops by name
	if (!$letter)
		$letter = "A";
	
	// Get tourops by name
	$sql = "SELECT * from tourop_list WHERE name LIKE '$letter%' ORDER BY NAME";
	
	if (mysql_num_rows($sql_result = mysql_query($sql)) == 0)
		$tour_output="<p><b>There are no Tour Operators in this category</b></p>";
	else
	{
		// Record exist
		while ($row_tourop = mysql_fetch_array($sql_result))
		{
			 if (strlen($row_tourop[description]) > 120)
				$description = substr($row_tourop[description], 0, 120) . "";
			 else
				$description=$row_tourop[description];
			
			$description=strip_tags($description);
			$tourop_name=urlencode($row_tourop[name]);
			
			$tour_output .= '<p style="margin-top:5px; display:block;"><b><a href="'.$target_server.'/TourOperators/'.$tourop_name.'">'.$row_tourop[name].'</a></b><br/>';
			$tour_output .= $description.' ...<a href="'.$target_server.'/TourOperators/'.$tourop_name.'">more</a></p>';
			unset($description);
		}
		$include_file="inc_tour_search.php";
		$_operator_additional_text="other tour operators";
	}
}
elseif($_POST['tour_search'])
{
	## tour destination name query
	## get codes from destination table
	if (isset($_REQUEST['locations']))
	{
		$extra_sql='  AND ( departure_countries LIKE \'ALL\'';
		$extra_sql.=' OR departure_countries = \'\'';
		$extra_sql.=' OR departure_countries IS NULL';
		foreach ($_REQUEST['locations'] as $location)
		{
			$temp_country_codes=explode(',',$location);
			foreach ($temp_country_codes as $temp_country_code)
			{
				$extra_sql.=' OR';
				$extra_sql.=' departure_countries LIKE \'%'.$temp_country_code.'%\'  ';
			}
		}
		$extra_sql.='  )';
	}
	
	// SEARCH AND SEARCH RESULTS
	$search_string = $_POST['tour_string'];
	$search_string = ucwords($search_string);
	$sql_destination="SELECT country_code from countries WHERE country_name='$search_string'";
	$mysql_result = mysql_query($sql_destination);
	if($mysql_result && (mysql_num_rows($mysql_result) > 0))
	{
		$country = mysql_fetch_array($mysql_result);
		
		// search tourops-list where this destination comes into play
		$sql_tour_dest = "SELECT * from tourop_list WHERE destinations like '%$country[country_code]%'".$extra_sql;
		if($mysql_tour_dest = mysql_query($sql_tour_dest))
		{
			if(mysql_num_rows($mysql_tour_dest) > 0)
			{
		  		// build results
				while($row_tourop = mysql_fetch_array($mysql_tour_dest))
				{
					if (strlen($row_tourop[description]) > 120)
						$description = substr($row_tourop[description], 0, 120) . " ...";
					else
						$description=$row_tourop[description];
					
					$tourop_name=urlencode($row_tourop[name]);
					
					$description=strip_tags($description);
					
					$tour_output.='<p style="margin-bottom:5px; display:block;"><b><a href="'.$target_server.'/TourOperators/'.$tourop_name.'">'.$row_tourop['name'].'</a></b><br/>';
					$tour_output.=$description.' <a href="'.$target_server.'/TourOperators/'.$tourop_name.'">more</a></p>';
					unset($description);
					$_operator_additional_text="other tour operators";
				}
			}
		}
	}
	else
		$tour_output="<p><b>There are no Tour Operators in this category</b></p>";
	
	$include_file="inc_tour_search.php";
}
elseif($name && $name != "name")
{
	// TOUR OPERATOR DETAIL PAGE
	
	// filter out Alphabetical listing with 'name'
	## wanna get the full description here
	$search_name=urldecode($name);
	$sql_description="Select * from tourop_list WHERE name = '$search_name'";
	if($mysql_result = mysql_query($sql_description))
	{
		if(mysql_num_rows($mysql_result) > 0)
		{
			$desc_row = mysql_fetch_array($mysql_result);
			
			if($desc_row[destinations])
			{
				$destinations = get_countries_desc($desc_row[destinations]);
				$departures = get_countries_desc($desc_row[departure_countries]);
			}
			$_operator_additional_text="another tour operator";
			
			$full_output='
		<a name="top"></a>
		<table width="100%" border="0" cellspacing="3" cellpadding="3">';
			
			if ($site_vars['this_site']!='wordtravels')
				$full_output.= '<tr><td colspan="3"><h1>'.$desc_row['name'].'</h1></td></tr><tr>';
			
			$rowCount = 0;
			if (!empty($desc_row['telephone']))
				$rowCount++;
			
			if (!empty($desc_row['fax']))
				$rowCount++;
				
			if (!empty($desc_row['email']))
				$rowCount++;
			
			if (!empty($desc_row['website']))
				$rowCount++;
			
			if($desc_row['telephone'])
			{
				$full_output .='
			<td width="140px" valign="bottom"><b>Tel:</b></td>
			<td valign="bottom">'.$desc_row['telephone'].'</td>
			<td rowspan="'.$rowCount.'" valign="top" align="right">';
			}
		
			if(!empty($desc_row['logo_path']) && file_exists("images/tourops/".$desc_row['logo_path']))
				$full_output.='<img src="'.$target_server.'/images/tourops/'.$desc_row['logo_path'].'" alt="" border="" />';
		
			$full_ouput.='
			</td>
			</tr>
			';
		
			if($desc_row['fax'])
			{
				$full_output.='
				<tr>
				<td><b>Fax:</b></td>
				<td>'.$desc_row['fax'].'</td>
				</tr>';
			}
		
			$full_ouput.='
				</tr>
				<tr>';
		
			if($desc_row['email'])
			{
				$full_output.='<tr>
				<td><b>Email:</b></td>
				<td><a href="mailto:'.$desc_row['name'].'">'.$desc_row['email'].'</a></td>
				</tr>';
			}
		
		
			if($desc_row['website'])
			{
			 	$full_output.='<tr>
				<td><b>Web:</b></td>
				<td><a href="http://www.wordtravels.com/track.php?newttrack='.$desc_row['id'].'" target="_blank">'.displayurl($desc_row['website']).'</a></td>
				</tr>';
			}
			
			$newname=urldecode($name);
			
			if($desc_row['address'])
			{
				$full_output.='<tr>
				<td><b>Address:</b></td>
				<td colspan="2">'.$desc_row['address'].'</td>
				</tr>';
			 }
			
			session_start();
			include_once('captcha/util.php');
			// save the reviews if posted
			if ($_REQUEST['tour_review']=='xyz')
			{
				
			 	// check empty field
				// 
				// do captcha processing
				$text = isset($_SESSION['CAPTCHA_SESSION_KEY'])? $_SESSION['CAPTCHA_SESSION_KEY'] : NULL;
				
				if(!$p=trim($_REQUEST['code']))
					$MESSAGE = '<div style="color: #FF0000;"><strong>Error</strong>: no code submited!!</div>';
				else if(!checkCaptchaCode($p))
					$MESSAGE = '<div style="color: #FF0000;"><strong>Error</strong>: Invalid code submited!! Please try again</div>';
				else
				{
					//
					// save the review;
					$sql = "INSERT INTO tourop_list_reviews (tourop_id, name, emailAddress, date_of_travel, review, created) VALUES (%s, '%s', '%s', '%s' , '%s', NOW())";
					$sql = sprintf($sql, $desc_row[id], mysql_real_escape_string($_REQUEST['reviewName']), mysql_real_escape_string($_REQUEST['reviewEmail']), mysql_real_escape_string($_REQUEST['reviewDateofTravel']), mysql_real_escape_string($_REQUEST['touropReview']));
					
					$res = mysql_query($sql);
					if ($res) 
					{
						$success = 'Thank You! Your review was submitted. It will be approved before it becomes visible on the site.';
						
						$output = 'The following review was posted for :'.$newname."\n\n";
						$output.= $_REQUEST['touropReview']."\n";
						
						// send the review to tourops@wordtravels.com
						if (!preg_match('/wtserver/',$_SERVER['HTTP_HOST']))
						{
							$mailresult = mail ('tourops@wordtravels.com', "Wordtravels: Tour Operator Review Posting: ".stripslashes($_REQUEST["reviewName"]),
											$output,
											"From: ".'tom@wordtravels.com',
											"-f ".'tourops@wordtravels.com');
								
							// temporary
							$mailresult = mail ('tourops@wordtravels.com', "Wordtravels: Tour Operator Review Posting: ".stripslashes($_REQUEST["reviewName"]),
											$output,
											"From: ".'tom@wordtravels.com',
											"-f ".'tourops@wordtravels.com');
						}
						unset($_REQUEST);
					}
					else
						$MESSAGE = '<div style="color: #FF0000;"><strong>Error</strong>: '.mysql_error().' <br/> An Error occured during submital. Please try again</div>';
				
				}
				$_SESSION[CAPTCHA_SESSION_KEY] = NULL;
			 }
			 
			 if($desc_row['description'])
			 {
			 	$full_output.='<tr>
					<td valign="top"><b>Description:</b></td>
					<td colspan="2">'.$desc_row['description'].'</td>
					</tr>';
				
				// check for reviews for this tourop
				$tsql = "SELECT * FROM tourop_list_reviews where tourop_id = ".$desc_row[id]." AND approved=1";
				$tres = mysql_query($tsql);
				if (mysql_num_rows($tres) > 0)
				{
					while ($row = mysql_fetch_array($tres))
						$userReviews[] = $row;
					
				}
				
				//$userReviews = false;
				
				//
				// open review cells and rows
				$full_output.='<tr>
					<td>&nbsp;</td>
					<td colspan="2">';
					
				// script output for toggle review && style for field validation
				$full_output.='
					<script type="text/javascript">
						function toggleAddReview()
						{
							var reviewBox = document.getElementById(\'tOpAddReview\');
							var addReviewLink = document.getElementById(\'addLink\');
							if (reviewBox.style.display == \'none\')
							{
								reviewBox.style.display =\'block\';
								addReviewLink.innerHTML=\'Cancel\';
								addReviewLink.href=\'#tourOpAdd\';
							}
							else
							{
								reviewBox.style.display =\'none\';
								addReviewLink.innerHTML=\'Add A Review\';
								addReviewLink.href=\'#top\';
							}
						}
					</script>
					<style type="text/css">
						input.disabled {
							border: 1px solid #F2F2F2;
							background-color: #F2F2F2;
						}
						
						input.validation-failed, textarea.validation-failed {
							border: 1px solid #FF3300;
							color : #FF3300;
						}
						
						input.validation-passed, textarea.validation-passed {
							border: 1px solid #00CC00;
							color : #000;
						}
						
						.validation-advice {
							margin: 3px 0;
							padding: 3px;
							background-color: #FF3300;
							color : #FFF;
							font-size: 11px;
							font-weight: bold;
						}
						
						.custom-advice {
							margin: 5px 0;
							padding: 5px;
							background-color: #C8AA00;
							color : #FFF;
							font-weight: bold;
						}
						
						fieldset {
							padding: 1em;
							margin-bottom: 0.5em;
						}
						
						label {
							font-weight: bold;
						}
						.form-row {
							clear: both;
							padding: 0.5em;
						}
	
					</style>
				';
					
				// open review box
				$full_output .='
					<div style="border: 1px solid #ddd; padding: 5px; padding-top: 5px; width:95%">
						<table border="0" cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<td>User reviews for <b>'.$newname.'</b> ('.(isset($userReviews) ? count($userReviews) : '0').')</td>
							<td align="right"><a href="#tourOpAdd" onClick="javascript: toggleAddReview();" style="border:1px outset  #555; padding: 1px; display:block; width:120px; text-align:center; color: white; font-weight: bold;  background: #11377E" id="addLink">Add A Review</a></td>
						</tr>';
				
				if (isset($success))
				{
					$full_output.='<tr>
						<td colspan="2"><div style="margin:5px; padding: 3px; background: #837641; color:#FFF;">'.$success.'</div></td>
					</tr>
					';
				}
				
				$full_output .= '
						</table>
						';
				
				if ($userReviews)
				{
					foreach ($userReviews as $review)
					{
						$full_output .='
						<div style="margin-top: 10px; border-top: 1px solid #aaa; padding: 5px;">
							<div><strong>'.stripslashes($review['name']).' '.($review['date_of_travel'] ? '('.stripslashes($review['date_of_travel']).')' : '').'</strong></div>
							<div>'.stripslashes($review['review']).'</div>
						</div>
						';
					}
					
				}
				else
				{
					$full_output .= '
						<div style="margin-top: 10px; border-top: 1px solid #aaa; padding: 5px; font-weight: normal; color: #ff0000; text-align:center;">There are no User Reviews for '.$newname.'</div>
					';
				}
				
				$revName = (empty($_REQUEST['reviewName']) ? '' : $_REQUEST['reviewName']);
				$revEmail = (empty($_REQUEST['reviewEmail']) ? '' : $_REQUEST['reviewEmail']);
				$revDate = (empty($_REQUEST['reviewDateofTravel']) ? '' : $_REQUEST['reviewDateofTravel']);
				$revReview = (empty($_REQUEST['touropReview']) ? '' : $_REQUEST['touropReview']);
				// addreview form
				$full_output .= '
					<a name="tourOpAdd"></a>
					<div style="margin-top: 10px; border-top: 3px solid #aaa; padding: 5px; display:none;" id="tOpAddReview">
					<span style=" "><b>Add your own Review for '.$newname.'</b></span><br/><br/>';
				
				if (isset($MESSAGE))
				{
					$full_output .='
						<br/><div style="border:1px solid #11377E; padding: 4px;">'.$MESSAGE.'</div><br/>
					';
				}
				
				$full_output .= '
					
					<form name="addTourOpReview" id="addReviewForm" action="/TourOperators/Origin+Tours" method="post">
					<input type="hidden" name="emptyField" value="">
					<input type="hidden" name="tour_review" value="xyz">
					<table border="0" cellspacing="2" cellpadding="0" align="center" >
					<tr>
						<td width="125" valign="top"><strong>Name:</strong></td>
						<td><input type="Text" name="reviewName" class="required" value="'.$revName.'" /></td>
					</tr>
					<tr>
						<td valign="top"><strong>Email Address:</strong></td>
						<td><input type="text" name="reviewEmail" class="required validate-email" value="'.$revEmail.'" /></td>
					</tr>
					<tr>
						<td valign="top"><strong>Date of Travel:</strong></td>
						<td><input type="text" name="reviewDateofTravel" value="'.$revDate.'" /></td>
					</tr>
					<tr>
						<td colspan="2" valign="top">
							<strong>Description:</strong><br/>
							<textarea name="touropReview" class="required" cols="63" rows="6">'.$revReview.'</textarea>
						</td>
					</tr>
					<tr>
						<td colspan="2" align="left">
							<div>Enter the code in the field below&nbsp;:</div>
						    <div style="width: 50%; height: 60px;"><img src="/captcha/captcha_image.php" id="captcha-image" alt="captcha image" border="0" /></div>
								if you can\'t read the image text<span> <a href="#" onClick="document.getElementById(\'captcha-image\').src +=\'?\'+ Math.round(Math.random()*100000); return false;" name="reload-captcha" style="" value="click here">Click Here</a></span> to load another one. 
							    <div style="margin-top: 10px; margin-bottom: 10px;"><input type="text" name="code" id="code" /></div>
						    <!--<div> 
						      <input type="submit" class="submit-button" name="CHECK" value="VERIFY" />
						    </div>-->
							<input type="Submit" name="tour_review_button" value="Submit"/></td>
					</tr>
					</table>
					</form>
					</div>';
					
				// close of review box
				$full_output .= '
				</div>
				';
				
				// close review cells & row
				$full_output.='
				</td>
				</tr>';
				
				// add form validation javascript:
				$full_output.='
					<script src="/js/scriptaculous/lib/prototype.js" type="text/javascript"></script>
					<script src="/js/validation.js" type="text/javascript"></script>
					<script src="/js/scriptaculous/src/effects.js" type="text/javascript"></script>
					';
				
				// activate form validation
				$full_output .= '
					<script type="text/javascript">
					     new Validation(\'addReviewForm\'); // OR new Validation(document.forms[0]);
					</script>
				';
				
				// show the form if there is an error message. 
				if (isset($MESSAGE))
				{
					$full_output .='
						<script>
							toggleAddReview();
						</script>
					';
				}
				
			}
			
			if($destinations)
			{
				$newname=urldecode($name);
				$full_output.='
				<tr>
					<td valign="top"><b>Destinations:</b></td>
					<td colspan="2">'.$newname.' specialise in holidays to '.$destinations.'</td>
				</tr>';
			}
			
			if($departures)
			{
				$full_output.='
				<tr>
				    <td valign="top"><b>Departure Countries:</b></td>
				    <td colspan="2">'.$departures.'</td>
			   	</tr>';
			}
			
			if($desc_row['keywords'])
			{
			$full_output.='
				<tr>
				    <td><b>Keywords:</b></td>
				    <td colspan="2">'.$desc_row['keywords'].'</td>
				</tr>';
			}
			
			$full_output.="
				<tr>
				    <td>&nbsp;</td>
				    <td>&nbsp;</td>
				    <td>&nbsp;</td>
				</tr>
			</table>";
		}
	}

}

// includes list of Characters for search
if(!$include_file)
	$include_file="inc_tour_search.php";

//end Ad_hotel information

// NEW TOUR OPERATOR LISTING
$sql_travel = "SELECT * FROM tour_operators WHERE ";

if(!$province_code)
	$sql_travel .= "country_code='$country_code'";
elseif ($req_destination_type == "Provinces")
	$sql_travel .= "province_code='$province_code'";

$sql_travel.=" AND show_in_column='1' LIMIT 1";
$sql_result = mysql_query($sql_travel) or die(mysql_error());

if($sql_result)
	$travel_listing_row=mysql_fetch_array($sql_result);

$meta_title = $newname." Holidays - Tour Operator";
$meta_description = $newname." Travel Holidays - read an independent description of this tour operator. Unbiased travel reviews of $newname and other tour operators.";
$meta_keywords = $newname.", Holidays, Travel, Reviews, description";

// INCLUDE ALL META DATA INTO TEMPLATE
if ($site_vars['include_tpl_top'])
	echo get_tpl($site_vars['include_tpl_top'],$meta_title,$meta_description,$meta_keywords);

## END TOUR OPERATOR LISTING
if (!$site_vars['show_only_body'])
{
?>
<html>
<head>
<title><?php echo $newname." Holidays - Tour Operator" ?></title>
<meta name="description" content="<? echo $newname." Travel Holidays - read an independent description of this tour operator. Unbiased travel reviews of $newname and other tour operators.
"?>">
<meta name="keywords" content="<? echo $newname.", Holidays, Travel, Reviews, description" ?>">
<?php
	
		if ($site_vars['this_site'] == "wordtravels")
		{
?>
<link rel="STYLESHEET" type="text/css" href="/styles/default_new.css">
<?php
		}
		else
		{
?>
<link rel="STYLESHEET" type="text/css" href="/styles/default.css">
<?php
		}
?>
<LINK href="travel_style.css" type=text/css rel=stylesheet>
<?php
	
	
	if ($site_vars['new_styles'])
		include $DOCUMENT_ROOT . $site_vars['new_styles'];
	
?>
<script language="JavaScript">
function popup_window(url, name, width, height)
{var new_window = window.open(url,name,"left=15,top=15,scrollbars=yes,toolbar=no,directories=no,location=no,menubar=no,resizable=no,width="+width+",height="+height)}
</script>
</head>
<body leftmargin="0" topmargin="0">
<?php
}// end !site_vars['show_only_body'];

if ($site_vars['this_site']!='wordtravels')
{

	if ($site_vars['indent_page'])
		echo "<div style=\"padding-left:" . $site_vars['indent_by'] . "px;padding-right:" . $site_vars['indent_by'] . "px;\">\n";

	if ($site_vars['this_site'] == "wordtravels" && !$_COOKIE[aid])
	{
?>
<!-- main table -->
<!-- <table cellpadding=0 cellspacing=0 border=0 align="<?php echo $site_vars['site_align'] ?>" width="<?php echo $site_vars['outer_table_width'] ?>">
<tr>
	<td valign="top">-->
<?php
	}
?>
<!-- end main table -->
<?php
	if ($_COOKIE['aid'])
	{
		echo "<table cellpadding=2 cellspacing=5 border=0 width=\"" .
			$site_vars['table_width'] . "\" align=\"" . $site_vars['site_align'] . "\">\n" .
			"<tr>\n<td bgcolor=\"#ECE9DD\">" .
			"<p>You are logged in as <b>" . $agent_details['name'] . "</b>. <a href=\"" . $PHP_SELF . "?do=logout\">Logout</a>.</p>" .
			"</td>\n</tr>\n</table>";
	}
	
	if ($site_vars['show_header'])
	{
?>
<table cellpadding=0 cellspacing=0 border=0 width="<?php echo $site_vars['table_width'] ?>" align="<?php echo $site_vars['site_align'] ?>">
<tr>
	<td valign="top">
		<div align="left"><a href="/index.php"><img src="<?php echo $site_vars['header_logo'] ?>" border="0" hspace="<?php echo $site_vars['header_hspace'] ?>" vspace="<?php echo $site_vars['header_vspace'] ?>"></a>
	</td>
</tr>
</table>
<?php
	}
?>
<!-- Breadcrumbs -->
<table cellpadding="5" cellspacing="0" border="0" align="<?php echo $site_vars['site_align'] ?>" width="<?php echo $site_vars['table_width'] ?>">
<tr>
	<td>
		<p style="color:#999999">
			<b><a href="/">Travel Guides Home</a> - <a href="/TourOperators">Tour Operators</a><?php if($name!="name"){ ?> - <?php echo $newname ?><?php } ?></b>
			<?php echo $str_title;?>
		</p>
	</td>
</tr>
</table>
<!-- Main Content -->
<table cellpadding="5" cellspacing="2" height="100%"  border="0" width="<?php echo $site_vars['table_width'] ?>" align="<?php echo $site_vars['site_align'] ?>">
<tr>
<td width="<?php echo $site_vars['table_width'] ?>" valign="top">
<?php
	include $DOCUMENT_ROOT . "/includes/".$include_file;
	
	if ($site_vars['this_site'] == "wordtravels" && !$_COOKIE[aid])
	{
?>
<! -- Addition of new Text -->
<?php
		if($site_vars['this_site'] == "wordtravels")
		{
?>
<br>
<script type="text/javascript"><!--
google_ad_client = "pub-8222242022850082";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text_image";
google_color_border = "eeeeee";
google_color_bg = "FFFFFF";
google_color_link = "0000CC";
google_color_url = "0000CC";
google_color_text = "000000";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br style="clear:both;"><br>
<!-- <div style="border: 1px solid black; padding: 3px; background-color: #EFFCFF; text-align: center;">
<a href="<?php echo $myholidayreport_url;?>">Write a review on a recent holiday to enter our weekly PRIZE DRAW.</a>
</div> -->
<?php
		}
?>
<!-- end centre content -->
<?php
	}
?>
		</td>
<?php
	include "inc_right_ads.php";
?>
</tr>
</table>
	<!-- End main table -->
<?php
}
else
if ($site_vars['this_site']=='wordtravels')
{
	include('wtv2/tpl_breadcrumbs.php');
?>
	<div id="guideleft">
		<div id="headerbluebox" style="margin-bottom:8px;">
			<div id="stripe" style="margin-bottom:1px;"></div>
			<div id="guidebluebox"><h1>Tour Operators <em><?php echo ($name!="name" && !empty($name) ? '- '.$newname :'')?></em></h1></div>
			<div id="guidebluecnr"></div>
		</div>
		
		<div id="fullguidecontent">
<?php
	// include the content file
	include $DOCUMENT_ROOT."/includes/".$include_file;
?>
		</div>
	</div>
	<div id="guideright">
		<div id="rt_text">	
<?php
				if (!$_COOKIE['aid'])
				{
?>	
			<script type="text/javascript"><!--
				google_ad_client = "pub-8222242022850082";
				google_ad_channel = "8858128947";
				google_ad_width = 250;
				google_ad_height = 250;
				google_ad_format = "250x250_as";
				google_ad_type = "text_image";
				google_color_border = "FFFFFF";
				google_color_bg = "FFFFFF";
				google_color_link = "7B7543";
				google_color_text = "000000";
				google_color_url = "72179D";
			//--></script>
			<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
					  
<?php
				}
		
				if (!$_COOKIE['aid'])
				{
?>
			<!-- <div class="gold_header">Travel Companies</div> -->
<?php
					$_right_province_code=$province_code;
					$_right_country_code=$country_code;
					$_right_city=$city;
					
					include 'inc_right_col.php';
?>
			<div class="right_column_text_header"></div>
			<script type="text/javascript"><!--
				google_ad_client = "pub-8222242022850082";
				google_ad_channel = "8666194211";
				google_ad_width = 250;
				google_ad_height = 250;
				google_ad_format = "250x250_as";
				google_ad_type = "text_image";
				google_color_border = "FFFFFF";
				google_color_bg = "FFFFFF";
				google_color_link = "7B7543";
				google_color_text = "000000";
				google_color_url = "72179D";
			//--></script>
			
			<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
			
			<!-- <div class="right_column_text_header"></div>
			<b><a href="http://www.airtreks.com/tools/TripPlannerIntro.cgi?ref=GONOMAD&v=31" target="_blank">Around the World Airline Tickets</a></b>-->
<?php
					if( $destination == "London")
					{
?>
			<div class="right_column_text_header"></div>
			<b><a href="http://www.bestwestern.co.uk/bw/hotel-information/london-hotel-break.aspx" target="_blank">London City Break</a></b>
<?php
					}
				}
?>
		</div>
	</div>
<?php
}
	include "inc_footer.php";

	if ($site_vars['include_tpl_btm'])
		echo get_tpl($site_vars['include_tpl_btm']);
	
	if ($site_vars['indent_page'])
		echo "</div>";
	
	if (!$site_vars['show_only_body'])
	{
		if ($site_vars['this_site'] == "wordtravels" && !$_COOKIE[aid])
		{
?>
	</td>
</tr>
</table>
<?php
		}
?>
</body>
</html>
<?php
	}
?>