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 Pointagefinal extends CI_Controller{
function __construct()
{
parent::__construct();
$this->load->model('Pointagefinal_model');
}
/*
* Listing of pointagefinal
*/
function index()
{
$data['pointagefinal'] = $this->Pointagefinal_model->get_all_pointagefinal();
$data['_view'] = 'pointagefinal/index';
$this->load->view('layouts/main',$data);
}
/*
* Adding a new pointagefinal
*/
function add()
{
if(isset($_POST) && count($_POST) > 0)
{
$params = array(
'date' => $this->input->post('date'),
'tempdebutp1' => $this->input->post('tempdebutp1'),
'tempfinp1' => $this->input->post('tempfinp1'),
'tempdebutp2' => $this->input->post('tempdebutp2'),
'tempfinp2' => $this->input->post('tempfinp2'),
'users_id' => $this->input->post('users_id'),
);
$pointagefinal_id = $this->Pointagefinal_model->add_pointagefinal($params);
redirect('pointagefinal/index');
}
else
{
$data['_view'] = 'pointagefinal/add';
$this->load->view('layouts/main',$data);
}
}
/*
* Editing a pointagefinal
*/
function edit($id)
{
// check if the pointagefinal exists before trying to edit it
$data['pointagefinal'] = $this->Pointagefinal_model->get_pointagefinal($id);
if(isset($data['pointagefinal']['id']))
{
if(isset($_POST) && count($_POST) > 0)
{
$params = array(
'date' => $this->input->post('date'),
'tempdebutp1' => $this->input->post('tempdebutp1'),
'tempfinp1' => $this->input->post('tempfinp1'),
'tempdebutp2' => $this->input->post('tempdebutp2'),
'tempfinp2' => $this->input->post('tempfinp2'),
'users_id' => $this->input->post('users_id'),
);
$this->Pointagefinal_model->update_pointagefinal($id,$params);
redirect('pointagefinal/index');
}
else
{
$data['_view'] = 'pointagefinal/edit';
$this->load->view('layouts/main',$data);
}
}
else
show_error('The pointagefinal you are trying to edit does not exist.');
}
/*
* Deleting pointagefinal
*/
function remove($id)
{
$pointagefinal = $this->Pointagefinal_model->get_pointagefinal($id);
// check if the pointagefinal exists before trying to delete it
if(isset($pointagefinal['id']))
{
$this->Pointagefinal_model->delete_pointagefinal($id);
redirect('pointagefinal/index');
}
else
show_error('The pointagefinal you are trying to delete does not exist.');
}
}