]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
WIO: Update to Version 1.3.2 several changes in many files
authorStephan Feddersen via Development <development@lists.ipfire.org>
Tue, 20 Feb 2018 20:41:13 +0000 (21:41 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Mar 2018 15:39:48 +0000 (15:39 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/wio
src/misc-progs/wiohelper.c
src/wio/lang/wio.de.pl
src/wio/lang/wio.en.pl
src/wio/main/wio.pl
src/wio/main/wiovpn.pl
src/wio/wio-graphs.pl
src/wio/wio-lib.pl
src/wio/wio.cgi
src/wio/wiographs.cgi

diff --git a/lfs/wio b/lfs/wio
index d70b12b469e43e36f34bc9dc7248608587a0d458..9ae11b8832a1f21e3b09b8f6ae3304641d50e1df 100644 (file)
--- 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    = 1
 
 ###############################################################################
 # Top-level Rules
index 0f7fd8657fed48b44b9123c9ee19b30c22b1d188..a1e0168b3c85afc93c0ebca472871257fc1bcabc 100644 (file)
@@ -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.
  *
index fd82ff00d10292c77d7045789a5a315c4df6132b..a71aefce0282a9e69ccf3668fadbb4cbe4bdd094 100644 (file)
@@ -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',
 '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',
@@ -60,7 +60,7 @@
 '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:',
 '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_ovpn_connected' => 'Verbunden seit',
 'wio_wan_up' => 'VERBUNDEN',
 'wio_wan_down' => 'GETRENNT',
 'wio_n2n' => 'Netz-zu-Netz Verbindung',
 'wio_hwaddress' => 'HW-Adresse',
 'wio_iface' => 'Schnittstelle',
 'wio_client_enable' => 'Client aktivieren?',
-'wio_ping_send' => 'überprüfen per',
+'wio_ping_send' => 'Ã\9cberprü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' => 'Ã\9cberprüfen per IP aktiviert',
+'wio_fqdn' => 'Ã\9cberprüfen per FQDN aktiviert',
+'wio_ip_on' => 'Ã\9cberprüfen per IP aktiviert (klicken, um per FQDN zu aktivieren)',
+'wio_fqdn_on' => 'Ã\9cberprü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:',
 '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',
 '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',
 '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!',
 'wio_answer' => 'Antwort',
 'wio_answer_time' => 'Antwortzeit',
 'wio_scriptruntime' => 'Scriptlaufzeit',
+'wio_show_table_off' => 'Tabelle ausblenden',
+'wio_show_table_on' => 'Tabelle einblenden',
 );
index 52793b90818c96c4b18e6ebde27c627f0b65cafd..f981eeec2b92cf43f51cfd66520354ea65ee60e7 100644 (file)
@@ -10,8 +10,8 @@
 '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',
@@ -19,7 +19,7 @@
 'wio_import_file' => 'Import settings from:',
 'wio_import_info_csv' => 'There are no new settings to import!',
 'wio settings' => 'configuration:',
-'wio enabled' => 'enable ?',
+'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_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_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_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' => '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_ovpn_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 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_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' => 'Configurate Client(s):',
+'wio_settings_msg' => 'Configurate 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' => 'Activ',
+'wio_check' => 'Check',
 'wio_common_name' => 'Remote Host/IP',
 'wio_msg_left' => 'Searching on the',
 'wio_msg_green' => 'green',
 '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"?',
 'wio_answer' => 'Answer',
 'wio_answer_time' => 'Response Time',
 'wio_scriptruntime' => 'Script Execution Time',
+'wio_show_table_off' => 'Show table',
+'wio_show_table_on' => 'Hide table',
 );
index 985900d473c271264287224ba5fdefff9961f577..b846feafa6147c72da67608426d23a8d0daea709 100644 (file)
@@ -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.
index f22bd7abbd23c4c4bd2605579ed9d89dd9582769..c4c6b5739e1cbf460616c57f5e475f5256fbee77 100644 (file)
@@ -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);
index a5a58b494488f58634f1ab812e1f6ec2c62c5f98..af5c52062edc730d2011f211eae3b3f6a264353a 100644 (file)
@@ -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.
index 2f23c1d8e0fd00e08cd96290998184e7e0289020..bbaf0bf4a0b5c6636bdf47209ad06d0fd3688ded 100644 (file)
@@ -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.
index 4fbf34aee115d5116a6ad99a071a2c09f1019bdf..8c43b0432a2dccb1f610ed2bda290f18fd7c642d 100644 (file)
@@ -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/01/05 14:34:23
 #
 # This wio.cgi is based on the Code from the IPCop WIO Addon
 # and is extremly adapted to work with IPFire.
@@ -105,6 +105,10 @@ my $nr = 0;
 my $count = 0;
 my $showcount = 0;
 
+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 ( $infomessage, $errormessage, $importmessage, $message ) = '';
 
 my ( $buttontext, $host, $timestamp, $ipadr, $on, $remark, $dyndns, $dyndnsip, $sendemailon, $net, $dev, $iprange, $output, $write, $webinterface,
@@ -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';
+               $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}";
+       }
+       else {
+               $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'on';
+               $clientimportbuttontext = "$Lang::tr{'wio_show_table_off'}";
+       }
+}
+
 ## add arp client
 
 if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_add'} ) {
@@ -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>&nbsp;$Lang::tr{'wio_settings_msg'}</b></td>
+       <td width='55%' bgcolor='$color{'color20'}' align='left' height='20'><b>&nbsp;$Lang::tr{'wio_settings_msg'}</b></td>
        <td width='2%'>&nbsp;</td>
-       <td width='53%'>&nbsp;</td>
+       <td width='43%'>&nbsp;</td>
 </tr>
 <tr><td colspan='3'>&nbsp;</td></tr>
 <tr>
@@ -953,7 +999,6 @@ print"
        <td align='left'><input type='checkbox' name='CLIENTREMARK' $checked{'CLIENTREMARK'}{'on'} /></td>
 </tr>
 <tr><td colspan='3'>&nbsp;</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>&nbsp;$Lang::tr{'wio_wan_con'}</b></td>
-       <td width='72%' align='right'>&nbsp;</td>
+<tr height='25'>
+       <td width='33%' bgcolor='$color{'color20'}' align='left'><b>&nbsp;$Lang::tr{'wio_wan_con'}</b></td>
+       <td width='67%' align='right'>&nbsp;</td>
 </tr>
 <tr><td colspan='2'>&nbsp;</td></tr>
 </table>
@@ -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>&nbsp;$Lang::tr{'wio_vpn_con'}</b></td>
-       <td width='72%'>&nbsp;</td>
+<tr height='25'>
+       <td width='33%' bgcolor='$color{'color20'}' align='left'><b>&nbsp;$Lang::tr{'wio_vpn_con'}</b></td>
+       <td width='67%'>&nbsp;</td>
 </tr>
 <tr><td colspan='2'>&nbsp;</td></tr>
 </table>
@@ -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>&nbsp;$Lang::tr{'wio_ovpn_con'}</b></td>
-       <td width='72%'>&nbsp;</td>
+<tr height='25'>
+       <td width='33%' bgcolor='$color{'color20'}' align='left'><b>&nbsp;$Lang::tr{'wio_ovpn_con'}</b></td>
+       <td width='67%'>&nbsp;</td>
 </tr>
 <tr><td colspan='2'>&nbsp;</td></tr>
 </table>
@@ -1346,9 +1391,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>&nbsp;$Lang::tr{'wio_clients'}</b></td>
-       <td width='72%'>&nbsp;</td>
+<tr height='25'>
+       <td width='33%' bgcolor='$color{'color20'}' align='left'><b>&nbsp;$Lang::tr{'wio_clients'}</b></td>
+       <td width='67%'>&nbsp;</td>
 </tr>
 <tr><td colspan='2'>&nbsp;</td></tr>
 </table>
@@ -1471,29 +1516,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];
@@ -1532,6 +1560,23 @@ 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 ( $webinterface[$a] eq 'HTTP' ) {
@@ -1662,8 +1707,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>&nbsp;$Lang::tr{'wio_add'}</b></td>
-       <td width='72%' align='right'>&nbsp;</td>
+       <td width='33%' bgcolor='$color{'color20'}' align='left' height='25'><b>&nbsp;$Lang::tr{'wio_add'}</b></td>
+       <td width='67%' align='right'>&nbsp;</td>
 </tr>
 <tr>
        <td>&nbsp;</td>
@@ -1755,13 +1800,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>&nbsp;$Lang::tr{'wio_arp_table_entries'}</b></td>
-       <td width='72%'>&nbsp;</td>
+       <td width='33%' bgcolor='$color{'color20'}' align='left' height='25'><b>&nbsp;$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'>&nbsp;</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'>&nbsp;</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 +1914,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>&nbsp;$Lang::tr{'wio_import_file'}</b></td>
-       <td width='72%'>&nbsp;</td>
+       <td width='33%' bgcolor='$color{'color20'}' align='left' height='25'><b>&nbsp;$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'>&nbsp;</td></tr>
 </table>
+";
+
+if ( $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} eq 'on' ) {
+
+print"
 <table width='100%' cellspacing='0' cellpadding='0' style='border-collapse: collapse'>
+<tr><td colspan='3'>&nbsp;</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'}&nbsp;</td>
@@ -1902,16 +1957,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>&nbsp;$Lang::tr{'wio_net_scan'}</b></td>
-       <td width='72%'>&nbsp;</td>
+       <td width='33%' bgcolor='$color{'color20'}' align='left' height='25'><b>&nbsp;$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'>&nbsp;</td>
@@ -1944,7 +2005,7 @@ print"
 </table>
 </form>
 ";
-
+}
 &Header::closebox();
 }
 
index 06b6946451e36b9d5f7f67812e23cd0486ad2775..e1a7475137081d33152b3e17258563990d44d976 100644 (file)
@@ -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.