diff --git a/uVote/api/votes/votes.php b/uVote/api/votes/votes.php index 0ffb01d..0c3453a 100644 --- a/uVote/api/votes/votes.php +++ b/uVote/api/votes/votes.php @@ -163,7 +163,7 @@ class votes { 'SELECT * FROM `uvote_votes` WHERE `ID` = ?;', array($poll_ID)); $res = $res->next(); - $res['title'] = utf8_encode($res['title']); +// $res['title'] = utf8_encode($res['title']); return $res; } @@ -201,7 +201,7 @@ class votes { public static function write_comment($poll_ID, $c_choice, $c_txt, $c_src){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in.");} - return \DBD\UVOTE_DATA_USER_COMMENT_INSERT::Q1(array($c_choice, $poll_ID, \SYSTEM\SECURITY\Security::getUser()->id, $c_txt, $c_src));} + return \DBD\UVOTE_DATA_USER_COMMENT_INSERT::Q1(array($c_choice, $poll_ID, \SYSTEM\SECURITY\Security::getUser()->id, utf8_encode($c_txt), $c_src));} public static function write_commentrate($c_ID, $val){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ @@ -211,8 +211,11 @@ class votes { public static function get_add_data(){ return \DBD\UVOTE_DATA_USER_ADD_DATA::Q1(array(\SYSTEM\SECURITY\Security::getUser()->id)); } - public static function write_poll($ID, $title, $iframe_link ){ - return \DBD\UVOTE_DATA_NEW_POLL::Q1($ID, $title, $iframe_link); + public static function write_poll($ID, $title, $iframe_link ){ + if ($ID == -1){ + return \DBD\UVOTE_DATA_NEW_POLL::QI(array($title, $iframe_link)); + } + return \DBD\UVOTE_DATA_UPDATE_POLL::QI(array($title, $iframe_link, $ID)); } diff --git a/uVote/dbd/qq/UVOTE_ACCORD_WITH_FRACTION.php b/uVote/dbd/qq/UVOTE_ACCORD_WITH_FRACTION.php new file mode 100644 index 0000000..2101e9e --- /dev/null +++ b/uVote/dbd/qq/UVOTE_ACCORD_WITH_FRACTION.php @@ -0,0 +1,13 @@ + + Dein aktuelles Stimmgewicht bei dieser Abstimmung: + ${voteweight}% + \ No newline at end of file diff --git a/uVote/page/default_page/js/loadtexts.js b/uVote/page/default_page/js/loadtexts.js index f91bd3a..644afb9 100644 --- a/uVote/page/default_page/js/loadtexts.js +++ b/uVote/page/default_page/js/loadtexts.js @@ -225,8 +225,16 @@ function submit_commentrate (c_ID, val) { }); } +function encode_utf8(c) { + return unescape(encodeURIComponent(c)); +} + +function decode_utf8(c) { + return decodeURIComponent(escape(c)); +} + function submit_c_data (poll_ID) { - var c_txt = $("#c_txt_pro").val(); + var c = $("#c_txt_pro").val(); var c_src = $("#c_src_pro").val(); var a = document.getElementById("side_select"); var c_choice = a.options[a.selectedIndex].value; diff --git a/uVote/page/user_list_active/user_list_active.php b/uVote/page/user_list_active/user_list_active.php index 5c57dd2..5529eb6 100644 --- a/uVote/page/user_list_active/user_list_active.php +++ b/uVote/page/user_list_active/user_list_active.php @@ -48,7 +48,7 @@ class user_list_active extends SYSTEM\PAGE\Page { $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['title'] = utf8_encode($vote['title']); $vote['time_left'] = round($time_remain/($time_span+1)*100,0); $vote['time_done'] = 100-$vote['time_left']; diff --git a/uVote/sai/saimod_uvote_vote_edit/saimod_uvote_vote_edit.js b/uVote/sai/saimod_uvote_vote_edit/saimod_uvote_vote_edit.js index 5d55a63..069cefd 100644 --- a/uVote/sai/saimod_uvote_vote_edit/saimod_uvote_vote_edit.js +++ b/uVote/sai/saimod_uvote_vote_edit/saimod_uvote_vote_edit.js @@ -2,7 +2,7 @@ function init_saimod_uvote_vote_edit(){ $('.btn_editvote').click(function() { alert (''); - var poll_ID = $('#input_poll_ID').val(); + var poll_ID = $('#input_poll_title').attr('poll_ID'); var title = $('#input_poll_title').val(); var iframe_link = $('#input_poll_link').val(); vote_data_edit(poll_ID, title, iframe_link); @@ -33,7 +33,7 @@ function init_saimod_uvote_vote_edit(){ function vote_data_edit (poll_ID, title, iframe_link) { alert('vote_data_edit'); - $.getJSON('./api.php?call=vote&action=new_vote&poll_ID=' + poll_ID + 'title=' + title + '&iframe_link=' + iframe_link, function(data) { + $.getJSON('./api.php?call=vote&action=new_vote&poll_ID=' + poll_ID + '&title=' + title + '&iframe_link=' + iframe_link, function(data) { var items = []; if(data.status == true){ alert("success"); diff --git a/uVote/sai/saimod_uvote_vote_edit/saimod_uvote_vote_edit.php b/uVote/sai/saimod_uvote_vote_edit/saimod_uvote_vote_edit.php index 5d77eb4..018ab37 100644 --- a/uVote/sai/saimod_uvote_vote_edit/saimod_uvote_vote_edit.php +++ b/uVote/sai/saimod_uvote_vote_edit/saimod_uvote_vote_edit.php @@ -28,6 +28,7 @@ class saimod_uvote_vote_edit extends \SYSTEM\SAI\SaiModule { return \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/main.tpl', $vars);*/ $result = ''; +// $result.=self::sai_mod_saimod_uvote_new_vote(); $votes = votes::getAllVotesOfGroup(1); foreach($votes as $vote){ $time_remain = strtotime($vote['time_end'])- microtime(true); @@ -60,5 +61,6 @@ class saimod_uvote_vote_edit extends \SYSTEM\SAI\SaiModule { public static function sai_mod_saimod_uvote_vote_edit_flag_js(){return \SYSTEM\LOG\JsonResult::toString(array( \SYSTEM\WEBPATH(new PSAI(),'saimod_uvote_vote_edit/saimod_uvote_vote_edit.js') ));} - + public static function sai_mod_saimod_uvote_vote_edit_flag_css(){return \SYSTEM\LOG\JsonResult::toString(array() + );} } \ No newline at end of file diff --git a/uVote/sai/saimod_uvote_vote_edit/vote.tpl b/uVote/sai/saimod_uvote_vote_edit/vote.tpl index ba0a9c5..906565b 100644 --- a/uVote/sai/saimod_uvote_vote_edit/vote.tpl +++ b/uVote/sai/saimod_uvote_vote_edit/vote.tpl @@ -1,8 +1,7 @@