1<?php
2require_once ('getWikiData.php');
3require_once ('getContinent.php');
4require_once ('getErrors.php');
5
6// get county and page
7$countryCode=$_GET["q"];
8$topic=$_GET["p"];
9
10// get Continent
11list ($continent, $country) = getContinent($countryCode);
12
13$html = '<h1> '.ucwords($topic).'</h1>';
14$html .= '<h2 class="indent">' . $country . '</h2>';
15$countryCode = strtolower($countryCode);
16$namespace = $topic;
17$path = $topic . ':earth:' . $continent . ':' . $countryCode;
18$wikiData = pullInWikiData($path, $namespace, $topic);
19if ($wikiData != '')
20  $html .= $wikiData;
21else
22  $html .=  '<p>'. htmlentities($exploreErrors['editPg']['en'], ENT_NOQUOTES) . htmlentities($exploreErrors['ckBack']['en'], ENT_NOQUOTES) .'</p> ';
23$html  .= '<br /><p><a href="doku.php?id='.$path.'"><input type="button" class="button" value="Go to Edit" title="Go To Edit" /></a></p>';
24$html .= htmlentities($exploreErrors['update']['en'], ENT_NOQUOTES);
25
26echo $html;
27
28?>