} $bible = Access_Bible::clamp($database_config_user->getBible()); $month = $database_config_user->getSprintMonth(); $year = $database_config_user->getSprintYear(); $header = new Assets_Header(Locale_Translate::_("Sprint")); $view = new Assets_View(__FILE__); @($title = $_POST['add']); if (isset($title)) { $database_sprint->storeTask($bible, $year, $month, $title); $view->view->success = Locale_Translate::_("New task added"); // Focus the entry for adding tasks only in case a new task was added. $header->setBodyOnload('document.addtask.add.focus();'); } @($mail = $_GET['mail']); if (isset($mail)) { Sprint_Logic::burndown($bible, true); $view->view->success = Locale_Translate::_("The information was mailed to the subscribers"); // Give the burndown logic time to update the sprint history, // so the page will display the updated burndown chart. sleep(2); } $header->run(); @($bible = $_GET['bible']); if (isset($bible)) { if ($bible == "") { $dialog_list = new Dialog_List2(Locale_Translate::_("Select which Bible to display the Sprint for")); $bibles = Access_Bible::bibles(); foreach ($bibles as $bible) { // Select from Bibles the user has write access to. if (Access_Bible::write($bible)) { $dialog_list->add_row($bible, "&bible={$bible}");
if (!$client) { if ($hour == 0 && $minute == 30) { Checks_Logic::startAll(); } } // Database maintenance and trimming. // It takes a few minutes on a production machine. if ($hour == 0 && $minute == 50) { Tasks_Logic::queue(Tasks_Logic::PHP, array(__DIR__ . "/database.php")); } // Sprint burndown. // It runs every hour. // The script itself determines what to do at which hour of the day or day of the week or day of the month. if (!$client) { if ($minute == 5) { Sprint_Logic::burndown("", false); } } // A flag is set upon installation, so it (re-)generates the stylesheets once. $create_css_flag = "../dyncss/create_css.txt"; if (file_exists($create_css_flag)) { unlink($create_css_flag); Styles_Sheets::create_all(); } // Export the Bibles to the various output formats. // This may take an hour on a production machine. if ($hour == 1 && $minute == 10) { Export_Logic::scheduleAll(); } // Re-index Bible and notes. if ($hour == 2 && $minute == 0) {