# HG changeset patch # User Matti Hamalainen # Date 1713115186 -10800 # Node ID 7f90630781a749074ab3140763d3ece98ca9c3e0 # Parent 783495d9fa7faa280a7705187cf4557e4e7fe51d Cleanup. diff -r 783495d9fa7f -r 7f90630781a7 www/latest.php --- a/www/latest.php Fri Apr 12 21:56:09 2024 +0300 +++ b/www/latest.php Sun Apr 14 20:19:46 2024 +0300 @@ -20,7 +20,7 @@ the changes made to the data.
-\n"; -if (count($locTable) > 0) +// Sort locations by timestamp .. +foreach ($locTable as $location) { - // Sort locations by timestamp .. - foreach ($locTable as $location) + // If "nodate" is set, show locations with NO known addition timestamp + if (isset($_REQUEST["nodate"])) + { + if ($location["added"] < 0) + $sortedLocs[] = $location; + } + else { - // If "nodate" is set, show locations with NO known addition timestamp - if (isset($_REQUEST["nodate"])) - { - if ($location["added"] < 0) - $sortedLocs[] = $location; - } - else - { - if ($location["added"] > 0) - $sortedLocs[] = $location; - } + if ($location["added"] > 0) + $sortedLocs[] = $location; } +} - usort($sortedLocs, "locCompare"); +usort($sortedLocs, "locCompare"); - // Print the list - $totalLoc = 0; +// Print the list +$totalLoc = 0; +echo + "\n". + " \n". + " \n". + " \n". + " \n". + ($showAll ? " \n" : ""). + " \n". + " \n". + " \n"; + +foreach ($sortedLocs as $ik => $iv) +{ + $totalLoc++; + echo - "
DateLocation nameContinentTypeAuthor(s)Information
\n". " \n". - " \n". - " \n". - " \n". - ($showAll ? " \n" : ""). - " \n". - " \n". + " \n". + " \n". + " \n". + ($showAll ? " \n" : ""). + " \n". + " \n". " \n"; - - foreach ($sortedLocs as $ik => $iv) - { - $totalLoc++; - - echo - " \n". - " \n". - " \n". - " \n". - ($showAll ? " \n" : ""). - " \n". - " \n". - " \n"; - } - echo - "
DateLocation nameContinentTypeAuthor(s)Information".(($iv["added"] <= 0) ? "?" : mpLocFormatTime($iv))."".mpGetMapLink($iv, TRUE, TRUE, FALSE)."".$continentList[$iv["continent"]][CTI_NAME]."".mpGetLocationTypeStr($iv["flags"])."".implode(", ", array_map( + (($iv["flags"] & LOCF_M_MASK) == LOCF_M_PCITY) ? $locGetNameStr : $locGetNameLink, + $iv["authors"]))."".(isset($iv["freeform"]) ? chentities($iv["freeform"]) : "")."
".(($iv["added"] <= 0) ? "?" : mpLocFormatTime($iv))."".mpGetMapLink($iv, TRUE, TRUE, FALSE)."".$continentList[$iv["continent"]][CTI_NAME]."".mpGetLocationTypeStr($iv["flags"])."".implode(", ", array_map( - (($iv["flags"] & LOCF_M_MASK) == LOCF_M_PCITY) ? $locGetNameStr : $locGetNameLink, - $iv["authors"]))."".(isset($iv["freeform"]) ? chentities($iv["freeform"]) : "")."
\n". - "

".$totalLoc." locations.

\n"; } -else -{ - echo "

No locations known!

\n"; -} +echo + "\n". + "

".$totalLoc." locations.

\n"; mpPrintPageFooter(); ?> \ No newline at end of file diff -r 783495d9fa7f -r 7f90630781a7 www/ss.php --- 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"); +?> +

Secret societies of BatMUD

+
+
+
+ $value) +foreach ($value["authors"] as $name) + $sortTable[$name["name"]] = $value; + +foreach ($locPTable as $key => $value) + $sortTable[$value["name"]] = $value; + +ksort($sortTable); echo - "

Secret societies of BatMUD

\n"; + "\n". + " \n". + " \n". + " \n". + " \n". + " \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 - "
Society namePlayer city/locationContinent
\n". " \n". - " \n". - " \n". - " \n". + " \n". + " \n". + " \n". " \n"; - - foreach ($sortTable as $name => $data) - { - $cont = $data["continent"]; - $link = $continentList[$cont][CTI_HAS_MAP]; - echo - " \n". - " \n". - " \n". - " \n". - " \n"; - } - echo - "
Society namePlayer city/locationContinent".mpGetMapURLLink($data, $link, $name, TRUE)."".mpGetMapLink($data, $link, TRUE, FALSE)."".chentities($continentList[$cont][CTI_NAME])."
".mpGetMapURLLink($data, $link, $name, TRUE)."".mpGetMapLink($data, $link, TRUE, FALSE)."".chentities($continentList[$cont][CTI_NAME])."
\n". - "

".count($sortTable)." societies.

\n"; } -else -{ - echo "

No societies known!

\n"; -} +echo + "\n". + "

".count($sortTable)." societies.

\n"; mpPrintPageFooter(); ?> \ No newline at end of file