changeset 1406:c5c7e1f9e17d

Sync.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 03 Feb 2014 01:16:23 +0200
parents 57b2de2b8ef9
children 84c3eb66a4b5
files www/config.inc.php www/faq.xml www/maps.css www/query.php www/wizards.txt
diffstat 5 files changed, 108 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/www/config.inc.php	Fri Jan 10 21:55:05 2014 +0200
+++ b/www/config.inc.php	Mon Feb 03 01:16:23 2014 +0200
@@ -5,7 +5,7 @@
 $batQuestURL = "http://www.bat.org/help/quests?str=";
 $pageIndex = "index.php";
 //$pageCSS = "maps.css";
-$pageCSS = "xmas.css";
+$pageCSS = "new.css";
 //$pageIndex = "maps.php";
 
 $protocolPrefix = (!isset($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] == "off" || $_SERVER["HTTPS"] == "") ? "http" : "https";
--- a/www/faq.xml	Fri Jan 10 21:55:05 2014 +0200
+++ b/www/faq.xml	Mon Feb 03 01:16:23 2014 +0200
@@ -78,9 +78,9 @@
 
 <!-- ========================================================================== -->
 <item id="3">
-<question>What is the relationship between Ggr's, Jeskko's, Ooga's and Batclient's maps?</question>
+<question>What is the relationship between Ggr's, Jeskko's, Batclient's maps?</question>
 <answer>
-Currently, all three major mapsites and Batclient map are based on more or
+Currently, both two major mapsites and Batclient map are based on more or
 less the same location data, centrally managed and known as the "PupuMaps"
 data. This is why all the maps are simply different representations of the
 same data. The history of <b>PupuMaps</b> has its roots in time before the new "Age of
@@ -267,6 +267,9 @@
  maintenance as before for the foreseeable future,
  despite ascending to higher realms.
  </li><br />
+
+ <li><b>09 Sep 2012</b> - Jeskko ascends to immortality as well.
+ </li><br />
 </ul>
 
 More to come...
--- a/www/maps.css	Fri Jan 10 21:55:05 2014 +0200
+++ b/www/maps.css	Mon Feb 03 01:16:23 2014 +0200
@@ -27,7 +27,7 @@
 
 .noborder {
 	border: none;
-	padding: 0pt;
+	padding: 0px;
 }
 
 
@@ -37,15 +37,15 @@
 	border-bottom: 2px solid black;
 	border-right: 2px solid black;
 	background: #060;
-	padding: 5pt;
+	padding: 0.5em;
 
 	-moz-border-radius: 15px;
 	border-radius: 15px;
 }
 
 div.selbar a {
-	padding: 5pt;
-	margin-bottom: 30pt;
+	padding: 0.5em;
+	margin-bottom: 2em;
 	border: 1px solid white;
 	-moz-border-radius: 8px;
 	border-radius: 8px;
@@ -74,7 +74,8 @@
 table.loc td {
 	border: 1px solid black;
 	text-align: center;
-	font-size: 8pt;
+	font-size: 0.9em;
+	padding: 0.2em;
 }
 
 
@@ -104,7 +105,7 @@
 
 .attnbox {
 	background: black;
-	padding: 5pt;
+	padding: 0.5em;
 	color: white;
 }
 
@@ -147,7 +148,7 @@
 	background-color: white;
 	color: black;
 	padding: 5px;
-	font-size: 8pt;
+	font-size: 0.9em;
 	z-index: 11;
 
 	border: 1px solid gray;
@@ -173,15 +174,15 @@
 	background: #565;
 	-moz-border-radius: 15px;
 	border-radius: 15px;
-	padding: 10pt;
+	padding: 1em;
 }
 
 #contents h1 {
-	font-size: 24pt;
+	font-size: 2.5em;
 	font-family: helvetica;
 	margin-top: 0px;
 	background: #343;
-	padding: 5pt;
+	padding: 0.2em;
 	color: white;
 	text-shadow: 2px 2px 2px #000;
 
@@ -190,7 +191,7 @@
 }
 
 h2,h3 {
-	padding: 5pt;
+	padding: 0.5em;
 	-moz-border-radius: 8px;
 	border-radius: 8px;
 	background: #343;
@@ -203,7 +204,7 @@
 	width: 15em;
 	min-width: 15em;
 
-	padding: 2pt;
+	padding: 0.2em;
 
 	background: #565;
 	color: black;
@@ -226,7 +227,7 @@
 	color: white;
 	text-decoration: none;
 	background: #454;
-	padding: 4pt;
+	padding: 0.4em;
 	border: 1px solid #676;
 }
 
@@ -242,16 +243,15 @@
 }
 
 #mainmenu a.item {
-	font-size: 10pt;
-	padding: 1pt;
+	font-size: 1em;
 	text-decoration: none;
 	color: black;
 
 	display: block;
 	background: #787;
-	margin: 2pt;
+	margin: 0.2em;
 
-	padding: 5pt;
+	padding: 0.5em;
 	-moz-border-radius: 8px;
 	border-radius: 8px;
 }
@@ -263,10 +263,10 @@
 }
 
 #mainmenu h1, #extrabox h1 {
-	margin: 0pt;
-	padding-top: 5pt;
-	padding-bottom: 5pt;
-	font-size: 15pt;
+	margin: 0px;
+	padding-top: 0.5em;
+	padding-bottom: 0.5em;
+	font-size: 1.5em;
 	color: white;
 	text-align: center;
 	text-shadow: 2px 2px 2px #000;
@@ -282,7 +282,7 @@
 	background: white;
 	border: 1px solid black;
 
-	padding: 5pt;
+	padding: 0.5em;
 	-moz-border-radius: 8px;
 	border-radius: 8px;
 }
@@ -291,7 +291,7 @@
 	background: #8a8;
 	border: 1px solid white;
 
-	padding: 5pt;
+	padding: 0.5em;
 	-moz-border-radius: 8px;
 	border-radius: 8px;
 }
@@ -305,16 +305,16 @@
 
 div.advert {
 	text-align: center;
-	padding-top: 0pt;
-	padding-bottom: 15pt;
+	padding-top: 0px;
+	padding-bottom: 2em;
 }
 
 div.advert a {
-	font-size: 14pt;
+	font-size: 1.4em;
 	text-decoration: none;
-	padding: 5pt;
+	padding: 0.5em;
 	background: rgba(255,0,0,0.3);
-	-moz-border-radius: 5pt;
-	border-radius: 5pt;
+	-moz-border-radius: 0.5em;
+	border-radius: 0.5em;
 	box-shadow: 0px 0px 6px rgba(0,0,0,0.7);
 }
--- a/www/query.php	Fri Jan 10 21:55:05 2014 +0200
+++ b/www/query.php	Mon Feb 03 01:16:23 2014 +0200
@@ -31,89 +31,89 @@
 
 // Read in location data, etc.
 $locTable = stReadLocationFiles(FALSE, "Q");
-$locExact = FALSE;
-$locFound = FALSE;
-$locJSMap = FALSE;
-$locOpenSearch = FALSE;
-$locWebPage = FALSE;
+
 
 // Check arguments
+$locDebug      = isset($_GET["debug"]);
+$locWebPage    = isset($_GET["web"]);
+$locExactMatch = isset($_GET["exact"]);
+$locJSMap      = isset($_GET["js"]);
+$locOpenSearch = isset($_GET["os"]);
+
 if (isset($argv[0]))
   $locName = stripslashes($argv[0]);
-
-if (isset($_GET["web"]))
-  $locWebPage = TRUE;
-
+else
 if (isset($_GET["q"]))
   $locName = stripslashes($_GET["q"]);
 
-if (isset($_GET["exact"]))
-  $locExact = TRUE;
-
-if (isset($_GET["js"]))
-  $locJSMap = TRUE;
-
-if (isset($_GET["os"]))
-  $locOpenSearch = TRUE;
-
 if (!isset($locName))
   myerr();
 
 $locRegEx = "/".preg_quote($locName, "/")."/i";
+$locFound = FALSE;
 
 // OpenSearch mode?
 if ($locOpenSearch)
 {
   header("Content-Type: application/json; charset=".$pageCharset);
   $locResult = array();
+
+  // Get all names into associative array
   foreach ($locTable as $data)
   {
     $match = FALSE;
     foreach ($data["names"] as $n)
     {
       if (preg_match($locRegEx, $n["name"]))
-        $locResult[] = $n["name"];
+        $locResult[$n["name"]] = 1;
     }
     
     if (preg_match($locRegEx, $data["name"]))
-      $locResult[] = $data["name"];
+      $locResult[$data["name"]] = 2;
   }
 
-  $str = "";
-  foreach ($locResult as $name) {
-    if ($str != "") $str .= ",";
-    $str .= "\"".addslashes($name)."\"";
-  }
-
-  echo "[\"".$locName."\",[".$str."]]";
-
+  // Format output
+  $str = array_map(function($value) { return "\"".addslashes($value)."\""; }, array_keys($locResult));
+  echo "[\"".$locName."\",[".implode(",", $str)."]]";
 }
 else
 {
   // Match location exactly (non-case sensitive tho)
-  reset($locTable);
-  while (!$locFound && (list($id, $data) = each($locTable)))
+  foreach ($locTable as $id => $data)
   {
     if (!strcasecmp($locName, $data["name"]))
+    {
       $locFound = TRUE;
+    }
     else
     {
       foreach ($data["names"] as $n)
-      if (!strcasecmp($locName, $n))
       {
-        $locFound = TRUE;
-        break;
+        if (!strcasecmp($locName, $n["name"]))
+        {
+          $locFound = TRUE;
+          break;
+        }
       }
     }
+
     if ($locFound)
+    {
       $locData = $data;
+      break;
+    }
   }
 
+  if ($locDebug && $locFound)
+  {
+    echo "Exact match: '".$locName."' -> ".var_export($locData, TRUE)."\n";
+  }
+
+
   // If not exact matching mode specified, try non-exact also
-  if (!$locExact)
+  if (!$locExactMatch && !$locFound)
   {
-    reset($locTable);
-    while (!$locFound && (list($id, $data) = each($locTable)))
+    foreach ($locTable as $id => $data)
     {
       if (preg_match($locRegEx, $data["name"]))
         $locFound = TRUE;
@@ -127,7 +127,15 @@
         }
       }
       if ($locFound)
+      {
         $locData = $data;
+        break;
+      }
+    }
+
+    if ($locDebug && $locFound)
+    {
+      echo "Non-Exact match: '".$locName."' -> ".var_export($locData, TRUE)."\n";
     }
   }
 
@@ -137,9 +145,18 @@
     header("Location: ".$pageMapURL.$locData["continent"].".".
     ($locJSMap ? "htm" : "html").
     "#loc".$locData["x"]."_".$locData["y"]);
+
+    if ($locDebug)
+    {
+      echo("Location: ".$pageMapURL.$locData["continent"].".".
+      ($locJSMap ? "htm" : "html").
+      "#loc".$locData["x"]."_".$locData["y"]);
+    }
   }
   else
     myerr();
 }
 
+if ($locDebug)
+  echo "\n\n";
 ?>
\ No newline at end of file
--- a/www/wizards.txt	Fri Jan 10 21:55:05 2014 +0200
+++ b/www/wizards.txt	Mon Feb 03 01:16:23 2014 +0200
@@ -25,7 +25,8 @@
 
 Jeskko;http://jeskko.pupunen.net/;;
 	Jeskko the fluffy newbie bunnywizard is currently fixing bugs
-	and codeslaving around. What else he will do in future, remains yet to be seen ...
+	and codeslaving around. What else he will do in future, remains
+	yet to be seen ...
 	$
 
 Jarnis;;;
@@ -554,7 +555,8 @@
 	Original coder of the Wrebie forest, which was finished 1998 by
 	~Souc~ and re-coded again by ~Grizzt~ in 2010.$
 
-Ramjett;bat;;Immorted 6 Dec 2006, coded one area and one event (Dragon
+Ramjett;bat;;
+	Immorted 6 Dec 2006, coded one area and one event (Dragon
 	Attack, with ~Hackop~). Remorted in early 2009.$
 
 Nerya;bat;nerya.jpg;
@@ -580,10 +582,26 @@
 	Remorted 22 Dec 2011.
 	$
 
+Acidia;;;
+	Works on various aspects of the Merchant guild, one of the
+	best known and loved things implemented by Acidia is the
+	"Minecrafting" system.
+	$
+
+
+Damut;;;
+	$
 
 Moss;;;
 	$
 
+Ssmud;;;
+	$
+
+Tyril;;;
+	$
+
+
 Seance;;;
 	Original coder of the area complex collectively known as "Seance's",
 	aka Foul's Creche + Guard's Gap + Seance's platform + Kevin's watch