edit frontend

This commit is contained in:
HB9HIL
2024-04-26 13:53:13 +02:00
parent 9c461d26ed
commit 9538d968ce
3 changed files with 45 additions and 51 deletions

View File

@@ -130,6 +130,22 @@ class cron extends CI_Controller {
$this->load->view('cron/edit', $data);
}
public function edit() {
$this->load->model('user_model');
if (!$this->user_model->authorize(99)) {
$this->session->set_flashdata('notice', 'You\'re not allowed to do that!');
redirect('dashboard');
}
$id = xss_clean($this->input->post('id',true));
$description = xss_clean($this->input->post('description',true));
$expression = xss_clean($this->input->post('expression',true));
$enabled = xss_clean($this->input->post('enabled',true));
$this->cron_model->update_cron($id, $description, $expression, $enabled);
}
public function toogleEnableCronSwitch() {
$id = xss_clean($this->input->post('id',true));