Mercurial > hg > fapweb
diff usrajax.php @ 325:aac3bdd73ec1
More work on voting.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 27 Nov 2013 23:19:00 +0200 |
parents | 54dfab6ba12c |
children | 899a3583666d |
line wrap: on
line diff
--- a/usrajax.php Wed Nov 27 18:48:49 2013 +0200 +++ b/usrajax.php Wed Nov 27 23:19:00 2013 +0200 @@ -104,8 +104,19 @@ $cid = $compo["id"]; foreach (stExecSQL("SELECT * FROM entries WHERE compo_id=".$cid) as $entry) { + $value = stGetRequestItem("", 0); + if (!stUpdateVote($voteKeyId, $entry["id"], $value)) + { + stError("Could not set vote for compo #".$cid.", entry #".$entry["id"]); + break; + } } } + if (!$errorSet) + { + stSetSessionItem("mode", "done"); + header("Location: ".stGetRequestItem("goto", "vote")); + } } break;