if ($what != '') {
    ?>
			<li><a href="#"><?php 
    echo $what;
    ?>
</a></li>
		<?php 
}
?>
	</ul>

	<?php 
$max = 2;
$format = 'json';
//Get All Active APIs
$citygrid = new citygridads($publishercode);
$sponsored = $citygrid->custom_ads_where($what, $where, $max, $format);
if (count($sponsored->ads) > 0) {
    ?>
		<p align="right">sponsored listings</p>
		<table cellpadding="5" cellspacing="5" with="450" align="center" class="zebra-striped">
			<tbody>				
			<?php 
    foreach ($sponsored->ads as $ad) {
        $id = $ad->id;
        $type = $ad->type;
        $listingId = $ad->listingId;
        $name = $ad->name;
        $street = $ad->street;
        $city = $ad->city;
        $state = $ad->state;
        ?>
</strong></a> = <?php 
        echo $review_text;
        ?>
</li><?php 
    }
    ?>
	     </ul>
	     <?php 
}
// Only Display Ads if this record allows, otherwise against TOS / Usage Requirements
if ($display_ad == 1) {
    // Display a Web Ad that is 630 x 100
    $adid = 5;
    $publisher = 'citysearch';
    $citygridad = new citygridads($publishercode);
    ?>
		<div id="detail_ad_slot_<?php 
    echo $adid;
    ?>
" align="center"></div>
		<?php 
    echo $citygridad->display_web_ad_630_100('detail_ad_slot_' . $adid, $publisher, $what, $where);
    ?>
		<br />
		<?php 
}
?>
		
	<p align="center"><a href="/search.php?what=<?php 
echo $what;
$DisplayCount = 1;
$RandomCount = 100;
// choose from random of potentially 50 images
$width = 275;
$flickr = new flickrphotos($FlickrKey);
$photo = $flickr->displayFlickr($FlickrKey, $what, $where, $DisplayCount, $RandomCount, $width);
echo $photo;
?>

					<br />
				
					<?php 
// Display a Web Ad that is 300 x 250
$adid = 1;
$publisher = 'citysearch';
$citygridad = new citygridads($publishercode);
$displayad = $citygridad->display_web_ad_300_250($adid, $publisher, $what, $where);
echo $displayad;
?>
			

					<br />
					
					<?php 
// Display a Single Flickr Photo That is 275 Wide
$FlickrSearch = $where;
// Just doing where
$DisplayCount = 1;
$RandomCount = 100;
// choose from random of potentially 50 images
$width = 275;