diff pages/vote.inc.php @ 1085:01783161eeb2

Fix usr and adm ajax and voting.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 25 Jan 2017 22:39:42 +0200
parents 7e497188e4c6
children 4c76b4994414
line wrap: on
line diff
--- a/pages/vote.inc.php	Wed Jan 25 22:02:29 2017 +0200
+++ b/pages/vote.inc.php	Wed Jan 25 22:39:42 2017 +0200
@@ -80,24 +80,7 @@
 <noscript>
 <div class="notice">If your browser supports JavaScript, enable it for smoother voting experience.</div>
 </noscript>
-<script type="text/javascript">
-
-function updateVote(eid, value)
-{
-  var msuccess = function(txt)
-  {
-  }
-
-  var mfail = function(txt)
-  {
-    jsMessageBox("<h1>Ooops, an error occured</h2><p>Something went wrong, votes might not be submitted. :(</p>");
-  }
-
-  jsSendPOSTRequest("action=set&entry_id="+eid+"&vote="+value, msuccess, mfail);
-  return false;
-}
-
-</script>
+<script type="text/javascript" src="usrajax.js.php"></script>
 <?php
   // Try fetching previously stored votes
   $sql = stPrepareSQL(