# HG changeset patch # User Matti Hamalainen # Date 1384720128 -7200 # Node ID bcc3c4696b3e811d025e6a56a7bbde1f2ee09811 # Parent bfd480370a70a6673eb51d1019a7fc0a00a66c15 Some more work. diff -r bfd480370a70 -r bcc3c4696b3e admajax.php --- 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 + "
\n". + " \n". + " \n". + " \n". + " \n". + " \n". + "
".stGetFormButtonInput("generate", "", "", " Generate entry show positions ", "generateEntryPositions()")."".stGetFormButtonInput("generate", "", "", " XXX ", "generateEntryPositions()")."
\n". + "
\n"; + break; + case "settings": $prefix = "st"; diff -r bfd480370a70 -r bcc3c4696b3e usrajax.php --- 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"))