function outputContent($dbAdapter) { $gate = new CountryTableGateway($dbAdapter); $result = $gate->findById($_GET['iso']); echo utf8_encode('<ol class="breadcrumb"> <li><a href="index.php">Home</a></li> <li><a href="browse.php">Browse</a></li> <li><a href="browse-countries.php">Countries</a></li> <li class="active">' . $result->CountryName . '</li> </ol>'); echo '<div class="panel panel-default"> <div class="panel-body">'; echo utf8_encode('<h2>' . $result->CountryName . '</h2> <p>Capital: <b>' . $result->Capital . '</b></p> <p>Area: <b>' . number_format($result->Area) . '</b> sq km.</p> <p>Population: <b>' . number_format($result->Population) . '</b></p> <p>Currency Name: <b>' . $result->CurrencyName . '</b></p> <p>' . $result->CountryDescription . '</p>'); echo '</div> </div>'; ImagesFrom($result->CountryName, $dbAdapter); }
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>'; }