$sum_out = 0.0;
$color = 0;
foreach ($db->fetchAssocList($query) as $row) {
- $descr = explode ("
-", $row['descr']);
+ $descr = explode ("\n", $row['descr']);
$date = explode (" ", $row['datum']);
$date = explode ("-", $date[0]);
$date = sprintf ("%d.%d.%d", $date[2], $date[1], $date[0]);
$out .= sprintf ("<tr class=\"t%d\">", $color);
$out .= sprintf ("<td width=\"10%%\" align=\"right\">%s</td>", $date);
$out .= sprintf ("<td width=\"10%%\" align=\"center\">%s</td>", $row['category']);
- $out .= sprintf ("<td width=\"70%%\"><a href=\"edit.php?id=%d%s\">%s</a></td>",
+ $out .= sprintf ("<td width=\"70%%\"><a href=\"edit.php?id=%d%s\" target=\"_new\">%s</a></td>",
$row['id'], $add, $descr[0]);
$out .= sprintf ("<td width=\"10%%\" align=\"right\" class=\"%s\">%5.2f</td>",
$row[$value]>0?"in":"out", $row[$value]);
$('body').append('<script type="text/javascript" src="../../jquery.event.ue.js"><\/script>');
});
+//+ Jonas Raoni Soares Silva
+//@ http://jsfromhell.com/geral/utf-8 [rev. #1]
+
+UTF8 = {
+ encode: function(s){
+ for(var c, i = -1, l = (s = s.split("")).length, o = String.fromCharCode; ++i < l;
+ s[i] = (c = s[i].charCodeAt(0)) >= 127 ? o(0xc0 | (c >>> 6)) + o(0x80 | (c & 0x3f)) : s[i]
+ );
+ return s.join("");
+ },
+ decode: function(s){
+ for(var a, b, i = -1, l = (s = s.split("")).length, o = String.fromCharCode, c = "charCodeAt"; ++i < l;
+ ((a = s[i][c](0)) & 0x80) &&
+ (s[i] = (a & 0xfc) == 0xc0 && ((b = s[i + 1][c](0)) & 0xc0) == 0x80 ?
+ o(((a & 0x03) << 6) + (b & 0x3f)) : o(128), s[++i] = "")
+ );
+ return s.join("");
+ }
+};
+
function filter_popup()
{
if (!$('#filter_popup form input').length) {
'handle': 'div#filter_title'
}).css('top', '70px').css('left', '103px');
+ $('#filter_popup form input,#filter_popup form select').not('input.button').change(function(e){
+ $.post('list.php',
+ 'ajax=1&'+$('#filter_popup form').serialize(),
+ function(data){
+ $('table.border tbody').html(UTF8.decode(data));
+ });
+ return false;
+ });
+
$('#filter_popup form input.button[type="submit"]').click(function(e){
$.post('list.php',
'ajax=1&'+$('#filter_popup form').serialize(),
function(data){
- $('table.border tbody').html(data);
+ $('table.border tbody').html(UTF8.decode(data));
$('#filter_popup').hide();
});
return false;