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 Pointagebrut extends CI_Controller{
function __construct()
{
parent::__construct();
$this->load->model('Pointagebrut_model');
}
/*
* Listing of pointagebrut
*/
function index()
{
$data['pointagebrut'] = $this->Pointagebrut_model->get_all_pointagebrut();
$data['_view'] = 'pointagebrut/index';
$this->load->view('layouts/main',$data);
}
/*
* Adding a new pointagebrut
*/
function add()
{
if(isset($_POST) && count($_POST) > 0)
{
$params = array(
'date' => $this->input->post('date'),
'temp' => $this->input->post('temp'),
'users_id' => $this->input->post('users_id'),
);
$pointagebrut_id = $this->Pointagebrut_model->add_pointagebrut($params);
redirect('pointagebrut/index');
}
else
{
$data['_view'] = 'pointagebrut/add';
$this->load->view('layouts/main',$data);
}
}
/*
* Editing a pointagebrut
*/
function edit($id)
{
// check if the pointagebrut exists before trying to edit it
$data['pointagebrut'] = $this->Pointagebrut_model->get_pointagebrut($id);
if(isset($data['pointagebrut']['id']))
{
if(isset($_POST) && count($_POST) > 0)
{
$params = array(
'date' => $this->input->post('date'),
'temp' => $this->input->post('temp'),
'users_id' => $this->input->post('users_id'),
);
$this->Pointagebrut_model->update_pointagebrut($id,$params);
redirect('pointagebrut/index');
}
else
{
$data['_view'] = 'pointagebrut/edit';
$this->load->view('layouts/main',$data);
}
}
else
show_error('The pointagebrut you are trying to edit does not exist.');
}
/*
* Deleting pointagebrut
*/
function remove($id)
{
$pointagebrut = $this->Pointagebrut_model->get_pointagebrut($id);
// check if the pointagebrut exists before trying to delete it
if(isset($pointagebrut['id']))
{
$this->Pointagebrut_model->delete_pointagebrut($id);
redirect('pointagebrut/index');
}
else
show_error('The pointagebrut you are trying to delete does not exist.');
}
}