Can edit visitor link

This commit is contained in:
Andreas Kristiansen
2024-03-15 11:42:19 +01:00
parent b5c1c0391a
commit 2b4b869d6a
6 changed files with 64 additions and 24 deletions

View File

@@ -20,6 +20,20 @@ class Stationsetup_model extends CI_Model {
$this->db->where('logbook_id', xss_clean($this->input->post('id', true)));
$this->db->update('station_logbooks', $data);
}
function remove_public_slug($logbook_id) {
$this->db->set('public_slug', null);
$this->db->where('user_id', $this->session->userdata('user_id'));
$this->db->where('logbook_id', xss_clean($logbook_id));
$this->db->update('station_logbooks');
}
function saveVisitorLink() {
$this->db->set('public_slug', xss_clean($this->input->post('name', true)));
$this->db->where('user_id', $this->session->userdata('user_id'));
$this->db->where('logbook_id', xss_clean($this->input->post('id', true)));
$this->db->update('station_logbooks');
}
}
?>