diff www/loc.php @ 1148:52550f58cee5

Move alphabetic table printing code to a function in common routines.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 21 Jul 2011 20:35:38 +0300
parents 3bb8253db932
children 02fe48a608d7
line wrap: on
line diff
--- a/www/loc.php	Thu Jul 21 20:32:53 2011 +0300
+++ b/www/loc.php	Thu Jul 21 20:35:38 2011 +0300
@@ -2,7 +2,6 @@
 require "config.inc.php";
 require "common.inc.php";
 
-
 // Wizard info box special formatting tags
 $specTags = array(
   "b"     => "<b>",
@@ -232,10 +231,11 @@
   $maxRow = 6;
   foreach ($alphaTable as $alpha => $alphaLocs) {
     if (count($alphaLocs) <= 0) continue;
+    $letter = strtoupper($alpha);
 
     asort($alphaLocs);
-      
-    echo "<h3><a name=\"".$alpha."\"></a>".$alpha."</h3>\n".
+    
+    echo "<h3><a name=\"".$letter."\"></a>".$letter."</h3>\n".
     "<table class=\"loc\" width=\"95%\">\n";
  
     $n = 0;
@@ -350,13 +350,7 @@
 
   /* Print out the alpha link index
    */
-  echo "<div id=\"extrabox\">\n".
-  " <div style=\"font-size: 12pt; padding: 5pt;\">\n";
-  foreach ($alphaTable as $alpha => $alphaLocs) {
-    echo "  <a href=\"#".$alpha."\">".$alpha."</a>&nbsp;\n";
-  }
-  echo "\n </div>\n".
-  "</div>\n";
+  printExtraBoxAlphaList($alphaTable);
 } else {
   echo "<p><b>No locations known!</b></p>\n";
   echo "</div>\n";