Merge pull request #2 from mariorodriguezlopez/Lang

lang in db
This commit is contained in:
Mario Rodriguez
2023-01-31 12:11:47 +01:00
committed by GitHub
23 changed files with 378 additions and 430 deletions

View File

@@ -269,7 +269,7 @@ def importConfig ():
# Specify globals so they can be overwritten with the new config
global lastTimeImported, mySettings
# General
global ENABLE_ARPSCAN, SCAN_SUBNETS, PRINT_LOG, TIMEZONE, PIALERT_WEB_PROTECTION, PIALERT_WEB_PASSWORD, INCLUDED_SECTIONS, SCAN_CYCLE_MINUTES, DAYS_TO_KEEP_EVENTS, REPORT_DASHBOARD_URL, DIG_GET_IP_ARG
global ENABLE_ARPSCAN, SCAN_SUBNETS, PRINT_LOG, TIMEZONE, PIALERT_WEB_PROTECTION, PIALERT_WEB_PASSWORD, INCLUDED_SECTIONS, SCAN_CYCLE_MINUTES, DAYS_TO_KEEP_EVENTS, REPORT_DASHBOARD_URL, DIG_GET_IP_ARG, UI_LANG
# Email
global REPORT_MAIL, SMTP_SERVER, SMTP_PORT, REPORT_TO, REPORT_FROM, SMTP_SKIP_LOGIN, SMTP_USER, SMTP_PASS, SMTP_SKIP_TLS, SMTP_FORCE_SSL
# Webhooks
@@ -319,6 +319,7 @@ def importConfig ():
DAYS_TO_KEEP_EVENTS = ccd('DAYS_TO_KEEP_EVENTS', 90 , c_d, 'Delete events days', 'integer', '', 'General')
REPORT_DASHBOARD_URL = ccd('REPORT_DASHBOARD_URL', 'http://pi.alert/' , c_d, 'PiAlert URL', 'text', '', 'General')
DIG_GET_IP_ARG = ccd('DIG_GET_IP_ARG', '-4 myip.opendns.com @resolver1.opendns.com' , c_d, 'DIG arguments', 'text', '', 'General')
UI_LANG = ccd('UI_LANG', 'English' , c_d, 'Language Interface', 'selecttext', "['English', 'German', 'Spanish']", 'General')
# Email
REPORT_MAIL = ccd('REPORT_MAIL', False , c_d, 'Enable email', 'boolean', '', 'Email', ['test'])

View File

@@ -9,7 +9,6 @@
<?php
require 'php/templates/header.php';
require 'php/server/db.php';
?>
<!-- Page ------------------------------------------------------------------ -->
@@ -26,11 +25,11 @@
<!-- period selector -->
<span class="breadcrumb" style="top: 0px;">
<select class="form-control" id="period" onchange="javascript: periodChanged();">
<option value="1 day"><?php echo lang('DevDetail_Periodselect_today');?></option>
<option value="7 days"><?php echo lang('DevDetail_Periodselect_LastWeek');?></option>
<option value="1 month" selected><?php echo lang('DevDetail_Periodselect_LastMonth');?></option>
<option value="1 year"><?php echo lang('DevDetail_Periodselect_LastYear');?></option>
<option value="100 years"><?php echo lang('DevDetail_Periodselect_All');?></option>
<option value="1 day"><?= lang('DevDetail_Periodselect_today');?></option>
<option value="7 days"><?= lang('DevDetail_Periodselect_LastWeek');?></option>
<option value="1 month" selected><?= lang('DevDetail_Periodselect_LastMonth');?></option>
<option value="1 year"><?= lang('DevDetail_Periodselect_LastYear');?></option>
<option value="100 years"><?= lang('DevDetail_Periodselect_All');?></option>
</select>
</span>
</section>
@@ -45,7 +44,7 @@
<a href="#" onclick="javascript: $('#tabDetails').trigger('click')">
<div class="small-box bg-aqua">
<div class="inner"> <h3 id="deviceStatus" style="margin-left: 0em"> -- </h3>
<p class="infobox_label"><?php echo lang('DevDetail_Shortcut_CurrentStatus');?></p>
<p class="infobox_label"><?= lang('DevDetail_Shortcut_CurrentStatus');?></p>
</div>
<div class="icon"> <i id="deviceStatusIcon" class=""></i></div>
</div>
@@ -57,7 +56,7 @@
<a href="#" onclick="javascript: $('#tabSessions').trigger('click');">
<div class="small-box bg-green">
<div class="inner"> <h3 id="deviceSessions"> -- </h3>
<p class="infobox_label"><?php echo lang('DevDetail_Shortcut_Sessions');?></p>
<p class="infobox_label"><?= lang('DevDetail_Shortcut_Sessions');?></p>
</div>
<div class="icon"> <i class="fa fa-plug"></i> </div>
</div>
@@ -69,7 +68,7 @@
<a href="#" onclick="javascript: $('#tabPresence').trigger('click')">
<div class="small-box bg-yellow">
<div class="inner"> <h3 id="deviceEvents" style="margin-left: 0em"> -- </h3>
<p class="infobox_label"><?php echo lang('DevDetail_Shortcut_Presence');?></p>
<p class="infobox_label"><?= lang('DevDetail_Shortcut_Presence');?></p>
</div>
<div id="deviceEventsIcon" class="icon"> <i class="fa fa-calendar"></i> </div>
</div>
@@ -81,7 +80,7 @@
<a href="#" onclick="javascript: $('#tabEvents').trigger('click');">
<div class="small-box bg-red">
<div class="inner"> <h3 id="deviceDownAlerts"> -- </h3>
<p class="infobox_label"><?php echo lang('DevDetail_Shortcut_DownAlerts');?></p>
<p class="infobox_label"><?= lang('DevDetail_Shortcut_DownAlerts');?></p>
</div>
<div class="icon"> <i class="fa fa-warning"></i> </div>
</div>
@@ -99,15 +98,15 @@
<div id="navDevice" class="nav-tabs-custom">
<ul class="nav nav-tabs" style="fon t-size:16px;">
<li> <a id="tabDetails" href="#panDetails" data-toggle="tab"> <?php echo lang('DevDetail_Tab_Details');?> </a></li>
<li> <a id="tabDetails" href="#panDetails" data-toggle="tab"> <?= lang('DevDetail_Tab_Details');?> </a></li>
<?php
if ($_REQUEST['mac'] == 'Internet') { $DevDetail_Tap_temp = "Tools"; } else { $DevDetail_Tap_temp = lang('DevDetail_Tab_Nmap');}
?>
<li> <a id="tabNmap" href="#panNmap" data-toggle="tab"> <?php echo $DevDetail_Tap_temp;?> </a></li>
<li> <a id="tabSessions" href="#panSessions" data-toggle="tab"> <?php echo lang('DevDetail_Tab_Sessions');?> </a></li>
<li> <a id="tabPresence" href="#panPresence" data-toggle="tab"> <?php echo lang('DevDetail_Tab_Presence');?> </a></li>
<li> <a id="tabEvents" href="#panEvents" data-toggle="tab"> <?php echo lang('DevDetail_Tab_Events');?> </a></li>
<li> <a id="tabPholus" href="#panPholus" data-toggle="tab"> <?php echo lang('DevDetail_Tab_Pholus');?> </a></li>
<li> <a id="tabSessions" href="#panSessions" data-toggle="tab"> <?= lang('DevDetail_Tab_Sessions');?> </a></li>
<li> <a id="tabPresence" href="#panPresence" data-toggle="tab"> <?= lang('DevDetail_Tab_Presence');?> </a></li>
<li> <a id="tabEvents" href="#panEvents" data-toggle="tab"> <?= lang('DevDetail_Tab_Events');?> </a></li>
<li> <a id="tabPholus" href="#panPholus" data-toggle="tab"> <?= lang('DevDetail_Tab_Pholus');?> </a></li>
<div class="btn-group pull-right">
<button type="button" class="btn btn-default" style="padding: 10px; min-width: 30px;"
@@ -134,12 +133,12 @@
<div class="row">
<!-- column 1 -->
<div class="col-lg-4 col-sm-6 col-xs-12">
<h4 class="bottom-border-aqua"><?php echo lang('DevDetail_MainInfo_Title');?></h4>
<h4 class="bottom-border-aqua"><?= lang('DevDetail_MainInfo_Title');?></h4>
<div class="box-body form-horizontal">
<!-- MAC -->
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo lang('DevDetail_MainInfo_mac');?></label>
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_mac');?></label>
<div class="col-sm-9">
<input class="form-control" id="txtMAC" type="text" readonly value="--">
</div>
@@ -147,7 +146,7 @@
<!-- Name -->
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo lang('DevDetail_MainInfo_Name');?></label>
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Name');?></label>
<div class="col-sm-9">
<div class="input-group">
<input class="form-control" id="txtName" type="text" value="--">
@@ -158,7 +157,7 @@
<!-- Owner -->
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo lang('DevDetail_MainInfo_Owner');?></label>
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Owner');?></label>
<div class="col-sm-9">
<div class="input-group">
<input class="form-control" id="txtOwner" type="text" value="--">
@@ -175,7 +174,7 @@
<!-- Type -->
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo lang('DevDetail_MainInfo_Type');?></label>
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Type');?></label>
<div class="col-sm-9">
<div class="input-group">
<input class="form-control" id="txtDeviceType" type="text" value="--">
@@ -194,13 +193,13 @@
<!-- Icon -->
<div class="form-group">
<label class="col-sm-3 control-label">
<?php echo lang('DevDetail_Icon');?>
<?= lang('DevDetail_Icon');?>
<a href="https://fontawesome.com/search?q=laptop&o=r&m=free" target="_blank"> <span><i class="fa fa-fw fa-arrow-up-right-from-square"></i></a><span>
</label>
<div class="col-sm-9">
<div class="input-group">
<input class="form-control" title="<?php echo lang('DevDetail_Icon_Descr');?>" id="txtIcon" type="text" value="--">
<span class="input-group-addon" title='<?php echo lang('DevDetail_button_OverwriteIcons_Tooltip');?>'><i class="fa fa-copy pointer" onclick="askOverwriteIconType();"></i></span>
<input class="form-control" title="<?= lang('DevDetail_Icon_Descr');?>" id="txtIcon" type="text" value="--">
<span class="input-group-addon" title='<?= lang('DevDetail_button_OverwriteIcons_Tooltip');?>'><i class="fa fa-copy pointer" onclick="askOverwriteIconType();"></i></span>
<span class="input-group-addon"><i class="fa fa-pencil pointer" onclick="editDrp('txtIcon');"></i></span>
<div class="input-group-btn">
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
@@ -215,7 +214,7 @@
<!-- Vendor -->
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo lang('DevDetail_MainInfo_Vendor');?></label>
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Vendor');?></label>
<div class="col-sm-9">
<input class="form-control" id="txtVendor" type="text" value="--">
</div>
@@ -223,7 +222,7 @@
<!-- Favorite -->
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo lang('DevDetail_MainInfo_Favorite');?></label>
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Favorite');?></label>
<div class="col-sm-9" style="padding-top:6px;">
<input class="checkbox blue hidden" id="chkFavorite" type="checkbox">
</div>
@@ -231,7 +230,7 @@
<!-- Group -->
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo lang('DevDetail_MainInfo_Group');?></label>
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Group');?></label>
<div class="col-sm-9">
<div class="input-group">
<input class="form-control" id="txtGroup" type="text" value="--">
@@ -249,7 +248,7 @@
<!-- Location -->
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo lang('DevDetail_MainInfo_Location');?></label>
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Location');?></label>
<div class="col-sm-9">
<div class="input-group">
<input class="form-control" id="txtLocation" type="text" value="--">
@@ -267,7 +266,7 @@
<!-- Comments -->
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo lang('DevDetail_MainInfo_Comments');?></label>
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Comments');?></label>
<div class="col-sm-9">
<textarea class="form-control" rows="3" id="txtComments"></textarea>
</div>
@@ -280,12 +279,12 @@
<!-- column 2 -->
<div class="col-lg-4 col-sm-6 col-xs-12">
<h4 class="bottom-border-aqua"><?php echo lang('DevDetail_SessionInfo_Title');?></h4>
<h4 class="bottom-border-aqua"><?= lang('DevDetail_SessionInfo_Title');?></h4>
<div class="box-body form-horizontal">
<!-- Status -->
<div class="form-group">
<label class="col-sm-5 control-label"><?php echo lang('DevDetail_SessionInfo_Status');?></label>
<label class="col-sm-5 control-label"><?= lang('DevDetail_SessionInfo_Status');?></label>
<div class="col-sm-7">
<input class="form-control" id="txtStatus" type="text" readonly value="--">
</div>
@@ -293,7 +292,7 @@
<!-- First Session -->
<div class="form-group">
<label class="col-sm-5 control-label"><?php echo lang('DevDetail_SessionInfo_FirstSession');?></label>
<label class="col-sm-5 control-label"><?= lang('DevDetail_SessionInfo_FirstSession');?></label>
<div class="col-sm-7">
<input class="form-control" id="txtFirstConnection" type="text" readonly value="--">
</div>
@@ -301,7 +300,7 @@
<!-- Last Session -->
<div class="form-group">
<label class="col-sm-5 control-label"><?php echo lang('DevDetail_SessionInfo_LastSession');?></label>
<label class="col-sm-5 control-label"><?= lang('DevDetail_SessionInfo_LastSession');?></label>
<div class="col-sm-7">
<input class="form-control" id="txtLastConnection" type="text" readonly value="--">
</div>
@@ -309,7 +308,7 @@
<!-- Last IP -->
<div class="form-group">
<label class="col-sm-5 control-label"><?php echo lang('DevDetail_SessionInfo_LastIP');?></label>
<label class="col-sm-5 control-label"><?= lang('DevDetail_SessionInfo_LastIP');?></label>
<div class="col-sm-7">
<input class="form-control" id="txtLastIP" type="text" readonly value="--">
</div>
@@ -317,21 +316,21 @@
<!-- Static IP -->
<div class="form-group">
<label class="col-sm-5 control-label"><?php echo lang('DevDetail_SessionInfo_StaticIP');?></label>
<label class="col-sm-5 control-label"><?= lang('DevDetail_SessionInfo_StaticIP');?></label>
<div class="col-sm-7" style="padding-top:6px;">
<input class="checkbox blue hidden" id="chkStaticIP" type="checkbox">
</div>
</div>
<!-- Network -->
<h4 class="bottom-border-aqua"><?php echo lang('DevDetail_MainInfo_Network_Title');?><span class="networkPageHelp"> <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/NETWORK_TREE.md"><i class="fa fa-circle-question"></i></a><span></h4>
<h4 class="bottom-border-aqua"><?= lang('DevDetail_MainInfo_Network_Title');?><span class="networkPageHelp"> <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/NETWORK_TREE.md"><i class="fa fa-circle-question"></i></a><span></h4>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo lang('DevDetail_MainInfo_Network');?></label>
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Network');?></label>
<div class="col-sm-9">
<div class="input-group">
<input class="form-control" id="txtNetworkNodeMac" type="text" value="--">
<span class="input-group-addon"><i title="<?php echo lang('DevDetail_GoToNetworkNode');?>" class="fa fa-square-up-right pointer" onclick="goToNetworkNode('txtNetworkNodeMac');"></i></span>
<span class="input-group-addon"><i title="<?= lang('DevDetail_GoToNetworkNode');?>" class="fa fa-square-up-right pointer" onclick="goToNetworkNode('txtNetworkNodeMac');"></i></span>
<div class="input-group-btn">
<button type="button" class="btn btn-info dropdown-toggle" data-mynodemac="" data-toggle="dropdown" aria-expanded="false" id="buttonNetworkNodeMac">
<span class="fa fa-caret-down"></span></button>
@@ -343,7 +342,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo lang('DevDetail_MainInfo_Network_Port');?></label>
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Network_Port');?></label>
<div class="col-sm-9">
<input class="form-control" id="txtNetworkPort" type="text" value="--">
</div>
@@ -354,12 +353,12 @@
<!-- column 3 -->
<div class="col-lg-4 col-sm-6 col-xs-12">
<h4 class="bottom-border-aqua"><?php echo lang('DevDetail_EveandAl_Title');?></h4>
<h4 class="bottom-border-aqua"><?= lang('DevDetail_EveandAl_Title');?></h4>
<div class="box-body form-horizontal">
<!-- Scan Cycle -->
<div class="form-group">
<label class="col-sm-5 control-label"><?php echo lang('DevDetail_EveandAl_ScanCycle');?></label>
<label class="col-sm-5 control-label"><?= lang('DevDetail_EveandAl_ScanCycle');?></label>
<div class="col-sm-7">
<div class="input-group">
<input class="form-control" id="txtScanCycle" type="text" value="--" readonly >
@@ -367,8 +366,8 @@
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-expanded="false" id="dropdownButtonScanCycle">
<span class="fa fa-caret-down"></span></button>
<ul id="dropdownScanCycle" class="dropdown-menu dropdown-menu-right">
<li><a href="javascript:void(0)" onclick="setTextValue('txtScanCycle','yes')"><?php echo lang('DevDetail_EveandAl_ScanCycle_a');?></a></li>
<li><a href="javascript:void(0)" onclick="setTextValue('txtScanCycle','no');"><?php echo lang('DevDetail_EveandAl_ScanCycle_z');?></a></li>
<li><a href="javascript:void(0)" onclick="setTextValue('txtScanCycle','yes')"><?= lang('DevDetail_EveandAl_ScanCycle_a');?></a></li>
<li><a href="javascript:void(0)" onclick="setTextValue('txtScanCycle','no');"><?= lang('DevDetail_EveandAl_ScanCycle_z');?></a></li>
</ul>
</div>
</div>
@@ -377,7 +376,7 @@
<!-- Alert events -->
<div class="form-group">
<label class="col-sm-5 control-label"><?php echo lang('DevDetail_EveandAl_AlertAllEvents');?></label>
<label class="col-sm-5 control-label"><?= lang('DevDetail_EveandAl_AlertAllEvents');?></label>
<div class="col-sm-7" style="padding-top:6px;">
<input class="checkbox blue hidden" id="chkAlertEvents" type="checkbox">
</div>
@@ -385,7 +384,7 @@
<!-- Alert Down -->
<div class="form-group">
<label class="col-sm-5 control-label"><?php echo lang('DevDetail_EveandAl_AlertDown');?></label>
<label class="col-sm-5 control-label"><?= lang('DevDetail_EveandAl_AlertDown');?></label>
<div class="col-sm-7" style="padding-top:6px;">
<input class="checkbox red hidden" id="chkAlertDown" type="checkbox">
</div>
@@ -393,7 +392,7 @@
<!-- Skip Notifications -->
<div class="form-group">
<label class="col-sm-5 control-label" style="padding-top: 0px; padding-left: 0px;"><?php echo lang('DevDetail_EveandAl_Skip');?></label>
<label class="col-sm-5 control-label" style="padding-top: 0px; padding-left: 0px;"><?= lang('DevDetail_EveandAl_Skip');?></label>
<div class="col-sm-7">
<div class="input-group">
<input class="form-control" id="txtSkipRepeated" type="text" value="--" readonly >
@@ -414,7 +413,7 @@
<!-- New Device -->
<div class="form-group">
<label class="col-sm-5 control-label"><?php echo lang('DevDetail_EveandAl_NewDevice');?>:</label>
<label class="col-sm-5 control-label"><?= lang('DevDetail_EveandAl_NewDevice');?>:</label>
<div class="col-sm-7" style="padding-top:6px;">
<input class="checkbox orange hidden" id="chkNewDevice" type="checkbox">
</div>
@@ -422,7 +421,7 @@
<!-- Archived -->
<div class="form-group">
<label class="col-sm-5 control-label"><?php echo lang('DevDetail_EveandAl_Archived');?>:</label>
<label class="col-sm-5 control-label"><?= lang('DevDetail_EveandAl_Archived');?>:</label>
<div class="col-sm-7" style="padding-top:6px;">
<input class="checkbox blue hidden" id="chkArchived" type="checkbox">
</div>
@@ -430,7 +429,7 @@
<!-- Randomized MAC -->
<div class="form-group" >
<label class="col-sm-5 control-label"><?php echo lang('DevDetail_EveandAl_RandomMAC');?>:</label>
<label class="col-sm-5 control-label"><?= lang('DevDetail_EveandAl_RandomMAC');?>:</label>
<div class="col-sm-7" style="padding-top:6px;">
<span id="iconRandomMACinactive" data-toggle="tooltip" data-placement="right" title="Random MAC is Inactive">
<i style="font-size: 24px;" class="text-gray glyphicon glyphicon-random"></i> &nbsp &nbsp </span>
@@ -450,13 +449,13 @@
<div class="col-xs-12">
<div class="pull-right">
<button type="button" class="btn btn-default pa-btn pa-btn-delete" style="margin-left:0px;"
id="btnDeleteEvents" onclick="askDeleteDeviceEvents()"> <?php echo lang('DevDetail_button_DeleteEvents');?> </button>
id="btnDeleteEvents" onclick="askDeleteDeviceEvents()"> <?= lang('DevDetail_button_DeleteEvents');?> </button>
<button type="button" class="btn btn-default pa-btn pa-btn-delete" style="margin-left:0px;"
id="btnDelete" onclick="askDeleteDevice()"> <?php echo lang('DevDetail_button_Delete');?> </button>
id="btnDelete" onclick="askDeleteDevice()"> <?= lang('DevDetail_button_Delete');?> </button>
<button type="button" class="btn btn-default pa-btn" style="margin-left:6px;"
id="btnRestore" onclick="getDeviceData(true)"> <?php echo lang('DevDetail_button_Reset');?> </button>
id="btnRestore" onclick="getDeviceData(true)"> <?= lang('DevDetail_button_Reset');?> </button>
<button type="button" disabled class="btn btn-primary pa-btn" style="margin-left:6px; "
id="btnSave" onclick="setDeviceData()" > <?php echo lang('DevDetail_button_Save');?> </button>
id="btnSave" onclick="setDeviceData()" > <?= lang('DevDetail_button_Save');?> </button>
</div>
</div>
@@ -470,12 +469,12 @@
<table id="tableSessions" class="table table-bordered table-hover table-striped ">
<thead>
<tr>
<th><?php echo lang('DevDetail_SessionTable_Order');?></th>
<th><?php echo lang('DevDetail_SessionTable_Connection');?></th>
<th><?php echo lang('DevDetail_SessionTable_Disconnection');?></th>
<th><?php echo lang('DevDetail_SessionTable_Duration');?></th>
<th><?php echo lang('DevDetail_SessionTable_IP');?></th>
<th><?php echo lang('DevDetail_SessionTable_Additionalinfo');?></th>
<th><?= lang('DevDetail_SessionTable_Order');?></th>
<th><?= lang('DevDetail_SessionTable_Connection');?></th>
<th><?= lang('DevDetail_SessionTable_Disconnection');?></th>
<th><?= lang('DevDetail_SessionTable_Duration');?></th>
<th><?= lang('DevDetail_SessionTable_IP');?></th>
<th><?= lang('DevDetail_SessionTable_Additionalinfo');?></th>
</tr>
</thead>
</table>
@@ -516,10 +515,10 @@
<div style="width:100%; text-align: center;">
<script>
setTimeout(function(){
document.getElementById('piamanualnmap_fast').innerHTML='<?php echo lang('DevDetail_Nmap_buttonFast');?> (' + document.getElementById('txtLastIP').value +')';
document.getElementById('piamanualnmap_normal').innerHTML='<?php echo lang('DevDetail_Nmap_buttonDefault');?> (' + document.getElementById('txtLastIP').value +')';
document.getElementById('piamanualnmap_detail').innerHTML='<?php echo lang('DevDetail_Nmap_buttonDetail');?> (' + document.getElementById('txtLastIP').value +')';
document.getElementById('piamanualnmap_skipdiscovery').innerHTML='<?php echo lang('DevDetail_Nmap_buttonSkipDiscovery');?> (' + document.getElementById('txtLastIP').value +')';
document.getElementById('piamanualnmap_fast').innerHTML='<?= lang('DevDetail_Nmap_buttonFast');?> (' + document.getElementById('txtLastIP').value +')';
document.getElementById('piamanualnmap_normal').innerHTML='<?= lang('DevDetail_Nmap_buttonDefault');?> (' + document.getElementById('txtLastIP').value +')';
document.getElementById('piamanualnmap_detail').innerHTML='<?= lang('DevDetail_Nmap_buttonDetail');?> (' + document.getElementById('txtLastIP').value +')';
document.getElementById('piamanualnmap_skipdiscovery').innerHTML='<?= lang('DevDetail_Nmap_buttonSkipDiscovery');?> (' + document.getElementById('txtLastIP').value +')';
}, 2000);
</script>
@@ -530,11 +529,11 @@
<div style="text-align: left;">
<ul style="padding:20px;">
<li><?php echo lang('DevDetail_Nmap_buttonFast_text');?></li>
<li><?php echo lang('DevDetail_Nmap_buttonDefault_text');?></li>
<li><?php echo lang('DevDetail_Nmap_buttonDetail_text');?></li>
<li><?php echo lang('DevDetail_Nmap_buttonSkipDiscovery_text');?></li>
<li><a onclick="setCache('activeMaintenanceTab', 'tab_Logging_id')" href="/maintenance.php#tab_Logging"><?php echo lang('DevDetail_Nmap_resultsLink');?></a></li>
<li><?= lang('DevDetail_Nmap_buttonFast_text');?></li>
<li><?= lang('DevDetail_Nmap_buttonDefault_text');?></li>
<li><?= lang('DevDetail_Nmap_buttonDetail_text');?></li>
<li><?= lang('DevDetail_Nmap_buttonSkipDiscovery_text');?></li>
<li><a onclick="setCache('activeMaintenanceTab', 'tab_Logging_id')" href="/maintenance.php#tab_Logging"><?= lang('DevDetail_Nmap_resultsLink');?></a></li>
</ul>
</div>
@@ -559,9 +558,9 @@
}
</script>
<h3><?php echo lang("DevDetail_Tab_NmapTableHeader");?></h3>
<h3><?= lang("DevDetail_Tab_NmapTableHeader");?></h3>
<div><?php echo lang("DevDetail_Tab_NmapTableText");?></div>
<div><?= lang("DevDetail_Tab_NmapTableText");?></div>
<table id="tableNmap" class="table table-bordered table-hover table-striped ">
<thead>
@@ -577,7 +576,7 @@
<!-- Comment out tbody when trying to implement better table with datatables here -->
<!-- IDEA: Show unmatched pholus entries? -->
<tbody id="tableNmapBody">
<tr id="tableNmapPlc" class="text-center"><td colspan='7'><span><?php echo lang("DevDetail_Tab_NmapEmpty"); ?></span></td></tr>
<tr id="tableNmapPlc" class="text-center"><td colspan='7'><span><?= lang("DevDetail_Tab_NmapEmpty"); ?></span></td></tr>
</tbody>
</table>
@@ -614,7 +613,7 @@
<div class="text-center">
<label>
<input class="checkbox blue hidden" id="chkHideConnectionEvents" type="checkbox" checked>
<?php echo lang('DevDetail_Events_CheckBox');?>
<?= lang('DevDetail_Events_CheckBox');?>
</label>
</div>
@@ -648,7 +647,7 @@
<!-- Comment out tbody when trying to implement better table with datatables here -->
<!-- IDEA: Show unmatched pholus entries? -->
<tbody id="tablePholusBody">
<tr id="tablePholusPlc" class="text-center"><td colspan='7'><span><?php echo lang("DevDetail_Tab_PholusEmpty"); ?></span></td></tr>
<tr id="tablePholusPlc" class="text-center"><td colspan='7'><span><?= lang("DevDetail_Tab_PholusEmpty"); ?></span></td></tr>
</tbody>
</table>
</div>
@@ -1065,13 +1064,13 @@ function initializeDatatables () {
'<td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw">'+
'</td></table>',
emptyTable: 'No data',
"lengthMenu": "<?php echo lang('Events_Tablelenght');?>",
"search": "<?php echo lang('Events_Searchbox');?>: ",
"lengthMenu": "<?= lang('Events_Tablelenght');?>",
"search": "<?= lang('Events_Searchbox');?>: ",
"paginate": {
"next": "<?php echo lang('Events_Table_nav_next');?>",
"previous": "<?php echo lang('Events_Table_nav_prev');?>"
"next": "<?= lang('Events_Table_nav_next');?>",
"previous": "<?= lang('Events_Table_nav_prev');?>"
},
"info": "<?php echo lang('Events_Table_info');?>",
"info": "<?= lang('Events_Table_info');?>",
}
});
@@ -1104,13 +1103,13 @@ function initializeDatatables () {
'<td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw">'+
'</td></table>',
emptyTable: 'No data',
"lengthMenu": "<?php echo lang('Events_Tablelenght');?>",
"search": "<?php echo lang('Events_Searchbox');?>: ",
"lengthMenu": "<?= lang('Events_Tablelenght');?>",
"search": "<?= lang('Events_Searchbox');?>: ",
"paginate": {
"next": "<?php echo lang('Events_Table_nav_next');?>",
"previous": "<?php echo lang('Events_Table_nav_prev');?>"
"next": "<?= lang('Events_Table_nav_next');?>",
"previous": "<?= lang('Events_Table_nav_prev');?>"
},
"info": "<?php echo lang('Events_Table_info');?>",
"info": "<?= lang('Events_Table_info');?>",
}
});
@@ -1149,7 +1148,7 @@ function initializeCalendar () {
slotLabelInterval : '04:00:00',
slotLabelFormat : 'H:mm',
timeFormat : 'H:mm',
locale : '<?php echo lang('Presence_CalHead_lang');?>',
locale : '<?= lang('Presence_CalHead_lang');?>',
header: {
left : 'prev,next today',
center : 'title',
@@ -1160,14 +1159,14 @@ function initializeCalendar () {
agendaYear: {
type : 'agenda',
duration : { year: 1 },
buttonText : '<?php echo lang('Presence_CalHead_year');?>',
buttonText : '<?= lang('Presence_CalHead_year');?>',
columnHeaderFormat : ''
},
agendaMonth: {
type : 'agenda',
duration : { month: 1 },
buttonText : '<?php echo lang('Presence_CalHead_month');?>',
buttonText : '<?= lang('Presence_CalHead_month');?>',
columnHeaderFormat : 'D'
}
},
@@ -1453,7 +1452,7 @@ function recordSwitch(direction) {
if(somethingChanged)
{
showModalDefaultStrParam ('Unsaved changes', 'Do you want to discard your changes?',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Okay');?>', performSwitch, direction);
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', performSwitch, direction);
} else
{
performSwitch(direction)
@@ -1561,7 +1560,7 @@ function askSkipNotifications () {
if ($('#chkArchived')[0].checked && $('#txtScanCycle').val() != "no") {
// Ask skip notifications
showModalDefault ('Device Archived', 'Do you want to skip all notifications for this device?',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Okay');?>', 'skipNotifications');
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', 'skipNotifications');
}
}
@@ -1583,8 +1582,8 @@ function askDeleteDeviceEvents () {
}
// Ask delete device Events
showModalWarning ('<?php echo lang('DevDetail_button_DeleteEvents');?>', '<?php echo lang('DevDetail_button_DeleteEvents_Warning');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteDeviceEvents');
showModalWarning ('<?= lang('DevDetail_button_DeleteEvents');?>', '<?= lang('DevDetail_button_DeleteEvents_Warning');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteDeviceEvents');
}
function deleteDeviceEvents () {
@@ -1611,8 +1610,8 @@ function askOverwriteIconType () {
}
// Ask overwrite icon types
showModalWarning ('<?php echo lang('DevDetail_button_OverwriteIcons');?>', '<?php echo lang('DevDetail_button_OverwriteIcons_Warning');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Okay');?>', 'overwriteIconType');
showModalWarning ('<?= lang('DevDetail_button_OverwriteIcons');?>', '<?= lang('DevDetail_button_OverwriteIcons_Warning');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', 'overwriteIconType');
}
// -----------------------------------------------------------------------------
@@ -1642,7 +1641,7 @@ function askDeleteDevice () {
// Ask delete device
showModalWarning ('Delete Device', 'Are you sure you want to delete this device?<br>(maybe you prefer to archive it)',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteDevice');
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteDevice');
}
@@ -1670,7 +1669,7 @@ function askDeleteDevice () {
// Ask delete device
showModalWarning ('Delete Device', 'Are you sure you want to delete this device?<br>(maybe you prefer to archive it)',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteDevice');
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteDevice');
}
@@ -1892,13 +1891,13 @@ function initTable(tableId, mac){
'<td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw">'+
'</td></table>',
emptyTable: 'No data',
"lengthMenu": "<?php echo lang('Events_Tablelenght');?>",
"search": "<?php echo lang('Events_Searchbox');?>: ",
"lengthMenu": "<?= lang('Events_Tablelenght');?>",
"search": "<?= lang('Events_Searchbox');?>: ",
"paginate": {
"next": "<?php echo lang('Events_Table_nav_next');?>",
"previous": "<?php echo lang('Events_Table_nav_prev');?>"
"next": "<?= lang('Events_Table_nav_next');?>",
"previous": "<?= lang('Events_Table_nav_prev');?>"
},
"info": "<?php echo lang('Events_Table_info');?>",
"info": "<?= lang('Events_Table_info');?>",
}
});

View File

@@ -11,7 +11,6 @@
require 'php/templates/header.php';
require 'php/templates/graph.php';
require 'php/server/util.php';
// check permissions
@@ -27,7 +26,7 @@
<!-- Content header--------------------------------------------------------- -->
<section class="content-header">
<h1 id="pageTitle">
<?php echo lang('Device_Title');?>
<?= lang('Device_Title');?>
</h1>
</section>
@@ -40,7 +39,7 @@
<a href="#" onclick="javascript: getDevicesList('all');">
<div class="small-box bg-aqua">
<div class="inner"><h3 id="devicesAll"> -- </h3>
<p class="infobox_label"><?php echo lang('Device_Shortcut_AllDevices');?></p>
<p class="infobox_label"><?= lang('Device_Shortcut_AllDevices');?></p>
</div>
<div class="icon"><i class="fa fa-laptop text-aqua-40"></i></div>
</div>
@@ -52,7 +51,7 @@
<a href="#" onclick="javascript: getDevicesList('connected');">
<div class="small-box bg-green">
<div class="inner"><h3 id="devicesConnected"> -- </h3>
<p class="infobox_label"><?php echo lang('Device_Shortcut_Connected');?></p>
<p class="infobox_label"><?= lang('Device_Shortcut_Connected');?></p>
</div>
<div class="icon"><i class="fa fa-plug text-green-40"></i></div>
</div>
@@ -64,7 +63,7 @@
<a href="#" onclick="javascript: getDevicesList('favorites');">
<div class="small-box bg-yellow">
<div class="inner"><h3 id="devicesFavorites"> -- </h3>
<p class="infobox_label"><?php echo lang('Device_Shortcut_Favorites');?></p>
<p class="infobox_label"><?= lang('Device_Shortcut_Favorites');?></p>
</div>
<div class="icon"><i class="fa fa-star text-yellow-40"></i></div>
</div>
@@ -76,7 +75,7 @@
<a href="#" onclick="javascript: getDevicesList('new');">
<div class="small-box bg-yellow">
<div class="inner"><h3 id="devicesNew"> -- </h3>
<p class="infobox_label"><?php echo lang('Device_Shortcut_NewDevices');?></p>
<p class="infobox_label"><?= lang('Device_Shortcut_NewDevices');?></p>
</div>
<div class="icon"><i class="ion ion-plus-round text-yellow-40"></i></div>
</div>
@@ -88,7 +87,7 @@
<a href="#" onclick="javascript: getDevicesList('down');">
<div class="small-box bg-red">
<div class="inner"><h3 id="devicesDown"> -- </h3>
<p class="infobox_label"><?php echo lang('Device_Shortcut_DownAlerts');?></p>
<p class="infobox_label"><?= lang('Device_Shortcut_DownAlerts');?></p>
</div>
<div class="icon"><i class="fa fa-warning text-red-40"></i></div>
</div>
@@ -100,7 +99,7 @@
<a href="#" onclick="javascript: getDevicesList('archived');">
<div class="small-box bg-gray top_small_box_gray_text">
<div class="inner"><h3 id="devicesArchived"> -- </h3>
<p class="infobox_label"><?php echo lang('Device_Shortcut_Archived');?></p>
<p class="infobox_label"><?= lang('Device_Shortcut_Archived');?></p>
</div>
<div class="icon"><i class="fa fa-eye-slash text-gray-40"></i></div>
</div>
@@ -115,7 +114,7 @@
<div class="col-md-12">
<div class="box" id="clients">
<div class="box-header with-border">
<h3 class="box-title"><?php echo lang('Device_Shortcut_OnlineChart');?> </h3>
<h3 class="box-title"><?= lang('Device_Shortcut_OnlineChart');?> </h3>
</div>
<div class="box-body">
<div class="chart">
@@ -227,24 +226,24 @@ function main () {
tableColumnOrder = numberArrayFromString(data);
//initialize the table headers in the correct order
var headersDefaultOrder = [ '<?php echo lang('Device_TableHead_Name');?>',
'<?php echo lang('Device_TableHead_Owner');?>',
'<?php echo lang('Device_TableHead_Type');?>',
'<?php echo lang('Device_TableHead_Icon');?>',
'<?php echo lang('Device_TableHead_Favorite');?>',
'<?php echo lang('Device_TableHead_Group');?>',
'<?php echo lang('Device_TableHead_FirstSession');?>',
'<?php echo lang('Device_TableHead_LastSession');?>',
'<?php echo lang('Device_TableHead_LastIP');?>',
'<?php echo lang('Device_TableHead_MAC');?>',
'<?php echo lang('Device_TableHead_Status');?>',
'<?php echo lang('Device_TableHead_MAC_full');?>',
'<?php echo lang('Device_TableHead_LastIPOrder');?>',
'<?php echo lang('Device_TableHead_Rowid');?>',
'<?php echo lang('Device_TableHead_Parent_MAC');?>',
'<?php echo lang('Device_TableHead_Connected_Devices');?>',
'<?php echo lang('Device_TableHead_Location');?>',
'<?php echo lang('Device_TableHead_Vendor');?>'
var headersDefaultOrder = [ '<?= lang('Device_TableHead_Name');?>',
'<?= lang('Device_TableHead_Owner');?>',
'<?= lang('Device_TableHead_Type');?>',
'<?= lang('Device_TableHead_Icon');?>',
'<?= lang('Device_TableHead_Favorite');?>',
'<?= lang('Device_TableHead_Group');?>',
'<?= lang('Device_TableHead_FirstSession');?>',
'<?= lang('Device_TableHead_LastSession');?>',
'<?= lang('Device_TableHead_LastIP');?>',
'<?= lang('Device_TableHead_MAC');?>',
'<?= lang('Device_TableHead_Status');?>',
'<?= lang('Device_TableHead_MAC_full');?>',
'<?= lang('Device_TableHead_LastIPOrder');?>',
'<?= lang('Device_TableHead_Rowid');?>',
'<?= lang('Device_TableHead_Parent_MAC');?>',
'<?= lang('Device_TableHead_Connected_Devices');?>',
'<?= lang('Device_TableHead_Location');?>',
'<?= lang('Device_TableHead_Vendor');?>'
];
html = '';
@@ -328,7 +327,7 @@ function initializeDatatable () {
$('#tableDevices').DataTable({
'paging' : true,
'lengthChange' : true,
'lengthMenu' : [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, '<?php echo lang('Device_Tablelenght_all');?>']],
'lengthMenu' : [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, '<?= lang('Device_Tablelenght_all');?>']],
'searching' : true,
'ordering' : true,
@@ -436,13 +435,13 @@ function initializeDatatable () {
'language' : {
processing: '<table> <td width="130px" align="middle">Loading...</td><td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw"></td> </table>',
emptyTable: 'No data',
"lengthMenu": "<?php echo lang('Device_Tablelenght');?>",
"search": "<?php echo lang('Device_Searchbox');?>: ",
"lengthMenu": "<?= lang('Device_Tablelenght');?>",
"search": "<?= lang('Device_Searchbox');?>: ",
"paginate": {
"next": "<?php echo lang('Device_Table_nav_next');?>",
"previous": "<?php echo lang('Device_Table_nav_prev');?>"
"next": "<?= lang('Device_Table_nav_next');?>",
"previous": "<?= lang('Device_Table_nav_prev');?>"
},
"info": "<?php echo lang('Device_Table_info');?>",
"info": "<?= lang('Device_Table_info');?>",
}
});
@@ -524,13 +523,13 @@ function getDevicesList (status) {
// Define color & title for the status selected
switch (deviceStatus) {
case 'all': tableTitle = '<?php echo lang('Device_Shortcut_AllDevices');?>'; color = 'aqua'; break;
case 'connected': tableTitle = '<?php echo lang('Device_Shortcut_Connected');?>'; color = 'green'; break;
case 'favorites': tableTitle = '<?php echo lang('Device_Shortcut_Favorites');?>'; color = 'yellow'; break;
case 'new': tableTitle = '<?php echo lang('Device_Shortcut_NewDevices');?>'; color = 'yellow'; break;
case 'down': tableTitle = '<?php echo lang('Device_Shortcut_DownAlerts');?>'; color = 'red'; break;
case 'archived': tableTitle = '<?php echo lang('Device_Shortcut_Archived');?>'; color = 'gray'; break;
default: tableTitle = '<?php echo lang('Device_Shortcut_Devices');?>'; color = 'gray'; break;
case 'all': tableTitle = '<?= lang('Device_Shortcut_AllDevices');?>'; color = 'aqua'; break;
case 'connected': tableTitle = '<?= lang('Device_Shortcut_Connected');?>'; color = 'green'; break;
case 'favorites': tableTitle = '<?= lang('Device_Shortcut_Favorites');?>'; color = 'yellow'; break;
case 'new': tableTitle = '<?= lang('Device_Shortcut_NewDevices');?>'; color = 'yellow'; break;
case 'down': tableTitle = '<?= lang('Device_Shortcut_DownAlerts');?>'; color = 'red'; break;
case 'archived': tableTitle = '<?= lang('Device_Shortcut_Archived');?>'; color = 'gray'; break;
default: tableTitle = '<?= lang('Device_Shortcut_Devices');?>'; color = 'gray'; break;
}
// Set title and color

View File

@@ -17,17 +17,17 @@
<!-- Content header--------------------------------------------------------- -->
<section class="content-header">
<h1 id="pageTitle">
<?php echo lang('Events_Title');?>
<?= lang('Events_Title');?>
</h1>
<!-- period selector -->
<span class="breadcrumb" style="top: 0px;">
<select class="form-control" id="period" onchange="javascript: periodChanged();">
<option value="1 day"><?php echo lang('Events_Periodselect_today');?></option>
<option value="7 days"><?php echo lang('Events_Periodselect_LastWeek');?></option>
<option value="1 month" selected><?php echo lang('Events_Periodselect_LastMonth');?></option>
<option value="1 year"><?php echo lang('Events_Periodselect_LastYear');?></option>
<option value="100 years"><?php echo lang('Events_Periodselect_All');?></option>
<option value="1 day"><?= lang('Events_Periodselect_today');?></option>
<option value="7 days"><?= lang('Events_Periodselect_LastWeek');?></option>
<option value="1 month" selected><?= lang('Events_Periodselect_LastMonth');?></option>
<option value="1 year"><?= lang('Events_Periodselect_LastYear');?></option>
<option value="100 years"><?= lang('Events_Periodselect_All');?></option>
</select>
</span>
</section>
@@ -42,7 +42,7 @@
<a href="#" onclick="javascript: getEvents('all');">
<div class="small-box bg-aqua">
<div class="inner"> <h3 id="eventsAll"> -- </h3>
<p class="infobox_label"><?php echo lang('Events_Shortcut_AllEvents');?></p>
<p class="infobox_label"><?= lang('Events_Shortcut_AllEvents');?></p>
</div>
<div class="icon"> <i class="fa fa-bolt text-aqua-40"></i> </div>
</div>
@@ -54,7 +54,7 @@
<a href="#" onclick="javascript: getEvents('sessions');">
<div class="small-box bg-green">
<div class="inner"> <h3 id="eventsSessions"> -- </h3>
<p class="infobox_label"><?php echo lang('Events_Shortcut_Sessions');?></p>
<p class="infobox_label"><?= lang('Events_Shortcut_Sessions');?></p>
</div>
<div class="icon"> <i class="fa fa-plug text-green-40"></i> </div>
</div>
@@ -66,7 +66,7 @@
<a href="#" onclick="javascript: getEvents('missing');">
<div class="small-box bg-yellow">
<div class="inner"> <h3 id="eventsMissing"> -- </h3>
<p class="infobox_label"><?php echo lang('Events_Shortcut_MissSessions');?></p>
<p class="infobox_label"><?= lang('Events_Shortcut_MissSessions');?></p>
</div>
<div class="icon"> <i class="fa fa-exchange text-yellow-40"></i> </div>
</div>
@@ -78,7 +78,7 @@
<a href="#" onclick="javascript: getEvents('voided');">
<div class="small-box bg-yellow">
<div class="inner"> <h3 id="eventsVoided"> -- </h3>
<p class="infobox_label"><?php echo lang('Events_Shortcut_VoidSessions');?></p>
<p class="infobox_label"><?= lang('Events_Shortcut_VoidSessions');?></p>
</div>
<div class="icon"> <i class="fa fa-exclamation-circle text-yellow-40"></i> </div>
</div>
@@ -90,7 +90,7 @@
<a href="#" onclick="javascript: getEvents('new');">
<div class="small-box bg-yellow">
<div class="inner"> <h3 id="eventsNewDevices"> -- </h3>
<p class="infobox_label"><?php echo lang('Events_Shortcut_NewDevices');?></p>
<p class="infobox_label"><?= lang('Events_Shortcut_NewDevices');?></p>
</div>
<div class="icon"> <i class="ion ion-plus-round text-yellow-40"></i> </div>
</div>
@@ -102,7 +102,7 @@
<a href="#" onclick="javascript: getEvents('down');">
<div class="small-box bg-red">
<div class="inner"> <h3 id="eventsDown"> -- </h3>
<p class="infobox_label"><?php echo lang('Events_Shortcut_DownAlerts');?></p>
<p class="infobox_label"><?= lang('Events_Shortcut_DownAlerts');?></p>
</div>
<div class="icon"> <i class="fa fa-warning text-red-40"></i> </div>
</div>
@@ -127,18 +127,18 @@
<table id="tableEvents" class="table table-bordered table-hover table-striped ">
<thead>
<tr>
<th><?php echo lang('Events_TableHead_Order');?></th>
<th><?php echo lang('Events_TableHead_Device');?></th>
<th><?php echo lang('Events_TableHead_Owner');?></th>
<th><?php echo lang('Events_TableHead_Date');?></th>
<th><?php echo lang('Events_TableHead_EventType');?></th>
<th><?php echo lang('Events_TableHead_Connection');?></th>
<th><?php echo lang('Events_TableHead_Disconnection');?></th>
<th><?php echo lang('Events_TableHead_Duration');?></th>
<th><?php echo lang('Events_TableHead_DurationOrder');?></th>
<th><?php echo lang('Events_TableHead_IP');?></th>
<th><?php echo lang('Events_TableHead_IPOrder');?></th>
<th><?php echo lang('Events_TableHead_AdditionalInfo');?></th>
<th><?= lang('Events_TableHead_Order');?></th>
<th><?= lang('Events_TableHead_Device');?></th>
<th><?= lang('Events_TableHead_Owner');?></th>
<th><?= lang('Events_TableHead_Date');?></th>
<th><?= lang('Events_TableHead_EventType');?></th>
<th><?= lang('Events_TableHead_Connection');?></th>
<th><?= lang('Events_TableHead_Disconnection');?></th>
<th><?= lang('Events_TableHead_Duration');?></th>
<th><?= lang('Events_TableHead_DurationOrder');?></th>
<th><?= lang('Events_TableHead_IP');?></th>
<th><?= lang('Events_TableHead_IPOrder');?></th>
<th><?= lang('Events_TableHead_AdditionalInfo');?></th>
</tr>
</thead>
</table>
@@ -253,13 +253,13 @@ function initializeDatatable () {
'language' : {
processing: '<table><td width="130px" align="middle">Loading...</td><td><i class="ion ion-ios-loop-strong fa-spin fa-2x fa-fw"></td></table>',
emptyTable: 'No data',
"lengthMenu": "<?php echo lang('Events_Tablelenght');?>",
"search": "<?php echo lang('Events_Searchbox');?>: ",
"lengthMenu": "<?= lang('Events_Tablelenght');?>",
"search": "<?= lang('Events_Searchbox');?>: ",
"paginate": {
"next": "<?php echo lang('Events_Table_nav_next');?>",
"previous": "<?php echo lang('Events_Table_nav_prev');?>"
"next": "<?= lang('Events_Table_nav_next');?>",
"previous": "<?= lang('Events_Table_nav_prev');?>"
},
"info": "<?php echo lang('Events_Table_info');?>",
"info": "<?= lang('Events_Table_info');?>",
}
});
@@ -311,13 +311,13 @@ function getEvents (p_eventsType) {
// Define color & title for the status selected
switch (eventsType) {
case 'all': tableTitle = '<?php echo lang('Events_Shortcut_AllEvents');?>'; color = 'aqua'; sesionCols = false; break;
case 'sessions': tableTitle = '<?php echo lang('Events_Shortcut_Sessions');?>'; color = 'green'; sesionCols = true; break;
case 'missing': tableTitle = '<?php echo lang('Events_Shortcut_MissSessions');?>'; color = 'yellow'; sesionCols = true; break;
case 'voided': tableTitle = '<?php echo lang('Events_Shortcut_VoidSessions');?>'; color = 'yellow'; sesionCols = false; break;
case 'new': tableTitle = '<?php echo lang('Events_Shortcut_NewDevices');?>'; color = 'yellow'; sesionCols = false; break;
case 'down': tableTitle = '<?php echo lang('Events_Shortcut_DownAlerts');?>'; color = 'red'; sesionCols = false; break;
default: tableTitle = '<?php echo lang('Events_Shortcut_Events');?>'; boxClass = ''; sesionCols = false; break;
case 'all': tableTitle = '<?= lang('Events_Shortcut_AllEvents');?>'; color = 'aqua'; sesionCols = false; break;
case 'sessions': tableTitle = '<?= lang('Events_Shortcut_Sessions');?>'; color = 'green'; sesionCols = true; break;
case 'missing': tableTitle = '<?= lang('Events_Shortcut_MissSessions');?>'; color = 'yellow'; sesionCols = true; break;
case 'voided': tableTitle = '<?= lang('Events_Shortcut_VoidSessions');?>'; color = 'yellow'; sesionCols = false; break;
case 'new': tableTitle = '<?= lang('Events_Shortcut_NewDevices');?>'; color = 'yellow'; sesionCols = false; break;
case 'down': tableTitle = '<?= lang('Events_Shortcut_DownAlerts');?>'; color = 'red'; sesionCols = false; break;
default: tableTitle = '<?= lang('Events_Shortcut_Events');?>'; boxClass = ''; sesionCols = false; break;
}
// Set title and color

View File

@@ -8,13 +8,13 @@
<section class="content-header">
<?php require 'php/templates/notification.php'; ?>
<h1 id="pageTitle">
<?php echo lang('HelpFAQ_Title');?>
<?= lang('HelpFAQ_Title');?>
</h1>
</section>
<!-- Main content ---------------------------------------------------------- -->
<section class="content">
<h4><?php echo lang('HelpFAQ_Cat_General');?></h4>
<h4><?= lang('HelpFAQ_Cat_General');?></h4>
<div class="panel-group" id="accordion_gen">
<div class="panel panel-default">
@@ -22,16 +22,16 @@
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_gen" href="#collapse100">
<?php echo lang('HelpFAQ_Cat_General_100_head');?></a>
<?= lang('HelpFAQ_Cat_General_100_head');?></a>
</h4>
</div>
<div id="collapse100" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body"><?php echo lang('HelpFAQ_Cat_General_100_text_a');?>
<div class="panel-body"><?= lang('HelpFAQ_Cat_General_100_text_a');?>
<span class="text-danger help_faq_code"><?php echo date_default_timezone_get(); ?></span><br>
<?php echo lang('HelpFAQ_Cat_General_100_text_b');?>
<?= lang('HelpFAQ_Cat_General_100_text_b');?>
<span class="text-danger help_faq_code"><?php echo php_ini_loaded_file(); ?></span><br>
<?php echo lang('HelpFAQ_Cat_General_100_text_c');?>
<?= lang('HelpFAQ_Cat_General_100_text_c');?>
</div>
</div>
@@ -42,12 +42,12 @@
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_gen" href="#collapse101">
<?php echo lang('HelpFAQ_Cat_General_101_head');?></a>
<?= lang('HelpFAQ_Cat_General_101_head');?></a>
</h4>
</div>
<div id="collapse101" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
<?php echo lang('HelpFAQ_Cat_General_101_text');?>
<?= lang('HelpFAQ_Cat_General_101_text');?>
</div>
</div>
</div>
@@ -55,12 +55,12 @@
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_gen" href="#collapse102">
<?php echo lang('HelpFAQ_Cat_General_102_head');?></a>
<?= lang('HelpFAQ_Cat_General_102_head');?></a>
</h4>
</div>
<div id="collapse102" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
<?php echo lang('HelpFAQ_Cat_General_102_text');?>
<?= lang('HelpFAQ_Cat_General_102_text');?>
</div>
</div>
</div>
@@ -68,12 +68,12 @@
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_gen" href="#collapse102docker">
<?php echo lang('HelpFAQ_Cat_General_102docker_head');?></a>
<?= lang('HelpFAQ_Cat_General_102docker_head');?></a>
</h4>
</div>
<div id="collapse102docker" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
<?php echo lang('HelpFAQ_Cat_General_102docker_text');?>
<?= lang('HelpFAQ_Cat_General_102docker_text');?>
</div>
</div>
</div>
@@ -81,48 +81,48 @@
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_gen" href="#collapse103">
<?php echo lang('HelpFAQ_Cat_General_103_head');?></a>
<?= lang('HelpFAQ_Cat_General_103_head');?></a>
</h4>
</div>
<div id="collapse103" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
<?php echo lang('HelpFAQ_Cat_General_103_text');?>
<?= lang('HelpFAQ_Cat_General_103_text');?>
</div>
</div>
</div>
</div>
<h4><?php echo lang('Navigation_Devices');?></h4>
<h4><?= lang('Navigation_Devices');?></h4>
<div class="panel-group" id="accordion_dev">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_dev" href="#collapse200">
<?php echo lang('HelpFAQ_Cat_Device_200_head');?></a>
<?= lang('HelpFAQ_Cat_Device_200_head');?></a>
</h4>
</div>
<div id="collapse200" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
<?php echo lang('HelpFAQ_Cat_Device_200_text');?>
<?= lang('HelpFAQ_Cat_Device_200_text');?>
</div>
</div>
</div>
</div>
<h4><?php echo lang('HelpFAQ_Cat_Detail');?></h4>
<h4><?= lang('HelpFAQ_Cat_Detail');?></h4>
<div class="panel-group" id="accordion_det">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_det" href="#collapse300">
<?php echo lang('HelpFAQ_Cat_Detail_300_head');?> "<?php echo lang('DevDetail_MainInfo_Network');?>" / "<?php echo lang('DevDetail_MainInfo_Network_Port');?>"?</a>
<?= lang('HelpFAQ_Cat_Detail_300_head');?> "<?= lang('DevDetail_MainInfo_Network');?>" / "<?= lang('DevDetail_MainInfo_Network_Port');?>"?</a>
</h4>
</div>
<div id="collapse300" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
"<?php echo lang('DevDetail_MainInfo_Network');?>" <?php echo lang('HelpFAQ_Cat_Detail_300_text_a');?><br>
"<?php echo lang('DevDetail_MainInfo_Network_Port');?>" <?php echo lang('HelpFAQ_Cat_Detail_300_text_b');?>
"<?= lang('DevDetail_MainInfo_Network');?>" <?= lang('HelpFAQ_Cat_Detail_300_text_a');?><br>
"<?= lang('DevDetail_MainInfo_Network_Port');?>" <?= lang('HelpFAQ_Cat_Detail_300_text_b');?>
</div>
</div>
</div>
@@ -130,12 +130,12 @@
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_det" href="#collapse301">
<?php echo lang('HelpFAQ_Cat_Detail_301_head_a');?> "<?php echo lang('DevDetail_EveandAl_ScanCycle');?>" <?php echo lang('HelpFAQ_Cat_Detail_301_head_b');?></a>
<?= lang('HelpFAQ_Cat_Detail_301_head_a');?> "<?= lang('DevDetail_EveandAl_ScanCycle');?>" <?= lang('HelpFAQ_Cat_Detail_301_head_b');?></a>
</h4>
</div>
<div id="collapse301" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
<?php echo lang('HelpFAQ_Cat_Detail_301_text');?>
<?= lang('HelpFAQ_Cat_Detail_301_text');?>
</div>
</div>
</div>
@@ -143,12 +143,12 @@
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_det" href="#collapse302">
<?php echo lang('HelpFAQ_Cat_Detail_302_head_a');?> "<?php echo lang('DevDetail_EveandAl_RandomMAC');?>" <?php echo lang('HelpFAQ_Cat_Detail_302_head_b');?></a>
<?= lang('HelpFAQ_Cat_Detail_302_head_a');?> "<?= lang('DevDetail_EveandAl_RandomMAC');?>" <?= lang('HelpFAQ_Cat_Detail_302_head_b');?></a>
</h4>
</div>
<div id="collapse302" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
<?php echo lang('HelpFAQ_Cat_Detail_302_text');?>
<?= lang('HelpFAQ_Cat_Detail_302_text');?>
</div>
</div>
</div>
@@ -156,29 +156,29 @@
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_det" href="#collapse303">
<?php echo lang('HelpFAQ_Cat_Detail_303_head');?></a>
<?= lang('HelpFAQ_Cat_Detail_303_head');?></a>
</h4>
</div>
<div id="collapse303" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
<?php echo lang('HelpFAQ_Cat_Detail_303_text');?>
<?= lang('HelpFAQ_Cat_Detail_303_text');?>
</div>
</div>
</div>
</div>
<h4><?php echo lang('Navigation_Presence');?></h4>
<h4><?= lang('Navigation_Presence');?></h4>
<div class="panel-group" id="accordion_pre">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_pre" href="#collapse400">
<?php echo lang('HelpFAQ_Cat_Presence_400_head');?></a>
<?= lang('HelpFAQ_Cat_Presence_400_head');?></a>
</h4>
</div>
<div id="collapse400" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
<?php echo lang('HelpFAQ_Cat_Presence_400_text');?>
<?= lang('HelpFAQ_Cat_Presence_400_text');?>
</div>
</div>
</div>
@@ -186,29 +186,29 @@
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_pre" href="#collapse401">
<?php echo lang('HelpFAQ_Cat_Presence_401_head');?></a>
<?= lang('HelpFAQ_Cat_Presence_401_head');?></a>
</h4>
</div>
<div id="collapse401" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
<?php echo lang('HelpFAQ_Cat_Presence_401_text');?>
<?= lang('HelpFAQ_Cat_Presence_401_text');?>
</div>
</div>
</div>
</div>
<h4><?php echo lang('Navigation_Network');?></h4>
<h4><?= lang('Navigation_Network');?></h4>
<div class="panel-group" id="accordion_net">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_net" href="#collapse600">
<?php echo lang('HelpFAQ_Cat_Network_600_head');?></a>
<?= lang('HelpFAQ_Cat_Network_600_head');?></a>
</h4>
</div>
<div id="collapse600" class="panel-collapse collapse" style="font-size: 16px;">
<div class="panel-body">
<?php echo lang('HelpFAQ_Cat_Network_600_text');?>
<?= lang('HelpFAQ_Cat_Network_600_text');?>
</div>
</div>
</div>

View File

@@ -1,7 +1,5 @@
<?php
require 'php/templates/language/lang.php';
require dirname(__FILE__).'/php/server/init.php';
require 'php/templates/security.php';
if ($Pia_WebProtection != 'true')
@@ -97,10 +95,10 @@ if ($ENABLED_DARKMODE === True) {
</div>
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg"><?php echo lang('Login_Box');?></p>
<p class="login-box-msg"><?= lang('Login_Box');?></p>
<form action="index.php" method="post">
<div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="<?php echo lang('Login_Psw-box');?>" name="loginpassword">
<input type="password" class="form-control" placeholder="<?= lang('Login_Psw-box');?>" name="loginpassword">
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="row">
@@ -109,21 +107,21 @@ if ($ENABLED_DARKMODE === True) {
<label>
<input type="checkbox" name="PWRemember">
<div style="margin-left: 10px; display: inline-block; vertical-align: top;">
<?php echo lang('Login_Remember');?><br><span style="font-size: smaller"><?php echo lang('Login_Remember_small');?></span>
<?= lang('Login_Remember');?><br><span style="font-size: smaller"><?= lang('Login_Remember_small');?></span>
</div>
</label>
</div>
</div>
<!-- /.col -->
<div class="col-xs-4" style="padding-top: 10px;">
<button type="submit" class="btn btn-primary btn-block btn-flat"><?php echo lang('Login_Submit');?></button>
<button type="submit" class="btn btn-primary btn-block btn-flat"><?= lang('Login_Submit');?></button>
</div>
<!-- /.col -->
</div>
</form>
<div style="padding-top: 10px;">
<button class="btn btn-xs btn-primary btn-block btn-flat" onclick="Passwordhinfo()"><?php echo lang('Login_Toggle_Info');?></button>
<button class="btn btn-xs btn-primary btn-block btn-flat" onclick="Passwordhinfo()"><?= lang('Login_Toggle_Info');?></button>
</div>
</div>
@@ -136,7 +134,7 @@ if ($ENABLED_DARKMODE === True) {
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><3E></button>
<h4><i class="icon fa <?php echo $login_icon;?>"></i><?php echo $login_headline;?></h4>
<p><?php echo $login_info;?></p>
<p><?php echo lang('Login_Psw_run');?><br><span style="border: solid 1px yellow; padding: 2px;">./reset_password.sh <?php echo lang('Login_Psw_new');?></span><br><?php echo lang('Login_Psw_folder');?></p>
<p><?= lang('Login_Psw_run');?><br><span style="border: solid 1px yellow; padding: 2px;">./reset_password.sh <?= lang('Login_Psw_new');?></span><br><?= lang('Login_Psw_folder');?></p>
</div>
</div>

View File

@@ -11,19 +11,6 @@
// leiweibau 2022 https://github.com/leiweibau GNU GPLv3
//------------------------------------------------------------------------------
// Language selector config ----------------------------------------------------
//
// For security reasons, new language files must be entered into this array.
// The files in the language directory are compared with this array and only
// then accepted.
//
$pia_installed_langs = array('en_us',
'de_de',
'es_es');
//
// In addition to this, the language must also be added to the select tag in
// line 235. Later, the whole thing may become dynamic.
// Skin selector config ----------------------------------------------------
//
// For security reasons, new language files must be entered into this array.
@@ -57,7 +44,7 @@ $pia_installed_skins = array('skin-black-light',
<section class="content-header">
<?php require 'php/templates/notification.php'; ?>
<h1 id="pageTitle">
<?php echo lang('Maintenance_Title');?>
<?= lang('Maintenance_Title');?>
</h1>
</section>
@@ -145,31 +132,31 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<div class="box-body" style="padding-bottom: 5px;">
<div class="db_info_table">
<div class="db_info_table_row">
<div class="db_info_table_cell" style="min-width: 140px"><?php echo lang('Maintenance_version');?></div>
<div class="db_info_table_cell" style="min-width: 140px"><?= lang('Maintenance_version');?></div>
<div class="db_info_table_cell">
<div class="version" id="version" data-build-time="<?php echo file_get_contents( "buildtimestamp.txt");?>"><?php echo '<span id="new-version-text" class="myhidden">' .lang('Maintenance_new_version').'</span>'.'<span id="current-version-text" class="myhidden">' .lang('Maintenance_current_version').'</span>';?></div>
</div>
</div>
<div class="db_info_table_row">
<div class="db_info_table_cell" style="min-width: 140px"><?php echo lang('Maintenance_database_path');?></div>
<div class="db_info_table_cell" style="min-width: 140px"><?= lang('Maintenance_database_path');?></div>
<div class="db_info_table_cell">
<?php echo $pia_db;?>
</div>
</div>
<div class="db_info_table_row">
<div class="db_info_table_cell"><?php echo lang('Maintenance_database_size');?></div>
<div class="db_info_table_cell"><?= lang('Maintenance_database_size');?></div>
<div class="db_info_table_cell">
<?php echo $pia_db_size;?>
</div>
</div>
<div class="db_info_table_row">
<div class="db_info_table_cell"><?php echo lang('Maintenance_database_lastmod');?></div>
<div class="db_info_table_cell"><?= lang('Maintenance_database_lastmod');?></div>
<div class="db_info_table_cell">
<?php echo $pia_db_mod;?>
</div>
</div>
<div class="db_info_table_row">
<div class="db_info_table_cell"><?php echo lang('Maintenance_database_backup');?></div>
<div class="db_info_table_cell"><?= lang('Maintenance_database_backup');?></div>
<div class="db_info_table_cell">
<?php echo $Pia_Archive_count.' '.lang('Maintenance_database_backup_found').' / '.lang('Maintenance_database_backup_total').': '.$Pia_Archive_diskusage;?>
</div>
@@ -184,44 +171,27 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active">
<a id="tab_Settings_id" href="#tab_Settings" data-toggle="tab"><?php echo lang('Maintenance_Tools_Tab_UISettings');?></a>
<a id="tab_Settings_id" href="#tab_Settings" data-toggle="tab"><?= lang('Maintenance_Tools_Tab_UISettings');?></a>
</li>
<li>
<a id="tab_DBTools_id" href="#tab_DBTools" data-toggle="tab"><?php echo lang('Maintenance_Tools_Tab_Tools');?></a>
<a id="tab_DBTools_id" href="#tab_DBTools" data-toggle="tab"><?= lang('Maintenance_Tools_Tab_Tools');?></a>
</li>
<li>
<a id="tab_BackupRestore_id" href="#tab_BackupRestore" data-toggle="tab"><?php echo lang('Maintenance_Tools_Tab_BackupRestore');?></a>
<a id="tab_BackupRestore_id" href="#tab_BackupRestore" data-toggle="tab"><?= lang('Maintenance_Tools_Tab_BackupRestore');?></a>
</li>
<li>
<a id="tab_Logging_id" href="#tab_Logging" data-toggle="tab"><?php echo lang('Maintenance_Tools_Tab_Logging');?></a>
<a id="tab_Logging_id" href="#tab_Logging" data-toggle="tab"><?= lang('Maintenance_Tools_Tab_Logging');?></a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_Settings">
<div class="db_info_table">
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="text-align:center;">
<form method="post" action="maintenance.php">
<div style="display: inline-block;">
<select name="langselector" id="langselector" class="form-control bg-green" style="width:160px; margin-bottom:5px;">
<option value=""><?php echo lang('Maintenance_lang_selector_empty');?></option>
<option value="en_us"><?php echo lang('Maintenance_lang_en_us');?></option>
<option value="de_de"><?php echo lang('Maintenance_lang_de_de');?></option>
<option value="es_es"><?php echo lang('Maintenance_lang_es_es');?></option>
</select>
</div>
</form>
</div>
<div class="db_info_table_cell" style="padding: 10px; height:40px; text-align:left; vertical-align: middle;">
<?php echo lang('Maintenance_lang_selector_text');?>
</div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="text-align: center;">
<form method="post" action="maintenance.php">
<div style="display: inline-block; text-align: center;">
<select name="skinselector" class="form-control bg-green" style="width:160px; margin-bottom:5px;">
<option value=""><?php echo lang('Maintenance_themeselector_empty');?></option>
<option value=""><?= lang('Maintenance_themeselector_empty');?></option>
<option value="skin-black-light">black light</option>
<option value="skin-black">black</option>
<option value="skin-blue-light">blue light</option>
@@ -235,52 +205,52 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<option value="skin-yellow-light">yellow light</option>
<option value="skin-yellow">yellow</option>
</select></div>
<div style="display: block;"><input type="submit" name="skinselector_set" value="<?php echo lang('Maintenance_themeselector_apply');?>" class="btn bg-green" style="width:160px;">
<div style="display: block;"><input type="submit" name="skinselector_set" value="<?= lang('Maintenance_themeselector_apply');?>" class="btn bg-green" style="width:160px;">
<?php // echo $pia_skin_test; ?>
</div>
</form>
</div>
<div class="db_info_table_cell" style="padding: 10px; height:40px; text-align:left; vertical-align: middle;">
<?php echo lang('Maintenance_themeselector_text'); ?>
<?= lang('Maintenance_themeselector_text'); ?>
</div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a">
<button type="button" class="btn bg-green dbtools-button" id="btnToggleDarkmode" onclick="askToggleDarkmode()"><?php echo lang('Maintenance_Tool_darkmode');?></button>
<button type="button" class="btn bg-green dbtools-button" id="btnToggleDarkmode" onclick="askToggleDarkmode()"><?= lang('Maintenance_Tool_darkmode');?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_darkmode_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_darkmode_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a">
<div class="form-group" >
<div class="input-group" >
<select id="columnsSelect" class="form-control select2 select2-hidden-accessible" multiple="" style="width: 100%;" tabindex="-1" aria-hidden="true">
<option value="0"><?php echo lang('Device_TableHead_Name');?></option>
<option value="1"><?php echo lang('Device_TableHead_Owner');?></option>
<option value="2"><?php echo lang('Device_TableHead_Type');?></option>
<option value="3"><?php echo lang('Device_TableHead_Icon');?></option>
<option value="4"><?php echo lang('Device_TableHead_Favorite');?></option>
<option value="5"><?php echo lang('Device_TableHead_Group');?></option>
<option value="6"><?php echo lang('Device_TableHead_FirstSession');?></option>
<option value="7"><?php echo lang('Device_TableHead_LastSession');?></option>
<option value="8"><?php echo lang('Device_TableHead_LastIP');?></option>
<option value="9"><?php echo lang('Device_TableHead_MAC');?></option>
<option value="10"><?php echo lang('Device_TableHead_Status');?></option>
<option value="11"><?php echo lang('Device_TableHead_MAC_full');?></option>
<option value="12"><?php echo lang('Device_TableHead_LastIPOrder');?></option>
<option value="13"><?php echo lang('Device_TableHead_Rowid');?></option>
<option value="14"><?php echo lang('Device_TableHead_Parent_MAC');?></option>
<option value="15"><?php echo lang('Device_TableHead_Connected_Devices');?></option>
<option value="16"><?php echo lang('Device_TableHead_Location');?></option>
<option value="17"><?php echo lang('Device_TableHead_Vendor');?></option>
<option value="0"><?= lang('Device_TableHead_Name');?></option>
<option value="1"><?= lang('Device_TableHead_Owner');?></option>
<option value="2"><?= lang('Device_TableHead_Type');?></option>
<option value="3"><?= lang('Device_TableHead_Icon');?></option>
<option value="4"><?= lang('Device_TableHead_Favorite');?></option>
<option value="5"><?= lang('Device_TableHead_Group');?></option>
<option value="6"><?= lang('Device_TableHead_FirstSession');?></option>
<option value="7"><?= lang('Device_TableHead_LastSession');?></option>
<option value="8"><?= lang('Device_TableHead_LastIP');?></option>
<option value="9"><?= lang('Device_TableHead_MAC');?></option>
<option value="10"><?= lang('Device_TableHead_Status');?></option>
<option value="11"><?= lang('Device_TableHead_MAC_full');?></option>
<option value="12"><?= lang('Device_TableHead_LastIPOrder');?></option>
<option value="13"><?= lang('Device_TableHead_Rowid');?></option>
<option value="14"><?= lang('Device_TableHead_Parent_MAC');?></option>
<option value="15"><?= lang('Device_TableHead_Connected_Devices');?></option>
<option value="16"><?= lang('Device_TableHead_Location');?></option>
<option value="17"><?= lang('Device_TableHead_Vendor');?></option>
</select>
<span class="input-group-addon"><i title="<?php echo lang('DevDetail_GoToNetworkNode');?>" class="fa fa-save pointer" onclick="saveSelectedColumns();"></i></span>
<span class="input-group-addon"><i title="<?= lang('DevDetail_GoToNetworkNode');?>" class="fa fa-save pointer" onclick="saveSelectedColumns();"></i></span>
</div>
</div>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_displayed_columns_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_displayed_columns_text');?></div>
</div>
@@ -290,39 +260,39 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<div class="db_info_table">
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="">
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteMAC" onclick="askDeleteDevicesWithEmptyMACs()"><?php echo lang('Maintenance_Tool_del_empty_macs');?></button>
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteMAC" onclick="askDeleteDevicesWithEmptyMACs()"><?= lang('Maintenance_Tool_del_empty_macs');?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_empty_macs_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_empty_macs_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="">
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteMAC" onclick="askDeleteAllDevices()"><?php echo lang('Maintenance_Tool_del_alldev');?></button>
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteMAC" onclick="askDeleteAllDevices()"><?= lang('Maintenance_Tool_del_alldev');?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_alldev_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_alldev_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="">
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteUnknown" onclick="askDeleteUnknown()"><?php echo lang('Maintenance_Tool_del_unknowndev');?></button>
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteUnknown" onclick="askDeleteUnknown()"><?= lang('Maintenance_Tool_del_unknowndev');?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_unknowndev_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_unknowndev_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="">
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteEvents" onclick="askDeleteEvents()"><?php echo lang('Maintenance_Tool_del_allevents');?></button>
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteEvents" onclick="askDeleteEvents()"><?= lang('Maintenance_Tool_del_allevents');?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_allevents_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_allevents_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="">
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteEvents30" onclick="askDeleteEvents30()"><?php echo lang('Maintenance_Tool_del_allevents30');?></button>
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteEvents30" onclick="askDeleteEvents30()"><?= lang('Maintenance_Tool_del_allevents30');?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_allevents30_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_allevents30_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="">
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteActHistory" onclick="askDeleteActHistory()"><?php echo lang('Maintenance_Tool_del_ActHistory');?></button>
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnDeleteActHistory" onclick="askDeleteActHistory()"><?= lang('Maintenance_Tool_del_ActHistory');?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_del_ActHistory_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_del_ActHistory_text');?></div>
</div>
</div>
</div>
@@ -330,33 +300,33 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<div class="db_info_table">
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="">
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaBackupDBtoArchive" onclick="askPiaBackupDBtoArchive()"><?php echo lang('Maintenance_Tool_backup');?></button>
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaBackupDBtoArchive" onclick="askPiaBackupDBtoArchive()"><?= lang('Maintenance_Tool_backup');?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_backup_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_backup_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="">
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaRestoreDBfromArchive" onclick="askPiaRestoreDBfromArchive()"><?php echo lang('Maintenance_Tool_restore');?><br><?php echo $latestbackup_date;?></button>
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaRestoreDBfromArchive" onclick="askPiaRestoreDBfromArchive()"><?= lang('Maintenance_Tool_restore');?><br><?php echo $latestbackup_date;?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_restore_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_restore_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="">
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaPurgeDBBackups" onclick="askPiaPurgeDBBackups()"><?php echo lang('Maintenance_Tool_purgebackup');?></button>
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnPiaPurgeDBBackups" onclick="askPiaPurgeDBBackups()"><?= lang('Maintenance_Tool_purgebackup');?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_purgebackup_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_purgebackup_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="">
<button type="button" class="btn btn-default pa-btn bg-green dbtools-button" id="btnExportCSV" onclick="askExportCSV()"><?php echo lang('Maintenance_Tool_ExportCSV');?></button>
<button type="button" class="btn btn-default pa-btn bg-green dbtools-button" id="btnExportCSV" onclick="askExportCSV()"><?= lang('Maintenance_Tool_ExportCSV');?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_ExportCSV_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ExportCSV_text');?></div>
</div>
<div class="db_info_table_row">
<div class="db_tools_table_cell_a" style="">
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnImportCSV" onclick="askImportCSV()"><?php echo lang('Maintenance_Tool_ImportCSV');?></button>
<button type="button" class="btn btn-default pa-btn pa-btn-delete bg-red dbtools-button" id="btnImportCSV" onclick="askImportCSV()"><?= lang('Maintenance_Tool_ImportCSV');?></button>
</div>
<div class="db_tools_table_cell_b"><?php echo lang('Maintenance_Tool_ImportCSV_text');?></div>
<div class="db_tools_table_cell_b"><?= lang('Maintenance_Tool_ImportCSV_text');?></div>
</div>
</div>
</div>
@@ -374,7 +344,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<span class="span-padding"><a href="./log/pialert.log" target="_blank"><i class="fa fa-download"></i> </a></span>
</div></div>
<div class="log-purge">
<button class="btn btn-primary" onclick="logManage('pialert.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
<button class="btn btn-primary" onclick="logManage('pialert.log','cleanLog')"><?= lang('Gen_Purge');?></button>
</div>
</div>
</div>
@@ -390,7 +360,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<span class="span-padding"><a href="./log/pialert_front.log"><i class="fa fa-download"></i> </a></span>
</div></div>
<div class="log-purge">
<button class="btn btn-primary" onclick="logManage('pialert_front.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
<button class="btn btn-primary" onclick="logManage('pialert_front.log','cleanLog')"><?= lang('Gen_Purge');?></button>
</div>
</div>
</div>
@@ -407,7 +377,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<span class="span-padding"><a href="./log/pialert_pholus.log"><i class="fa fa-download"></i> </a></span>
</div></div>
<div class="log-purge">
<button class="btn btn-primary" onclick="logManage('pialert_pholus.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
<button class="btn btn-primary" onclick="logManage('pialert_pholus.log','cleanLog')"><?= lang('Gen_Purge');?></button>
</div>
</div>
</div>
@@ -425,7 +395,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<span class="span-padding"><a href="./log/pialert_pholus_lastrun.log"><i class="fa fa-download"></i> </a></span>
</div></div>
<div class="log-purge">
<button class="btn btn-primary" onclick="logManage('pialert_pholus_lastrun.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
<button class="btn btn-primary" onclick="logManage('pialert_pholus_lastrun.log','cleanLog')"><?= lang('Gen_Purge');?></button>
</div>
</div>
</div>
@@ -443,7 +413,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<span class="span-padding"><a href="./log/IP_changes.log"><i class="fa fa-download"></i> </a></span>
</div></div>
<div class="log-purge">
<button class="btn btn-primary" onclick="logManage('IP_changes.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
<button class="btn btn-primary" onclick="logManage('IP_changes.log','cleanLog')"><?= lang('Gen_Purge');?></button>
</div>
</div>
</div>
@@ -460,7 +430,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<span class="span-padding"><a href="./log/stdout.log"><i class="fa fa-download"></i> </a></span>
</div></div>
<div class="log-purge">
<button class="btn btn-primary" onclick="logManage('stdout.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
<button class="btn btn-primary" onclick="logManage('stdout.log','cleanLog')"><?= lang('Gen_Purge');?></button>
</div>
</div>
</div>
@@ -477,7 +447,7 @@ if (isset($_POST['submit']) && submit && isset($_POST['skinselector_set'])) {
<span class="span-padding"><a href="./log/stderr.log"><i class="fa fa-download"></i> </a></span>
</div></div>
<div class="log-purge">
<button class="btn btn-primary" onclick="logManage('stderr.log','cleanLog')"><?php echo lang('Gen_Purge');?></button>
<button class="btn btn-primary" onclick="logManage('stderr.log','cleanLog')"><?= lang('Gen_Purge');?></button>
</div>
</div>
</div>
@@ -528,7 +498,7 @@ initializeTabs();
// delete devices with emty macs
function askDeleteDevicesWithEmptyMACs () {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_del_empty_macs_noti');?>', '<?php echo lang('Maintenance_Tool_del_empty_macs_noti_text');?>',
showModalWarning('<?= lang('Maintenance_Tool_del_empty_macs_noti');?>', '<?= lang('Maintenance_Tool_del_empty_macs_noti_text');?>',
'Cancel', 'Delete', 'deleteDevicesWithEmptyMACs');
}
function deleteDevicesWithEmptyMACs()
@@ -542,8 +512,8 @@ function deleteDevicesWithEmptyMACs()
// delete all devices
function askDeleteAllDevices () {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_del_alldev_noti');?>', '<?php echo lang('Maintenance_Tool_del_alldev_noti_text');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteAllDevices');
showModalWarning('<?= lang('Maintenance_Tool_del_alldev_noti');?>', '<?= lang('Maintenance_Tool_del_alldev_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteAllDevices');
}
function deleteAllDevices()
{
@@ -556,8 +526,8 @@ function deleteAllDevices()
// delete all (unknown) devices
function askDeleteUnknown () {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_del_unknowndev_noti');?>', '<?php echo lang('Maintenance_Tool_del_unknowndev_noti_text');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteUnknownDevices');
showModalWarning('<?= lang('Maintenance_Tool_del_unknowndev_noti');?>', '<?= lang('Maintenance_Tool_del_unknowndev_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteUnknownDevices');
}
function deleteUnknownDevices()
{
@@ -570,8 +540,8 @@ function deleteUnknownDevices()
// delete all Events
function askDeleteEvents () {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_del_allevents_noti');?>', '<?php echo lang('Maintenance_Tool_del_allevents_noti_text');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteEvents');
showModalWarning('<?= lang('Maintenance_Tool_del_allevents_noti');?>', '<?= lang('Maintenance_Tool_del_allevents_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteEvents');
}
function deleteEvents()
{
@@ -584,8 +554,8 @@ function deleteEvents()
// delete all Events older than 30 days
function askDeleteEvents30 () {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_del_allevents30_noti');?>', '<?php echo lang('Maintenance_Tool_del_allevents30_noti_text');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteEvents30');
showModalWarning('<?= lang('Maintenance_Tool_del_allevents30_noti');?>', '<?= lang('Maintenance_Tool_del_allevents30_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteEvents30');
}
function deleteEvents30()
{
@@ -598,8 +568,8 @@ function deleteEvents30()
// delete History
function askDeleteActHistory () {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_del_ActHistory_noti');?>', '<?php echo lang('Maintenance_Tool_del_ActHistory_noti_text');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Delete');?>', 'deleteActHistory');
showModalWarning('<?= lang('Maintenance_Tool_del_ActHistory_noti');?>', '<?= lang('Maintenance_Tool_del_ActHistory_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Delete');?>', 'deleteActHistory');
}
function deleteActHistory()
{
@@ -612,8 +582,8 @@ function deleteActHistory()
// Backup DB to Archive
function askPiaBackupDBtoArchive () {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_backup_noti');?>', '<?php echo lang('Maintenance_Tool_backup_noti_text');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Backup');?>', 'PiaBackupDBtoArchive');
showModalWarning('<?= lang('Maintenance_Tool_backup_noti');?>', '<?= lang('Maintenance_Tool_backup_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Backup');?>', 'PiaBackupDBtoArchive');
}
function PiaBackupDBtoArchive()
{
@@ -626,8 +596,8 @@ function PiaBackupDBtoArchive()
// Restore DB from Archive
function askPiaRestoreDBfromArchive () {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_restore_noti');?>', '<?php echo lang('Maintenance_Tool_restore_noti_text');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Restore');?>', 'PiaRestoreDBfromArchive');
showModalWarning('<?= lang('Maintenance_Tool_restore_noti');?>', '<?= lang('Maintenance_Tool_restore_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Restore');?>', 'PiaRestoreDBfromArchive');
}
function PiaRestoreDBfromArchive()
{
@@ -640,8 +610,8 @@ function PiaRestoreDBfromArchive()
// Purge Backups
function askPiaPurgeDBBackups() {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_purgebackup_noti');?>', '<?php echo lang('Maintenance_Tool_purgebackup_noti_text');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Purge');?>', 'PiaPurgeDBBackups');
showModalWarning('<?= lang('Maintenance_Tool_purgebackup_noti');?>', '<?= lang('Maintenance_Tool_purgebackup_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Purge');?>', 'PiaPurgeDBBackups');
}
function PiaPurgeDBBackups()
{
@@ -654,8 +624,8 @@ function PiaPurgeDBBackups()
// Export CSV
function askExportCSV() {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_ExportCSV_noti');?>', '<?php echo lang('Maintenance_Tool_ExportCSV_noti_text');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Okay');?>', 'ExportCSV');
showModalWarning('<?= lang('Maintenance_Tool_ExportCSV_noti');?>', '<?= lang('Maintenance_Tool_ExportCSV_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', 'ExportCSV');
}
function ExportCSV()
{
@@ -666,8 +636,8 @@ function ExportCSV()
// Import CSV
function askImportCSV() {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_ImportCSV_noti');?>', '<?php echo lang('Maintenance_Tool_ImportCSV_noti_text');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Okay');?>', 'ImportCSV');
showModalWarning('<?= lang('Maintenance_Tool_ImportCSV_noti');?>', '<?= lang('Maintenance_Tool_ImportCSV_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', 'ImportCSV');
}
function ImportCSV()
{
@@ -682,8 +652,8 @@ function ImportCSV()
// Switch Darkmode
function askToggleDarkmode() {
// Ask
showModalWarning('<?php echo lang('Maintenance_Tool_darkmode_noti');?>', '<?php echo lang('Maintenance_Tool_darkmode_noti_text');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Switch');?>', 'ToggleDarkmode');
showModalWarning('<?= lang('Maintenance_Tool_darkmode_noti');?>', '<?= lang('Maintenance_Tool_darkmode_noti_text');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Switch');?>', 'ToggleDarkmode');
}
// --------------------------------------------------------
@@ -727,8 +697,8 @@ function logManage(callback) {
targetLogFile = arguments[0]; // target
logFileAction = arguments[1]; // action
// Ask
showModalWarning('<?php echo lang('Gen_Purge');?>' + ' ' + arguments[1], '<?php echo lang('Gen_AreYouSure');?>',
'<?php echo lang('Gen_Cancel');?>', '<?php echo lang('Gen_Okay');?>', "performLogManage");
showModalWarning('<?= lang('Gen_Purge');?>' + ' ' + arguments[1], '<?= lang('Gen_AreYouSure');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', "performLogManage");
}
// --------------------------------------------------------

View File

@@ -1,8 +1,6 @@
<?php
require 'php/templates/header.php';
require 'php/server/db.php';
require 'php/server/util.php';
// online / offline badges HTML snippets
define('badge_online', '<div class="badge bg-green text-white" style="width: 60px;">Online</div>');
@@ -20,7 +18,7 @@
<section class="content-header">
<?php require 'php/templates/notification.php'; ?>
<h1 id="pageTitle">
<i class="fa fa-network-wired"></i> <?php echo lang('Network_Title');?>
<i class="fa fa-network-wired"></i> <?= lang('Network_Title');?>
<span class="networkPageHelp"> <a target="_blank" href="https://github.com/jokob-sk/Pi.Alert/blob/main/docs/NETWORK_TREE.md"><i class="fa fa-circle-question"></i></a><span>
</h1>
</section>

View File

@@ -8,11 +8,9 @@
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
//------------------------------------------------------------------------------
require '/home/pi/pialert/front/php/templates/timezone.php';
//------------------------------------------------------------------------------
// DB File Path
$DBFILE = '/home/pi/pialert/db/pialert.db';
$DBFILE = dirname(__FILE__).'/../../../db/pialert.db';
//------------------------------------------------------------------------------
// Connect DB
@@ -74,6 +72,3 @@ function OpenDB (...$DBPath) {
// # Open DB once and keep open
// # Opening / closing DB frequently actually casues more issues
OpenDB (); // main
?>

View File

@@ -9,10 +9,7 @@
//------------------------------------------------------------------------------
// External files
require '/home/pi/pialert/front/php/templates/timezone.php';
require '/home/pi/pialert/front/php/templates/language/lang.php';
require '/home/pi/pialert/front/php/server/db.php';
require '/home/pi/pialert/front/php/server/util.php';
require dirname(__FILE__).'/init.php';
//------------------------------------------------------------------------------
// Action selector

View File

@@ -9,8 +9,7 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// External files
require 'db.php';
require 'util.php';
require dirname(__FILE__).'/init.php';
//------------------------------------------------------------------------------

View File

@@ -0,0 +1,5 @@
<?php
require dirname(__FILE__).'/../templates/timezone.php';
require dirname(__FILE__).'/db.php';
require dirname(__FILE__).'/util.php';
require dirname(__FILE__).'/../templates/language/lang.php';

View File

@@ -33,4 +33,3 @@ if(filter_var($PIA_HOST_IP, FILTER_VALIDATE_IP)) // Vulnerability fix v22.12.20
{
echo '<h4>Internal error.</h4>';
}
?>

View File

@@ -11,8 +11,7 @@
//------------------------------------------------------------------------------
// External files
require 'db.php';
require 'util.php';
require dirname(__FILE__).'/init.php';
//------------------------------------------------------------------------------

View File

@@ -8,8 +8,8 @@
# Puche 2021 / 2022+ jokob jokob@duck.com GNU GPLv3
//------------------------------------------------------------------------------
require '/home/pi/pialert/front/php/templates/timezone.php';
require '/home/pi/pialert/front/php/templates/skinUI.php';
require dirname(__FILE__).'/../templates/timezone.php';
require dirname(__FILE__).'/../templates/skinUI.php';
$FUNCTION = [];
$SETTINGS = [];

View File

@@ -1,7 +1,5 @@
<?php
require 'php/server/db.php';
global $db;
$Pia_Graph_Device_Time = array();
@@ -27,6 +25,3 @@ function pia_graph_devices_data($Pia_Graph_Array) {
echo ",";
}
}
?>

View File

@@ -8,10 +8,8 @@
#--------------------------------------------------------------------------- -->
<?php
require '/home/pi/pialert/front/php/templates/timezone.php';
require '/home/pi/pialert/front/php/templates/language/lang.php';
require '/home/pi/pialert/front/php/templates/security.php';
require dirname(__FILE__).'/../server/init.php';
require dirname(__FILE__).'/security.php';
?>
@@ -169,8 +167,8 @@ if ($ENABLED_DARKMODE === True) {
<li class="user-header" style=" height: 100px;">
<img src="img/pialertLogoWhite.png" class="img-circle" alt="Pi.Alert Logo" style="border-color:transparent; height: 50px; width: 50px; margin-top:15px;">
<p style="float: right; width: 200px">
<?php echo lang('About_Title');?>
<small><?php echo lang('About_Design');?> Raspberry Pi</small>
<?= lang('About_Title');?>
<small><?= lang('About_Design');?> Raspberry Pi</small>
</p>
</li>
@@ -178,7 +176,7 @@ if ($ENABLED_DARKMODE === True) {
<li class="user-footer">
<div class="pull-right">
<a href="index.php?action=logout" class="btn btn-danger"><?php echo lang('About_Exit');?></a>
<a href="index.php?action=logout" class="btn btn-danger"><?= lang('About_Exit');?></a>
</div>
</li>
</ul>
@@ -209,31 +207,31 @@ if ($ENABLED_DARKMODE === True) {
<ul class="sidebar-menu" data-widget="tree">
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('devices.php', 'deviceDetails.php') ) ){ echo 'active'; } ?>">
<a href="devices.php"><span><?php echo lang('Navigation_Devices');?></span></a>
<a href="devices.php"><span><i class="fa fa-laptop"></i> <?= lang('Navigation_Devices');?></span></a>
</li>
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('presence.php') ) ){ echo 'active'; } ?>">
<a href="presence.php"><?php echo lang('Navigation_Presence');?></span></a>
<a href="presence.php"><i class="fa fa-calendar"></i> <?= lang('Navigation_Presence');?></span></a>
</li>
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('events.php') ) ){ echo 'active'; } ?>">
<a href="events.php"><i class="fa fa-bolt"></i> <span><?php echo lang('Navigation_Events');?></span></a>
<a href="events.php"><i class="fa fa-bolt"></i> <span><?= lang('Navigation_Events');?></span></a>
</li>
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('network.php') ) ){ echo 'active'; } ?>">
<a href="network.php"><span><?php echo lang('Navigation_Network');?></span></a>
<a href="network.php"><span><i class="fa fa-fw fa-network-wired"></i> <?= lang('Navigation_Network');?></span></a>
</li>
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('maintenance.php') ) ){ echo 'active'; } ?>">
<div class="new-version myhidden" id="version" data-build-time="<?php echo file_get_contents( "buildtimestamp.txt");?>">🆕</div>
<a href="maintenance.php"><i class="fa fa-wrench "></i> <span><?php echo lang('Navigation_Maintenance');?></span></a>
<a href="maintenance.php"><i class="fa fa-wrench "></i> <span><?= lang('Navigation_Maintenance');?></span></a>
</li>
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('settings.php') ) ){ echo 'active'; } ?>">
<a href="settings.php"><i class="fa fa-cog"></i> <span><?php echo lang('Navigation_Settings');?></span></a>
<a href="settings.php"><i class="fa fa-cog"></i> <span><?= lang('Navigation_Settings');?></span></a>
</li>
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('help_faq.php') ) ){ echo 'active'; } ?>">
<a href="help_faq.php"><i class="fa fa-question"></i> <span><?php echo lang('Navigation_HelpFAQ');?></span></a>
<a href="help_faq.php"><i class="fa fa-question"></i> <span><?= lang('Navigation_HelpFAQ');?></span></a>
</li>
</ul>

View File

@@ -47,12 +47,12 @@ $lang['en_us'] = array(
// Device Page
//////////////////////////////////////////////////////////////////
'Navigation_Devices' => '<i class="fa fa-laptop"></i> Devices',
'Navigation_Presence' => '<i class="fa fa-calendar"></i> Presence',
'Navigation_Devices' => 'Devices',
'Navigation_Presence' => 'Presence',
'Navigation_Events' => 'Events',
'Navigation_Maintenance' => 'Maintenance',
'Navigation_Settings' => 'Settings',
'Navigation_Network' => '<i class="fa fa-fw fa-network-wired"></i> Network',
'Navigation_Network' => 'Network',
'Navigation_HelpFAQ' => 'Help / FAQ',
'Device_Title' => 'Devices',
'Device_Shortcut_AllDevices' => 'All Devices',
@@ -513,6 +513,8 @@ the arp-scan will take hours to complete instead of seconds.
'REPORT_DASHBOARD_URL_description' => 'This URL is used as the base for generating links in the emails. Enter full URL starting with <code>http://</code> including the port number (no trailig slash <code>/</code>).',
'DIG_GET_IP_ARG_name' => 'Internet IP discovery',
'DIG_GET_IP_ARG_description' => 'Change the <a href="https://linux.die.net/man/1/dig" target="_blank">dig utility</a> arguments if you have issues resolving your Internet IP. Arguments are added at the end of the following command: <code>dig +short </code>.',
'UI_LANG_name' => 'Select Language',
'UI_LANG_description' => '',
//Email
'Email_settings_group' => '<i class="fa fa-at"></i> Email',

View File

@@ -46,7 +46,7 @@ $lang['es_es'] = array(
'Navigation_Devices' => 'Dispositivos',
'Navigation_Presence' => 'Historial',
'Navigation_Events' => 'Eventos',
'Navigation_Maintenance' => 'Cantenimiento',
'Navigation_Maintenance' => 'Mantenimiento',
'Navigation_Settings' => 'Configuración',
'Navigation_Network' => 'Red',
'Navigation_HelpFAQ' => 'Ayuda / FAQ',

View File

@@ -6,18 +6,21 @@
$defaultLang = "en_us";
if(!isset($_COOKIE["language"])) {
$pia_lang_selected = $defaultLang;
} else {
$pia_lang_selected = $_COOKIE["language"];
global $db;
$result = $db->querySingle("SELECT Value FROM Settings WHERE Code_Name = 'UI_LANG'");
switch($result){
case 'Spanish': $pia_lang_selected = 'es_es'; break;
case 'German': $pia_lang_selected = 'de_de'; break;
default: $pia_lang_selected = 'en_us'; break;
}
if (isset($pia_lang_selected) == FALSE or (strlen($pia_lang_selected) == 0)) {$pia_lang_selected = defaultLang;}
if (isset($pia_lang_selected) == FALSE or (strlen($pia_lang_selected) == 0)) {$pia_lang_selected = $defaultLang;}
require '/home/pi/pialert/front/php/templates/skinUI.php';
require 'en_us.php';
require 'de_de.php';
require 'es_es.php';
require dirname(__FILE__).'/../skinUI.php';
require dirname(__FILE__).'/en_us.php';
require dirname(__FILE__).'/de_de.php';
require dirname(__FILE__).'/es_es.php';
function lang($key)
{
@@ -45,4 +48,3 @@ function lang($key)
return $temp;
}
?>

View File

@@ -4,9 +4,9 @@
// ## TimeZone processing start
// ###################################
$configFolderPath = "/home/pi/pialert/config/";
$configFolderPath = dirname(__FILE__)."/../../../config/";
$config_file = "pialert.conf";
$logFolderPath = "/home/pi/pialert/front/log/";
$logFolderPath = dirname(__FILE__)."/../../log/";
$log_file = "pialert_front.log";
@@ -40,5 +40,3 @@ $timestamp = $date->format('Y-m-d_H-i-s');
// ###################################
// ## TimeZone processing end
// ###################################
?>

View File

@@ -18,7 +18,7 @@
<!-- Content header--------------------------------------------------------- -->
<section class="content-header">
<h1 id="pageTitle">
<?php echo lang('Presence_Title');?>
<?= lang('Presence_Title');?>
</h1>
</section>
@@ -32,7 +32,7 @@
<a href="#" onclick="javascript: getDevicesPresence('all');">
<div class="small-box bg-aqua">
<div class="inner"><h3 id="devicesAll"> -- </h3>
<p class="infobox_label"><?php echo lang('Presence_Shortcut_AllDevices');?></p>
<p class="infobox_label"><?= lang('Presence_Shortcut_AllDevices');?></p>
</div>
<div class="icon"><i class="fa fa-laptop text-aqua-40"></i></div>
</div>
@@ -44,7 +44,7 @@
<a href="#" onclick="javascript: getDevicesPresence('connected');">
<div class="small-box bg-green">
<div class="inner"> <h3 id="devicesConnected"> -- </h3>
<p class="infobox_label"><?php echo lang('Presence_Shortcut_Connected');?></p>
<p class="infobox_label"><?= lang('Presence_Shortcut_Connected');?></p>
</div>
<div class="icon"> <i class="fa fa-plug text-green-40"></i> </div>
</div>
@@ -56,7 +56,7 @@
<a href="#" onclick="javascript: getDevicesPresence('favorites');">
<div class="small-box bg-yellow">
<div class="inner"> <h3 id="devicesFavorites"> -- </h3>
<p class="infobox_label"><?php echo lang('Presence_Shortcut_Favorites');?></p>
<p class="infobox_label"><?= lang('Presence_Shortcut_Favorites');?></p>
</div>
<div class="icon"> <i class="fa fa-star text-yellow-40"></i> </div>
</div>
@@ -68,7 +68,7 @@
<a href="#" onclick="javascript: getDevicesPresence('new');">
<div class="small-box bg-yellow">
<div class="inner"> <h3 id="devicesNew"> -- </h3>
<p class="infobox_label"><?php echo lang('Presence_Shortcut_NewDevices');?></p>
<p class="infobox_label"><?= lang('Presence_Shortcut_NewDevices');?></p>
</div>
<div class="icon"> <i class="ion ion-plus-round text-yellow-40"></i> </div>
</div>
@@ -80,7 +80,7 @@
<a href="#" onclick="javascript: getDevicesPresence('down');">
<div class="small-box bg-red">
<div class="inner"> <h3 id="devicesDown"> -- </h3>
<p class="infobox_label"><?php echo lang('Presence_Shortcut_DownAlerts');?></p>
<p class="infobox_label"><?= lang('Presence_Shortcut_DownAlerts');?></p>
</div>
<div class="icon"> <i class="fa fa-warning text-red-40"></i> </div>
</div>
@@ -92,7 +92,7 @@
<a href="#" onclick="javascript: getDevicesPresence('archived');">
<div class="small-box bg-gray top_small_box_gray_text">
<div class="inner"> <h3 id="devicesHidden"> -- </h3>
<p class="infobox_label"><?php echo lang('Presence_Shortcut_Archived');?></p>
<p class="infobox_label"><?= lang('Presence_Shortcut_Archived');?></p>
</div>
<div class="icon"> <i class="fa fa-eye-slash text-gray-40"></i> </div>
</div>
@@ -106,7 +106,7 @@
<div class="col-md-12">
<div class="box" id="clients">
<div class="box-header with-border">
<h3 class="box-title"><?php echo lang('Device_Shortcut_OnlineChart');?></h3>
<h3 class="box-title"><?= lang('Device_Shortcut_OnlineChart');?></h3>
</div>
<div class="box-body">
<div class="chart">
@@ -242,12 +242,12 @@ function initializeCalendar () {
allDaySlot : false,
timeFormat : 'H:mm',
resourceLabelText : '<?php echo lang('Presence_CallHead_Devices');?>',
resourceLabelText : '<?= lang('Presence_CallHead_Devices');?>',
resourceAreaWidth : '160px',
slotWidth : '1px',
resourceOrder : '-favorite,title',
locale : '<?php echo lang('Presence_CalHead_lang');?>',
locale : '<?= lang('Presence_CalHead_lang');?>',
//schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
@@ -256,7 +256,7 @@ function initializeCalendar () {
timelineYear: {
type : 'timeline',
duration : { year: 1 },
buttonText : '<?php echo lang('Presence_CalHead_year');?>',
buttonText : '<?= lang('Presence_CalHead_year');?>',
slotLabelFormat : 'MMM',
// Hack to show partial day events not as fullday events
slotDuration : {minutes: 44641}
@@ -265,7 +265,7 @@ function initializeCalendar () {
timelineQuarter: {
type : 'timeline',
duration : { month: 3 },
buttonText : '<?php echo lang('Presence_CalHead_quarter');?>',
buttonText : '<?= lang('Presence_CalHead_quarter');?>',
slotLabelFormat : 'MMM',
// Hack to show partial day events not as fullday events
slotDuration : {minutes: 44641}
@@ -274,7 +274,7 @@ function initializeCalendar () {
timelineMonth: {
type : 'timeline',
duration : { month: 1 },
buttonText : '<?php echo lang('Presence_CalHead_month');?>',
buttonText : '<?= lang('Presence_CalHead_month');?>',
slotLabelFormat : 'D',
// Hack to show partial day events not as fullday events
slotDuration : '24:00:01'
@@ -283,7 +283,7 @@ function initializeCalendar () {
timelineWeek: {
type : 'timeline',
duration : { week: 1 },
buttonText : '<?php echo lang('Presence_CalHead_week');?>',
buttonText : '<?= lang('Presence_CalHead_week');?>',
slotLabelFormat : 'D',
slotDuration : '24:00:01'
}
@@ -361,13 +361,13 @@ function getDevicesPresence (status) {
// Defini color & title for the status selected
switch (deviceStatus) {
case 'all': tableTitle = '<?php echo lang('Presence_Shortcut_AllDevices');?>'; color = 'aqua'; break;
case 'connected': tableTitle = '<?php echo lang('Presence_Shortcut_Connected');?>'; color = 'green'; break;
case 'favorites': tableTitle = '<?php echo lang('Presence_Shortcut_Favorites');?>'; color = 'yellow'; break;
case 'new': tableTitle = '<?php echo lang('Presence_Shortcut_NewDevices');?>'; color = 'yellow'; break;
case 'down': tableTitle = '<?php echo lang('Presence_Shortcut_DownAlerts');?>'; color = 'red'; break;
case 'archived': tableTitle = '<?php echo lang('Presence_Shortcut_Archived');?>'; color = 'gray'; break;
default: tableTitle = '<?php echo lang('Presence_Shortcut_Devices');?>'; color = 'gray'; break;
case 'all': tableTitle = '<?= lang('Presence_Shortcut_AllDevices');?>'; color = 'aqua'; break;
case 'connected': tableTitle = '<?= lang('Presence_Shortcut_Connected');?>'; color = 'green'; break;
case 'favorites': tableTitle = '<?= lang('Presence_Shortcut_Favorites');?>'; color = 'yellow'; break;
case 'new': tableTitle = '<?= lang('Presence_Shortcut_NewDevices');?>'; color = 'yellow'; break;
case 'down': tableTitle = '<?= lang('Presence_Shortcut_DownAlerts');?>'; color = 'red'; break;
case 'archived': tableTitle = '<?= lang('Presence_Shortcut_Archived');?>'; color = 'gray'; break;
default: tableTitle = '<?= lang('Presence_Shortcut_Devices');?>'; color = 'gray'; break;
}
// Set title and color

View File

@@ -2,12 +2,6 @@
require 'php/templates/header.php';
//------------------------------------------------------------------------------
// External files
require 'php/server/db.php';
require 'php/server/util.php';
//------------------------------------------------------------------------------
// Action selector
//------------------------------------------------------------------------------
@@ -49,14 +43,14 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
<section class="content-header">
<?php require 'php/templates/notification.php'; ?>
<h1 id="pageTitle">
<?php echo lang('Navigation_Settings');?>
<?= lang('Navigation_Settings');?>
<a style="cursor:pointer">
<span>
<i id='toggleSettings' onclick="toggleAllSettings()" class="settings-expand-icon fa fa-angle-double-down"></i>
</span>
</a>
</h1>
<div class="settingsImported"><?php echo lang("settings_imported");?> <span id="lastImportedTime"></span></div>
<div class="settingsImported"><?= lang("settings_imported");?> <span id="lastImportedTime"></span></div>
</section>
<div class="content " id='accordion_gen'>
<?php
@@ -268,7 +262,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
<!-- /.content -->
<div class="row" >
<div class="row">
<button type="button" class="center top-margin btn btn-primary btn-default pa-btn bg-green dbtools-button" id="save" onclick="saveSettings()"><?php echo lang('DevDetail_button_Save');?></button>
<button type="button" class="center top-margin btn btn-primary btn-default pa-btn bg-green dbtools-button" id="save" onclick="saveSettings()"><?= lang('DevDetail_button_Save');?></button>
</div>
<div id="result"></div>
</div>
@@ -285,12 +279,12 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
<script>
// number of settings has to be equal to
var settingsNumber = 66;
var settingsNumber = 67;
// Wrong number of settings processing
if(<?php echo count($settings)?> != settingsNumber)
{
showModalOk('WARNING', "<?php echo lang("settings_missing")?>");
showModalOk('WARNING', "<?= lang("settings_missing")?>");
}
@@ -367,7 +361,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
function saveSettings() {
if(<?php echo count($settings)?> != settingsNumber)
{
showModalOk('WARNING', "<?php echo lang("settings_missing_block")?>");
showModalOk('WARNING', "<?= lang("settings_missing_block")?>");
} else
{
$.ajax({
@@ -408,7 +402,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
// check if displayed settings are outdated
if(fileModificationTime > importedMiliseconds)
{
showModalOk('WARNING: Outdated settings displayed', "<?php echo lang("settings_old")?>");
showModalOk('WARNING: Outdated settings displayed', "<?= lang("settings_old")?>");
}
} else{
result = result.replaceAll('"', '');
@@ -470,7 +464,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
setParameter ('Front_Event', value)
// show message
showModalOk("<?php echo lang("general_event_title")?>", "<?php echo lang("general_event_description")?> <code id='"+modalEventStatusId+"'></code>");
showModalOk("<?= lang("general_event_title")?>", "<?= lang("general_event_description")?> <code id='"+modalEventStatusId+"'></code>");
// Periodically update state of the requested action
getParam(modalEventStatusId,"Front_Event", true, updateModalState)