diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php index 656f7cfc3f..b7cc7c3e2d 100644 --- a/usr/local/www/firewall_schedule_edit.php +++ b/usr/local/www/firewall_schedule_edit.php @@ -251,11 +251,11 @@ function repeatExistingDays(){ } } -function daytogglerepeating(year,week,daypos,bExists){ +function daytogglerepeating(week,daypos,bExists){ var tempstr, daycell, dayoriginal = ""; for (j=1; j<=53; j++) { - tempstr = 'y' + year +'w' + j + 'p' + daypos; + tempstr = 'w' + j + 'p' + daypos; daycell = eval('document.getElementById(tempstr)'); dayoriginalpos = daysSelected.indexOf(tempstr); @@ -288,15 +288,8 @@ function daytoggle(id) { var bFoundValid = false; iddashpos = id.search("-"); - - var tempstryearpos = id.search("y"); - var tempstrweekpos = id.search("w"); var tempstrdaypos = id.search("p"); - - var year = id.substring(tempstryearpos + 1,tempstrweekpos); - year = parseInt(year); - - var week = id.substring(tempstrweekpos + 1,tempstrdaypos); + var week = id.substring(1,tempstrdaypos); week = parseInt(week); if (iddashpos == "-1") @@ -324,7 +317,7 @@ function daytoggle(id) { } else if (rgb2hex(daycell.style.backgroundColor) == "#F08080") // lightcoral { - daytogglerepeating(year,week,daypos,true); + daytogglerepeating(week,daypos,true); } else //color is white cell { @@ -335,7 +328,7 @@ function daytoggle(id) { else { daycell.style.backgroundColor = "#F08080"; // lightcoral - daytogglerepeating(year,week,daypos,false); + daytogglerepeating(week,daypos,false); } daysSelected += id + ","; } @@ -345,7 +338,7 @@ function daytoggle(id) { { //we found an invalid cell when column was clicked, move up to the next week week++; - tempstr = "y" + year + "w" + week + "p" + daypos; + tempstr = "w" + week + "p" + daypos; idmod = tempstr; } } @@ -857,13 +850,13 @@ EOD; - - - - - - - + + + + + + + "; } if ($firstdayofmonth == $positioncounter){?> - + "; } elseif ($firstdayprinted == TRUE && $daycounter <= $numberofdays){?> - + ";