mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
(legacy) reimplement previously removed code in firewall_schedule.php
This commit is contained in:
parent
bda106346e
commit
9ac2f80589
@ -186,6 +186,39 @@ $main_buttons = array(
|
||||
}
|
||||
$arraycounter++;
|
||||
}
|
||||
} else {
|
||||
$tempdayFriendly = $timerange['position'];
|
||||
$firstDayFound = false;
|
||||
$tempFriendlyDayArray = explode(",", $tempdayFriendly);
|
||||
$currentDay = "";
|
||||
$firstDay = "";
|
||||
$nextDay = "";
|
||||
$counter = 0;
|
||||
foreach ($tempFriendlyDayArray as $day){
|
||||
if ($day != ""){
|
||||
if (!$firstDayFound)
|
||||
{
|
||||
$firstDay = $tempFriendlyDayArray[$counter];
|
||||
$firstDayFound = true;
|
||||
}
|
||||
$currentDay =$tempFriendlyDayArray[$counter];
|
||||
//get next day
|
||||
$nextDay = $tempFriendlyDayArray[$counter+1];
|
||||
$currentDay++;
|
||||
if ($currentDay != $nextDay){
|
||||
if ($firstprint)
|
||||
$dayFriendly .= "<br />";
|
||||
$currentDay--;
|
||||
if ($currentDay != $firstDay)
|
||||
$dayFriendly .= $dayArray[$firstDay-1] . " - " . $dayArray[$currentDay-1];
|
||||
else
|
||||
$dayFriendly .= $dayArray[$firstDay-1];
|
||||
$firstDayFound = false;
|
||||
$firstprint = true;
|
||||
}
|
||||
$counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
$timeFriendly = $starttime . "-" . $stoptime;
|
||||
$description = $timerange['rangedescr'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user