function filterCity($dbAdapter) { $gate = new CityTableGateway($dbAdapter); $result = $gate->findCitiesWithImages(); foreach ($result as $row) { echo '<option value="' . $row->GeoNameID . '">'; echo $row->AsciiName; echo '</option>'; } }
function ImageDetailsPanel($cityCode, $countryCode, $dbAdapter) { $gateCountry = new CountryTableGateway($dbAdapter); $gateCity = new CityTableGateway($dbAdapter); $cityName = $gateCity->findById($cityCode)->AsciiName; $countryName = $gateCountry->findById($countryCode)->CountryName; $countryCodeISO = $gateCountry->findById($countryCode)->CountryCodeISO; echo '<div class="panel panel-info"> <div class="panel-heading">Image Details</div> <div class="panel-body">'; echo utf8_encode('<p>' . $cityName . ', <a href="single-country.php?iso=' . $countryCode . '">' . $countryName . '</a></p>'); echo '</div> </div>'; }