diff www/ss.php @ 2819:7f90630781a7

Cleanup.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 14 Apr 2024 20:19:46 +0300
parents 164aa519640d
children
line wrap: on
line diff
--- a/www/ss.php	Fri Apr 12 21:56:09 2024 +0300
+++ b/www/ss.php	Sun Apr 14 20:19:46 2024 +0300
@@ -17,50 +17,45 @@
 
 // Page start
 mpPrintPageHeader($pageTitle." - Secret societies");
+?>
+<h1>Secret societies of BatMUD</h1>
+<div class="attnbox">
+</div>
+<hr />
+<?php
+// Print list of societies
+// Make the list array
+foreach ($locTable as $key => $value)
+foreach ($value["authors"] as $name)
+  $sortTable[$name["name"]] = $value;
+
+foreach ($locPTable as $key => $value)
+  $sortTable[$value["name"]] = $value;
+
+ksort($sortTable);
 
 echo
-  "<h1>Secret societies of BatMUD</h1>\n";
+  "<table class=\"locTable societies\">\n".
+  " <tr>\n".
+  "  <th>Society name</th>\n".
+  "  <th>Player city/location</th>\n".
+  "  <th>Continent</th>\n".
+  " </tr>\n";
 
-// Print list of societies
-if (count($locTable) > 0)
+foreach ($sortTable as $name => $data)
 {
-  // Make the list array
-  foreach ($locTable as $key => $value)
-  foreach ($value["authors"] as $name)
-    $sortTable[$name["name"]] = $value;
-
-  foreach ($locPTable as $key => $value)
-    $sortTable[$value["name"]] = $value;
-
-  ksort($sortTable);
-
+  $cont = $data["continent"];
+  $link = $continentList[$cont][CTI_HAS_MAP];
   echo
-    "<table class=\"locTable societies\">\n".
     " <tr>\n".
-    "  <th>Society name</th>\n".
-    "  <th>Player city/location</th>\n".
-    "  <th>Continent</th>\n".
+    "  <td>".mpGetMapURLLink($data, $link, $name, TRUE)."</td>\n".
+    "  <td class=\"".$cont."\">".mpGetMapLink($data, $link, TRUE, FALSE)."</td>\n".
+    "  <td>".chentities($continentList[$cont][CTI_NAME])."</td>\n".
     " </tr>\n";
-
-  foreach ($sortTable as $name => $data)
-  {
-    $cont = $data["continent"];
-    $link = $continentList[$cont][CTI_HAS_MAP];
-    echo
-      " <tr>\n".
-      "  <td>".mpGetMapURLLink($data, $link, $name, TRUE)."</td>\n".
-      "  <td class=\"".$cont."\">".mpGetMapLink($data, $link, TRUE, FALSE)."</td>\n".
-      "  <td>".chentities($continentList[$cont][CTI_NAME])."</td>\n".
-      " </tr>\n";
-  }
-  echo
-    "</table>\n".
-    "<p><b>".count($sortTable)."</b> societies.</p>\n";
 }
-else
-{
-  echo "<p><b>No societies known!</b></p>\n";
-}
+echo
+  "</table>\n".
+  "<p><b>".count($sortTable)."</b> societies.</p>\n";
 
 mpPrintPageFooter();
 ?>
\ No newline at end of file