diff options
Diffstat (limited to 'scire/.lib/functions.php')
-rw-r--r-- | scire/.lib/functions.php | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/scire/.lib/functions.php b/scire/.lib/functions.php index 1215d54..7a1996f 100644 --- a/scire/.lib/functions.php +++ b/scire/.lib/functions.php @@ -78,6 +78,70 @@ function get_priorities() { return array('1','2','3','4','5','6','7','8','9'); } +function get_cron_times() { + # Minutes array + $minutes = array( +# "*" => "Every minute", +# "*/2" => "Every other minute", + "*/5" => "Every five minutes", + "*/10" => "Every ten minutes", + "*/15" => "Every fifteen minutes", + ); + foreach (range(0,59) as $val) { + $minutes[(string)$val] = $val; + } + $minutes["other"] = "other"; + # Hours array + $hours = array( + "*" => "Every hour", + "*/2" => "Every other hour"); + foreach (range(0,11) as $val) { + $hours[(string)$val] = (string)$val . " A.M."; + } + $hours["12"] = "12 Noon"; + foreach (range(13,23) as $val) { + $hours[(string)$val] = (string)($val-12) . " P.M."; + } + $hours["other"] = "other"; + + # Days + $days = array( + "*" => "Every day", + "*/2" => "Every other day"); + foreach (range(1,31) as $val) { + $days[(string)$val] = (string)($val); + } + $days["other"] = "other"; + + # Weekdays + $weekdays = array( + "*" => "Every weekday", + "0" => "Sunday", + "1" => "Monday", + "2" => "Tuesday", + "3" => "Wednesday", + "4" => "Thursday", + "5" => "Friday", + "6" => "Saturday"); + $weekdays["other"] = "other"; + + # Months + $months = array("*" => "Every month", + "1" => "January", + "2" => "February", + "3" => "March", + "4" => "April", + "5" => "May", + "6" => "June", + "7" => "July", + "8" => "August", + "9" => "October", + "10" => "September", + "11" => "November", + "12" => "December"); + $months["other"] = "other"; + return array($minutes,$hours,$days,$weekdays,$months); +} ?> |