?>
 
-<p>The following sites currently host or plan to host <?php echo PLC_NAME; ?> nodes:</p>
 
-<ul>
+<div id='public_sites'>
+<p>The following sites currently host or plan to host <?php echo PLC_NAME; ?> nodes.</p>
+
+<p> Also available for download in <a href="/sites/sites.kml">KML format for Google Earth.</a> </p> 
+</div>
 
 <?php
+require_once 'plc_functions.php';
+require_once 'plc_peers.php';
+require_once 'table.php';
+
+$headers = array();
+$headers['Peer']='string';
+$headers['Name']='string';
+$headers['Lon']='float';
+$headers['Lat']='float';
+
+$table=new PlekitTable ("sites",$headers,1,array('pagesize'=>10000,'pagesize_area'=>false));
+$table->start();
+
+$peers=new Peers($adm);
 
 // All defined sites
-$sites = $adm->GetSites(array('is_public' => TRUE, 'peer_id' => NULL), array('name', 'url'));
+$sites = $adm->GetSites(array('is_public' => TRUE), 
+                       array('peer_id','name', 'url','latitude','longitude'));
+
 
 foreach ($sites as $site) {
   $name = htmlspecialchars($site['name']);
   $url = $site['url'];
-  print "<li>";
-  if ($url) {
-    print "<a href=\"$url\">$name</a>";
-  } else {
-    print "$name";
-  }
-  print "</li>";
-}
 
-?>
-
-</ul>
-
-<?php
+  $table->row_start();
+  $peers->cell($table,$site['peer_id']);
+  if ($url) 
+    $table->cell(href($url,$name));
+  else
+    $table->cell($name);
+  $table->cell($site['longitude']);
+  $table->cell($site['latitude']);
+  $table->row_end();
+}
+$table->end();
 
 include 'plc_footer.php';
 
 
 global $GRACE_DAYS;    $GRACE_DAYS=10;         // days for renewal promoted on top
 global $NOW;           $NOW=mktime();
 
-
+////////////////////////////////////////////////////////////
 // make the renew area on top and open if the expiration time is less than 10 days from now
 function renew_needed ($slice) {
   global $DAY, $NOW, $GRACE_DAYS;
   $toggle->end();
 }
 
-////////// 
+////////////////////////////////////////////////////////////
 
 $am_in_slice = in_array(plc_my_person_id(),$person_ids);