made vote-function use poll_ID from Database. Pro-buttons have issues with that (?).

This commit is contained in:
Nael 2013-06-24 11:04:56 +02:00
parent a6aa8c728f
commit bb4f169083
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ class default_page extends SYSTEM\PAGE\Page {
$result = "";
$votes = votes::getAllVotesOfGroup(1);
foreach($votes as $vote){
$vars = array('vote_title' => $vote['title'], 'vote_text' => $vote['text'], 'poll_ID' => rand(1, 100));
$vars = array('vote_title' => $vote['title'], 'vote_text' => $vote['text'], 'poll_ID' => $vote['ID']);
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote.tpl'), $vars);
}
return $result;

View File

@ -8,7 +8,7 @@
<div class="span5" style="">
<h2>Abstimmung</h2>
<a class="btn btn-large btn-green btnvote_yes" style="width: 110px;" poll_ID="${poll_ID}">Pro &raquo;
<a class="btn btn-large btn-green btnvote_yes" style="width: 110px;" poll_ID="${ID}">Pro &raquo;
</a>