This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via f0e9ed78a2ae1b828493c523e5137735c780d833 (commit) via c1fc92a9b8e2a049875c02a736087beacb8c6348 (commit) via cc222a8e62ebaebf140f6287f8e55edd887b36aa (commit) via a25c95b3a0bf5a3db03fbed0e53f2f2d82d3e148 (commit) from d536c178ec90fd95b7e793923a856b8dab8bcb52 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit f0e9ed78a2ae1b828493c523e5137735c780d833 Author: Stephan Feddersen sfeddersen@ipfire.org Date: Tue Mar 6 20:53:20 2018 +0100
WIO: increment PAK_VER
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit c1fc92a9b8e2a049875c02a736087beacb8c6348 Author: Stephan Feddersen via Development development@lists.ipfire.org Date: Tue Feb 27 17:20:07 2018 +0100
WIO: Fix a problem with the Network-Table-Button
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit cc222a8e62ebaebf140f6287f8e55edd887b36aa Author: Stephan Feddersen via Development development@lists.ipfire.org Date: Tue Feb 27 17:18:39 2018 +0100
WIO: Fix some typos
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit a25c95b3a0bf5a3db03fbed0e53f2f2d82d3e148 Author: Stephan Feddersen via Development development@lists.ipfire.org Date: Tue Feb 20 21:41:13 2018 +0100
WIO: Update to Version 1.3.2 several changes in many files
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
-----------------------------------------------------------------------
Summary of changes: lfs/wio | 4 +- src/misc-progs/wiohelper.c | 2 +- src/wio/lang/wio.de.pl | 49 ++++++----- src/wio/lang/wio.en.pl | 125 +++++++++++++------------- src/wio/main/wio.pl | 4 +- src/wio/main/wiovpn.pl | 59 ++++++------- src/wio/wio-graphs.pl | 4 +- src/wio/wio-lib.pl | 4 +- src/wio/wio.cgi | 212 +++++++++++++++++++++++++++++---------------- src/wio/wiographs.cgi | 4 +- 10 files changed, 261 insertions(+), 206 deletions(-)
Difference in files: diff --git a/lfs/wio b/lfs/wio index d70b12b46..bb76c9e56 100644 --- a/lfs/wio +++ b/lfs/wio @@ -9,13 +9,13 @@
include Config
-VER = 1.3.1 +VER = 1.3.2
THISAPP = wio-$(VER) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = wio -PAK_VER = 3 +PAK_VER = 2
############################################################################### # Top-level Rules diff --git a/src/misc-progs/wiohelper.c b/src/misc-progs/wiohelper.c index 0f7fd8657..a1e0168b3 100644 --- a/src/misc-progs/wiohelper.c +++ b/src/misc-progs/wiohelper.c @@ -8,7 +8,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IPFire.org - A linux based firewall - * Copyright (C) 2017 Stephan Feddersen addons@h-loit.de + * Copyright (C) 2017-2018 Stephan Feddersen sfeddersen@ipfire.org * * All Rights Reserved. * diff --git a/src/wio/lang/wio.de.pl b/src/wio/lang/wio.de.pl index fd82ff00d..2544cef82 100644 --- a/src/wio/lang/wio.de.pl +++ b/src/wio/lang/wio.de.pl @@ -1,7 +1,7 @@ %tr = (%tr, 'wio' => 'Who Is Online?', 'wio stat' => 'Status:', -'wio checked' => 'zuletzt überprüft', +'wio checked' => 'Zuletzt überprüft', 'wio name' => 'Hostname / FQDN', 'wio ipadress' => 'IP-Adresse', 'wio image' => 'Zustand', @@ -12,21 +12,21 @@ 'wio_import_csv' => 'CSV Datei', 'wio_import_hosts' => 'Hosts Datei (var/ipfire/main/hosts)', 'wio_import_data' => 'Einstellungen für ', -'wio_import_data1' => ' bearbeiten:', -'wio_import_data2' => ' importieren:', +'wio_import_data1' => ' Bearbeiten:', +'wio_import_data2' => ' Importieren:', 'wio_import' => 'Importieren', 'wio_import_info' => 'Mitteilung:', 'wio_import_file' => 'Client(s) importieren aus:', 'wio_import_info_csv' => 'Es gibt keine neuen Einstellungen zu importieren!', 'wio settings' => 'Konfiguration:', -'wio enabled' => 'aktivieren?', +'wio enabled' => 'Aktivieren?', 'wio min' => 'Minute(n)', 'wio cron' => 'Zeitintervall für die Überprüfung:', 'wio_ovpn_cron' => 'Zeitintervall für die Überprüfung des OpenVPN RW und IPSec Status:', -'wio_save' => 'speichern', +'wio_save' => 'Speichern', 'wio_error' => 'Fehlermeldung:', 'wio_info' => 'Meldung:', -'wio_back' => 'zurück', +'wio_back' => 'Zurück', 'wio_use' => 'Diese Einstellungen importieren?', 'wio_ip_error' => 'Ungültige IP-Adresse!', 'wio_host_error' => 'Ungültiger Hostname!', @@ -34,7 +34,7 @@ 'wio_host_empty' => 'Es wurde kein Hostname eingetragen!', 'wio_ip_exists' => 'IP-Adresse wird schon benutzt!', 'wio_ip_empty' => 'Es wurde keine IP-Adresse eingetragen!', -'wio_import_fixleases' => 'DHCP Datei (var/ipfire/dhcp/fixleases)', +'wio_import_fixleases' => 'DHCP-Datei (var/ipfire/dhcp/fixleases)', 'wio_import_leases' => 'Einstellungen importieren:', 'wio network' => 'Netzwerk', 'wio_refresh' => 'alle Clients aktualisieren', @@ -55,12 +55,11 @@ 'wio_msg' => 'Zustand (aktiv/inaktiv) des Clients / der Clients wird aktualisiert ...', 'wio_lanname' => 'LAN Hostname', 'wio_wanname' => 'WAN Hostname', -'wio_wancheck' => 'verbunden seit', 'wio_sc_refresh' => 'Client aktualisieren', 'wio_edit_settings' => 'Client hinzufügen:', 'wio_edit_client' => 'Client bearbeiten:', 'wio_graphs' => 'Graphen anzeigen', -'wio_no_graphs' => 'keine Graphen vorhanden', +'wio_no_graphs' => 'Keine Graphen vorhanden', 'wio_graphs_stat' => 'Diagramme für', 'wio_vpn_con' => 'VPN - Verbindung(en):', 'wio_wan_con' => 'WAN - Verbindung:', @@ -74,13 +73,13 @@ 'wio_net_scan_green' => 'grünes', 'wio_net_scan_blue' => 'blaues', 'wio_net_scan_orange' => 'oranges', -'wio_net_scan_run' => 'starten', -'wio_sort_host' => 'nach Hostnamen (FQDN) sortieren', -'wio_sort_ip' => 'nach IP Adressen sortieren', +'wio_net_scan_run' => 'Starten', +'wio_sort_host' => 'Nach Hostnamen (FQDN) sortieren', +'wio_sort_ip' => 'Nach IP Adressen sortieren', 'wio_logging' => 'Logging (/var/log/messages) aktivieren?', 'wio_no_image' => 'KEIN STATUS', 'wio_ovpn_con' => 'OpenVPN - Verbindung(en):', -'wio_ovpn_connected' => 'verbunden seit', +'wio_connected' => 'Verbunden seit', 'wio_wan_up' => 'VERBUNDEN', 'wio_wan_down' => 'GETRENNT', 'wio_n2n' => 'Netz-zu-Netz Verbindung', @@ -96,17 +95,17 @@ 'wio_hwaddress' => 'HW-Adresse', 'wio_iface' => 'Schnittstelle', 'wio_client_enable' => 'Client aktivieren?', -'wio_ping_send' => 'überprüfen per', +'wio_ping_send' => 'Überprüfen per', 'wio_link_open' => 'Link öffnen per', 'enable disable client' => 'Client aktivieren oder deaktivieren', 'wio_client_on' => 'Überwachung aktiviert (klicken, um zu deaktivieren)', 'wio_client_off' => 'Überwachung deaktiviert (klicken, um zu aktivieren)', 'wio_webinterface' => 'LINK', 'wio_webinterface_link' => 'Link öffnen', -'wio_ip' => 'überprüfen per IP aktiviert', -'wio_fqdn' => 'überprüfen per FQDN aktiviert', -'wio_ip_on' => 'überprüfen per IP aktiviert (klicken, um per FQDN zu aktivieren)', -'wio_fqdn_on' => 'überprüfen per FQDN aktiviert (klicken, um per IP zu aktivieren)', +'wio_ip' => 'Überprüfen per IP aktiviert', +'wio_fqdn' => 'Überprüfen per FQDN aktiviert', +'wio_ip_on' => 'Überprüfen per IP aktiviert (klicken, um per FQDN zu aktivieren)', +'wio_fqdn_on' => 'Überprüfen per FQDN aktiviert (klicken, um per IP zu aktivieren)', 'wio_client_add' => 'Eingaben anwenden', 'wio_config' => 'Client(s) konfigurieren:', 'wio_settings_msg' => 'Einstellungen bearbeiten:', @@ -117,8 +116,8 @@ 'wio_add' => 'Client hinzufügen:', 'wio_no_add' => 'Client ist vorhanden', 'wio_id' => '#', -'wio_online' => 'online', -'wio_offline' => 'offline', +'wio_online' => 'Online', +'wio_offline' => 'Offline', 'wio_status' => 'WIO Client-Status', 'wio_mail_style' => 'WIO Client Statusmails versenden als', 'wio_mail_smail' => 'Sammelmail', @@ -127,13 +126,13 @@ 'wio_edit_set' => 'Konfiguration', 'wio_service' => 'Service:', 'wio_dyndns_success' => 'DynDNS IP ermittelt und eingetragen!', -'wio_remove_all' => 'alle Clients löschen', +'wio_remove_all' => 'Alle Clients löschen', 'wio_remove_all_hint' => 'Möchten Sie wirklich alle Clients löschen?', 'wio_remove_client' => 'Client löschen', 'wio_remove_client_hint' => 'Möchten Sie den Client wirklich löschen?', 'wio_arp_table_entries' => 'Client aus der ARP-Tabelle hinzufügen:', -'wio_activ' => 'aktiv', -'wio_check' => 'prüfen', +'wio_activ' => 'Aktiv', +'wio_check' => 'Prüfen', 'wio_common_name' => 'Remote Host / IP', 'wio_msg_left' => 'Das', 'wio_msg_green' => 'grüne', @@ -142,7 +141,7 @@ 'wio_msg_center' => 'Netzwerk an', 'wio_msg_right' => 'wird durchsucht.', 'wio_msg_hint' => 'Einen Moment bitte ...', -'wio_last_update' => 'zuletzt aktualisiert', +'wio_last_update' => 'Zuletzt aktualisiert', 'wio_disable_hint' => 'Achtung! Es werden alle Einstellungen incl. der zu überprüfenden Clients zurückgesetzt!', 'wio_clientremark' => 'Anmerkung anzeigen?', 'wio_already_running' => 'Die Prüfung wird bereits durchgeführt!', @@ -154,4 +153,6 @@ 'wio_answer' => 'Antwort', 'wio_answer_time' => 'Antwortzeit', 'wio_scriptruntime' => 'Scriptlaufzeit', +'wio_show_table_off' => 'Tabelle ausblenden', +'wio_show_table_on' => 'Tabelle einblenden', ); diff --git a/src/wio/lang/wio.en.pl b/src/wio/lang/wio.en.pl index 52793b908..be0046fe7 100644 --- a/src/wio/lang/wio.en.pl +++ b/src/wio/lang/wio.en.pl @@ -10,23 +10,23 @@ 'wio err' => 'Error', 'wio warn' => 'Warning', 'wio_import_csv' => 'CSV file:', -'wio_import_hosts' => 'hosts configuration (var/ipfire/main/hosts) ?', -'wio_import_data' => 'import settings for ', +'wio_import_hosts' => 'Hosts configuration (var/ipfire/main/hosts)?', +'wio_import_data' => 'Import settings for ', 'wio_import_data1' => ' correct:', 'wio_import_data2' => ' import:', 'wio_import' => 'Importing', 'wio_import_info' => 'message:', -'wio_import_file' => 'Import settings from:', +'wio_import_file' => 'Import client(s) from:', 'wio_import_info_csv' => 'There are no new settings to import!', -'wio settings' => 'configuration:', -'wio enabled' => 'enable ?', +'wio settings' => 'Configuration:', +'wio enabled' => 'Enable?', 'wio min' => 'Minute(s)', 'wio cron' => 'Time interval for checking:', 'wio_ovpn_cron' => 'Time interval for checking the OpenVPN RW and IPSec Status:', -'wio_save' => 'save', +'wio_save' => 'Save', 'wio_error' => 'errormessage:', 'wio_info' => 'message:', -'wio_back' => 'back', +'wio_back' => 'Back', 'wio_use' => 'Import these settings ?', 'wio_ip_error' => 'Invalid IP Address.', 'wio_host_error' => 'Invalid Hostname.', @@ -34,106 +34,105 @@ 'wio_host_empty' => 'No Hostname was registered!', 'wio_ip_exists' => 'IP Address is already used.', 'wio_ip_empty' => 'No IP Address was registered!', -'wio_import_fixleases' => 'DHCP configuration (var/ipfire/dhcp/fixleases) ?', +'wio_import_fixleases' => 'DHCP configuration (var/ipfire/dhcp/fixleases)?', 'wio_import_leases' => 'Import settings:', 'wio network' => 'Network', -'wio_refresh' => 'update all clients now', +'wio_refresh' => 'Update all clients now', 'wio_fqdn_error' => 'Invalid Fully Qualified Domain Name (FQDN)! Please do not use special characters or blanks in the FQDN.', -'wio_edit' => 'change settings:', +'wio_edit' => 'Change settings:', 'wio_dyndns' => 'DynDNS', 'wio_dyndns_hosts' => 'DynDNS Name(s)', 'wio_dyndns_refresh' => 'DynDNS Host IP update', 'wio_dyndns_on' => 'DynDNS Host enabled (click to disable)', 'wio_dyndns_off' => 'DynDNS Host disabled (click to enable)', -'wio_dyndns_info' => 'None IP registered, since apparently no connection exists in Internet. With the next connection in Internet is accomplished an actualization of the IP of the DynDNS Hostes.', +'wio_dyndns_info' => 'No IP registered, since apparently no connection exists in Internet. With the next connection in Internet is accomplished an actualization of the IP of the DynDNS Hostes.', 'wio_no_csv' => 'File has not the extension .csv', 'wio_no_csv_error' => 'Please do not use special characters or blanks in the filename.', 'wio_no_file_selected' => 'No File selected!', 'wio_import_infos' => 'Import settings:', -'wio_import_infos_csv' => 'NOTE: Only Data records with marked "Import these settings ?" are considered by importing! If data records with double IP-Addresses or Hostnames should occur, only the first data record will be imported and the other data records (with the double IP-Addresses or Hostnames) will not be considered!', +'wio_import_infos_csv' => 'NOTE: Only Data records with marked "Import these settings?" are considered by importing! If data records with double IP-Addresses or Hostnames should occur, only the first data record will be imported and the other data records (with the double IP-Addresses or Hostnames) will not be considered!', 'enable disable dyndns' => 'enable or disable DynDNS Host', -'wio_msg' => 'Condition of the examining Client(s) are updated ...', +'wio_msg' => 'Condition of the examining client(s) are updated ...', 'wio_lanname' => 'LAN Hostname', 'wio_wanname' => 'WAN Hostname', -'wio_wancheck' => 'connected since', -'wio_sc_refresh' => 'update client now', -'wio_edit_settings' => 'add client:', -'wio_edit_client' => 'edit client:', -'wio_graphs' => 'show graphs', -'wio_no_graphs' => 'no graphs available', -'wio_graphs_stat' => 'Diagramm for', +'wio_sc_refresh' => 'Update client now', +'wio_edit_settings' => 'Add client:', +'wio_edit_client' => 'Edit client:', +'wio_graphs' => 'Show graphs', +'wio_no_graphs' => 'No graphs available', +'wio_graphs_stat' => 'Diagram for', 'wio_vpn_con' => 'VPN - Connection(s):', 'wio_wan_con' => 'WAN - Connection:', 'wio_clients' => 'clients:', 'wio click to disable' => 'Activated', 'wio click to enable' => 'Deactivated', -'wio_net_scan' => 'Scan Network(s):', -'wio_net_scan_vl' => 'scan', -'wio_net_scan_l' => 'Network on', +'wio_net_scan' => 'Scan network(s):', +'wio_net_scan_vl' => 'Scan', +'wio_net_scan_l' => 'network on', 'wio_net_scan_r' => '', 'wio_net_scan_green' => 'green', 'wio_net_scan_blue' => 'blue', 'wio_net_scan_orange' => 'orange', -'wio_net_scan_run' => 'start', -'wio_sort_host' => 'sort Hostnames (FQDN)', -'wio_sort_ip' => 'sort IP-Adresses', -'wio_logging' => 'activate Logging (/var/log/messages) ?', +'wio_net_scan_run' => 'Start', +'wio_sort_host' => 'Sort Hostnames (FQDN)', +'wio_sort_ip' => 'Sort IP-Adresses', +'wio_logging' => 'Activate logging (/var/log/messages)?', 'wio_no_image' => 'NO STATUS', 'wio_ovpn_con' => 'OpenVPN - Connection(s):', -'wio_ovpn_connected' => 'connected since', +'wio_connected' => 'Connected since', 'wio_wan_up' => 'CONNECTED', 'wio_wan_down' => 'NOT CONNECTED', 'wio_n2n' => 'Net-to-Net Connection', 'wio_rw' => 'Host-to-Net Connection', -'wio_mailremark_enabled' => 'Add Remark from client to mailbody ?', -'wio_mail_online_on' => 'online email enabled (click to disable)', -'wio_mail_online_off' => 'online email disabled (click to enable)', -'wio_mail_offline_on' => 'offline email enabled (click to disable)', -'wio_mail_offline_off' => 'offline emaildisabled (click to enable)', -'wio_mail_online' => 'enable or disable online email', -'wio_mail_offline' => 'enable or disable offline email', -'wio_sendemail' => 'send email', +'wio_mailremark_enabled' => 'Add Remark from client to mailbody?', +'wio_mail_online_on' => 'Online email enabled (click to disable)', +'wio_mail_online_off' => 'Online email disabled (click to enable)', +'wio_mail_offline_on' => 'Offline email enabled (click to disable)', +'wio_mail_offline_off' => 'Offline email disabled (click to enable)', +'wio_mail_online' => 'Enable or disable online email', +'wio_mail_offline' => 'Enable or disable offline email', +'wio_sendemail' => 'Send email', 'wio_hwaddress' => 'HW-Adresse', 'wio_iface' => 'Interface', -'wio_client_enable' => 'enable Host ?', -'wio_ping_send' => 'send ping to', -'wio_link_open' => 'open link via', -'enable disable client' => 'enable or disable client', +'wio_client_enable' => 'Enable Host?', +'wio_ping_send' => 'Send ping to', +'wio_link_open' => 'Open link via', +'enable disable client' => 'Enable or disable client', 'wio_client_on' => 'Client enabled (click to disable)', 'wio_client_off' => 'Client disabled (click to enable)', 'wio_webinterface' => 'LINK', -'wio_webinterface_link' => 'follow link', -'wio_ip' => 'send ping to IP enabled', -'wio_fqdn' => 'send ping to FQDN enabled', -'wio_ip_on' => 'send ping to IP enabled (click to enable FQDN)', -'wio_fqdn_on' => 'send ping to FQDN enabled (click to enable IP)', -'wio_client_add' => 'use settings', -'wio_config' => 'configurate Client(s):', -'wio_settings_msg' => 'configurate settings:', +'wio_webinterface_link' => 'Follow link', +'wio_ip' => 'Send ping to IP enabled', +'wio_fqdn' => 'Send ping to FQDN enabled', +'wio_ip_on' => 'Send ping to IP enabled (click to enable FQDN)', +'wio_fqdn_on' => 'Send ping to FQDN enabled (click to enable IP)', +'wio_client_add' => 'Use settings', +'wio_config' => 'Configure Client(s):', +'wio_settings_msg' => 'Configure settings:', 'wio_settings_msg_hint' => 'Here you have to set some values to get the addon started.', 'wio_sub' => 'WIO Client-Status-Mail', 'wio timeout' => 'Ping Timeout:', 'wio sec' => 'Second(s)', -'wio_add' => 'add Client:', +'wio_add' => 'Add Client:', 'wio_no_add' => 'Client is available', 'wio_id' => '#', -'wio_online' => 'online', -'wio_offline' => 'offline', +'wio_online' => 'Online', +'wio_offline' => 'Offline', 'wio_status' => 'WIO Client-Status', -'wio_mail_style' => 'send WIO Client Statusmails as', -'wio_mail_smail' => 'collected mail', -'wio_mail_email' => 'single mails', -'wio_mail_ovpnrw' => 'enable OpenVPN RW and IPSec Statusmails ?', +'wio_mail_style' => 'Send WIO client statusmails as', +'wio_mail_smail' => 'Collected mail', +'wio_mail_email' => 'Single mails', +'wio_mail_ovpnrw' => 'Enable OpenVPN RW and IPSec Statusmails?', 'wio_edit_set' => 'Configuration', 'wio_service' => 'Service:', 'wio_dyndns_success' => 'DynDNS IP identified and registered!', -'wio_remove_all' => 'remove all clients', +'wio_remove_all' => 'Remove all clients', 'wio_remove_all_hint' => 'Are you sure to delete all the clients?', -'wio_remove_client' => 'remove client', +'wio_remove_client' => 'Remove client', 'wio_remove_client_hint' => 'Are you sure to delete the client?', -'wio_arp_table_entries' => 'add client from ARP-Table:', -'wio_activ' => 'activ', -'wio_check' => 'check', +'wio_arp_table_entries' => 'Add client from ARP-Table:', +'wio_activ' => 'Active', +'wio_check' => 'Check', 'wio_common_name' => 'Remote Host/IP', 'wio_msg_left' => 'Searching on the', 'wio_msg_green' => 'green', @@ -142,9 +141,9 @@ 'wio_msg_center' => 'Interface on', 'wio_msg_right' => 'is being examined.', 'wio_msg_hint' => 'One moment please ...', -'wio_last_update' => 'last update', +'wio_last_update' => 'Last update', 'wio_disable_hint' => 'Attention! It will reset all settings including the client to be checked!', -'wio_clientremark' => 'show remark?', +'wio_clientremark' => 'Show remark?', 'wio_already_running' => 'This check is already running!', 'wio_error_function' => 'This function is temporarily unavailable, because in the background client states are being updated (active/inactive).', 'wio_shutdown' => 'Shutdown when all clients are "offline"?', @@ -154,4 +153,6 @@ 'wio_answer' => 'Answer', 'wio_answer_time' => 'Response Time', 'wio_scriptruntime' => 'Script Execution Time', +'wio_show_table_off' => 'Hide table', +'wio_show_table_on' => 'Show table', ); diff --git a/src/wio/main/wio.pl b/src/wio/main/wio.pl index 985900d47..b846feafa 100644 --- a/src/wio/main/wio.pl +++ b/src/wio/main/wio.pl @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen addons@h-loit.de # +# Copyright (C) 2017-2018 Stephan Feddersen sfeddersen@ipfire.org # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wio.pl, v1.3.1 2017/07/11 21:31:16 sfeddersen +# Version: 2017/08/04 18:55:23 # # This wio.pl is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. diff --git a/src/wio/main/wiovpn.pl b/src/wio/main/wiovpn.pl index f22bd7abb..c4c6b5739 100644 --- a/src/wio/main/wiovpn.pl +++ b/src/wio/main/wiovpn.pl @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen addons@h-loit.de # +# Copyright (C) 2017-2018 Stephan Feddersen sfeddersen@ipfire.org # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wioovpn.pl, v1.3.1 2017/07/11 21:31:16 sfeddersen +# Version: 2018/01/05 12:32:23 # # This wioovpn.pl is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. @@ -93,8 +93,7 @@ else { close (FILE); }
-foreach (@ovpncfg) -{ +foreach (@ovpncfg) { chomp;
if ( $_ =~ "server" ) { next; } @@ -106,8 +105,7 @@ foreach (@ovpncfg) unless ( grep (/$name/, @ovpncache) ) { push (@ovpncache, "$name,$remark,$status\n"); } }
-foreach (@ovpncache) -{ +foreach (@ovpncache) { chomp;
( $name, $remark, $status ) = split (/,/, $_); @@ -115,18 +113,16 @@ foreach (@ovpncache) if ( grep (/,$name,/, @ovpncfg) ) { push (@ovpnarray, "$name,$remark,$status\n"); } }
-foreach (@ovpnarray) -{ +foreach (@ovpnarray) { chomp; + ( $name, $remark, $status ) = split (/,/, $_);
if ( $name =~ m/_/ ) { $nameul = $name; } else { ($nameul = $name) =~ s/ /_/g; }
- if ( grep (/$name/, @ovpnstatus) || grep (/$nameul/, @ovpnstatus) ) - { - foreach (@ovpnstatus) - { + if ( grep (/$name/, @ovpnstatus) || grep (/$nameul/, @ovpnstatus) ) { + foreach (@ovpnstatus) { chomp;
if ( $_ =~ "ROUTING TABLE" ) { last; } @@ -151,8 +147,7 @@ foreach (@ovpnarray)
if ( $nameul eq $ovpnclt || $name eq $ovpnclt ) { push (@ovpnwrite, "$name,$remark,$status\n"); }
- if ( $togglestat == 1 && ($name eq $ovpnclt || $nameul eq $ovpnclt) ) - { + if ( $togglestat == 1 && ($name eq $ovpnclt || $nameul eq $ovpnclt) ) { $ovpnmailsub = "WIO OVPN - $name - $ovpnrwstatus - $now"; $logmsg = "Client: WIO OVPN $name - IP: $ovpncltip - Status: $ovpnrwstatus"; $ovpnmailmsg = "Client : $name\nLogin : $ovpnrwlogin\nIP : $ovpncltip\nStatus : $ovpnrwstatus\n"; @@ -177,11 +172,10 @@ foreach (@ovpnarray) $logmsg = "Client: WIO OVPN $name - Status: $ovpnrwstatus"; $ovpnmailmsg = "Client : $name\nLogout : $now\nStatus : $ovpnrwstatus\n";
- if ( $mailremark eq 'on' ) { - $ovpnmailmsg .= "Remark : $remark\n\n"; - } + if ( $mailremark eq 'on' ) { $ovpnmailmsg .= "Remark : $remark\n\n"; }
&WIO::mailsender($ovpnmailsub, $ovpnmailmsg); + if ( $logging eq 'on' ) { &General::log("wio","$logmsg"); } undef ($ovpnmailsub); undef ($ovpnmailmsg); @@ -220,11 +214,10 @@ else { close (FILE); }
-foreach (@vpncfg) -{ +foreach (@vpncfg) { chomp;
- ( $activ, $name, $remark ) = (split (/,/, $_))[1, 2, 25]; + ( $activ, $name, $remark ) = (split (/,/, $_))[1, 2, 26];
if ( $remark eq 'off' ) { $remark = '-'; }
@@ -235,8 +228,7 @@ foreach (@vpncfg) unless ( grep (/$name/, @vpncache) ) { push (@vpncache, "$name,$remark,$status\n"); } }
-foreach (@vpncache) -{ +foreach (@vpncache) { chomp;
( $name, $remark, $status ) = split (/,/, $_); @@ -244,14 +236,12 @@ foreach (@vpncache) if ( grep (/,$name,/, @vpncfg) ) { push (@vpnarray, "$name,$remark,$status\n"); } }
-foreach (@vpnarray) -{ +foreach (@vpnarray) { chomp; ( $name, $remark, $status ) = split (/,/, $_);
- if ( grep (/$name{.*INSTALLED/ , @vpnstatus) ) - { + if ( grep (/$name{.*INSTALLED/ , @vpnstatus) ) { $vpnrwstatus = "$Lang::tr{'wio up'}"; $togglestat = ( $status ne 'on' ) ? 1 : 0; $status = 'on'; @@ -264,21 +254,24 @@ foreach (@vpnarray)
push (@vpnwrite, "$name,$remark,$status\n");
- if ( $togglestat == 1 ) - { + if ( $togglestat == 1 ) { $vpnmailsub = "WIO VPN - $name - $vpnrwstatus - $now"; $logmsg = "Client: WIO VPN $name - Status: $vpnrwstatus $now"; + $vpnmailmsg = "Client : $name\n";
- if ( $mailremark eq 'on' ) { - if ( $status eq 'on' ) { $vpnmailmsg = "Client : $name\nLogin : $now\nStatus : $vpnrwstatus\nRemark : $remark\n"; } - else { $vpnmailmsg = "Client : $name\nLogout : $now\nStatus : $vpnrwstatus\nRemark : $remark\n"; } + if ( $status eq 'on' ) { + $vpnmailmsg .= "Login : $now\n"; } else { - if ( $status eq 'on' ) { $vpnmailmsg = "Client : $name\nLogin : $now\nStatus : $vpnrwstatus\n"; } - else { $vpnmailmsg = "Client : $name\nLogout : $now\nStatus : $vpnrwstatus\n"; } + $vpnmailmsg .= "Logout : $now\n"; }
+ $vpnmailmsg .= "Status : $vpnrwstatus\n"; + + if ( $mailremark eq 'on' ) { $vpnmailmsg .= "Remark : $remark\n\n"; } + &WIO::mailsender($vpnmailsub, $vpnmailmsg); + if ( $logging eq 'on' ) { &General::log("wio","$logmsg"); } undef ($vpnmailsub); undef ($vpnmailmsg); diff --git a/src/wio/wio-graphs.pl b/src/wio/wio-graphs.pl index a5a58b494..af5c52062 100644 --- a/src/wio/wio-graphs.pl +++ b/src/wio/wio-graphs.pl @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen addons@h-loit.de # +# Copyright (C) 2017-2018 Stephan Feddersen sfeddersen@ipfire.org # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wio-graphs.pl, v1.3.1 2017/07/11 21:31:16 sfeddersen +# Version: 2017/07/11 21:32:23 # # This wio-graphs.pl is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. diff --git a/src/wio/wio-lib.pl b/src/wio/wio-lib.pl index 2f23c1d8e..bbaf0bf4a 100644 --- a/src/wio/wio-lib.pl +++ b/src/wio/wio-lib.pl @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen addons@h-loit.de # +# Copyright (C) 2017-2018 Stephan Feddersen sfeddersen@ipfire.org # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wio-lib.pl, v1.3.1 2017/07/11 21:31:16 sfeddersen +# Version: 2017/07/11 21:32:23 # # This wio-lib.pl is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi index 4fbf34aee..c51910f4d 100644 --- a/src/wio/wio.cgi +++ b/src/wio/wio.cgi @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen addons@h-loit.de # +# Copyright (C) 2017-2018 Stephan Feddersen sfeddersen@ipfire.org # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wio.cgi, v1.3.2 2017/08/27 14:11:16 sfeddersen +# Version: 2018/02/27 16:54:23 # # This wio.cgi is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. @@ -105,7 +105,11 @@ my $nr = 0; my $count = 0; my $showcount = 0;
-my ( $infomessage, $errormessage, $importmessage, $message ) = ''; +my $arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; +my $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}"; +my $networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}"; + +my ( $message, $infomessage, $errormessage, $importmessage ) = '';
my ( $buttontext, $host, $timestamp, $ipadr, $on, $remark, $dyndns, $dyndnsip, $sendemailon, $net, $dev, $iprange, $output, $write, $webinterface, $sendemailoff, $pingmethode, $online, $color, $bgcolor, $exitcode, $id, $line, $interface, $counter, $vpnn2nip, $vpnn2nmask, $ddns, $edc, @@ -153,6 +157,9 @@ $wiosettings{'MAILREMARK'} = 'off'; $wiosettings{'MAILSTYLE'} = 'email'; $wiosettings{'OVPNRWMAIL'} = 'off'; $wiosettings{'SHUTDOWN'} = 'off'; +$wiosettings{'WIOGUISHOWARPTABLE'} = ''; +$wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} = ''; +$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = '';
&Header::getcgihash(%wiosettings); &Header::getcgihash(%mainsettings); @@ -219,7 +226,6 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_save'}.'2' ) { $wiosettings{'SENDEMAILOFF'} = $wiosettings{"SENDEMAILOFF$count"}; $wiosettings{'PINGMETHODE'} = $wiosettings{"PINGMETHODE$count"}; $wiosettings{'ONLINE'} = $wiosettings{"ONLINE$count"}; - $wiosettings{'WEBINTERFACE'} = $wiosettings{"WEBINTERFACE$count"};
&validSave();
@@ -272,6 +278,45 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_client_add'} ) { } }
+## show / hide arptable + +if ( $wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable' ) { + if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { + $wiosettings{'WIOGUISHOWARPTABLE'} = 'off'; + $arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; + } + else { + $wiosettings{'WIOGUISHOWARPTABLE'} = 'on'; + $arpbuttontext = "$Lang::tr{'wio_show_table_off'}"; + } +} + +## show / hide clientimporttable + +if ( $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} eq 'clientimport' ) { + if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { + $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} = 'off'; + $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}"; + } + else { + $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} = 'on'; + $clientimportbuttontext = "$Lang::tr{'wio_show_table_off'}"; + } +} + +## show / hide networksearchtable + +if ( $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} eq 'networksearch' ) { + if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { + $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'off'; + $networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}"; + } + else { + $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'on'; + $networksearchbuttontext = "$Lang::tr{'wio_show_table_off'}"; + } +} + ## add arp client
if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_add'} ) { @@ -303,7 +348,7 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_add'} ) { } }
-## enable / disabel client || enable / disable dyndns || enable / disable sendemailon || enable / disable sendemailoff || change ip / fqdn +## enable / disable client || enable / disable dyndns || enable / disable sendemailon || enable / disable sendemailoff || change ip / fqdn
if ( $wiosettings{'ACTION'} eq $Lang::tr{'enable disable client'} ) { $edc = 'on'; } if ( $wiosettings{'ACTION'} eq $Lang::tr{'enable disable dyndns'} ) { $edd = 'on'; } @@ -376,6 +421,7 @@ exit 0; } else { $infomessage = "$Lang::tr{'wio_already_running'}"; + unlink($onoffip); }
} @@ -842,7 +888,7 @@ if ( $debug ) { print"infomessage: $infomessage<br />\n";
&hrline(); - + my $wiodebug = 0; foreach (sort keys %wiosettings) { print"$_ = $wiosettings{$_}<br />\n"; @@ -881,9 +927,9 @@ print" <form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'> <table width='100%'> <tr> - <td width='45%' bgcolor='$color{'color20'}' align='left' height='20'><b> $Lang::tr{'wio_settings_msg'}</b></td> + <td width='55%' bgcolor='$color{'color20'}' align='left' height='20'><b> $Lang::tr{'wio_settings_msg'}</b></td> <td width='2%'> </td> - <td width='53%'> </td> + <td width='43%'> </td> </tr> <tr><td colspan='3'> </td></tr> <tr> @@ -937,7 +983,7 @@ for ($i=1; $i<=15; $i++) { print "<option $selected{'TIMEOUT'}{$_}>$_</option>\n"; }
-print" +print" </select> $Lang::tr{'wio sec'}</td> </tr> <tr><td colspan='3'> </td></tr> @@ -953,7 +999,6 @@ print" <td align='left'><input type='checkbox' name='CLIENTREMARK' $checked{'CLIENTREMARK'}{'on'} /></td> </tr> <tr><td colspan='3'> </td></tr> - ";
if ( $wiosettings{'SENDEMAIL'} eq 'on' ) { @@ -1062,9 +1107,9 @@ if ( $wiosettings{'ENABLE'} eq 'on') {
print" <table border='0' width='100%' bordercolor='$Header::bordercolour' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> -<tr height='20'> - <td width='28%' bgcolor='$color{'color20'}' align='left'><b> $Lang::tr{'wio_wan_con'}</b></td> - <td width='72%' align='right'> </td> +<tr height='25'> + <td width='33%' bgcolor='$color{'color20'}' align='left'><b> $Lang::tr{'wio_wan_con'}</b></td> + <td width='67%' align='right'> </td> </tr> <tr><td colspan='2'> </td></tr> </table> @@ -1078,7 +1123,7 @@ print" <td width='15%' align='center'><b>$Lang::tr{'wio_wanname'}</b></td> <td width='24%' align='center'><b>$Lang::tr{'wio_dyndns_hosts'}</b></td> <td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td> - <td width='14%' align='center'><b>$Lang::tr{'wio_wancheck'}</b></td> + <td width='14%' align='center'><b>$Lang::tr{'wio_connected'}</b></td> </tr> <tr bgcolor='$color{'color22'}' height='20'> <td align='center'>01</td> @@ -1137,9 +1182,9 @@ if ( -e "$vpnpid" ) {
print" <table border='0' width='100%' bordercolor='$Header::bordercolour' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> -<tr height='20'> - <td width='28%' bgcolor='$color{'color20'}' align='left'><b> $Lang::tr{'wio_vpn_con'}</b></td> - <td width='72%'> </td> +<tr height='25'> + <td width='33%' bgcolor='$color{'color20'}' align='left'><b> $Lang::tr{'wio_vpn_con'}</b></td> + <td width='67%'> </td> </tr> <tr><td colspan='2'> </td></tr> </table> @@ -1151,7 +1196,7 @@ print" <td width='8%' align='center'><b>$Lang::tr{'type'}</b></td> <td width='25%' align='center'><b>$Lang::tr{'wio_common_name'}</b></td> <td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td> - <td width='14%' align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td> + <td width='14%' align='center'><b>$Lang::tr{'wio_connected'}</b></td> </tr> ";
@@ -1199,7 +1244,7 @@ $statustxt = "$Lang::tr{'capsclosed'}"; <td align='center' height='20'> </td> </tr> "; - + if ($vpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'} eq 'on') { print"<tr".($idvpn % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'><td> </td><td colspan='16' align='left'>$vpnconfighash{$key}[25]</td></tr>"; } @@ -1219,9 +1264,9 @@ if ( -e "$ovpnpid" ) {
print" <table border='0' width='100%' bordercolor='$Header::bordercolour' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> -<tr height='20'> - <td width='28%' bgcolor='$color{'color20'}' align='left'><b> $Lang::tr{'wio_ovpn_con'}</b></td> - <td width='72%'> </td> +<tr height='25'> + <td width='33%' bgcolor='$color{'color20'}' align='left'><b> $Lang::tr{'wio_ovpn_con'}</b></td> + <td width='67%'> </td> </tr> <tr><td colspan='2'> </td></tr> </table> @@ -1233,7 +1278,7 @@ print" <td width='8%' align='center'><b>$Lang::tr{'type'}</b></td> <td width='25%' align='center'><b>$Lang::tr{'common name'}</b></td> <td width='11%' align='center'><b>$Lang::tr{'wio image'}</b></td> - <td width='14%' align='center'><b>$Lang::tr{'wio_ovpn_connected'}</b></td> + <td width='14%' align='center'><b>$Lang::tr{'wio_connected'}</b></td> </tr> ";
@@ -1265,7 +1310,6 @@ print" $statustxt = "$Lang::tr{'capsclosed'}"; } else { - if ($ovpnconfighash{$key}[3] eq 'net') { if (-e "/var/run/$ovpnconfighash{$key}[1]n2n.pid") { my @output = ""; @@ -1333,7 +1377,7 @@ print" if ($ovpnconfighash{$key}[25] && $wiosettings{'CLIENTREMARK'} eq 'on') { print"<tr".($idovpn % 2?" bgcolor='$color{'color20'}'":" bgcolor='$color{'color22'}'")." height='20'><td> </td><td colspan='16' align='left'>$ovpnconfighash{$key}[25]</td></tr>"; } - + print"<tr height='1'><td colspan='17' bgcolor='#696565'></td></tr>"; $idovpn++ } @@ -1346,9 +1390,9 @@ print"
print" <table border='0' width='100%' bordercolor='$Header::bordercolour' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> -<tr height='20'> - <td width='28%' bgcolor='$color{'color20'}' align='left'><b> $Lang::tr{'wio_clients'}</b></td> - <td width='72%'> </td> +<tr height='25'> + <td width='33%' bgcolor='$color{'color20'}' align='left'><b> $Lang::tr{'wio_clients'}</b></td> + <td width='67%'> </td> </tr> <tr><td colspan='2'> </td></tr> </table> @@ -1471,29 +1515,12 @@ my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.'); } }
- if ($netsettings{"RED_TYPE"} eq 'DHCP' || $netsettings{"RED_TYPE"} eq 'PPPOE') { - my $redipadr = qx'ip addr | grep red0 | grep inet | awk "{print $2}"'; - my @rednet = split ("/", $redipadr); - chomp ($rednet[1]); - my $red_netmask = General::iporsubtodec($rednet[1]); - my $red_netaddress = Network::get_netaddress("$rednet[0]/$red_netmask"); - - if ( &General::IpInSubnet($ipaddresses[$a], $red_netaddress, $red_netmask) ) { - print"<td align='center' height='20'><img src='$imgstatic/red.png' alt='$Lang::tr{'wio_red_lan'}' title='$Lang::tr{'wio_red_lan'}' /></td>"; - last SWITCH; - } - else { - print"<td align='center'><img align='middle' src='$imgstatic/white.png' alt='$Lang::tr{'wio_unknown_lan'}' title='$Lang::tr{'wio_unknown_lan'}' /></td>"; - last SWITCH; - } - } - if ( -e "$vpnpid" ) { foreach $key (keys(%vpnconfighash)) { next unless ($vpnconfighash{$key}[3] eq 'net'); - + my $convertip = &General::ipcidr2msk($vpnconfighash{$key}[11]); - + my @net = split ("/", $convertip);
$vpnn2nip = $net[0]; @@ -1510,16 +1537,15 @@ my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.'); @match = split ("/", $ovpnsettings{'DOVPN_SUBNET'});
if ( &General::IpInSubnet($ipaddresses[$a], $match[0], $match[1]) ) { - print"<td align='center'><img src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>"; - last SWITCH; + print"<td align='center'><img src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>"; + last SWITCH; } }
if ( %ovpnccdconfhash ne '' ) { foreach $key (keys(%ovpnccdconfhash)) { - + my $convertip = &General::ipcidr2msk($ovpnccdconfhash{$key}[1]); - my @net = split ("/", $convertip);
$vpnn2nip = $net[0]; @@ -1529,7 +1555,23 @@ my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.'); print"<td align='center'><img align='middle' src='$imgstatic/ovpn.png' alt='OpenVPN' title='OpenVPN' /></td>"; last SWITCH; } - + } + } + + if ($netsettings{"RED_TYPE"} eq 'DHCP' || $netsettings{"RED_TYPE"} eq 'PPPOE') { + my $redipadr = qx'ip addr | grep red0 | grep inet | awk "{print $2}"'; + my @rednet = split ("/", $redipadr); + chomp ($rednet[1]); + my $red_netmask = General::iporsubtodec($rednet[1]); + my $red_netaddress = Network::get_netaddress("$rednet[0]/$red_netmask"); + + if ( &General::IpInSubnet($ipaddresses[$a], $red_netaddress, $red_netmask) ) { + print"<td align='center' height='20'><img src='$imgstatic/red.png' alt='$Lang::tr{'wio_red_lan'}' title='$Lang::tr{'wio_red_lan'}' /></td>"; + last SWITCH; + } + else { + print"<td align='center'><img align='middle' src='$imgstatic/white.png' alt='$Lang::tr{'wio_unknown_lan'}' title='$Lang::tr{'wio_unknown_lan'}' /></td>"; + last SWITCH; } } } @@ -1662,8 +1704,8 @@ if (! defined($errormessage) && $wiosettings{'ACTION'} ne $Lang::tr{'edit'} ) { print" <table width='100%' border='0' bordercolor='$Header::bordercolour' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> <tr> - <td width='28%' bgcolor='$color{'color20'}' align='left' height='20'><b> $Lang::tr{'wio_add'}</b></td> - <td width='72%' align='right'> </td> + <td width='33%' bgcolor='$color{'color20'}' align='left' height='25'><b> $Lang::tr{'wio_add'}</b></td> + <td width='67%' align='right'> </td> </tr> <tr> <td> </td> @@ -1755,13 +1797,17 @@ if ( $wiosettings{'ENABLE'} eq 'on' && !$errormessage && $wiosettings{'ACTION'} print" <table border='0' width='100%' bordercolor='$Header::bordercolour' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> <tr> - <td width='28%' bgcolor='$color{'color20'}' align='left' height='20'><b> $Lang::tr{'wio_arp_table_entries'}</b></td> - <td width='72%'> </td> + <td width='33%' bgcolor='$color{'color20'}' align='left' height='25'><b> $Lang::tr{'wio_arp_table_entries'}</b></td> + <td width='67%' align='right'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='WIOGUISHOWARPTABLE' value='arptable' /><input type='submit' name='ACTION' value='$arpbuttontext' /></form></td> </tr> -<tr><td colspan='2'> </td></tr> </table> +";
+if ( $wiosettings{'WIOGUISHOWARPTABLE'} eq 'on' ) { + +print" <table border='0' width='100%' bordercolor='$Header::bordercolour' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> +<tr><td colspan='2'> </td></tr> <tr bgcolor='$color{'color20'}'> <td width='5%' align='center' height='20'><b>$Lang::tr{'wio_id'}</b></td> <td width='20%' align='center' height='20'><b>$Lang::tr{'wio_hwaddress'}</b></td> @@ -1865,18 +1911,24 @@ $idarp++ print" </table> "; +}
&hrline();
print" <table border='0' width='100%' bordercolor='$Header::bordercolour' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> <tr> - <td width='28%' bgcolor='$color{'color20'}' align='left' height='20'><b> $Lang::tr{'wio_import_file'}</b></td> - <td width='72%'> </td> + <td width='33%' bgcolor='$color{'color20'}' align='left' height='25'><b> $Lang::tr{'wio_import_file'}</b></td> + <td width='67%' align='right'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='WIOGUISHOWCLIENTIMPORTTABLE' value='clientimport' /><input type='submit' name='ACTION' value='$clientimportbuttontext' /></form></td> </tr> -<tr><td colspan='2'> </td></tr> </table> +"; + +if ( $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} eq 'on' ) { + +print" <table width='100%' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> +<tr><td colspan='3'> </td></tr> <tr bgcolor='$color{'color22'}'> <form method='post' action='/cgi-bin/wio.cgi' enctype='multipart/form-data'> <td width='35%' align='right'>$Lang::tr{'wio_import_csv'} </td> @@ -1902,16 +1954,22 @@ print" </tr> </table> "; +}
&hrline;
print" <table border='0' width='100%' bordercolor='$Header::bordercolour' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> <tr> - <td width='28%' bgcolor='$color{'color20'}' align='left' height='20'><b> $Lang::tr{'wio_net_scan'}</b></td> - <td width='72%'> </td> + <td width='33%' bgcolor='$color{'color20'}' align='left' height='25'><b> $Lang::tr{'wio_net_scan'}</b></td> + <td width='67%' align='right'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='WIOGUISHOWNETWORKSEARCHTABLE' value='networksearch' /><input type='submit' name='ACTION' value='$networksearchbuttontext' /></form></td> </tr> </table> +"; + +if ( $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} eq 'on' ) { + +print" <table width='100%' cellspacing='0' cellpadding='0' style='border-collapse: collapse'> <tr> <td colspan='3'> </td> @@ -1944,7 +2002,7 @@ print" </table> </form> "; - +} &Header::closebox(); }
@@ -2104,23 +2162,24 @@ close(FILE);
############################################################################################################################
-sub SortByTunnelName -{ - if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) { - return -1; - } - elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) { - return 1; - } - else { - return 0; - } +sub SortByTunnelName { + + if ($vpnconfighash{$a}[1] lt $vpnconfighash{$b}[1]) { + return -1; + } + elsif ($vpnconfighash{$a}[1] gt $vpnconfighash{$b}[1]) { + return 1; + } + else { + return 0; + } + }
############################################################################################################################
-sub validSave -{ +sub validSave { + if ( $wiosettings{'IPADR'} eq '' && $wiosettings{'PINGMETHODE'} eq 'ip' && $wiosettings{'DYNDNS'} eq '' ) { $errormessage = $Lang::tr{'wio_ip_empty'}; } @@ -2146,4 +2205,5 @@ sub validSave if ( $wiosettings{'ID'} eq '' && ! defined($errormessage) ) { $errormessage = &WIO::checkinto($wiosettings{'IPADR'}, $wiosettings{'HOST'}, @current); }
if ( $wiosettings{'REMARK'} ne '' ) { $wiosettings{'REMARK'} =~ s/,/,/g; } + } diff --git a/src/wio/wiographs.cgi b/src/wio/wiographs.cgi index 06b694645..e1a747513 100644 --- a/src/wio/wiographs.cgi +++ b/src/wio/wiographs.cgi @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen addons@h-loit.de # +# Copyright (C) 2017-2018 Stephan Feddersen sfeddersen@ipfire.org # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wiographs.cgi, v1.3.2 2017/08/27 14:11:16 sfeddersen +# Version: 2017/08/27 14:07:23 # # This wiographs.cgi is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire.
hooks/post-receive -- IPFire 2.x development tree