Uname:
Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software:
Apache
PHP version:
7.4.33 [ PHP INFO ] PHP os:
Linux
Server Ip:
54.36.31.145
Your Ip:
216.73.216.182
User:
homesquasz (91404) | Group:
users (100)
Safe Mode:
OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl
<?php
/*
* Generated by CRUDigniter v3.2
* www.crudigniter.com
*/
class Objetautorisation extends FrontApplication{
function __construct()
{
parent::__construct();
$this->load->model('Objetautorisation_model');
}
/*
* Listing of objetautorisation
*/
function index()
{
$params['limit'] = RECORDS_PER_PAGE;
$params['offset'] = ($this->input->get('per_page')) ? $this->input->get('per_page') : 0;
$config = $this->config->item('pagination');
$config['base_url'] = site_url('objetautorisation/index?');
$config['total_rows'] = $this->Objetautorisation_model->get_all_objetautorisation_count();
$this->pagination->initialize($config);
$this->data['objetautorisation'] = $this->Objetautorisation_model->get_all_objetautorisation($params);
$this->data['_view'] = 'objetautorisation/index';
$this->load->view('layouts/main',$this->data);
}
/*
* Adding a new objetautorisation
*/
function add()
{
if(isset($_POST) && count($_POST) > 0)
{
$params = array(
'libelle' => $this->input->post('libelle'),
);
$objetautorisation_id = $this->Objetautorisation_model->add_objetautorisation($params);
redirect('objetautorisation/index');
}
else
{
$this->data['_view'] = 'objetautorisation/add';
$this->load->view('layouts/main',$this->data);
}
}
/*
* Editing a objetautorisation
*/
function edit($id)
{
// check if the objetautorisation exists before trying to edit it
$this->data['objetautorisation'] = $this->Objetautorisation_model->get_objetautorisation($id);
if(isset($this->data['objetautorisation']['id']))
{
if(isset($_POST) && count($_POST) > 0)
{
$params = array(
'libelle' => $this->input->post('libelle'),
);
$this->Objetautorisation_model->update_objetautorisation($id,$params);
redirect('objetautorisation/index');
}
else
{
$this->data['_view'] = 'objetautorisation/edit';
$this->load->view('layouts/main',$this->data);
}
}
else
show_error('The objetautorisation you are trying to edit does not exist.');
}
/*
* Deleting objetautorisation
*/
function remove($id)
{
$objetautorisation = $this->Objetautorisation_model->get_objetautorisation($id);
// check if the objetautorisation exists before trying to delete it
if(isset($objetautorisation['id']))
{
$this->Objetautorisation_model->delete_objetautorisation($id);
redirect('objetautorisation/index');
}
else
show_error('The objetautorisation you are trying to delete does not exist.');
}
}