initial commit of file from CVS for smeserver-phpsysinfo on Sat Sep 7 20:53:46 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 20:53:46 +10:00
parent 8f9c36d1f5
commit 9552652292
693 changed files with 86806 additions and 2 deletions

View File

@@ -0,0 +1,61 @@
<div class="col-lg-6" id="block_bat" style="display:none">
<div class="panel panel-primary">
<div class="panel-heading">Battery Status</div>
<div class="panel-body">
<table id="bat" class="table table-hover table-condensed">
<thead>
<tr>
<th>Items</th>
<th>Values</th>
<th></th>
</tr>
</thead>
<tr id="bat_DesignCapacity" style="display:none">
<th>Design capacity</th>
<td><span data-bind="DesignCapacity"></span></td>
<td></td>
</tr>
<tr id="bat_RemainingCapacity" style="display:none">
<th>Remaining capacity</th>
<td><span data-bind="RemainingCapacity"></span></td>
<td><span data-bind="RemainingCapacityBar"></span></td>
</tr>
<tr id="bat_ChargingState" style="display:none">
<th>Charging state</th>
<td><span data-bind="ChargingState"></span></td>
<td></td>
</tr>
<tr id="bat_DesignVoltage" style="display:none">
<th>Design voltage</th>
<td><span data-bind="DesignVoltage"></span></td>
<td><span data-bind="DesignVoltageMax"></span></td>
</tr>
<tr id="bat_PresentVoltage" style="display:none">
<th>Present voltage</th>
<td><span data-bind="PresentVoltage"></span></td>
<td></td>
</tr>
<tr id="bat_BatteryType" style="display:none">
<th>Battery Type</th>
<td><span data-bind="BatteryType"></span></td>
<td></td>
</tr>
<tr id="bat_BatteryTemperature" style="display:none">
<th>Battery Temperature</th>
<td><span data-bind="BatteryTemperature"></span></td>
<td></td>
</tr>
<tr id="bat_BatteryCondition" style="display:none">
<th>Battery Condition</th>
<td><span data-bind="BatteryCondition"></span></td>
<td></td>
</tr>
<tr id="bat_CycleCount" style="display:none">
<th>Cycle Count</th>
<td><span data-bind="CycleCount"></span></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>

View File

@@ -0,0 +1,539 @@
<?php
/**
* BAT Plugin, which displays battery state
*
* @category PHP
* @package PSI_Plugin_BAT
* @author Erkan V
* @copyright 2009 phpSysInfo
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @version $Id: class.bat.inc.php 661 2012-08-27 11:26:39Z namiltd $
* @link http://phpsysinfo.sourceforge.net
*/
class BAT extends PSI_Plugin
{
/**
* variable, which holds the content of the command
* @var array
*/
private $_filecontent = array();
/**
* variable, which holds the result before the xml is generated out of this array
* @var array
*/
private $_result = array();
/**
* read the data into an internal array and also call the parent constructor
*
* @param String $enc encoding
*/
public function __construct($enc)
{
parent::__construct(__CLASS__, $enc);
switch (strtolower(PSI_PLUGIN_BAT_ACCESS)) {
case 'command':
if (PSI_OS == 'WINNT') {
$_cim = null; //root\CIMv2
$_wmi = null; //root\WMI
// don't set this params for local connection, it will not work
$strHostname = '';
$strUser = '';
$strPassword = '';
try {
// initialize the wmi object
$objLocatorCIM = new COM('WbemScripting.SWbemLocator');
if ($strHostname == "") {
$_cim = $objLocatorCIM->ConnectServer();
} else {
$_cim = $objLocatorCIM->ConnectServer($strHostname, 'root\CIMv2', $strHostname.'\\'.$strUser, $strPassword);
}
// initialize the wmi object
$objLocatorWMI = new COM('WbemScripting.SWbemLocator');
if ($strHostname == "") {
$_wmi = $objLocatorWMI->ConnectServer($strHostname, 'root\WMI');
} else {
$_wmi = $objLocatorWMI->ConnectServer($strHostname, 'root\WMI', $strHostname.'\\'.$strUser, $strPassword);
}
} catch (Exception $e) {
$this->error->addError("WMI connect error", "PhpSysInfo can not connect to the WMI interface for security reasons.\nCheck an authentication mechanism for the directory where phpSysInfo is installed.");
}
$buffer_info = '';
$buffer_state = '';
$bufferWB = CommonFunctions::getWMI($_cim, 'Win32_Battery', array('EstimatedChargeRemaining', 'DesignVoltage', 'BatteryStatus', 'Chemistry'));
if (sizeof($bufferWB)>0) {
$capacity = '';
if (isset($bufferWB[0]['EstimatedChargeRemaining'])) {
$capacity = $bufferWB[0]['EstimatedChargeRemaining'];
}
if (isset($bufferWB[0]['BatteryStatus'])) {
switch ($bufferWB[0]['BatteryStatus']) {
case 1: $batstat = 'Discharging'; break;
case 2: $batstat = 'AC connected'; break;
case 3: $batstat = 'Fully Charged'; break;
case 4: $batstat = 'Low'; break;
case 5: $batstat = 'Critical'; break;
case 6: $batstat = 'Charging'; break;
case 7: $batstat = 'Charging and High'; break;
case 8: $batstat = 'Charging and Low'; break;
case 9: $batstat = 'Charging and Critical'; break;
case 10: $batstat = 'Undefined'; break;
case 11: $batstat = 'Partially Charged'; break;
default: $batstat = '';
}
if ($batstat != '') $buffer_state .= 'POWER_SUPPLY_STATUS='.$batstat."\n";
}
$techn = '';
if (isset($bufferWB[0]['Chemistry'])) {
switch ($bufferWB[0]['Chemistry']) {
case 1: $techn = 'Other'; break;
case 2: $techn = 'Unknown'; break;
case 3: $techn = 'PbAc'; break;
case 4: $techn = 'NiCd'; break;
case 5: $techn = 'NiMH'; break;
case 6: $techn = 'Li-ion'; break;
case 7: $techn = 'Zinc-air'; break;
case 8: $techn = 'Li-poly'; break;
}
}
$bufferWPB = CommonFunctions::getWMI($_cim, 'Win32_PortableBattery', array('DesignVoltage', 'Chemistry', 'DesignCapacity', 'FullChargeCapacity'));
if (isset($bufferWPB[0]['DesignVoltage'])) {
$buffer_info .= 'POWER_SUPPLY_VOLTAGE_MIN_DESIGN='.($bufferWPB[0]['DesignVoltage']*1000)."\n";
}
// sometimes Chemistry from Win32_Battery returns 2 but Win32_PortableBattery returns e.g. 6
if ((($techn == '') || ($techn == 'Unknown')) && isset($bufferWPB[0]['Chemistry'])) {
switch ($bufferWPB[0]['Chemistry']) {
case 1: $techn = 'Other'; break;
case 2: $techn = 'Unknown'; break;
case 3: $techn = 'PbAc'; break;
case 4: $techn = 'NiCd'; break;
case 5: $techn = 'NiMH'; break;
case 6: $techn = 'Li-ion'; break;
case 7: $techn = 'Zinc-air'; break;
case 8: $techn = 'Li-poly'; break;
}
}
if ($techn != '') $buffer_info .= 'POWER_SUPPLY_TECHNOLOGY='.$techn."\n";
$bufferBS = CommonFunctions::getWMI($_wmi, 'BatteryStatus', array('RemainingCapacity', 'Voltage'));
if (sizeof($bufferBS)>0) {
if (isset($bufferBS[0]['RemainingCapacity']) && ($bufferBS[0]['RemainingCapacity']>0)) {
$buffer_state .= 'POWER_SUPPLY_ENERGY_NOW='.($bufferBS[0]['RemainingCapacity']*1000)."\n";
$capacity = '';
}
if (isset($bufferBS[0]['Voltage']) && ($bufferBS[0]['Voltage']>0)) {
$buffer_state .= 'POWER_SUPPLY_VOLTAGE_NOW='.($bufferBS[0]['Voltage']*1000)."\n";
} elseif (isset($bufferWB[0]['DesignVoltage'])) {
$buffer_state .= 'POWER_SUPPLY_VOLTAGE_NOW='.($bufferWB[0]['DesignVoltage']*1000)."\n";
}
}
if (!isset($bufferWPB[0]['FullChargeCapacity'])) {
$bufferBFCC = CommonFunctions::getWMI($_wmi, 'BatteryFullChargedCapacity', array('FullChargedCapacity'));
if ((sizeof($bufferBFCC)>0) && isset($bufferBFCC[0]['FullChargedCapacity'])) {
$bufferWPB[0]['FullChargeCapacity'] = $bufferBFCC[0]['FullChargedCapacity'];
}
}
if (isset($bufferWPB[0]['FullChargeCapacity'])) {
$buffer_info .= 'POWER_SUPPLY_ENERGY_FULL='.($bufferWPB[0]['FullChargeCapacity']*1000)."\n";
if ($capacity != '') $buffer_state .= 'POWER_SUPPLY_ENERGY_NOW='.(round($capacity*$bufferWPB[0]['FullChargeCapacity']*10)."\n");
if (isset($bufferWPB[0]['DesignCapacity']) && ($bufferWPB[0]['DesignCapacity']!=0))
$buffer_info .= 'POWER_SUPPLY_ENERGY_FULL_DESIGN='.($bufferWPB[0]['DesignCapacity']*1000)."\n";
} elseif (isset($bufferWPB[0]['DesignCapacity'])) {
$buffer_info .= 'POWER_SUPPLY_ENERGY_FULL_DESIGN='.($bufferWPB[0]['DesignCapacity']*1000)."\n";
if ($capacity != '') $buffer_state .= 'POWER_SUPPLY_ENERGY_NOW='.(round($capacity*$bufferWPB[0]['DesignCapacity']*10)."\n");
} else {
if ($capacity != '') $buffer_state .= 'POWER_SUPPLY_CAPACITY='.$capacity."\n";
}
$bufferBCC = CommonFunctions::getWMI($_wmi, 'BatteryCycleCount', array('CycleCount'));
if ((sizeof($bufferBCC)>0) && isset($bufferBCC[0]['CycleCount']) && ($bufferBCC[0]['CycleCount']>0)) {
$buffer_info .= 'POWER_SUPPLY_CYCLE_COUNT='.$bufferBCC[0]['CycleCount']."\n";
}
}
} elseif (PSI_OS == 'Darwin') {
$buffer_info = '';
$buffer_state = '';
CommonFunctions::executeProgram('ioreg', '-w0 -l -n AppleSmartBattery -r', $buffer_info, false);
} elseif (PSI_OS == 'FreeBSD') {
$buffer_info = '';
$buffer_state = '';
CommonFunctions::executeProgram('acpiconf', '-i batt', $buffer_info, false);
} else {
$buffer_info = '';
$buffer_state = '';
$bat_name = PSI_PLUGIN_BAT_DEVICE;
$rfts_bi = CommonFunctions::rfts('/proc/acpi/battery/'.$bat_name.'/info', $buffer_info, 0, 4096, false);
$rfts_bs = CommonFunctions::rfts('/proc/acpi/battery/'.$bat_name.'/state', $buffer_state, 0, 4096, false);
if (!$rfts_bi && !$rfts_bs) {
$buffer_info = '';
$buffer_state = '';
if (!CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/uevent', $buffer_info, 0, 4096, false)) {
if (CommonFunctions::rfts('/sys/class/power_supply/battery/uevent', $buffer_info, 0, 4096, false)) {
$bat_name = 'battery';
} else {
CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/uevent', $buffer_info, 0, 4096, PSI_DEBUG); // Once again but with debug
}
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/voltage_min_design', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_VOLTAGE_MIN_DESIGN='.$buffer1."\n";
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/voltage_max_design', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_VOLTAGE_MAX_DESIGN='.$buffer1."\n";
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/voltage_now', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_VOLTAGE_NOW='.$buffer1."\n";
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/energy_full', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_ENERGY_FULL='.$buffer1."\n";
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/energy_now', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_ENERGY_NOW='.$buffer1."\n";
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/charge_full', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_CHARGE_FULL='.$buffer1."\n";
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/charge_now', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_CHARGE_NOW='.$buffer1."\n";
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/capacity', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_CAPACITY='.$buffer1;
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/technology', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_TECHNOLOGY='.$buffer1;
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/status', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_STATUS='.$buffer1;
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/batt_temp', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_TEMP='.$buffer1;
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/batt_vol', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_VOLTAGE_NOW='.$buffer1;
}
if (CommonFunctions::rfts('/sys/class/power_supply/'.$bat_name.'/health', $buffer1, 1, 4096, false)) {
$buffer_state .= 'POWER_SUPPLY_HEALTH='.$buffer1;
}
}
}
break;
case 'data':
CommonFunctions::rfts(APP_ROOT."/data/bat_info.txt", $buffer_info);
CommonFunctions::rfts(APP_ROOT."/data/bat_state.txt", $buffer_state);
break;
default:
$this->global_error->addConfigError("__construct()", "PSI_PLUGIN_BAT_ACCESS");
break;
}
$this->_filecontent['info'] = preg_split("/\n/", $buffer_info, -1, PREG_SPLIT_NO_EMPTY);
$this->_filecontent['state'] = preg_split("/\n/", $buffer_state, -1, PREG_SPLIT_NO_EMPTY);
}
/**
* doing all tasks to get the required informations that the plugin needs
* result is stored in an internal array
*
* @return void
*/
public function execute()
{
if (empty($this->_filecontent)) {
return;
}
foreach ($this->_filecontent['info'] as $roworig) {
if (preg_match('/^[dD]esign capacity:\s*(.*) (.*)$/', trim($roworig), $data)) {
$bat['design_capacity_max'] = $data[1];
if (!isset($bat['capacity_unit'])) {
$bat['capacity_unit'] = trim($data[2]);
} elseif ($bat['capacity_unit'] != trim($data[2])) {
$bat['capacity_unit'] = "???";
}
} elseif (preg_match('/^[lL]ast full capacity:\s*(.*) (.*)$/', trim($roworig), $data)) {
$bat['design_capacity'] = $data[1];
if (!isset($bat['capacity_unit'])) {
$bat['capacity_unit'] = trim($data[2]);
} elseif ($bat['capacity_unit'] != trim($data[2])) {
$bat['capacity_unit'] = "???";
}
} elseif (preg_match('/^cycle count:\s*(.*)$/', trim($roworig), $data) && ($data[1]>0)) {
$bat['cycle_count'] = $data[1];
} elseif (preg_match('/^[dD]esign voltage:\s*(.*) (.*)$/', trim($roworig), $data)) {
if ($data[2]=="mV") { // uV or mV detection
$bat['design_voltage'] = $data[1];
} else {
$bat['design_voltage'] = round($data[1]/1000);
}
} elseif (preg_match('/^battery type:\s*(.*)$/', trim($roworig), $data)) {
$bat['battery_type'] = $data[1];
} elseif (preg_match('/^POWER_SUPPLY_CYCLE_COUNT=(.*)$/', trim($roworig), $data) && ($data[1]>0)) {
$bat['cycle_count'] = $data[1];
} elseif (preg_match('/^POWER_SUPPLY_VOLTAGE_MIN_DESIGN=(.*)$/', trim($roworig), $data)) {
if ($data[1]<100000) { // uV or mV detection
$bat['design_voltage'] = $data[1];
} else {
$bat['design_voltage'] = round($data[1]/1000);
}
} elseif (preg_match('/^POWER_SUPPLY_VOLTAGE_MAX_DESIGN=(.*)$/', trim($roworig), $data)) {
if ($data[1]<100000) { // uV or mV detection
$bat['design_voltage_max'] = $data[1];
} else {
$bat['design_voltage_max'] = round($data[1]/1000);
}
} elseif (preg_match('/^POWER_SUPPLY_ENERGY_FULL=(.*)$/', trim($roworig), $data)) {
$bat['design_capacity'] = ($data[1]/1000);
if (!isset($bat['capacity_unit'])) {
$bat['capacity_unit'] = "mWh";
} elseif ($bat['capacity_unit'] != "mWh") {
$bat['capacity_unit'] = "???";
}
} elseif (preg_match('/^POWER_SUPPLY_CHARGE_FULL=(.*)$/', trim($roworig), $data)) {
$bat['design_capacity'] = ($data[1]/1000);
if (!isset($bat['capacity_unit'])) {
$bat['capacity_unit'] = "mAh";
} elseif ($bat['capacity_unit'] != "mAh") {
$bat['capacity_unit'] = "???";
}
} elseif (preg_match('/^POWER_SUPPLY_ENERGY_NOW=(.*)$/', trim($roworig), $data)) {
if (!isset($bat['capacity_unit']) || ($bat['capacity_unit'] == "mWh")) {
$bat['capacity_unit'] = "mWh";
$bat['remaining_capacity'] = ($data[1]/1000);
}
} elseif (preg_match('/^POWER_SUPPLY_CHARGE_NOW=(.*)$/', trim($roworig), $data)) {
if (!isset($bat['capacity_unit']) || ($bat['capacity_unit'] == "mAh")) {
$bat['capacity_unit'] = "mAh";
$bat['remaining_capacity'] = ($data[1]/1000);
}
/* auxiary */
} elseif (preg_match('/^POWER_SUPPLY_ENERGY_FULL_DESIGN=(.*)$/', trim($roworig), $data)) {
$bat['design_capacity_max'] = ($data[1]/1000);
if (!isset($bat['capacity_unit'])) {
$bat['capacity_unit'] = "mWh";
} elseif ($bat['capacity_unit'] != "mWh") {
$bat['capacity_unit'] = "???";
}
} elseif (preg_match('/^POWER_SUPPLY_CHARGE_FULL_DESIGN=(.*)$/', trim($roworig), $data)) {
$bat['design_capacity_max'] = ($data[1]/1000);
if (!isset($bat['capacity_unit'])) {
$bat['capacity_unit'] = "mAh";
} elseif ($bat['capacity_unit'] != "mAh") {
$bat['capacity_unit'] = "???";
}
} elseif (preg_match('/^POWER_SUPPLY_VOLTAGE_NOW=(.*)$/', trim($roworig), $data)) {
if ($data[1]<100000) { // uV or mV detection
$bat['present_voltage'] = $data[1];
} else {
$bat['present_voltage'] = round($data[1]/1000);
}
} elseif (preg_match('/^POWER_SUPPLY_CAPACITY=(.*)$/', trim($roworig), $data)) {
$bat['capacity'] = $data[1];
} elseif (preg_match('/^POWER_SUPPLY_TEMP=(.*)$/', trim($roworig), $data)) {
$bat['battery_temperature'] = $data[1]/10;
} elseif (preg_match('/^POWER_SUPPLY_TECHNOLOGY=(.*)$/', trim($roworig), $data)) {
$bat['battery_type'] = $data[1];
} elseif (preg_match('/^POWER_SUPPLY_STATUS=(.*)$/', trim($roworig), $data)) {
$bat['charging_state'] = $data[1];
} elseif (preg_match('/^POWER_SUPPLY_HEALTH=(.*)$/', trim($roworig), $data)) {
$bat['battery_condition'] = $data[1];
/* Darwin */
} elseif (preg_match('/^"MaxCapacity"\s*=\s*(.*)$/', trim($roworig), $data)) {
$bat['design_capacity'] = $data[1];
} elseif (preg_match('/^"CurrentCapacity"\s*=\s*(.*)$/', trim($roworig), $data)) {
$bat['remaining_capacity'] = $data[1];
} elseif (preg_match('/^"Voltage"\s*=\s*(.*)$/', trim($roworig), $data)) {
$bat['present_voltage'] = $data[1];
} elseif (preg_match('/^"BatteryType"\s*=\s*"(.*)"$/', trim($roworig), $data)) {
$bat['battery_type'] = $data[1];
} elseif (preg_match('/^"Temperature"\s*=\s*(.*)$/', trim($roworig), $data)) {
if ($data[1]>0) $bat['battery_temperature'] = $data[1]/100;
} elseif (preg_match('/^"DesignCapacity"\s*=\s*(.*)$/', trim($roworig), $data)) {
$bat['design_capacity_max'] = $data[1];
} elseif (preg_match('/^"CycleCount"\s*=\s*(.*)$/', trim($roworig), $data) && ($data[1]>0)) {
$bat['cycle_count'] = $data[1];
/* auxiary */
} elseif (preg_match('/^"FullyCharged"\s*=\s*Yes$/', trim($roworig), $data)) {
$bat['charging_state_f'] = true;
} elseif (preg_match('/^"IsCharging"\s*=\s*Yes$/', trim($roworig), $data)) {
$bat['charging_state_i'] = true;
} elseif (preg_match('/^"ExternalConnected"\s*=\s*Yes$/', trim($roworig), $data)) {
$bat['charging_state_e'] = true;
/* FreeBSD */
} elseif (preg_match('/^Type:\s*(.*)$/', trim($roworig), $data)) {
$bat['battery_type'] = $data[1];
} elseif (preg_match('/^State:\s*(.*)$/', trim($roworig), $data)) {
$bat['charging_state'] = $data[1];
} elseif (preg_match('/^Present voltage:\s*(.*) (.*)$/', trim($roworig), $data)) {
if ($data[2]=="mV") { // uV or mV detection
$bat['present_voltage'] = $data[1];
} else {
$bat['present_voltage'] = round($data[1]/1000);
}
} elseif (preg_match('/^Voltage:\s*(.*) (.*)$/', trim($roworig), $data)) {
if ($data[2]=="mV") { // uV or mV detection
$bat['present_voltage'] = $data[1];
} else {
$bat['present_voltage'] = round($data[1]/1000);
}
} elseif (preg_match('/^Remaining capacity:\s*(.*)%$/', trim($roworig), $data)) {
$bat['capacity'] = $data[1];
}
}
foreach ($this->_filecontent['state'] as $roworig) {
if (preg_match('/^remaining capacity:\s*(.*) (.*)$/', trim($roworig), $data)) {
if (!isset($bat['capacity_unit']) || ($bat['capacity_unit'] == trim($data[2]))) {
$bat['capacity_unit'] = trim($data[2]);
$bat['remaining_capacity'] = $data[1];
}
} elseif (preg_match('/^present voltage:\s*(.*) (.*)$/', trim($roworig), $data)) {
if ($data[2]=="mV") { // uV or mV detection
$bat['present_voltage'] = $data[1];
} else {
$bat['present_voltage'] = round($data[1]/1000);
}
} elseif (preg_match('/^charging state:\s*(.*)$/', trim($roworig), $data)) {
$bat['charging_state'] = $data[1];
} elseif (preg_match('/^POWER_SUPPLY_VOLTAGE_MIN_DESIGN=(.*)$/', trim($roworig), $data)) {
if ($data[1]<100000) { // uV or mV detection
$bat['design_voltage'] = $data[1];
} else {
$bat['design_voltage'] = round($data[1]/1000);
}
} elseif (preg_match('/^POWER_SUPPLY_VOLTAGE_MAX_DESIGN=(.*)$/', trim($roworig), $data)) {
if ($data[1]<100000) { // uV or mV detection
$bat['design_voltage_max'] = $data[1];
} else {
$bat['design_voltage_max'] = round($data[1]/1000);
}
} elseif (preg_match('/^POWER_SUPPLY_ENERGY_FULL=(.*)$/', trim($roworig), $data)) {
$bat['design_capacity'] = ($data[1]/1000);
if (!isset($bat['capacity_unit'])) {
$bat['capacity_unit'] = "mWh";
} elseif ($bat['capacity_unit'] != "mWh") {
$bat['capacity_unit'] = "???";
}
} elseif (preg_match('/^POWER_SUPPLY_CHARGE_FULL=(.*)$/', trim($roworig), $data)) {
$bat['design_capacity'] = ($data[1]/1000);
if (!isset($bat['capacity_unit'])) {
$bat['capacity_unit'] = "mAh";
} elseif ($bat['capacity_unit'] != "mAh") {
$bat['capacity_unit'] = "???";
}
} elseif (preg_match('/^POWER_SUPPLY_ENERGY_NOW=(.*)$/', trim($roworig), $data)) {
if (!isset($bat['capacity_unit']) || ($bat['capacity_unit'] == "mWh")) {
$bat['capacity_unit'] = "mWh";
$bat['remaining_capacity'] = ($data[1]/1000);
}
} elseif (preg_match('/^POWER_SUPPLY_CHARGE_NOW=(.*)$/', trim($roworig), $data)) {
if (!isset($bat['capacity_unit']) || ($bat['capacity_unit'] == "mAh")) {
$bat['capacity_unit'] = "mAh";
$bat['remaining_capacity'] = ($data[1]/1000);
}
} elseif (preg_match('/^POWER_SUPPLY_VOLTAGE_NOW=(.*)$/', trim($roworig), $data)) {
if ($data[1]<100000) { // uV or mV detection
$bat['present_voltage'] = $data[1];
} else {
$bat['present_voltage'] = round($data[1]/1000);
}
} elseif (preg_match('/^POWER_SUPPLY_CAPACITY=(.*)$/', trim($roworig), $data)) {
$bat['capacity'] = $data[1];
} elseif (preg_match('/^POWER_SUPPLY_TEMP=(.*)$/', trim($roworig), $data)) {
$bat['battery_temperature'] = $data[1]/10;
} elseif (preg_match('/^POWER_SUPPLY_TECHNOLOGY=(.*)$/', trim($roworig), $data)) {
$bat['battery_type'] = $data[1];
} elseif (preg_match('/^POWER_SUPPLY_STATUS=(.*)$/', trim($roworig), $data)) {
$bat['charging_state'] = $data[1];
} elseif (preg_match('/^POWER_SUPPLY_HEALTH=(.*)$/', trim($roworig), $data)) {
$bat['battery_condition'] = $data[1];
}
}
if (isset($bat)) $this->_result[0] = $bat;
}
/**
* generates the XML content for the plugin
*
* @return SimpleXMLElement entire XML content for the plugin
*/
public function xml()
{
foreach ($this->_result as $bat_item) {
$xmlbat = $this->xml->addChild("Bat");
if ((!isset($bat_item['remaining_capacity']) || (isset($bat_item['design_capacity']) && ($bat_item['design_capacity'] == 0))) &&
isset($bat_item['capacity']) && ($bat_item['capacity']>=0)) {
$xmlbat->addAttribute("DesignCapacity", 100);
$xmlbat->addAttribute("RemainingCapacity", $bat_item['capacity']);
$xmlbat->addAttribute("CapacityUnit", "%");
} else {
if (isset($bat_item['design_capacity'])) {
$xmlbat->addAttribute("DesignCapacity", $bat_item['design_capacity']);
} elseif (isset($bat_item['design_capacity_max'])) {
$xmlbat->addAttribute("DesignCapacity", $bat_item['design_capacity_max']);
}
if (isset($bat_item['remaining_capacity'])) {
$xmlbat->addAttribute("RemainingCapacity", $bat_item['remaining_capacity']);
}
if (isset($bat_item['capacity_unit'])) {
$xmlbat->addAttribute("CapacityUnit", $bat_item['capacity_unit']);
}
}
if (isset($bat_item['design_voltage'])) {
$xmlbat->addAttribute("DesignVoltage", $bat_item['design_voltage']);
if (isset($bat_item['design_voltage_max']) && ($bat_item['design_voltage_max'] != $bat_item['design_voltage'])) {
$xmlbat->addAttribute("DesignVoltageMax", $bat_item['design_voltage_max']);
}
} elseif (isset($bat_item['design_voltage_max'])) {
$xmlbat->addAttribute("DesignVoltage", $bat_item['design_voltage_max']);
}
if (isset($bat_item['present_voltage'])) {
$xmlbat->addAttribute("PresentVoltage", $bat_item['present_voltage']);
}
if (isset($bat_item['charging_state'])) {
$xmlbat->addAttribute("ChargingState", $bat_item['charging_state']);
} else {
if (isset($bat_item['charging_state_i'])) {
$xmlbat->addAttribute("ChargingState", 'Charging');
} elseif (!isset($bat_item['charging_state_e'])) {
$xmlbat->addAttribute("ChargingState", 'Discharging');
} elseif (isset($bat_item['charging_state_f'])) {
$xmlbat->addAttribute("ChargingState", 'Fully Charged');
} else {
$xmlbat->addAttribute("ChargingState", 'Unknown state');
}
}
if (isset($bat_item['battery_type'])) {
$xmlbat->addAttribute("BatteryType", $bat_item['battery_type']);
}
if (isset($bat_item['battery_temperature'])) {
$xmlbat->addAttribute("BatteryTemperature", $bat_item['battery_temperature']);
}
if (isset($bat_item['design_capacity'])
&& isset($bat_item['design_capacity_max']) && ($bat_item['design_capacity_max'] != 0)
&& (!isset($bat['capacity_unit']) || ($bat['capacity_unit'] != "???"))) {
if (isset($bat_item['battery_condition'])) {
$xmlbat->addAttribute("BatteryCondition", min(100, round(100*$bat_item['design_capacity']/$bat_item['design_capacity_max']))."% ".$bat_item['battery_condition']);
} else {
$xmlbat->addAttribute("BatteryCondition", min(100, round(100*$bat_item['design_capacity']/$bat_item['design_capacity_max']))."%");
}
} elseif (isset($bat_item['battery_condition'])) {
$xmlbat->addAttribute("BatteryCondition", $bat_item['battery_condition']);
}
if (isset($bat_item['cycle_count'])) {
$xmlbat->addAttribute("CycleCount", $bat_item['cycle_count']);
}
}
return $this->xml->getSimpleXmlElement();
}
}

View File

@@ -0,0 +1,168 @@
/***************************************************************************
* 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 661 2012-08-27 11:26:39Z 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 = "", BatteryType = "",RemainingCapacity = "", PresentVoltage = "", ChargingState = "", BatteryTemperature = "", BatteryCondition = "", CapacityUnit = "", CycleCount = "", DesignVoltageMax = "";
DesignCapacity = $(this).attr("DesignCapacity");
DesignVoltage = $(this).attr("DesignVoltage");
BatteryType = $(this).attr("BatteryType");
RemainingCapacity = $(this).attr("RemainingCapacity");
PresentVoltage = $(this).attr("PresentVoltage");
ChargingState = $(this).attr("ChargingState");
BatteryTemperature = $(this).attr("BatteryTemperature");
BatteryCondition = $(this).attr("BatteryCondition");
CapacityUnit = $(this).attr("CapacityUnit");
CycleCount = $(this).attr("CycleCount");
DesignVoltageMax = $(this).attr("DesignVoltageMax");
if (CapacityUnit == undefined) {
CapacityUnit = "mWh";
}
if ((CapacityUnit == "%") && (RemainingCapacity != undefined)) {
bat_table.fnAddData([genlang(4, true, "BAT"), createBar(round(parseInt(RemainingCapacity, 10),0)), '&nbsp;']);
} else if (DesignCapacity == undefined) {
if (RemainingCapacity != undefined) bat_table.fnAddData([genlang(4, true, "BAT"), RemainingCapacity+' '+CapacityUnit, '&nbsp;']);
} else {
bat_table.fnAddData([genlang(3, true, "BAT"), DesignCapacity+' '+CapacityUnit, '&nbsp;']);
if (RemainingCapacity != undefined) bat_table.fnAddData([genlang(4, true, "BAT"), RemainingCapacity+' '+CapacityUnit, createBar(parseInt(DesignCapacity, 10) != 0 ? round(parseInt(RemainingCapacity, 10) / parseInt(DesignCapacity, 10) * 100, 0) : 0)]);
}
if (ChargingState != undefined) {
bat_table.fnAddData([genlang(9, true, "BAT"), ChargingState, '&nbsp;']);
}
if (DesignVoltage != undefined) {
if (DesignVoltageMax != undefined) {
bat_table.fnAddData([genlang(5, true, "BAT"), DesignVoltage+' mV', DesignVoltageMax+' mV']);
} else {
bat_table.fnAddData([genlang(5, true, "BAT"), DesignVoltage+' mV', '&nbsp;']);
}
} else if (DesignVoltageMax != undefined) {
bat_table.fnAddData([genlang(5, true, "BAT"), DesignVoltageMax+' mV', '&nbsp;']);
}
if (PresentVoltage != undefined) {
bat_table.fnAddData([genlang(6, true, "BAT"), PresentVoltage+' mV', '&nbsp;']);
}
if (BatteryType != undefined) {
bat_table.fnAddData([genlang(10, true, "BAT"), BatteryType, '&nbsp;']);
}
if (BatteryTemperature != undefined) {
bat_table.fnAddData([genlang(11, true, "BAT"), formatTemp(BatteryTemperature, xml), '&nbsp;']);
}
if (BatteryCondition != undefined) {
bat_table.fnAddData([genlang(12, true, "BAT"), BatteryCondition, '&nbsp;']);
}
if (CycleCount != undefined) {
bat_table.fnAddData([genlang(13, true, "BAT"), CycleCount, '&nbsp;']);
}
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>&nbsp;</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());
});
});

View File

@@ -0,0 +1,70 @@
function renderPlugin_bat(data) {
var directives = {
RemainingCapacity: {
html: function () {
var CapacityUnit = (this["CapacityUnit"] !== undefined) ? this["CapacityUnit"] : 'mWh';
if ( CapacityUnit === "%" ) {
return '<div class="progress"><div class="progress-bar progress-bar-info" style="width: ' + round(this["RemainingCapacity"],0) + '%;"></div>' +
'</div><div class="percent">' + round(this["RemainingCapacity"],0) + '%</div>';
} else {
return this["RemainingCapacity"] + String.fromCharCode(160) + CapacityUnit;
}
}
},
DesignCapacity: {
html: function () {
var CapacityUnit = (this["CapacityUnit"] !== undefined) ? this["CapacityUnit"] : 'mWh';
return this["DesignCapacity"] + String.fromCharCode(160) + CapacityUnit;
}
},
RemainingCapacityBar: {
html: function () {
var CapacityUnit = (this["CapacityUnit"] !== undefined) ? this["CapacityUnit"] : 'mWh';
if (( CapacityUnit !== "%" ) && (this["DesignCapacity"] !== undefined)){
var percent = (this["DesignCapacity"] != 0) ? round(100*this["RemainingCapacity"]/this["DesignCapacity"],0) : 0;
return '<div class="progress"><div class="progress-bar progress-bar-info" style="width: ' + percent + '%;"></div>' +
'</div><div class="percent">' + percent + '%</div>';
} else {
return '';
}
}
},
PresentVoltage: {
text: function () {
return this['PresentVoltage'] + String.fromCharCode(160) + 'mV';
}
},
BatteryTemperature: {
text: function () {
return formatTemp(this["BatteryTemperature"], data["Options"]["@attributes"]["tempFormat"]);
}
},
DesignVoltage: {
text: function () {
return this['DesignVoltage']+String.fromCharCode(160) + 'mV';
}
},
DesignVoltageMax: {
text: function () {
return (this["DesignVoltageMax"] !== undefined) ? this['DesignVoltageMax']+String.fromCharCode(160) + 'mV' : '';
}
}
};
if ((data['Plugins']['Plugin_BAT'] !== undefined) && (data['Plugins']['Plugin_BAT']["Bat"] !== undefined) && (data['Plugins']['Plugin_BAT']["Bat"]["@attributes"] !== undefined)){
$('#bat').render(data['Plugins']['Plugin_BAT']["Bat"]["@attributes"], directives);
var attr = data['Plugins']['Plugin_BAT']["Bat"]["@attributes"];
for (bat_param in {DesignCapacity:0,RemainingCapacity:1,ChargingState:2,DesignVoltage:3,PresentVoltage:4,BatteryType:5,BatteryTemperature:6,BatteryCondition:7,CycleCount:8}) {
if (attr[bat_param] !== undefined) {
$('#bat_' + bat_param).show();
}
}
if (attr["CapacityUnit"] === "%") {
$('#bat_DesignCapacity').hide();
}
$('#block_bat').show();
} else {
$('#block_bat').hide();
}
}

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: cz.xml 661 2012-08-27 11:26:39Z namiltd $ -->
<!--
phpSysInfo language file Language: Czech Created by: Tomáš Růžička
-->
<tns:translationPlugin language="czech" charset="utf-8"
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
<expression id="plugin_bat_001" name="bat_title">
<exp>Stav baterie</exp>
</expression>
<expression id="plugin_bat_002" name="bat_date">
<exp>Aktualizováno</exp>
</expression>
<expression id="plugin_bat_003" name="bat_design_capacity">
<exp>Konstrukční kapacita</exp>
</expression>
<expression id="plugin_bat_004" name="bat_remaining_capacity">
<exp>Zbývající kapacita</exp>
</expression>
<expression id="plugin_bat_005" name="bat_design_voltage">
<exp>Konstrukční napětí</exp>
</expression>
<expression id="plugin_bat_006" name="bat_present_voltage">
<exp>Aktuální napětí</exp>
</expression>
<expression id="plugin_bat_007" name="bat_item">
<exp>Položky</exp>
</expression>
<expression id="plugin_bat_008" name="bat_value">
<exp>Hodnoty</exp>
</expression>
<expression id="plugin_bat_009" name="bat_charging_state">
<exp>Stav nabíjení</exp>
</expression>
<expression id="plugin_bat_010" name="bat_battery_type">
<exp>Battery Type</exp>
</expression>
<expression id="plugin_bat_011" name="bat_battery_temperature">
<exp>Battery Temperature</exp>
</expression>
<expression id="plugin_bat_012" name="bat_battery_condition">
<exp>Battery Condition</exp>
</expression>
<expression id="plugin_bat_013" name="bat_cycle_count">
<exp>Cycle Count</exp>
</expression>
</tns:translationPlugin>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: de.xml 661 2012-08-27 11:26:39Z namiltd $ -->
<!--
phpSysInfo language file Language: German Created by: Matthias Freund (MAFLO321)
-->
<tns:translationPlugin language="german" charset="utf-8"
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
<expression id="plugin_bat_001" name="bat_title">
<exp>Akku-Status</exp>
</expression>
<expression id="plugin_bat_002" name="bat_date">
<exp>Letzte Aktualisierung</exp>
</expression>
<expression id="plugin_bat_003" name="bat_design_capacity">
<exp>Bemeskapazität</exp>
</expression>
<expression id="plugin_bat_004" name="bat_remaining_capacity">
<exp>Übrige Kapazität</exp>
</expression>
<expression id="plugin_bat_005" name="bat_design_voltage">
<exp>Bemessungsspannung</exp>
</expression>
<expression id="plugin_bat_006" name="bat_present_voltage">
<exp>Momentane Spannung</exp>
</expression>
<expression id="plugin_bat_007" name="bat_item">
<exp>Dinge</exp>
</expression>
<expression id="plugin_bat_008" name="bat_value">
<exp>Werte</exp>
</expression>
<expression id="plugin_bat_009" name="bat_charging_state">
<exp>Ladezustand</exp>
</expression>
<expression id="plugin_bat_010" name="bat_battery_type">
<exp>Akku-Typ</exp>
</expression>
<expression id="plugin_bat_011" name="bat_battery_temperature">
<exp>Akku-Temperatur</exp>
</expression>
<expression id="plugin_bat_012" name="bat_battery_condition">
<exp>Akku-Zustand</exp>
</expression>
<expression id="plugin_bat_013" name="bat_cycle_count">
<exp>Cycle Count</exp>
</expression>
</tns:translationPlugin>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: en.xml 661 2012-08-27 11:26:39Z namiltd $ -->
<!--
phpSysInfo language file Language: English Created by: Erkan VALENTIN
-->
<tns:translationPlugin language="english" charset="utf-8"
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
<expression id="plugin_bat_001" name="bat_title">
<exp>Battery Status</exp>
</expression>
<expression id="plugin_bat_002" name="bat_date">
<exp>Last refresh</exp>
</expression>
<expression id="plugin_bat_003" name="bat_design_capacity">
<exp>Design capacity</exp>
</expression>
<expression id="plugin_bat_004" name="bat_remaining_capacity">
<exp>Remaining capacity</exp>
</expression>
<expression id="plugin_bat_005" name="bat_design_voltage">
<exp>Design voltage</exp>
</expression>
<expression id="plugin_bat_006" name="bat_present_voltage">
<exp>Present voltage</exp>
</expression>
<expression id="plugin_bat_007" name="bat_item">
<exp>Items</exp>
</expression>
<expression id="plugin_bat_008" name="bat_value">
<exp>Values</exp>
</expression>
<expression id="plugin_bat_009" name="bat_charging_state">
<exp>Charging state</exp>
</expression>
<expression id="plugin_bat_010" name="bat_battery_type">
<exp>Battery Type</exp>
</expression>
<expression id="plugin_bat_011" name="bat_battery_temperature">
<exp>Battery Temperature</exp>
</expression>
<expression id="plugin_bat_012" name="bat_battery_condition">
<exp>Battery Condition</exp>
</expression>
<expression id="plugin_bat_013" name="bat_cycle_count">
<exp>Cycle Count</exp>
</expression>
</tns:translationPlugin>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: fr.xml 661 2012-08-27 11:26:39Z namiltd $ -->
<!--
phpSysInfo language file Language: French Created by: Erkan VALENTIN
-->
<tns:translationPlugin language="french" charset="utf-8"
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
<expression id="plugin_bat_001" name="bat_title">
<exp>Etat des batteries</exp>
</expression>
<expression id="plugin_bat_002" name="bat_date">
<exp>Dernière actualisation</exp>
</expression>
<expression id="plugin_bat_003" name="bat_design_capacity">
<exp>Capacité d'origine</exp>
</expression>
<expression id="plugin_bat_004" name="bat_remaining_capacity">
<exp>Capacité restante</exp>
</expression>
<expression id="plugin_bat_005" name="bat_design_voltage">
<exp>Tension d'origine</exp>
</expression>
<expression id="plugin_bat_006" name="bat_present_voltage">
<exp>Tension actuelle</exp>
</expression>
<expression id="plugin_bat_007" name="bat_item">
<exp>Elements</exp>
</expression>
<expression id="plugin_bat_008" name="bat_value">
<exp>Valeurs</exp>
</expression>
<expression id="plugin_bat_009" name="bat_charging_state">
<exp>Etat</exp>
</expression>
<expression id="plugin_bat_010" name="bat_battery_type">
<exp>Battery Type</exp>
</expression>
<expression id="plugin_bat_011" name="bat_battery_temperature">
<exp>Battery Temperature</exp>
</expression>
<expression id="plugin_bat_012" name="bat_battery_condition">
<exp>Battery Condition</exp>
</expression>
<expression id="plugin_bat_013" name="bat_cycle_count">
<exp>Cycle Count</exp>
</expression>
</tns:translationPlugin>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: pl.xml 661 2012-08-27 11:26:39Z namiltd $ -->
<!--
phpSysInfo language file Language: Polish Created by: Mieczyslaw Nalewaj
-->
<tns:translationPlugin language="polish" charset="utf-8"
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
<expression id="plugin_bat_001" name="bat_title">
<exp>Status Baterii</exp>
</expression>
<expression id="plugin_bat_002" name="bat_date">
<exp>Ostatnie odświeżenie</exp>
</expression>
<expression id="plugin_bat_003" name="bat_design_capacity">
<exp>Pojemność znamionowa</exp>
</expression>
<expression id="plugin_bat_004" name="bat_remaining_capacity">
<exp>Pojemność aktualna</exp>
</expression>
<expression id="plugin_bat_005" name="bat_design_voltage">
<exp>Napięcie znamionowe</exp>
</expression>
<expression id="plugin_bat_006" name="bat_present_voltage">
<exp>Napięcie aktualne</exp>
</expression>
<expression id="plugin_bat_007" name="bat_item">
<exp>Parametry</exp>
</expression>
<expression id="plugin_bat_008" name="bat_value">
<exp>Wartości</exp>
</expression>
<expression id="plugin_bat_009" name="bat_charging_state">
<exp>Stan ładowania</exp>
</expression>
<expression id="plugin_bat_010" name="bat_battery_type">
<exp>Typ ogniw</exp>
</expression>
<expression id="plugin_bat_011" name="bat_battery_temperature">
<exp>Temperatura ogniw</exp>
</expression>
<expression id="plugin_bat_012" name="bat_battery_condition">
<exp>Kondycja ogniw</exp>
</expression>
<expression id="plugin_bat_013" name="bat_cycle_count">
<exp>Cykli ładowania</exp>
</expression>
</tns:translationPlugin>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: ro.xml 661 2014-05-02 11:26:39Z namiltd $ -->
<!--
phpSysInfo language file Language: Romană Created by: Iulian Alexe
-->
<tns:translationPlugin language="romana" charset="utf-8"
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
<expression id="plugin_bat_001" name="bat_title">
<exp>Stare Baterie</exp>
</expression>
<expression id="plugin_bat_002" name="bat_date">
<exp>Ultimul refresh</exp>
</expression>
<expression id="plugin_bat_003" name="bat_design_capacity">
<exp>Capacitate Design</exp>
</expression>
<expression id="plugin_bat_004" name="bat_remaining_capacity">
<exp>Capacitate rămasă</exp>
</expression>
<expression id="plugin_bat_005" name="bat_design_voltage">
<exp>Voltaj design</exp>
</expression>
<expression id="plugin_bat_006" name="bat_present_voltage">
<exp>Voltaj prezent</exp>
</expression>
<expression id="plugin_bat_007" name="bat_item">
<exp>Elemente</exp>
</expression>
<expression id="plugin_bat_008" name="bat_value">
<exp>Valori</exp>
</expression>
<expression id="plugin_bat_009" name="bat_charging_state">
<exp>Stare de Încărcare</exp>
</expression>
<expression id="plugin_bat_010" name="bat_battery_type">
<exp>Tip Baterie</exp>
</expression>
<expression id="plugin_bat_011" name="bat_battery_temperature">
<exp>Temperatura Baterie</exp>
</expression>
<expression id="plugin_bat_012" name="bat_battery_condition">
<exp>Condiții Baterie</exp>
</expression>
<expression id="plugin_bat_013" name="bat_cycle_count">
<exp>Cycle Count</exp>
</expression>
</tns:translationPlugin>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: en.xml 661 2012-08-27 11:26:39Z namiltd $ -->
<!--
phpSysInfo language file Language: Russian Created by: Denis Sevostyanov (den007)
-->
<tns:translationPlugin language="russian" charset="utf-8"
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
<expression id="plugin_bat_001" name="bat_title">
<exp>Состояние батареи</exp>
</expression>
<expression id="plugin_bat_002" name="bat_date">
<exp>Последние обновление</exp>
</expression>
<expression id="plugin_bat_003" name="bat_design_capacity">
<exp>Проектная мощность</exp>
</expression>
<expression id="plugin_bat_004" name="bat_remaining_capacity">
<exp>Оставшийся объем</exp>
</expression>
<expression id="plugin_bat_005" name="bat_design_voltage">
<exp>Проектное напряжение</exp>
</expression>
<expression id="plugin_bat_006" name="bat_present_voltage">
<exp>Фактическое напряжение</exp>
</expression>
<expression id="plugin_bat_007" name="bat_item">
<exp>Элементы</exp>
</expression>
<expression id="plugin_bat_008" name="bat_value">
<exp>Значение</exp>
</expression>
<expression id="plugin_bat_009" name="bat_charging_state">
<exp>Состояние зарядки</exp>
</expression>
<expression id="plugin_bat_010" name="bat_battery_type">
<exp>Тип батареи</exp>
</expression>
<expression id="plugin_bat_011" name="bat_battery_temperature">
<exp>Температура батареи</exp>
</expression>
<expression id="plugin_bat_012" name="bat_battery_condition">
<exp>Состояние аккумулятора</exp>
</expression>
<expression id="plugin_bat_013" name="bat_cycle_count">
<exp>Циклы</exp>
</expression>
</tns:translationPlugin>