Mercurial > hg > fapweb
diff admajax.php @ 320:a0a6131c37b4
Vote key activation.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 27 Nov 2013 17:26:17 +0200 |
parents | 623acd958944 |
children | 9462a59d3ab3 |
line wrap: on
line diff
--- a/admajax.php Wed Nov 27 16:26:58 2013 +0200 +++ b/admajax.php Wed Nov 27 17:26:17 2013 +0200 @@ -138,7 +138,7 @@ if ($voteKeyMode == VOTE_ACTIVATE) { $str .= stGetFormCheckBoxInput("active", $id, $prefix, $item["active"], FALSE, - "class=\"keyactive\" onClick=\"voteKeyToggle(".$id.")\"", "")."\n"; + "class=\"keyactive\" onClick=\"voteKeySetActive(".$id.")\"", ""); } return $str; @@ -363,7 +363,7 @@ echo "<div class=\"votekey\" id=\"vkey".$item["id"]."\">". stGetVoteKeyItemData($item["id"], $item, "vk"). - "</div>"; + "</div>\n"; } break; @@ -747,6 +747,8 @@ case "active": // Autobots activate! + $sql = stPrepareSQL("UPDATE votekeys SET active=%B WHERE id=%D", "active", "id"); + stExecSQLCond($sql, "Votekey status changed."); break; } }