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 @@
  • -