Merge branch 'master' of mojotrollz.eu:hosting

Conflicts:
	system
This commit is contained in:
messerbill 2014-03-11 01:17:32 +01:00
commit b7aa816e58
18 changed files with 484 additions and 84 deletions

View File

@ -9,12 +9,14 @@ class default_page extends SYSTEM\PAGE\Page {
'<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PCRYPTOSHA(),'jquery.md5.js').'"></script>'.
'<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PCRYPTOSHA(),'jquery.sha1.js').'"></script>'.
'<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PLIB(),'jquery.countdown\jquery.countdown.js').'"></script>'.
'<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/loadtexts.js').'"></script>';
'<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/account_create.js').'"></script>';
'<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/loadtexts.js').'"></script>'.
'<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/account_create.js').'"></script>'.
'<script src="https://www.google.com/jsapi" type="text/javascript"></script>'.
'<script type="text/javascript">google.load("visualization", "1", {packages:["corechart"]});</script>';
}
private function css(){
return '<link href="'.SYSTEM\WEBPATH(new PPAGE(),'default_page\css\default_page.css').'" rel="stylesheet">';}
return '<link href="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/css/default_page.css').'" rel="stylesheet">';}
private function get_party_per_poll($choice){
switch($choice){
@ -84,7 +86,7 @@ class default_page extends SYSTEM\PAGE\Page {
$vote['bt'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote_bt.tpl'),
array( 'party' => $pv['party'],
'choice' => $this->get_party_per_poll($pv['choice']),
'choice_class' => $this->tablerow_class($pv['choice'])));
'choice_class' => $this->badge_class($pv['choice'])));
}
//uvote vote
@ -93,7 +95,7 @@ class default_page extends SYSTEM\PAGE\Page {
foreach($uvote as $v){
$vote['uv'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote_uv.tpl'),
array( 'badge' => self::badge_class($v['choice']),
'perc' => $v['count'] > 0 ? $v['count']/$vote_count['count']*100 : 0));
'perc' => $v['count'] > 0 ? round($v['count']/$vote_count['count']*100, 2) : 0));
}
}

View File

@ -1,8 +1,9 @@
<div class="row" style="margin: 0;">
<div class="span6" style="width: 50%;">
<iframe src="${iframe_link}" width="730" height="650"></iframe>
</div>
<div class="row" style="margin: 0;">
<div class="span6" style="float: right">
Quelle: <a href="${iframe_link}">${iframe_link} </a>
</div>
<div class="span6" style="width: 50%;">
<iframe src="${iframe_link}" width="730" height="650"></iframe>
</div>
</div>

View File

@ -6,12 +6,7 @@ $(document).ready(function() {
//loadUrlPic($(this).attr('url'));
});*/
$('.btn_vote').click(function () {
//vote_click($(this).attr('poll_ID'));
$('#user_main').load('./?action=open_bulletin&poll_ID=' + $(this).attr('poll_ID'));
open_vote($(this).attr('poll_ID'));
});
/*$('.btn_openvoteinfo').click(function () {
@ -23,9 +18,43 @@ $(document).ready(function() {
});*/
//jqBootstrapValidation
$("#form_login input").not("[type=submit]").jqBootstrapValidation({
$('#user_main').load('./?action=user_main', function(){
register_registerform();
$('#feedback_submit').click(function (data){
var test = $('textarea#feedback_text').val();
send_feedback(test);
});
$('#tabs_user_main a').click(function (e) {
e.preventDefault();
$(this).tab('show');
load_user_main_tab($(this).attr('action'));
});
//load_user_main_tab('user_main_uVote');
});
$('#user_list').load('./?action=user_list', function(){
$('.btn_vote').click(function () {
//vote_click($(this).attr('poll_ID'));
$('#user_main').load('./?action=open_bulletin&poll_ID=' + $(this).attr('poll_ID'));
open_vote($(this).attr('poll_ID'));
register_registerform();
});
$('#tabs_user_list a').click(function (e) {
e.preventDefault();
$(this).tab('show');
load_user_list_tab($(this).attr('action'));
});
//load_user_main_tab('user_main_uVote');
});
});
$("#form_login input").not("[type=submit]").jqBootstrapValidation({
preventSubmit: true,
submitError: function($form, event, errors) {},
submitSuccess: function($form, event){
@ -52,56 +81,63 @@ $(document).ready(function() {
}
});
$('#user_main').load('./?action=user_main', function(){
$("#register_user_form input").not("[type=submit]").jqBootstrapValidation(
{
preventSubmit: true,
submitError: function($form, event, errors) {},
submitSuccess: function($form, event){
$.get('./api.php?call=account&action=create&username=' + $('#register_username').val() + '&password_sha=' + $.sha1($('#user_register_password1').val()) + '&email=' + $('#register_email').val() + '&locale=deDE', function (data) {
if(data == 1){
window.location.reload();
} else {
$('#help-block-user-password-combi-wrong').attr('style', 'display: block;');
}
});
event.preventDefault();
}
});
$('#feedback_submit').click(function (data){
var test = $('textarea#feedback_text').val();
send_feedback(test);
});
$('#tabs_user_main a').click(function (e) {
e.preventDefault();
$(this).tab('show');
load_user_main_tab($(this).attr('action'));
});
//load_user_main_tab('user_main_uVote');
function register_registerform(){
console.log("wegwegwegwegwegweg");
$("#register_user_form input").not("[type=submit]").jqBootstrapValidation(
{
preventSubmit: true,
submitError: function($form, event, errors) {},
submitSuccess: function($form, event){
$.get('./api.php?call=account&action=create&username=' + $('#register_username').val() + '&password_sha=' + $.sha1($('#user_register_password1').val()) + '&email=' + $('#register_email').val() + '&locale=deDE', function (data) {
if(data == 1){
window.location.reload();
} else {
$('#help-block-user-password-combi-wrong').attr('style', 'display: block;');
}
});
event.preventDefault();
}
});
});
}
function drawChart(){
//load_visualisation('#graph_bt_uv_overall',84600);
}
function load_user_main_tab(action){
switch(action){
case 'user_main_uVote':
window.location.reload();
$('#tab_uVote').load('./?action='+ action);
$('#tab_uVote').load('./?action='+ action);
return;
case 'user_main_urVote':
$('#tab_urVote').load('./?action='+ action);
return;
case 'user_main_myVote':
$('#tab_myVote').load('./?action='+ action);
$('#tab_myVote').load('./?action='+ action, function(){
$('.add_data_submit').click(function () {
submit_add_data();
alert('success');
});
});
return;
default:
}
}
function load_user_list_tab(action){
switch(action){
case 'user_list_active':
$('#tab_active').load('./?action='+ action);
return;
case 'user_list_ended':
$('#tab_ended').load('./?action='+ action);
return;
default:
}
}
function account_create(inputEmail, inputPassword){
$.get('./api.php?call=account&action=create&username=' + NULL + '&password_sha=' + password + '&email=' + email + '&locale=deDE', function (data) {
@ -138,9 +174,31 @@ function get_barsperparty (poll_ID) {
function vote_click (poll_ID, vote) {
$.getJSON('./api.php?call=vote&action=vote&poll_ID=' + poll_ID + '&vote=' + vote, function(data) {
var items = [];
var items = [];
if(data.status == true){
alert("success");
$('#user_main').load('./?action=open_bulletin&poll_ID=' + poll_ID, function(){
open_vote(poll_ID);
});
} else {
alert(data.result.message);
}
});
}
function submit_add_data () {
var a = document.getElementById("location");
var location = a.options[a.selectedIndex].text;
var b = document.getElementById("birthyear");
var birthyear = b.options[b.selectedIndex].text;
var c = document.getElementById("gender");
var gender = c.options[c.selectedIndex].text;
var d = document.getElementById("children");
var children = d.options[d.selectedIndex].text;
$.getJSON('./api.php?call=vote&action=data&location=' + location + '&birthyear=' + birthyear + '&gender=' + gender + '&children=' + children, function(data) {
var items = [];
if(data.status == true){
alert("success");
} else {
alert(data.result.message);
}
@ -176,7 +234,7 @@ $.ajax({
}
function open_vote (poll_ID) {
$('#list').load('./api.php?call=vote&action=open_vote&poll_ID=' + poll_ID, function(){
$('#user_list').load('./api.php?call=vote&action=open_vote&poll_ID=' + poll_ID, function(){
$('.btnvote_yes').click(function () {
vote_click($(this).attr('poll_ID'),1);
});
@ -186,6 +244,10 @@ function open_vote (poll_ID) {
$('.btnvote_off').click(function () {
vote_click($(this).attr('poll_ID'),3);
});
$('#test').click(function(){
$('#myModal').modal();
});
register_registerform();
});
}
@ -229,4 +291,62 @@ function loadApiPic(id) {
}).complete(function() {
});
}
function load_visualisation(id, timespan){
$('img#loader').show();
$.getJSON('./api.php?call=graph_bt_to_uvote_overall_by_time',function(json){
if(!json || json.status != true || !json.result){
$('img#loader').hide();
return;
}
json = json.result;
$('img#loader').hide();
var data = new google.visualization.DataTable();
first = true;
$.each(json[0], function(key, value){
if(first){
data.addColumn('datetime',key);
first = false;
} else {
data.addColumn('number',key);
}
});
$.each(json, function(key, value){
first = true;
data.addRow($.map(value, function(v) { if(first){first=false;return [new Date(v)];}else{return [parseFloat(v)];}}));});
console.log(data);
var options = {title: 'Übereinstimmung uVote Community/Bundestag', aggregationTarget: 'category', selectionMode: 'multiple', /*curveType: 'function',*/ /*focusTarget: 'category',*/ chartArea:{}, vAxis:{format:'#%', logScale: false}, interpolateNulls: false, width: "300", height: "250"};
//LineChart
new google.visualization.ColumnChart(document.getElementById(id)).draw(data, options);
});
}
function load_visualisation_urvote(id, timespan){
$('img#loader').show();
$.getJSON('./api.php?call=graph_bt_to_user_overall_by_time',function(json){
if(!json || json.status != true || !json.result){
$('img#loader').hide();
return;
}
json = json.result;
$('img#loader').hide();
var data = new google.visualization.DataTable();
first = true;
$.each(json[0], function(key, value){
if(first){
data.addColumn('datetime',key);
first = false;
} else {
data.addColumn('number',key);
}
});
$.each(json, function(key, value){
first = true;
data.addRow($.map(value, function(v) { if(first){first=false;return [new Date(v)];}else{return [parseFloat(v)];}}));});
console.log(data);
var options = {title: id, aggregationTarget: 'category', selectionMode: 'multiple', curveType: 'function', /*focusTarget: 'category',*/ chartArea:{}, vAxis:{logScale: false}, interpolateNulls: false, width: "300", height: "250"};
new google.visualization.LineChart(document.getElementById(id)).draw(data, options);
});
}

View File

@ -3,7 +3,6 @@
<input class="span2" type="password" id="login_password" placeholder="Passwort">
<button type="submit" class="btn">Login</button>
</form> -->
<form class="navbar-form pull-right" style="" id="form_login">
<div class="control-group">
<div class="help-block"style="float: left; padding: 0;"></div>

View File

@ -20,8 +20,32 @@
</head>
<body style="background: ${frontend_logos}background.png, padding-top: 50px;">
<div class="navbar navbar-inverse navbar-fixed-top">
<body style="padding-top: 51px;">
<div class="modal fade" id="impressum" style="float: left; display:none;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Impressum</h4>
</div>
<div class="modal-body">
<div style="background: white;">
${impressum_header}
${impressum_1}
${impressum_2}
${impressum_3}
${impressum_4}
${impressum_5}
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="navbar navbar-inverse navbar-fixed-top" style="">
<div class="navbar-inner" style="padding-left: 50px; padding-right: 50px;">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
@ -29,6 +53,8 @@
<span class="icon-bar"></span>
</button>
<a class="brand" href="" id="menu_uvote">uVote</a>
<a data-toggle="modal" class="brand" href="#impressum" id="impressum"><font size="2">impressum</font></a>
<div class="nav-collapse collapse">
<ul class="nav">
<!--
@ -40,12 +66,16 @@
${loginform}
</div>
</div>
</div>
<div id="site-content" style="padding: 0; margin: 0; margin-left: 40px;">
<div id="user_main" style="padding: 0px; width: 50%; float: left;"></div>
<div id="list" style="padding: 0px; width: 50%; float: right;">
${votelist}
</div>
<div id="site-content" style="padding: 0; margin: 0; margin-left: 40px;">
<div id="user_main" style="position: absolute; padding: 0; padding-top: 0px; width: 50%;"></div>
<div id="user_list" style="padding: 0px; width: 50%; float: right;">
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,4 @@
<td class="${bt_vote_class}" style="width: 80px; margin-top: 10px; border-left: 1px solid lightgray;">
<img src="${frontend_logos}icon_${party}.png" width="30"/><span class="badge badge-success" style="float:right;">${choice}</span><br/>
</td>

View File

@ -1,20 +1,21 @@
<table style="margin-bottom: 5px; width: 95%; height: 100px; border: solid lightgray 1px; background: beige;">
<tr>
<!--<td class="${vote_class}" style="width: 10px; margin-top: 10px; border-left: 1px solid lightgray;">
</td>-->
<td style="padding: 5px; padding-top: 0;">
<h5>${title}</h5>
<img src="${frontend_logos}icon_urn_${vote_class}.png"/>
<a class="btn btn-primary btn-small btn_vote" style="" poll_ID="${ID}">${full_vote_btn}</a>
</td>
<td class="${bt_vote_class}" style="width: 80px; margin-top: 10px; border-left: 1px solid lightgray;">
<td class="${bt_vote_class}" style="width: 80px; margin-top: 5px; border-left: 1px solid lightgray; padding: 2px;">
<img src="${frontend_logos}icon_bt.png" width="80"/>
${bt}
</td>
<td class="${uv_vote_class}" style="width: 50px; height: 100%; border-left: 1px solid lightgray;">
<img src="${frontend_logos}icon_urn.png" width="25"/><br/>
<td class="${uv_vote_class}" style="width: 60px; height: 100%; border-left: 1px solid lightgray; padding: 2px;">
<img src="${frontend_logos}icon_urn.png" width="20"/>
<span style="float: right"><font size="2">uVote</font></span>
<br/>
${uv}
<span class="badge badge-info" style="">${uv_count}</span>
<span class="badge" style="">${uv_count}</span>
</td>
<td style="margin: 0; padding: 0; width: 3px;" >
<table class="poll_time" time="${time_end}" style="width: 100%; height: 100%; margin: 0; padding: 0;">

View File

@ -0,0 +1 @@
<img src="${frontend_logos}icon_${party}.png" width="30"/><span class="badge ${choice_class}" style="float:right;">${choice}</span><br/>

View File

@ -0,0 +1 @@
<span class="badge ${badge}" style="">${perc}%</span>

View File

@ -1,4 +1,4 @@
<div style="width: 90%;">
<div style="width: 50%; padding: 60px;">
<img src="${frontend_logos}logo2.png"/>
<br />
<br />

View File

@ -7,16 +7,22 @@ class page_uvote extends \SYSTEM\API\api_default {
public static function action_open_bulletin ($poll_ID){
if(!\SYSTEM\SECURITY\Security::isLoggedIn()){
return new default_register ($poll_ID);}
return new default_register ();}
return new default_bulletin($poll_ID);}
public static function action_user_main(){
if(!\SYSTEM\SECURITY\Security::isLoggedIn()){
return new default_register ();}
return new user_main();}
return new user_main();}
public static function action_user_list(){
return new user_list();}
public static function action_user_main_uVote(){
return new user_main_uVote();}
public static function action_user_list_active(){
return new user_list_active();}
public static function action_user_list_ended(){
return new user_list_ended();}
public static function action_user_main_urVote(){
return new user_main_urVote();}

View File

@ -0,0 +1,11 @@
<div class="tabbable" style="padding-right: 50px;">
<ul class="nav nav-tabs" id="tabs_user_list">
<li class="active"><a href="#tab_active" action="user_list_active">aktive Abstimmungen</a></li>
<li class=""><a href="#tab_ended" action="user_list_ended">abgelaufene Abstimmungen</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_active">${active}</div>
<div class="tab-pane" id="tab_ended" style="overflow: hidden;"></div>
</div>
</div>

View File

@ -0,0 +1,15 @@
<?php
class user_list extends SYSTEM\PAGE\Page {
public function html(){
$vars = array();
$uv = new user_list_active();
$vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=img&cat=frontend_logos&id=';
$vars['active'] = $uv->html();
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_list/list_menu.tpl'),$vars);
}
}

View File

@ -0,0 +1 @@
${votelist}

View File

@ -0,0 +1,104 @@
<?php
class user_list_active extends SYSTEM\PAGE\Page {
private function get_party_per_poll($choice){
switch($choice){
case 1:
return 'PRO';
case 2:
return 'CON';
case 3:
return 'ENT';
default:
return 'NONE';
}
}
private static function tablerow_class($choice){
switch($choice){
case 1:
return 'pro';
case 2:
return 'con';
case 3:
return 'ent';
default:
return 'open';
}
}
private static function badge_class($choice){
switch($choice){
case 1:
return 'badge-success';
case 2:
return 'badge-important';
case 3:
return 'badge-info';
default:
return '';
}
}
public function generate_votelist(){
$result = array('','');
$votes = votes::getAllVotesOfGroup(1);
foreach($votes as $vote){
$time_remain = strtotime($vote['time_end'])- microtime(true);
$time_span = strtotime($vote['time_end']) - strtotime($vote['time_start']);
$vote_count = votes::get_count_user_votes_per_poll($vote['ID']);
$vote['title'] = utf8_encode($vote['title']);
$vote['time_left'] = round($time_remain/($time_span+1)*100,0);
$vote['time_done'] = 100-$vote['time_left'];
$vote['full_vote_btn'] = $time_remain > 0 ? 'Abstimmen' : 'Ansehen';
$vote['uv'] = $vote['bt'] = '';
$vote['uv_count'] = $vote_count['count'] > 4 ? $vote_count['count'] : '< 5';
$user_vote = votes::getUserPollData($vote['ID']);
$vote['vote_class'] = $this->tablerow_class($user_vote);
if($user_vote){
//user vote
$vote['vote_class'] = $this->tablerow_class($user_vote);
//bt vote
$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'),
array( 'party' => $pv['party'],
'choice' => $this->get_party_per_poll($pv['choice']),
'choice_class' => $this->badge_class($pv['choice'])));
}
//uvote vote
$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'),
array( 'badge' => self::badge_class($v['choice']),
'perc' => $v['count'] > 0 ? round($v['count']/$vote_count['count']*100, 2) : 0));
}
}
if($time_remain > 0){
$result[0] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote.tpl'), $vote);
} else {
$result[1] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote.tpl'), $vote);
}
}
return $result[0].$result[1];
}
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_active/active.tpl'), $vars);
}
}

View File

@ -0,0 +1 @@
${votelist}

View File

@ -0,0 +1,103 @@
<?php
class user_list_ended extends SYSTEM\PAGE\Page {
private function get_party_per_poll($choice){
switch($choice){
case 1:
return 'PRO';
case 2:
return 'CON';
case 3:
return 'ENT';
default:
return 'NONE';
}
}
private static function tablerow_class($choice){
switch($choice){
case 1:
return 'pro';
case 2:
return 'con';
case 3:
return 'ent';
default:
return 'open';
}
}
private static function badge_class($choice){
switch($choice){
case 1:
return 'badge-success';
case 2:
return 'badge-important';
case 3:
return 'badge-info';
default:
return '';
}
}
public function generate_votelist(){
$result = array('','');
$votes = votes::getAllVotesOfGroup(1);
foreach($votes as $vote){
$time_remain = strtotime($vote['time_end'])- microtime(true);
$time_span = strtotime($vote['time_end']) - strtotime($vote['time_start']);
$vote_count = votes::get_count_user_votes_per_poll($vote['ID']);
$vote['title'] = utf8_encode($vote['title']);
$vote['time_left'] = round($time_remain/($time_span+1)*100,0);
$vote['time_done'] = 100-$vote['time_left'];
$vote['full_vote_btn'] = $time_remain > 0 ? 'Abstimmen' : 'Ansehen';
$vote['uv'] = $vote['bt'] = '';
$vote['uv_count'] = $vote_count['count'] > 4 ? $vote_count['count'] : '< 5';
$user_vote = votes::getUserPollData($vote['ID']);
$vote['vote_class'] = $this->tablerow_class($user_vote);
if($user_vote){
//user vote
$vote['vote_class'] = $this->tablerow_class($user_vote);
//bt vote
$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'),
array( 'party' => $pv['party'],
'choice' => $this->get_party_per_poll($pv['choice']),
'choice_class' => $this->badge_class($pv['choice'])));
}
//uvote vote
$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'),
array( 'badge' => self::badge_class($v['choice']),
'perc' => $v['count'] > 0 ? round($v['count']/$vote_count['count']*100, 2) : 0));
}
}
if($time_remain > 0){
$result[0] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote.tpl'), $vote);
} else {
$result[1] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote.tpl'), $vote);
}
}
return $result[0].$result[1];
}
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);
}
}

View File

@ -1,4 +1,4 @@
<div class="tabbable">
<div class="tabbable" style="padding-right: 50px;">
<ul class="nav nav-tabs" id="tabs_user_main">
<li class="active"><a href="#tab_uVote" action="user_main_uVote">uVote</a></li>
<li><a href="#tab_urVote" action="user_main_urVote">urVote</a></li>
@ -10,10 +10,10 @@
<div class="tab-pane" id="tab_myVote"></div>
</div>
</div>
<form>
<br /><img src="${frontend_logos}logo2.png" width="180"/>
<h4>uVote BETA Feedback</h4>
<textarea id="feedback_text">Sag uns was dich stört!</textarea>
<br />
<input type="submit" id="feedback_submit" />
</form>
<form>
<br /><img src="${frontend_logos}logo2.png" width="180"/>
<h4>uVote BETA Feedback</h4>
<textarea id="feedback_text">Sag uns was dich stört!</textarea>
<br />
<input type="submit" id="feedback_submit" />
</form>