diff --git a/lib/system b/lib/system
index 90ce83b..bb73e4d 160000
--- a/lib/system
+++ b/lib/system
@@ -1 +1 @@
-Subproject commit 90ce83ba36c6081b1395b555575260cb13358693
+Subproject commit bb73e4d8a5547ba56f433c65fb70f2cd765e1a06
diff --git a/uvote/api/votes/votes.php b/uvote/api/votes/votes.php
index 1cb4c1b..8ef7f93 100644
--- a/uvote/api/votes/votes.php
+++ b/uvote/api/votes/votes.php
@@ -173,7 +173,7 @@ class votes {
public static function open_vote($poll_ID){
$vote = self::get_voteinfo($poll_ID); //votes::getVoteOfGroup($poll_ID);
- $result = SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/full_vote.tpl'), $vote);
+ $result = SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/full_vote.tpl'), $vote);
return $result;
}
}
diff --git a/uvote/files/frontend_logos/icon_urn.png b/uvote/files/frontend_logos/icon_urn.png
new file mode 100644
index 0000000..f68e86c
Binary files /dev/null and b/uvote/files/frontend_logos/icon_urn.png differ
diff --git a/uvote/page/default_bulletin/default_bulletin.php b/uvote/page/default_bulletin/default_bulletin.php
index 5d6361b..1ca55ed 100644
--- a/uvote/page/default_bulletin/default_bulletin.php
+++ b/uvote/page/default_bulletin/default_bulletin.php
@@ -43,7 +43,7 @@ class default_bulletin extends SYSTEM\PAGE\Page {
// $vote['bt_vote_class'] = $this->tablerow_class($vote['bt_choice']);
foreach($party_votes as $pv){
- $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/vote_bt.tpl'),
+ $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/vote_bt.tpl'),
array( 'party' => $pv['party'],
'choice' => $this->get_party_per_poll($pv['choice']),
'choice_class' => $this->tablerow_class($pv['choice']),
@@ -57,7 +57,7 @@ class default_bulletin extends SYSTEM\PAGE\Page {
private function get_pro_comments (){
$result = '';
- $vars = votes::getUserComments($this->poll_ID, 1);
+ /*$vars = votes::getUserComments($this->poll_ID, 1);
foreach($vars as $com){
$rating = votes::get_commentrate($com['c_ID'], 1);
@@ -65,14 +65,14 @@ class default_bulletin extends SYSTEM\PAGE\Page {
$rating2 = votes::get_commentrate($com['c_ID'], 2);
$com['count_down'] = $rating2['count'];
// $com['c_txt'] = utf8_encode($com['c_txt']);
- $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/comment.tpl'), $com);
- }
+ $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/comment.tpl'), $com);
+ }*/
return $result;
}
private function get_con_comments (){
$result = '';
- $vars = votes::getUserComments($this->poll_ID, 2);
+ /*$vars = votes::getUserComments($this->poll_ID, 2);
foreach($vars as $com){
$rating = votes::get_commentrate($com['c_ID'], 1);
@@ -80,8 +80,8 @@ class default_bulletin extends SYSTEM\PAGE\Page {
$rating2 = votes::get_commentrate($com['c_ID'], 2);
$com['count_down'] = $rating2['count'];
// $com['c_txt'] = utf8_encode($com['c_txt']);
- $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/comment.tpl'), $com);
- }
+ $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/comment.tpl'), $com);
+ }*/
return $result;
}
@@ -91,7 +91,7 @@ class default_bulletin extends SYSTEM\PAGE\Page {
$bars['vote_no_perc'] = round($bars['no_perc']*100,0);
$bars['vote_ent_perc'] = round($bars['ent_perc']*100,0);
$bars['title'] = 'Gemessen auf uVote';
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/bars_user.tpl'),$bars);
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/bars_user.tpl'),$bars);
}
private function bars_party(){
@@ -102,7 +102,7 @@ class default_bulletin extends SYSTEM\PAGE\Page {
$vote['party_yes'] = $vote['votes_pro'] > 0 ? round($vote['votes_pro']/$vote['total']*100,0) : $vote['votes_pro'];
$vote['party_no'] = $vote['votes_contra'] > 0 ? round($vote['votes_contra']/$vote['total']*100,0) : $vote['votes_contra'];
$vote['party_ent'] = $vote['nr_attending'] > 0 ? round(($vote['nr_attending'] - $vote['votes_pro'] - $vote['votes_contra'])/$vote['total']*100,0) : $vote['nr_attending'];
- $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/table_parties.tpl'), $vote);
+ $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/table_parties.tpl'), $vote);
}
return $result;
@@ -113,7 +113,7 @@ class default_bulletin extends SYSTEM\PAGE\Page {
if (!$vars['bt_total']){
return '';}
$info = array();
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/icons_table_parties.tpl'), $info);
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/icons_table_parties.tpl'), $info);
}
private function bars_bt(){
@@ -123,13 +123,13 @@ class default_bulletin extends SYSTEM\PAGE\Page {
$vars['bt_ent'] = round(($vars['bt_attending'] - $vars['bt_pro'] - $vars['bt_con'])/$vars['bt_total']*100,0);
$vars['bt_pro'] = round($vars['bt_pro']/$vars['bt_total']*100,0);
$vars['bt_con'] = round($vars['bt_con']/$vars['bt_total']*100,0);
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/table_bt.tpl'), $vars);
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/table_bt.tpl'), $vars);
}
private function voice_weight(){
$vars = votes::get_count_user_votes_per_poll($this->poll_ID);
$vars['voteweight'] = round(1/$vars['count']*100);
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/voteweight.tpl'), $vars);
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/voteweight.tpl'), $vars);
}
private function p_fields (){
@@ -230,13 +230,12 @@ class default_bulletin extends SYSTEM\PAGE\Page {
}
$vars['poll_ID'] = $this->poll_ID; //put it here - so its filled in!
- $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_MAINPAGE));
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(150));
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(100));
+ $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=files&cat=frontend_logos&id=';
+ $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote_register'));
+ $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
$vars = array_merge($vars,votes::get_voteinfo($this->poll_ID));
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/bulletin.tpl'),$vars);
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/bulletin.tpl'),$vars);
}
}
\ No newline at end of file
diff --git a/uvote/page/default_bulletin/bars_user.tpl b/uvote/page/default_bulletin/tpl/bars_user.tpl
similarity index 100%
rename from uvote/page/default_bulletin/bars_user.tpl
rename to uvote/page/default_bulletin/tpl/bars_user.tpl
diff --git a/uvote/page/default_bulletin/bulletin.tpl b/uvote/page/default_bulletin/tpl/bulletin.tpl
similarity index 100%
rename from uvote/page/default_bulletin/bulletin.tpl
rename to uvote/page/default_bulletin/tpl/bulletin.tpl
diff --git a/uvote/page/default_bulletin/comment.tpl b/uvote/page/default_bulletin/tpl/comment.tpl
similarity index 100%
rename from uvote/page/default_bulletin/comment.tpl
rename to uvote/page/default_bulletin/tpl/comment.tpl
diff --git a/uvote/page/default_bulletin/icons_table_parties.tpl b/uvote/page/default_bulletin/tpl/icons_table_parties.tpl
similarity index 100%
rename from uvote/page/default_bulletin/icons_table_parties.tpl
rename to uvote/page/default_bulletin/tpl/icons_table_parties.tpl
diff --git a/uvote/page/default_bulletin/table_bt.tpl b/uvote/page/default_bulletin/tpl/table_bt.tpl
similarity index 100%
rename from uvote/page/default_bulletin/table_bt.tpl
rename to uvote/page/default_bulletin/tpl/table_bt.tpl
diff --git a/uvote/page/default_bulletin/table_parties.tpl b/uvote/page/default_bulletin/tpl/table_parties.tpl
similarity index 100%
rename from uvote/page/default_bulletin/table_parties.tpl
rename to uvote/page/default_bulletin/tpl/table_parties.tpl
diff --git a/uvote/page/default_bulletin/vote_bt.tpl b/uvote/page/default_bulletin/tpl/vote_bt.tpl
similarity index 100%
rename from uvote/page/default_bulletin/vote_bt.tpl
rename to uvote/page/default_bulletin/tpl/vote_bt.tpl
diff --git a/uvote/page/default_bulletin/voteweight.tpl b/uvote/page/default_bulletin/tpl/voteweight.tpl
similarity index 100%
rename from uvote/page/default_bulletin/voteweight.tpl
rename to uvote/page/default_bulletin/tpl/voteweight.tpl
diff --git a/uvote/page/default_comment/default_comment.php b/uvote/page/default_comment/default_comment.php
index 32b9b0c..204f805 100644
--- a/uvote/page/default_comment/default_comment.php
+++ b/uvote/page/default_comment/default_comment.php
@@ -30,7 +30,7 @@ class default_comment extends SYSTEM\PAGE\Page {
$vars = votes::getUserComments($this->poll_ID, 1);
foreach($vars as $com){
$com['c_txt'] = utf8_encode($com['c_txt']);
- $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/comment.tpl'), $com);
+ $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/comment.tpl'), $com);
}
return $result;
@@ -41,7 +41,7 @@ class default_comment extends SYSTEM\PAGE\Page {
foreach($vars as $com){
$com['c_txt'] = utf8_encode($com['c_txt']);
- $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/comment.tpl'), $com);
+ $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/comment.tpl'), $com);
}
return $result;
@@ -75,13 +75,13 @@ class default_comment extends SYSTEM\PAGE\Page {
}
$vars['poll_ID'] = $this->poll_ID; //put it here - so its filled in!
- $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
+ $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=files&cat=frontend_logos&id=';
$vars = array_merge($vars, \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_MAINPAGE));
$vars = array_merge($vars, \SYSTEM\locale::getStrings(150));
$vars = array_merge($vars, \SYSTEM\locale::getStrings(100));
$vars = array_merge($vars,votes::get_voteinfo($this->poll_ID));
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_comment/comment.tpl'),$vars);
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_comment/tpl/comment.tpl'),$vars);
}
}
\ No newline at end of file
diff --git a/uvote/page/default_comment/comment.tpl b/uvote/page/default_comment/tpl/comment.tpl
similarity index 100%
rename from uvote/page/default_comment/comment.tpl
rename to uvote/page/default_comment/tpl/comment.tpl
diff --git a/uvote/page/default_page/default_page.php b/uvote/page/default_page/default_page.php
index 0a42ad4..b842e7f 100644
--- a/uvote/page/default_page/default_page.php
+++ b/uvote/page/default_page/default_page.php
@@ -156,10 +156,10 @@ class default_page extends SYSTEM\PAGE\Page {
if(!$_escaped_fragment_){
$vars['js'] = $this->js();}
$vars['css'] = $this->css();
- $vars['votelist'] = $this->generate_votelist();
$vars['registerform'] = \SYSTEM\SECURITY\Security::isLoggedIn() ? $this->getloggedinform() : $this->exchange_registerform();
$vars['loginform'] = \SYSTEM\SECURITY\Security::isLoggedIn() ? $this->exchange_loginform() : $this->getloginform() ;
- $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
+ $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=files&cat=frontend_logos&id=';
+ $vars['votelist'] = $this->generate_votelist();
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote_register'));
diff --git a/uvote/page/default_register/default_register.php b/uvote/page/default_register/default_register.php
index a167f29..01e5414 100644
--- a/uvote/page/default_register/default_register.php
+++ b/uvote/page/default_register/default_register.php
@@ -7,11 +7,11 @@ class default_register extends SYSTEM\PAGE\Page {
public function html(){
$vars = array();
- $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
+ $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=files&cat=frontend_logos&id=';
$vars['css'] = $this->css();
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote_register'));
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_register/register.tpl'), $vars);
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_register/tpl/register.tpl'), $vars);
}
}
\ No newline at end of file
diff --git a/uvote/page/default_register/register.tpl b/uvote/page/default_register/tpl/register.tpl
similarity index 98%
rename from uvote/page/default_register/register.tpl
rename to uvote/page/default_register/tpl/register.tpl
index d5d4172..2e9f067 100644
--- a/uvote/page/default_register/register.tpl
+++ b/uvote/page/default_register/tpl/register.tpl
@@ -28,7 +28,7 @@
-
+
diff --git a/uvote/page/user_list_active/active.tpl b/uvote/page/user_list_active/active.tpl
deleted file mode 100644
index 3955133..0000000
--- a/uvote/page/user_list_active/active.tpl
+++ /dev/null
@@ -1 +0,0 @@
-${votetlist}
\ No newline at end of file
diff --git a/uvote/page/user_list_ended/ended.tpl b/uvote/page/user_list_active/tpl/active.tpl
similarity index 100%
rename from uvote/page/user_list_ended/ended.tpl
rename to uvote/page/user_list_active/tpl/active.tpl
diff --git a/uvote/page/user_list_active/user_list_active.php b/uvote/page/user_list_active/user_list_active.php
index 1d42c71..8d06192 100644
--- a/uvote/page/user_list_active/user_list_active.php
+++ b/uvote/page/user_list_active/user_list_active.php
@@ -66,7 +66,7 @@ class user_list_active extends SYSTEM\PAGE\Page {
$party_votes = votes::get_barsperparty($vote['ID']);
$vote['bt_vote_class'] = $this->tablerow_class($vote['bt_choice']);
foreach($party_votes as $pv){
- $vote['bt'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote_bt.tpl'),
+ $vote['bt'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/vote_bt.tpl'),
array( 'party' => $pv['party'],
'choice' => $this->get_party_per_poll($pv['choice']),
'choice_class' => $this->badge_class($pv['choice'])));
@@ -76,7 +76,7 @@ class user_list_active extends SYSTEM\PAGE\Page {
$uvote = votes::get_users_choice_per_poll($vote['ID']);
$vote['uv_vote_class'] = count($uvote) > 0 ? $this->tablerow_class($uvote[0]['choice']) : '';
foreach($uvote as $v){
- $vote['uv'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote_uv.tpl'),
+ $vote['uv'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/vote_uv.tpl'),
array( 'badge' => self::badge_class($v['choice']),
'perc' => $v['count'] > 0 ? round($v['count']/$vote_count['count']*100, 2) : 0));
}
@@ -86,9 +86,9 @@ class user_list_active extends SYSTEM\PAGE\Page {
$vote['panel_class'] = default_page::panel_class($user_vote);
if($time_remain > 0){
- $result[0] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote.tpl'), $vote);
+ $result[0] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/vote.tpl'), $vote);
} else {
- $result[1] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote.tpl'), $vote);
+ $result[1] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/vote.tpl'), $vote);
}
}
return $result[0].$result[1];
@@ -97,11 +97,10 @@ class user_list_active extends SYSTEM\PAGE\Page {
public function html(){
$vars = array();
$vars['votelist'] = $this->generate_votelist();
- $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
+ $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=files&cat=frontend_logos&id=';
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote_register'));
- $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote_poll'));
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_list_active/active.tpl'), $vars);
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_list_active/tpl/active.tpl'), $vars);
}
}
\ No newline at end of file
diff --git a/uvote/page/user_list_ended/tpl/ended.tpl b/uvote/page/user_list_ended/tpl/ended.tpl
new file mode 100644
index 0000000..f2cef67
--- /dev/null
+++ b/uvote/page/user_list_ended/tpl/ended.tpl
@@ -0,0 +1 @@
+${votelist}
\ No newline at end of file
diff --git a/uvote/page/user_list_ended/user_list_ended.php b/uvote/page/user_list_ended/user_list_ended.php
index 55a6b8a..f20dfc2 100644
--- a/uvote/page/user_list_ended/user_list_ended.php
+++ b/uvote/page/user_list_ended/user_list_ended.php
@@ -65,7 +65,7 @@ class user_list_ended extends SYSTEM\PAGE\Page {
$party_votes = votes::get_barsperparty($vote['ID']);
$vote['bt_vote_class'] = $this->tablerow_class($vote['bt_choice']);
foreach($party_votes as $pv){
- $vote['bt'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote_bt.tpl'),
+ $vote['bt'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/vote_bt.tpl'),
array( 'party' => $pv['party'],
'choice' => $this->get_party_per_poll($pv['choice']),
'choice_class' => $this->badge_class($pv['choice'])));
@@ -75,7 +75,7 @@ class user_list_ended extends SYSTEM\PAGE\Page {
$uvote = votes::get_users_choice_per_poll($vote['ID']);
$vote['uv_vote_class'] = count($uvote) > 0 ? $this->tablerow_class($uvote[0]['choice']) : '';
foreach($uvote as $v){
- $vote['uv'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote_uv.tpl'),
+ $vote['uv'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/vote_uv.tpl'),
array( 'badge' => self::badge_class($v['choice']),
'perc' => $v['count'] > 0 ? round($v['count']/$vote_count['count']*100, 2) : 0));
}
@@ -85,9 +85,9 @@ class user_list_ended extends SYSTEM\PAGE\Page {
$vote['panel_class'] = default_page::panel_class($user_vote);
if($time_remain > 0){
- $result[0] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote.tpl'), $vote);
+ $result[0] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/vote.tpl'), $vote);
} else {
- $result[1] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote.tpl'), $vote);
+ $result[1] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/vote.tpl'), $vote);
}
}
return $result[0].$result[1];
@@ -96,11 +96,10 @@ class user_list_ended extends SYSTEM\PAGE\Page {
public function html(){
$vars = array();
$vars['votelist'] = $this->generate_votelist();
- $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_MAINPAGE));
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(150));
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(110));
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_list_ended/ended.tpl'), $vars);
+ $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=files&cat=frontend_logos&id=';
+ $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
+ $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote_register'));
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_list_ended/tpl/ended.tpl'), $vars);
}
}
\ No newline at end of file
diff --git a/uvote/page/user_main/user_main.php b/uvote/page/user_main/user_main.php
index 2f86906..20903e9 100644
--- a/uvote/page/user_main/user_main.php
+++ b/uvote/page/user_main/user_main.php
@@ -6,12 +6,9 @@ class user_main extends SYSTEM\PAGE\Page {
return '';}
public function html(){
$vars = array();
-
$uv = new user_main_uVote();
- $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
+ $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=files&cat=frontend_logos&id=';
$vars['uVote'] = $uv->html();
-
-
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main/main_menu.tpl'),$vars);
}
diff --git a/uvote/page/user_main_myVote/myVote.tpl b/uvote/page/user_main_myVote/tpl/myVote.tpl
similarity index 100%
rename from uvote/page/user_main_myVote/myVote.tpl
rename to uvote/page/user_main_myVote/tpl/myVote.tpl
diff --git a/uvote/page/user_main_myVote/user_main_myVote.php b/uvote/page/user_main_myVote/user_main_myVote.php
index 536b4a3..d67ad93 100644
--- a/uvote/page/user_main_myVote/user_main_myVote.php
+++ b/uvote/page/user_main_myVote/user_main_myVote.php
@@ -20,10 +20,9 @@ class user_main_myVote extends SYSTEM\PAGE\Page {
$vars = array();
$vars = $this->get_add_data();
$vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_MAINPAGE));
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(150));
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(110));
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_myVote/myVote.tpl'), $vars);
+ $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
+ $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote_register'));
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_myVote/tpl/myVote.tpl'), $vars);
}
}
\ No newline at end of file
diff --git a/uvote/page/user_main_uVote/bt_to_uvote_overall.tpl b/uvote/page/user_main_uVote/tpl/bt_to_uvote_overall.tpl
similarity index 100%
rename from uvote/page/user_main_uVote/bt_to_uvote_overall.tpl
rename to uvote/page/user_main_uVote/tpl/bt_to_uvote_overall.tpl
diff --git a/uvote/page/user_main_uVote/uVote.tpl b/uvote/page/user_main_uVote/tpl/uVote.tpl
similarity index 100%
rename from uvote/page/user_main_uVote/uVote.tpl
rename to uvote/page/user_main_uVote/tpl/uVote.tpl
diff --git a/uvote/page/user_main_uVote/uvoteparties.tpl b/uvote/page/user_main_uVote/tpl/uvoteparties.tpl
similarity index 100%
rename from uvote/page/user_main_uVote/uvoteparties.tpl
rename to uvote/page/user_main_uVote/tpl/uvoteparties.tpl
diff --git a/uvote/page/user_main_uVote/votecountchoice.tpl b/uvote/page/user_main_uVote/tpl/votecountchoice.tpl
similarity index 100%
rename from uvote/page/user_main_uVote/votecountchoice.tpl
rename to uvote/page/user_main_uVote/tpl/votecountchoice.tpl
diff --git a/uvote/page/user_main_uVote/votecountchoicebt.tpl b/uvote/page/user_main_uVote/tpl/votecountchoicebt.tpl
similarity index 100%
rename from uvote/page/user_main_uVote/votecountchoicebt.tpl
rename to uvote/page/user_main_uVote/tpl/votecountchoicebt.tpl
diff --git a/uvote/page/user_main_uVote/user_main_uVote.php b/uvote/page/user_main_uVote/user_main_uVote.php
index c7bc9dc..4d61608 100644
--- a/uvote/page/user_main_uVote/user_main_uVote.php
+++ b/uvote/page/user_main_uVote/user_main_uVote.php
@@ -7,7 +7,7 @@ class user_main_uVote extends SYSTEM\PAGE\Page {
foreach($votes as $vote){
$vote['match_percentage'] = round($vote['class_MATCH']/($vote['class_MATCH']+$vote['class_MISSMATCH'])*100,2);
- $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_uVote/uvoteparties.tpl'), $vote);
+ $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_uVote/tpl/uvoteparties.tpl'), $vote);
}
print_r($votes, TRUE);
return $result;
@@ -34,7 +34,7 @@ class user_main_uVote extends SYSTEM\PAGE\Page {
}
//$vote['count'];
//$vote['choice'];
- $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_uVote/votecountchoice.tpl'),$vote);
+ $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_uVote/tpl/votecountchoice.tpl'),$vote);
}
return $result;
}
@@ -60,7 +60,7 @@ class user_main_uVote extends SYSTEM\PAGE\Page {
}
//$vote['count'];
//$vote['choice'];
- $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_uVote/votecountchoicebt.tpl'),$vote);
+ $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_uVote/tpl/votecountchoicebt.tpl'),$vote);
}
return $result;
}
@@ -78,11 +78,10 @@ class user_main_uVote extends SYSTEM\PAGE\Page {
$vars['votes_all'] = $this->votes_all();
$vars['votes_all_bt'] = $this->votes_all_bt();
$vars['user_count'] = $this->user_count();
- $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_MAINPAGE));
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(150));
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(100));
- return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_uVote/uVote.tpl'),$vars);
+ $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=files&cat=frontend_logos&id=';
+ $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
+ $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote_register'));
+ return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_uVote/tpl/uVote.tpl'),$vars);
}
}
\ No newline at end of file
diff --git a/uvote/page/user_main_urVote/all_polls.tpl b/uvote/page/user_main_urVote/tpl/all_polls.tpl
similarity index 100%
rename from uvote/page/user_main_urVote/all_polls.tpl
rename to uvote/page/user_main_urVote/tpl/all_polls.tpl
diff --git a/uvote/page/user_main_urVote/bt_to_user_overall.tpl b/uvote/page/user_main_urVote/tpl/bt_to_user_overall.tpl
similarity index 100%
rename from uvote/page/user_main_urVote/bt_to_user_overall.tpl
rename to uvote/page/user_main_urVote/tpl/bt_to_user_overall.tpl
diff --git a/uvote/page/user_main_urVote/overall_all_polls.tpl b/uvote/page/user_main_urVote/tpl/overall_all_polls.tpl
similarity index 100%
rename from uvote/page/user_main_urVote/overall_all_polls.tpl
rename to uvote/page/user_main_urVote/tpl/overall_all_polls.tpl
diff --git a/uvote/page/user_main_urVote/urVote.tpl b/uvote/page/user_main_urVote/tpl/urVote.tpl
similarity index 100%
rename from uvote/page/user_main_urVote/urVote.tpl
rename to uvote/page/user_main_urVote/tpl/urVote.tpl
diff --git a/uvote/page/user_main_urVote/urvoteparties.tpl b/uvote/page/user_main_urVote/tpl/urvoteparties.tpl
similarity index 100%
rename from uvote/page/user_main_urVote/urvoteparties.tpl
rename to uvote/page/user_main_urVote/tpl/urvoteparties.tpl
diff --git a/uvote/page/user_main_urVote/user_main_urVote.php b/uvote/page/user_main_urVote/user_main_urVote.php
index 6889e5d..3c8d97f 100644
--- a/uvote/page/user_main_urVote/user_main_urVote.php
+++ b/uvote/page/user_main_urVote/user_main_urVote.php
@@ -1,13 +1,10 @@
id, \SYSTEM\SECURITY\Security::getUser()->creationDate);
$v = $vars['voted'] > 1 ? $vars['voted'] : 1;
$nv = $vars['not_voted'];
- return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/overall_all_polls.tpl'),
+ return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/tpl/overall_all_polls.tpl'),
array( 'vote_perc'=> round($v/($nv+$v)*100, 2),
'no_vote_perc'=> round($nv/($nv+$v)*100, 2),
'voted'=> $v,
@@ -19,9 +16,9 @@ class user_main_urVote extends SYSTEM\PAGE\Page {
$v = $vars['voted'];
$nv = $vars['not_voted'];
print_r($vars, true);
- return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/all_polls.tpl'),
- array( 'vote_perc'=> round($v/($nv+$v)*100, 2),
- 'no_vote_perc'=> round($nv/($nv+$v)*100, 2),
+ return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/tpl/all_polls.tpl'),
+ array( 'vote_perc'=> round($v/(($nv+$v)*100+1), 2),
+ 'no_vote_perc'=> round($nv/(($nv+$v)*100+1), 2),
'voted'=> $v,
'not_voted'=> $nv));
}
@@ -40,7 +37,7 @@ class user_main_urVote extends SYSTEM\PAGE\Page {
while($row = $res->next()){
$row['match_percentage'] = round($row['class_MATCH']/($row['class_MATCH']+$row['class_MISSMATCH']+1)*100,2);
- $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/bt_to_user_overall.tpl'), $row);
+ $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/tpl/bt_to_user_overall.tpl'), $row);
}
return $result;
$row['votes_cast'] = round(($row['class_MATCH']+$row['class_MISSMATCH']),2);
@@ -65,7 +62,7 @@ class user_main_urVote extends SYSTEM\PAGE\Page {
$res2 = votes::vote_accord_with_party($row['party']);
$row['according_laws'] = $this->build_according_law_html($res2, $row['party']);
$row['match_percentage'] = round($row['class_MATCH']/($row['class_MATCH']+$row['class_MISSMATCH'])*100,2);
- $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/urvoteparties.tpl'), $row);;
+ $result .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/tpl/urvoteparties.tpl'), $row);;
}
return $result;
}
@@ -84,12 +81,12 @@ class user_main_urVote extends SYSTEM\PAGE\Page {
// $vars['poll_compare'] = $this->count_all_polls();
$vars['choices_user_ID'] = $this->user_per_party_overall();
$vars['choices_bt_to_user'] = $this->user_to_bt();
- $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
+ $vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=files&cat=frontend_logos&id=';
$vars['user_temp_votes'] = $this->user_temp_votes();
$vars['user_overall_votes'] = $this->user_overall_votes();
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_MAINPAGE));
- $vars = array_merge($vars, \SYSTEM\locale::getStrings(150));
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/urVote.tpl'),$vars);
+ $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
+ $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote_register'));
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_main_urVote/tpl/urVote.tpl'),$vars);
}
}
\ No newline at end of file