changeset 216:bcc3c4696b3e

Some more work.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 17 Nov 2013 22:28:48 +0200
parents bfd480370a70
children d313f9907610
files admajax.php usrajax.php
diffstat 2 files changed, 17 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/admajax.php	Sun Nov 17 22:17:11 2013 +0200
+++ b/admajax.php	Sun Nov 17 22:28:48 2013 +0200
@@ -180,6 +180,21 @@
         $sql = "SELECT * FROM compos ORDER BY id DESC";
         break;
 
+      case "slides":
+        $sql = "SELECT * FROM displaySlides SORT BY id ASC";
+        $sql = "SELECT * FROM displayListData SORT BY id ASC";
+        $sql = "SELECT * FROM displayListSlides SORT BY id ASC";
+        echo
+          "<form>\n".
+          " <table>\n".
+          "  <tr>\n".
+          "   <td>".stGetFormButtonInput("generate", "", "", " Generate entry show positions ", "generateEntryPositions()")."</td>\n".
+          "   <td>".stGetFormButtonInput("generate", "", "", " XXX ", "generateEntryPositions()")."</td>\n".
+          "  </tr>\n".
+          " </table>\n".
+          "</form>\n";
+        break;
+      
       case "settings":
         $prefix = "st";
 
--- a/usrajax.php	Sun Nov 17 22:17:11 2013 +0200
+++ b/usrajax.php	Sun Nov 17 22:28:48 2013 +0200
@@ -75,42 +75,13 @@
 //
 // Handle the request
 //
-$action = "ERROR";
-if (stChkRequestItem("action") && stChkRequestItem("type"))
-{
-  $action = $_REQUEST["action"];
-  $type = $_REQUEST["type"];
-}
-
-switch ($action)
+switch (stGetRequestItem("action"))
 {
-  case "get":
-    //
-    // Get specific data
-    //
-    switch ($type)
-    {
-      case "votes":
-        $sql = "SELECT * FROM votes ORDER BY utime DESC";
-        break;
-    }
-    
-    //
-    // Perform query if we need to, output results
-    //
-    if (isset($sql) && ($res = stExecSQLCond($sql, "")) !== FALSE)
-    {
-      if ($type == "votes")
-      {
-      }
-    }
-    break;
-
   case "set":
     //
     // Set vote, if voting is enabled
     //
-    if ($type == "votes" && stChkSetting("allowVoting") &&
+    if (stChkSetting("allowVoting") &&
       stChkRequestItem("votekey") &&
       stChkRequestItem("entry_id") &&
       stChkRequestItem("vote"))