????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.57 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/phpsysinfo/plugins/BAT/js/ |
Upload File : |
/***************************************************************************
* Copyright (C) 2008 by phpSysInfo - A PHP System Information Script *
* http://phpsysinfo.sourceforge.net/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
//
// $Id: BAT.js 518 2011-10-28 08:09:07Z namiltd $
//
/*global $, jQuery, buildBlock, datetime, plugin_translate, genlang, createBar */
"use strict";
var bat_show = false, bat_table;
/**
* insert content into table
* @param {jQuery} xml plugin-XML
*/
function bat_populate(xml) {
bat_table.fnClearTable();
$("Plugins Plugin_BAT Bat", xml).each(function bat_getitem(idp) {
var DesignCapacity = "", DesignVoltage = "", RemainingCapacity = "", PresentVoltage = "", ChargingState = "";
DesignCapacity = $(this).attr("DesignCapacity");
DesignVoltage = $(this).attr("DesignVoltage");
RemainingCapacity = $(this).attr("RemainingCapacity");
PresentVoltage = $(this).attr("PresentVoltage");
ChargingState = $(this).attr("ChargingState");
bat_table.fnAddData([genlang(3, true, "BAT"), DesignCapacity, ' ']);
bat_table.fnAddData([genlang(4, true, "BAT"), RemainingCapacity, createBar(parseInt(parseInt(RemainingCapacity, 10) / parseInt(DesignCapacity, 10) * 100, 10))]);
bat_table.fnAddData([genlang(9, true, "BAT"), ChargingState, ' ']);
bat_table.fnAddData([genlang(5, true, "BAT"), DesignVoltage, ' ']);
bat_table.fnAddData([genlang(6, true, "BAT"), PresentVoltage, ' ']);
bat_show = true;
});
}
/**
* fill the plugin block with table structure
*/
function bat_buildTable() {
var html = "";
html += "<table id=\"Plugin_BATTable\" style=\"border-spacing:0;\">\n";
html += " <thead>\n";
html += " <tr>\n";
html += " <th>" + genlang(7, true, "BAT") + "</th>\n";
html += " <th>" + genlang(8, true, "BAT") + "</th>\n";
html += " <th> </th>\n";
html += " </tr>\n";
html += " </thead>\n";
html += " <tbody>\n";
html += " </tbody>\n";
html += "</table>\n";
$("#Plugin_BAT").append(html);
}
/**
* load the xml via ajax
*/
function bat_request() {
$.ajax({
url: "xml.php?plugin=BAT",
dataType: "xml",
error: function bat_error() {
$.jGrowl("Error loading XML document for Plugin BAT!");
},
success: function bat_buildblock(xml) {
populateErrors(xml);
bat_populate(xml);
if (bat_show) {
plugin_translate("BAT");
$("#Plugin_BAT").show();
}
}
});
}
$(document).ready(function bat_buildpage() {
$("#footer").before(buildBlock("BAT", 1, true));
$("#Plugin_BAT").css("width", "451px");
bat_buildTable();
bat_table = $("#Plugin_BATTable").dataTable({
"bPaginate": false,
"bLengthChange": false,
"bFilter": false,
"bSort": false,
"bInfo": false,
"bProcessing": true,
"bAutoWidth": false,
"bStateSave": true,
"aoColumns": [{
"sType": 'span-string'
}, {
"sType": 'span-string'
}, {
"sType": 'span-string'
}]
});
bat_request();
$("#Reload_BATTable").click(function bat_reload(id) {
bat_request();
$("#Reload_BATTable").attr("title",datetime());
});
});