tried to implement javascript to vote.tpl
This commit is contained in:
parent
99612ce729
commit
1c5e934818
@ -21,6 +21,8 @@ class votes {
|
||||
// die();
|
||||
if ($res->next()){
|
||||
throw new ERROR('You already voted!'); }
|
||||
$poll_ID = $_GET["poll_ID"];
|
||||
$vote = $_GET["vote"];
|
||||
$res = $con->prepare( 'insertVote',
|
||||
'INSERT INTO uvote_data
|
||||
VALUES (?, ?, ?);',
|
||||
|
||||
@ -8,7 +8,23 @@
|
||||
|
||||
<div class="span5" style="">
|
||||
<h2>Abstimmung</h2>
|
||||
<a class="btn btn-large btn-green" style="width: 110px;" href="#">Pro »</a>
|
||||
<a class="btn btn-large btn-green" style="width: 110px;">Pro »
|
||||
<script language="javascript">
|
||||
$(function(){
|
||||
|
||||
$('#btn btn-large btn-green').on('click', function (e) {
|
||||
|
||||
var poll_ID = "15";
|
||||
var vote = "4";
|
||||
|
||||
document.write('href="mojotrollz.eu/web/uVote/api.php?call=vote&action=vote&poll_ID=' + poll_ID + '&vote=' + vote + '"');
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</a>
|
||||
|
||||
<a class="btn btn-large btn-red" style="width: 110px; background-color: red;" href="#">Contra »</a>
|
||||
<a class="btn btn-large btn-grey" style="width: 110px; background-color: grey;" href="#">Enthaltung »</a>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user