changeset 543:1f75523293ad

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 15 Dec 2013 23:48:25 +0200
parents 8c1a53532be0
children b4581dc165dc
files admajax.php
diffstat 1 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/admajax.php	Sun Dec 15 23:48:14 2013 +0200
+++ b/admajax.php	Sun Dec 15 23:48:25 2013 +0200
@@ -1185,14 +1185,15 @@
         $prefix = "st";
 
         echo
-        "<h1>Site settings</h1>\n".
-        "<form method=\"post\" action=\"\" onsubmit=\"return updateSettings()\">\n".
-        "<table>\n";
-        foreach (stExecSQL("SELECT * FROM settings WHERE vtype<>".VT_TEXT) as $item)
+          "<h1>Site settings</h1>\n".
+          "<form method=\"post\" action=\"\" onsubmit=\"return updateSettings()\">\n".
+          "<table>\n";
+
+        foreach (stExecSQL("SELECT * FROM settings WHERE vtype<>".VT_TEXT." ORDER BY vtype ASC") as $item)
         {
           echo
-          " <tr>\n".
-          "  <td>";
+            " <tr>\n".
+            "  <td>";
           $id = $item["key"];
           switch ($item["vtype"])
           {
@@ -1206,13 +1207,14 @@
               echo stGetFormCheckBoxInput("", $id, $prefix, $item["vint"], "");
               break;
           }
-          echo "</td>\n".
-          "  <td>".$item["sdesc"]."</td>\n".
-          " </tr>\n";
+          echo
+            "</td>\n".
+            "  <td>".$item["sdesc"]."</td>\n".
+            " </tr>\n";
         }
         echo "</table>\n".stGetSaveButton();
 
-        foreach (stExecSQL("SELECT * FROM settings WHERE vtype=".VT_TEXT) as $item)
+        foreach (stExecSQL("SELECT * FROM settings WHERE vtype=".VT_TEXT." ORDER BY key DESC") as $item)
         {
           echo
             "<h2>".chentities($item["sdesc"])."</h2>\n".
@@ -1277,7 +1279,7 @@
             "  </tr>\n".
             "  <tr><td colspan=\"6\"><hr /></td></tr>\n";
 
-          foreach (stExecSQL("SELECT * FROM entries WHERE compo_id=".$id) as $entry)
+          foreach (stExecSQL("SELECT * FROM entries WHERE compo_id=".$id." ORDER BY id ASC") as $entry)
           {
             echo
               "  <tr id=\"entry".$entry["id"]."\">\n".