]> git.openstreetmap.org Git - nominatim.git/commitdiff
factor out link formatting function and osm type translation
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 12 Jun 2016 10:39:09 +0000 (12:39 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 12 Jun 2016 10:39:09 +0000 (12:39 +0200)
16 files changed:
lib/output.php [new file with mode: 0644]
lib/template/address-json.php
lib/template/address-jsonv2.php
lib/template/address-xml.php
lib/template/details-error-html.php
lib/template/details-html.php
lib/template/search-batch-json.php
lib/template/search-json.php
lib/template/search-jsonv2.php
lib/template/search-xml.php
website/deletable.php
website/details.php
website/hierarchy.php
website/polygons.php
website/reverse.php
website/search.php

diff --git a/lib/output.php b/lib/output.php
new file mode 100644 (file)
index 0000000..722d73b
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+
+       function formatOSMType($sType, $bIncludeExternal=true)
+       {
+               if ($sType == 'N') return 'node';
+               if ($sType == 'W') return 'way';
+               if ($sType == 'R') return 'relation';
+
+               if (!$bIncludeExternal) return '';
+
+               if ($sType == 'T') return 'tiger';
+               if ($sType == 'I') return 'way';
+
+               return '';
+       }
+
+       function osmLink($aFeature, $sRefText=false)
+       {
+               $sOSMType = formatOSMType($aFeature['osm_type'], false);
+               if ($sOSMType)
+               {
+                       return '<a href="//www.openstreetmap.org/'.$sOSMType.'/'.$aFeature['osm_id'].'">'.$sOSMType.' '.($sRefText?$sRefText:$aFeature['osm_id']).'</a>';
+               }
+               return '';
+       }
+
+       function wikipediaLink($aFeature)
+       {
+               if ($aFeature['wikipedia'])
+               {
+                       list($sLanguage, $sArticle) = explode(':',$aFeature['wikipedia']);
+                       return '<a href="https://'.$sLanguage.'.wikipedia.org/wiki/'.urlencode($sArticle).'" target="_blank">'.$aFeature['wikipedia'].'</a>';
+               }
+               return '';
+       }
+
+       function detailsLink($aFeature, $sTitle=false)
+       {
+               if (!$aFeature['place_id']) return '';
+
+               return '<a href="details.php?place_id='.$aFeature['place_id'].'">'.($sTitle?$sTitle:$aFeature['place_id']).'</a>';
+       }
+
index 38db01c8626e2b1b9675583a42ee9bbe664270ba..bf6c700bf580acaec788671cbf734a8167613db0 100644 (file)
@@ -12,8 +12,7 @@
        {
                if (isset($aPlace['place_id'])) $aFilteredPlaces['place_id'] = $aPlace['place_id'];
                $aFilteredPlaces['licence'] = "Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright";
-               $sOSMType = ($aPlace['osm_type'] == 'N'?'node':($aPlace['osm_type'] == 'W'?'way':($aPlace['osm_type'] == 'R'?'relation':
-               ($aPlace['osm_type'] == 'T'?'tiger':($aPlace['osm_type'] == 'I'?'interpolation':'')))));
+               $sOSMType = formatOSMType($aPlace['osm_type']);
                if ($sOSMType)
                {
                        $aFilteredPlaces['osm_type'] = $sOSMType;
@@ -50,8 +49,6 @@
                {
                        $aFilteredPlaces['geokml'] = $aPlace['askml'];
                }
-
-
        }
 
        javascript_renderData($aFilteredPlaces);
index 2cef5e31ff9dd3340bfd7864af23d2f85badc3cf..d62141769b89cc33ecc26e19fb6e03d585f95b74 100644 (file)
@@ -12,8 +12,7 @@
        {
                if ($aPlace['place_id']) $aFilteredPlaces['place_id'] = $aPlace['place_id'];
                $aFilteredPlaces['licence'] = "Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright";
-               $sOSMType = ($aPlace['osm_type'] == 'N'?'node':($aPlace['osm_type'] == 'W'?'way':($aPlace['osm_type'] == 'R'?'relation':
-               ($aPlace['osm_type'] == 'T'?'tiger':($aPlace['osm_type'] == 'I'?'interpolation':'')))));
+               $sOSMType = formatOSMType($aPlace['osm_type']);
                if ($sOSMType)
                {
                        $aFilteredPlaces['osm_type'] = $sOSMType;
index 5e74846e26c5864f496553100c16d2cee96e2c19..2bfcffbf5ac0b3a3d8bb6b0e646e3139b5b90697 100644 (file)
@@ -22,8 +22,7 @@
        {
                echo "<result";
                if ($aPlace['place_id']) echo ' place_id="'.$aPlace['place_id'].'"';
-               $sOSMType = ($aPlace['osm_type'] == 'N'?'node':($aPlace['osm_type'] == 'W'?'way':($aPlace['osm_type'] == 'R'?'relation':
-               ($aPlace['osm_type'] == 'T'?'tiger':($aPlace['osm_type'] == 'I'?'interpolation':'')))));
+               $sOSMType = formatOSMType($aPlace['osm_type']);
                if ($sOSMType) echo ' osm_type="'.$sOSMType.'"'.' osm_id="'.$aPlace['osm_id'].'"';
                if ($aPlace['ref']) echo ' ref="'.htmlspecialchars($aPlace['ref']).'"';
                if (isset($aPlace['lat'])) echo ' lat="'.htmlspecialchars($aPlace['lat']).'"';
index 545dc52bd8dcc27d3c1fd9af942d96d247586e73..f93cca4d6917240147c98598a8567ce9c29e2abe 100644 (file)
@@ -9,26 +9,21 @@
 
 <?php
 
-       function osm_link($aFeature)
-       {
-               $sOSMType = ($aFeature['osm_type'] == 'N'?'node':($aFeature['osm_type'] == 'W'?'way':($aFeature['osm_type'] == 'R'?'relation':'')));
-               if ($sOSMType) {
-                       return '<a href="http://www.openstreetmap.org/'.$sOSMType.'/'.$aFeature['osm_id'].'">'.$sOSMType.' '.$aFeature['osm_id'].'</a>';
-               }
-               return '';
-       }
-
-       function osm_map_url($aFeature)
+       function osmMapUrl($aFeature)
        {
                $sLon = $aFeature['error_x'];
                $sLat = $aFeature['error_y'];
 
-               if (isset($sLat))
+               if (isset($sFeature['error_x']) && isset($sFeature['error_y']))
                {
-                       $sOSMType = ($aFeature['osm_type'] == 'N'?'node':($aFeature['osm_type'] == 'W'?'way':($aFeature['osm_type'] == 'R'?'relation':'')));
+                       $sBaseUrl = '//www.openstreetmap.org/';
+                       $sOSMType = formatOSMType($aFeature['osm_type'], false);
                        if ($sOSMType)
                        {
-                               return "http://www.openstreetmap.org/?lat=".$sLat."&lon=".$sLon."&zoom=18&layers=M&".$sOSMType."=".$aFeature['osm_id'];
+                               $sBaseUrl += $sOSMType.'/'.$aFeature['osm_id'];
+                       }
+
+                               return '<a href="'.$sBaseUrl.'?mlat='.$sLat.'&mlon='.$sLon.'">view on osm.org</a>';
                        }
                }
                return '';
@@ -45,7 +40,7 @@
                        return "http://localhost:8111/load_and_zoom?left=".($sLon-$fWidth)."&right=".($sLon+$fWidth)."&top=".($sLat+$fWidth)."&bottom=".($sLat-$fWidth);
                }
 
-               $sOSMType = ($aFeature['osm_type'] == 'N'?'node':($aFeature['osm_type'] == 'W'?'way':($aFeature['osm_type'] == 'R'?'relation':'')));
+               $sOSMType = formatOSMType($aFeature['osm_type'], false);
                if ($sOSMType)
                {
                        return 'http://localhost:8111/import?url=http://www.openstreetmap.org/api/0.6/'.$sOSMType.'/'.$aFeature['osm_id'].'/full';
@@ -63,7 +58,7 @@
 
                if (isset($sLat))
                {
-                       return "http://www.openstreetmap.org/edit?editor=potlatch2&bbox=".($sLon-$fWidth).",".($sLat-$fWidth).",".($sLon+$fWidth).",".($sLat+$fWidth);
+                       return "//www.openstreetmap.org/edit?editor=potlatch2&bbox=".($sLon-$fWidth).",".($sLat-$fWidth).",".($sLon+$fWidth).",".($sLat+$fWidth);
                }
                return '';
        }
@@ -87,7 +82,7 @@
                                        </div>
 
                                        <div>
-                                               OSM: <span class="label"><?php echo osm_link($aPointDetails); ?><span>
+                                               OSM: <span class="label"><?php echo osmLink($aPointDetails); ?><span>
                                        </div>
 
 
@@ -95,9 +90,7 @@
                                        <p>
                                                <?php echo $aPointDetails['errormessage']?$aPointDetails['errormessage']:'unknown'; ?>
                                        </p>
-                                       <?php if (osm_map_url($aPointDetails)) { ?>
-                                               <a href="<?php echo osm_map_url($aPointDetails); ?>">view on osm.org</a>
-                                       <?php } ?>
+                                       <?php echo osmMapUrl($aPointDetails); ?>
 
                                        <h4>Edit</h4>
                                        <ul>
index 7d9696b8b318a882125601dccdec7317b0cc4ead..71fcc7b3e0a0aa67c61151ce496e2c5dd02bba10 100644 (file)
@@ -7,7 +7,6 @@
 </head>
 
 
-
 <?php
 
        function headline($sTitle)
                echo "<tr class='all-columns'><td colspan='6'><h3>".$sTitle."</h3></td></tr>\n";
        }
 
-       function osm_link($aFeature)
-       {
-               $sOSMType = ($aFeature['osm_type'] == 'N'?'node':($aFeature['osm_type'] == 'W'?'way':($aFeature['osm_type'] == 'R'?'relation':'')));
-               if ($sOSMType)
-               {
-                       return '<a href="http://www.openstreetmap.org/'.$sOSMType.'/'.$aFeature['osm_id'].'">'.$sOSMType.' '.$aFeature['osm_id'].'</a>';
-               }
-               return '';
-       }
-
-       function wikipedia_link($aFeature)
-       {
-               if ($aFeature['wikipedia'])
-               {
-                       list($sWikipediaLanguage,$sWikipediaArticle) = explode(':',$aFeature['wikipedia']);
-                       return '<a href="https://'.$sWikipediaLanguage.'.wikipedia.org/wiki/'.urlencode($sWikipediaArticle).'" target="_blank">'.$aFeature['wikipedia'].'</a>';
-               }
-               return '';
-       }
-
-       function nominatim_link($aFeature, $sTitle)
-       {
-               return '<a href="details.php?place_id='.$aFeature['place_id'].'">'.$sTitle.'</a>';
-       }
 
        function format_distance($fDistance)
        {
                echo '<tr class="' . ($bNotUsed?'notused':'') . '">'."\n";
                echo '  <td class="name">'.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'<span class="noname">No Name</span>')."</td>\n";
                echo '  <td>' . $aAddressLine['class'].':'.$aAddressLine['type'] . "</td>\n";
-               echo '  <td>' . osm_link($aAddressLine) . "</td>\n";
+               echo '  <td>' . osmLink($aAddressLine) . "</td>\n";
                echo '  <td>' . (isset($aAddressLine['admin_level']) ? $aAddressLine['admin_level'] : '') . "</td>\n";
                echo '  <td>' . format_distance($aAddressLine['distance'])."</td>\n";
-               echo '  <td>' . nominatim_link($aAddressLine,'details &gt;') . "</td>\n";
+               echo '  <td>' . detailsLink($aAddressLine,'details &gt;') . "</td>\n";
                echo "</tr>\n";
        }
 
                                        }
                                        kv('Coverage'        , ($aPointDetails['isarea']=='t'?'Polygon':'Point') );
                                        kv('Centre Point'    , $aPointDetails['lat'].','.$aPointDetails['lon'] );
-                                       kv('OSM'             , osm_link($aPointDetails) );
+                                       kv('OSM'             , osmLink($aPointDetails) );
                                        if ($aPointDetails['wikipedia'])
                                        {
-                                               kv('Wikipedia Calculated' , wikipedia_link($aPointDetails) );
+                                               kv('Wikipedia Calculated' , wikipediaLink($aPointDetails) );
                                        }
 
                                        kv('Extra Tags'      , hash_to_subtable($aPointDetails['aExtraTags']) );
index edfe3871403684842fa822afcb2f4722a09db5b7..60d380418d6f74e86f665173d16a112fe3600b2b 100644 (file)
@@ -14,7 +14,7 @@
                                                'place_id'=>$aPointDetails['place_id'],
                                        );
 
-                       $sOSMType = ($aPointDetails['osm_type'] == 'N'?'node':($aPointDetails['osm_type'] == 'W'?'way':($aPointDetails['osm_type'] == 'R'?'relation':'')));
+                       $sOSMType = formatOSMType($aPointDetails['osm_type']);
                        if ($sOSMType)
                        {
                                $aPlace['osm_type'] = $sOSMType;
index 5d5ebfe81f9782706c4cb9ed24a74920c9baf15e..d3dc00f3b505b497eb90f404d770f9ce2e2d0f56 100644 (file)
@@ -9,8 +9,7 @@
                                'licence'=>"Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright",
                        );
         
-               $sOSMType = ($aPointDetails['osm_type'] == 'N'?'node':($aPointDetails['osm_type'] == 'W'?'way':($aPointDetails['osm_type'] == 'R'?
-                                       'relation':($aPointDetails['osm_type'] == 'T'?'tiger':($aPointDetails['osm_type'] == 'I'?'interpolation':'')))));
+               $sOSMType = formatOSMType($aPointDetails['osm_type']);
                if ($sOSMType)
                {
                        $aPlace['osm_type'] = $sOSMType;
index 251388b51a4157e6a7bd54871936eb79880d028f..e907a081f206750ac1a7e37de321c796c9de9af8 100644 (file)
@@ -7,7 +7,7 @@
                                'licence'=>"Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright",
                        );
 
-               $sOSMType = ($aPointDetails['osm_type'] == 'N'?'node':($aPointDetails['osm_type'] == 'W'?'way':($aPointDetails['osm_type'] == 'R'?'relation':($aPointDetails['osm_type'] == 'T'?'tiger':($aPointDetails['osm_type'] == 'I'?'interpolation':'')))));
+               $sOSMType = formatOSMType($aPointDetails['osm_type']);
                if ($sOSMType)
                {
                        $aPlace['osm_type'] = $sOSMType;
index 7cbcc04bf605623e3485b03f9d15910e7f649259..7a5c997fddd1b35b222871b7cd160fdca161c0e3 100644 (file)
@@ -25,8 +25,7 @@
        foreach($aSearchResults as $iResNum => $aResult)
        {
                echo "<place place_id='".$aResult['place_id']."'";
-               $sOSMType = ($aResult['osm_type'] == 'N'?'node':($aResult['osm_type'] == 'W'?'way':($aResult['osm_type'] == 'R'?'relation':
-               ($aResult['osm_type'] == 'T'?'tiger':($aResult['osm_type'] == 'I'?'interpolation':'')))));
+               $sOSMType = formatOSMType($aResult['osm_type']);
                if ($sOSMType)
                {
                        echo " osm_type='$sOSMType'";
index efd20ab3c2cc2ecb465bf3da2772a64ac0651f92..6521e774442e9a97b5cefdf89559581629e0313b 100755 (executable)
@@ -2,6 +2,7 @@
        require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
        require_once(CONST_BasePath.'/lib/init-website.php');
        require_once(CONST_BasePath.'/lib/log.php');
+       require_once(CONST_BasePath.'/lib/output.php');
 
        $sOutputFormat = 'html';
        ini_set('memory_limit', '200M');
@@ -66,6 +67,7 @@ table td {
 
 <table>
 <?php
+       if (!$aPolygons) exit;
        echo "<tr>";
 //var_dump($aPolygons[0]);
        foreach($aPolygons[0] as $sCol => $sVal)
@@ -81,11 +83,10 @@ table td {
                        switch($sCol)
                        {
                                case 'osm_id':
-                                       $sOSMType = ($aRow['osm_type'] == 'N'?'node':($aRow['osm_type'] == 'W'?'way':($aRow['osm_type'] == 'R'?'relation':'')));
-                                       echo '<td><a href="http://www.openstreetmap.org/'.$sOSMType.'/'.$sVal.'" target="_new">'.$sVal.'</a></td>';
+                                       echo '<td>'.osmLink($aRow).'</td>';
                                        break;
                                case 'place_id':
-                                       echo '<td><a href="'.CONST_Website_BaseURL.'details?place_id='.$sVal.'">'.$sVal.'</a></td>';
+                                       echo '<td>'.detailsLink($aRow).'</td>';
                                        break;
                                default:
                                        echo "<td>".($sVal?$sVal:'&nbsp;')."</td>";
index 2891ecfca2f7cc113b9e8721ff7635d80f5abe95..b3c9591be2a18c3b7807f55a2b26a9f864778aba 100755 (executable)
@@ -4,6 +4,7 @@
        require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
        require_once(CONST_BasePath.'/lib/init-website.php');
        require_once(CONST_BasePath.'/lib/log.php');
+       require_once(CONST_BasePath.'/lib/output.php');
 
        $sOutputFormat = 'html';
        /*
                $sTileAttribution = CONST_Map_Tile_Attribution;
        }
 
-       
        include(CONST_BasePath.'/lib/template/details-'.$sOutputFormat.'.php');
index 8c0ae1f511789a69bcd4bb0d076af8a3cdc074fb..7740abbc755765adb6769284d88daa0f2a82003b 100755 (executable)
@@ -5,6 +5,7 @@
        require_once(CONST_BasePath.'/lib/init-website.php');
        require_once(CONST_BasePath.'/lib/log.php');
        require_once(CONST_BasePath.'/lib/PlaceLookup.php');
+       require_once(CONST_BasePath.'/lib/output.php');
        ini_set('memory_limit', '200M');
 
        $oDB =& getDB();
        foreach($aPlaceAddress as $i => $aPlace)
        {
                if (!$aPlace['place_id']) continue;
-               $aBreadcrums[] = array('placeId'=>$aPlace['place_id'], 'osmType'=>$aPlace['osm_type'], 'osmId'=>$aPlace['osm_id'], 'localName'=>$aPlace['localname']);
-               $sPlaceUrl = 'hierarchy.php?place_id='.$aPlace['place_id'];
-               $sOSMType = ($aPlace['osm_type'] == 'N'?'node':($aPlace['osm_type'] == 'W'?'way':($aPlace['osm_type'] == 'R'?'relation':'')));
-                               $sOSMUrl = 'http://www.openstreetmap.org/'.$sOSMType.'/'.$aPlace['osm_id'];
-               if ($sOutputFormat == 'html') if ($i) echo " > ";
-               if ($sOutputFormat == 'html') echo '<a href="'.$sPlaceUrl.'">'.$aPlace['localname'].'</a> (<a href="'.$sOSMUrl.'">osm</a>)';
+               $aBreadcrums[] = array('placeId'   => $aPlace['place_id'],
+                                      'osmType'   => $aPlace['osm_type'],
+                                      'osmId'     => $aPlace['osm_id'],
+                                      'localName' => $aPlace['localname']);
+
+               if ($sOutputFormat == 'html')
+               {
+                       $sPlaceUrl = 'hierarchy.php?place_id='.$aPlace['place_id'];
+                       if ($i) echo " &gt; ";
+                       echo '<a href="'.$sPlaceUrl.'">'.$aPlace['localname'].'</a> ('.osmLink($aPlace).')';
+               }
        }
 
 
 
                        if (!isset($aGroupedAddressLines[$aAddressLine['label']])) $aGroupedAddressLines[$aAddressLine['label']] = array();
                                $aGroupedAddressLines[$aAddressLine['label']][] = $aAddressLine;
-                       }
-                       foreach($aGroupedAddressLines as $sGroupHeading => $aParentOfLines)
+               }
+
+               foreach($aGroupedAddressLines as $sGroupHeading => $aParentOfLines)
+               {
+                       echo "<h3>$sGroupHeading</h3>";
+                       foreach($aParentOfLines as $aAddressLine)
                        {
-                               echo "<h3>$sGroupHeading</h3>";
-                               foreach($aParentOfLines as $aAddressLine)
-                               {
-                                       $aAddressLine['localname'] = $aAddressLine['localname']?$aAddressLine['localname']:$aAddressLine['housenumber'];
-                                       $sOSMType = ($aAddressLine['osm_type'] == 'N'?'node':($aAddressLine['osm_type'] == 'W'?'way':($aAddressLine['osm_type'] == 'R'?'relation':'')));
-
-                                       echo '<div class="line">';
-                                       echo '<span class="name">'.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'<span class="noname">No Name</span>').'</span>';
-                                       echo ' (';
-                                       echo '<span class="area">'.($aAddressLine['isarea']=='t'?'Polygon':'Point').'</span>';
-                                       if ($sOSMType) echo ', <span class="osm"><span class="label"></span>'.$sOSMType.' <a href="http://www.openstreetmap.org/'.$sOSMType.'/'.$aAddressLine['osm_id'].'">'.$aAddressLine['osm_id'].'</a></span>';
-                                       echo ', <a href="hierarchy.php?place_id='.$aAddressLine['place_id'].'">GOTO</a>';
-                                       echo ', '.$aAddressLine['area'];
-                                       echo ')';
-                                       echo '</div>';
-                               }
+                               $aAddressLine['localname'] = $aAddressLine['localname']?$aAddressLine['localname']:$aAddressLine['housenumber'];
+                               $sOSMType = formatOSMType($aAddressLine['osm_type'], false);
+
+                               echo '<div class="line">';
+                               echo '<span class="name">'.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'<span class="noname">No Name</span>').'</span>';
+                               echo ' (';
+                               echo '<span class="area">'.($aAddressLine['isarea']=='t'?'Polygon':'Point').'</span>';
+                               if ($sOSMType) echo ', <span class="osm"><span class="label"></span>'.$sOSMType.' '.osmLink($aAddressLine).'</span>';
+                               echo ', <a href="hierarchy.php?place_id='.$aAddressLine['place_id'].'">GOTO</a>';
+                               echo ', '.$aAddressLine['area'];
+                               echo ')';
+                               echo '</div>';
                        }
-                       if (sizeof($aParentOfLines) >= 500) {
-                               echo '<p>There are more child objects which are not shown.</p>';
-                       }
-                       echo '</div>';
                }
+               if (sizeof($aParentOfLines) >= 500) {
+                       echo '<p>There are more child objects which are not shown.</p>';
+               }
+               echo '</div>';
+       }
index b6146d95b74953f63b57d264140b89df792d995a..bb350e6c4d7e985a668a5bc63b3339afeba17822 100755 (executable)
@@ -2,6 +2,7 @@
        require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
        require_once(CONST_BasePath.'/lib/init-website.php');
        require_once(CONST_BasePath.'/lib/log.php');
+       require_once(CONST_BasePath.'/lib/output.php');
        ini_set('memory_limit', '200M');
 
        $oDB =& getDB();
@@ -77,6 +78,7 @@ table td {
 <?php
 
        echo "<p>Total number of broken polygons: $iTotalBroken</p>";
+       if (!$aPolygons) exit;
        echo "<table>";
        echo "<tr>";
 //var_dump($aPolygons[0]);
@@ -110,8 +112,7 @@ table td {
                                }
                                break;
                        case 'id':
-                               $sOSMType = ($aRow['type'] == 'N'?'node':($aRow['type'] == 'W'?'way':($aRow['type'] == 'R'?'relation':'')));
-                               echo '<td><a href="http://www.openstreetmap.org/'.$sOSMType.'/'.$aRow['id'].'" target="_new">'.$aRow['id'].'</a></td>';
+                               echo '<td>'.osmLink($aRow).'</td>';
                                break;
                        default:
                                echo "<td>".($sVal?$sVal:'&nbsp;')."</td>";
@@ -130,10 +131,6 @@ table td {
                echo "</tr>";
        }
        echo "</table>";
-
-
-
-//     include(CONST_BasePath.'/lib/template/details-'.$sOutputFormat.'.php');
 ?>
 </body>
 </html>
index 430d9e39c2b208bb82ebfcb3d7956cf98808968c..c6c7305fe9d90ae88664f8f9b44d3d30ce94ffe2 100755 (executable)
@@ -6,6 +6,7 @@
        require_once(CONST_BasePath.'/lib/log.php');
        require_once(CONST_BasePath.'/lib/PlaceLookup.php');
        require_once(CONST_BasePath.'/lib/ReverseGeocode.php');
+       require_once(CONST_BasePath.'/lib/output.php');
 
        if (strpos(CONST_BulkUserIPs, ','.$_SERVER["REMOTE_ADDR"].',') !== false)
        {
index 776cfa78343e7578db6657ac0f9514b41198dcd9..3c85c8f7b4724e6d5ca14eefafe02f6ec19cc9a1 100755 (executable)
@@ -5,6 +5,7 @@
        require_once(CONST_BasePath.'/lib/init-website.php');
        require_once(CONST_BasePath.'/lib/log.php');
        require_once(CONST_BasePath.'/lib/Geocode.php');
+       require_once(CONST_BasePath.'/lib/output.php');
 
        ini_set('memory_limit', '200M');