// If there are no defaults if (!isset($_POST['run_cycle'])) { $_POST['run_cycle'] = 3600; } if (!isset($_POST['date_start'])) { $_POST['date_start'] = time(); } if (!isset($_POST['date_end'])) { $_POST['date_end'] = 10; } // Sanitize Values $_POST['title'] = Sanitize::safeword($_POST['title']); $_POST['method'] = Sanitize::variable($_POST['method']); $_POST['run_cycle'] = Sanitize::number($_POST['run_cycle'], 0); $_POST['date_start'] = Sanitize::number($_POST['date_start'], 0); $_POST['date_end'] = Sanitize::number($_POST['date_end'], 0); // Sanitize Parameters for ($a = 0; $a <= 3; $a++) { $_POST['args'][$a] = isset($_POST['args'][$a]) ? Sanitize::text($_POST['args'][$a]) : ""; } } // Run Header require SYS_PATH . "/controller/includes/admin_header.php"; // Get Navigation Entry echo ' <h2 style="margin-top:20px;">' . ($editID ? 'Edit' : 'Create New') . ' Cron Task</h2> <form class="uniform" action="/admin/cron/custom-task" method="post">' . Form::prepare("cron-custom") . ' <p>Title: <input type="text" name="title" value="' . $_POST['title'] . '" maxlength="22" /> (only useful to humans)</p> <p>Method: <input type="text" name="method" value="' . $_POST['method'] . '" maxlength="22" /> (the MyTasks:: or Task:: method to call)</p> <p>Parameters: