@@ -90,6 +90,11 @@ my $database_handle = DBI->connect("DBI:SQLite:dbname=$database", "", "", { Rais
my $from_datestring = sprintf '%04d-%02d-%02d', ($cgiparams{"FROM_YEAR"}, $cgiparams{"FROM_MONTH"}, $cgiparams{"FROM_DAY"});
my $to_datestring = sprintf '%04d-%02d-%02d', ($cgiparams{"TO_YEAR"}, $cgiparams{"TO_MONTH"}, $cgiparams{"TO_DAY"});
+# Check if the to datestring is later than the from datestring.
+unless ($to_datestring ge $from_datestring) {
+ $errormessage = "$Lang::tr{'error the to date has to be later than the from date'}";
+}
+
my $database_query = qq(
SELECT
common_name, SUM(
@@ -1012,6 +1012,7 @@
'error config' => 'Could not open /var/ipfire/ovpn/config/ZERINA.ovpn !',
'error external access' => 'Could not open /var/ipfire/xtaccess/config (external acccess could not be granted)!',
'error messages' => 'Error messages',
+'error the to date has to be later than the from date' => 'The to date has to be later than the from date!',
'esp encryption' => 'ESP Encryption:',
'esp grouptype' => 'ESP Grouptype:',
'esp integrity' => 'ESP Integrity:',