diff --git a/uVote/api/votes/votes.php b/uVote/api/votes/votes.php
index 97a464e..95fa84d 100644
--- a/uVote/api/votes/votes.php
+++ b/uVote/api/votes/votes.php
@@ -83,6 +83,12 @@ class votes {
public static function get_bar_bt_per_poll($poll_ID){
return \DBD\UVOTE_DATA_BT_PER_POLL::Q1(array($poll_ID));}
+ public static function get_user_count(){
+ return \DBD\UVOTE_DATA_USER_COUNT_USERS::Q1(array());}
+
+ public static function get_count_user_votes_per_poll($poll_ID){
+ return \DBD\UVOTE_DATA_USER_COUNT_CHOICE_PER_POLL::Q1(array($poll_ID));}
+
public static function get_user_per_party_overall($user_ID){
return \DBD\UVOTE_DATA_USER_PER_PARTY_OVERALL::QA(array($user_ID));
}
diff --git a/uVote/dbd/qq/UVOTE_DATA_USER_COUNT_CHOICE_PER_POLL.php b/uVote/dbd/qq/UVOTE_DATA_USER_COUNT_CHOICE_PER_POLL.php
new file mode 100644
index 0000000..a682924
--- /dev/null
+++ b/uVote/dbd/qq/UVOTE_DATA_USER_COUNT_CHOICE_PER_POLL.php
@@ -0,0 +1,11 @@
+
${bars_user}
+
Ergebnis Bundestag
${bars_bt}
@@ -16,6 +19,6 @@
${vote_buttons}
-
+
\ No newline at end of file
diff --git a/uVote/page/default_bulletin/default_bulletin.php b/uVote/page/default_bulletin/default_bulletin.php
index 57f0d4d..3a8fea8 100644
--- a/uVote/page/default_bulletin/default_bulletin.php
+++ b/uVote/page/default_bulletin/default_bulletin.php
@@ -38,6 +38,12 @@ class default_bulletin extends SYSTEM\PAGE\Page {
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/table_bt.tpl'), $vars);
}
+ private function voice_weight(){
+ $vars = votes::get_count_user_votes_per_poll($this->poll_ID);
+ $vars['voteweight'] = 1/$vars['count']*100;
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/voteweight.tpl'), $vars);;
+ }
+
private function vote_buttons($poll_expired){
$user_poll = votes::getUserPollData($this->poll_ID);
if($poll_expired){
@@ -105,6 +111,7 @@ class default_bulletin extends SYSTEM\PAGE\Page {
$vars['css'] = $this->css();
$vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
$vars ['vote_buttons'] = $this->vote_buttons($poll_expired);
+ $vars['voice_weight'] = $this->voice_weight();
$vars['poll_ID'] = $this->poll_ID;
$vars = array_merge($vars,votes::get_voteinfo($this->poll_ID));
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/bulletin.tpl'),$vars);
diff --git a/uVote/page/default_bulletin/voteweight.tpl b/uVote/page/default_bulletin/voteweight.tpl
new file mode 100644
index 0000000..fc5d06f
--- /dev/null
+++ b/uVote/page/default_bulletin/voteweight.tpl
@@ -0,0 +1,4 @@
+
+ Dein aktuelles Stimmgewicht bei dieser Abstimmung:
+ ${voteweight}%
+
\ No newline at end of file
diff --git a/uVote/page/default_page/vote.tpl b/uVote/page/default_page/vote.tpl
index 256620c..b03f632 100644
--- a/uVote/page/default_page/vote.tpl
+++ b/uVote/page/default_page/vote.tpl
@@ -1,25 +1,27 @@