diff www/loc.php @ 1567:026c6eca781c

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 21 Apr 2015 23:54:07 +0300
parents 9f9e1e1846f5
children f7646889e99d
line wrap: on
line diff
--- a/www/loc.php	Sat Apr 18 18:09:04 2015 +0300
+++ b/www/loc.php	Tue Apr 21 23:54:07 2015 +0300
@@ -17,24 +17,26 @@
 function printTitleLink($afilter, $filter, $coders, $desc, $qname, $qclass)
 {
   $s = "";
-  if ($afilter) $s = "f=".$filter;
+  if ($afilter)
+    $s = "f=".$filter;
 
-  if (!$coders) {
+  if (!$coders)
+  {
     if ($s !== "") $s .= "&amp;";
     $s .= "s";
   }
 
-  if ($qname !== "") {
+  if ($qname !== "")
+  {
     if ($s !== "") $s .= "&amp;";
     $s .= "n=".$qname;
   }
   
-  echo "  <a ";
-  if ($qclass !== "")
-    echo "class=\"".$qclass."\" ";
-  echo "href=\"".$_SERVER["PHP_SELF"];
-  if (strlen($s) > 0) echo "?".$s;
-  echo "\">".$desc."</a>\n";
+  echo
+    "  <a class=\"control continent ".$qclass.
+    "\" href=\"".$_SERVER["PHP_SELF"].
+    (strlen($s) > 0 ? "?".$s : "").
+    "\">".$desc."</a>\n";
 }
 
 
@@ -169,13 +171,13 @@
   "</h1>\n";
 
 echo
-  "<div class=\"selbar\">\n".
-  " <form action=\"".$_SERVER["PHP_SELF"]."\" method=\"get\">\n";
+  "<form action=\"".$_SERVER["PHP_SELF"]."\" method=\"get\">\n".
+  "<div class=\"controls\">\n";
 
 if (isset($setName))
   echo "<input type=\"hidden\" name=\"n\" value=\"".chentities($setName)."\" />\n";
 
-echo "<select class=\"dropdown\" name=\"f\">\n";
+echo "<select class=\"control dropdown\" name=\"f\">\n";
 foreach ($locationTypes as $id => $type)
 {
   echo
@@ -185,7 +187,7 @@
 }
 echo
   "</select>\n".
-  "<input type=\"submit\" value=\" Update \" class=\"submit\" />\n";
+  "<input type=\"submit\" value=\" Update \" class=\"control submit\" />\n";
 
 
 printTitleLink($applyFilter, $filter, $showCoders, "All&nbsp;continents", "", "all");
@@ -197,8 +199,8 @@
 printTitleLink($applyFilter, $filter, $showCoders, "Special", "special", "special");
 
 echo
-  "</form>\n".
-  "</div>\n";
+  "</div>\n".
+  "</form>\n";
 
 
 //