-
Notifications
You must be signed in to change notification settings - Fork 0
/
category.php
37 lines (36 loc) · 945 Bytes
/
category.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
class Category extends CI_Controller
{
public function Index()
{
if($this->input->post('submit'))
{
$this->load->model('admin/category_model');
$this->category_model->insert();
}
$this->load->view('admin/addcatogory');
}
public function view()
{
$this->load->model('admin/category_model');
$arr['data']=$this->category_model->view();
$this->load->view('admin/categoryview',$arr);
}
public function delete($id)
{
$this->load->model('admin/category_model');
$this->category_model->delete($id);
}
public function select($id)
{
if($this->input->post())
{
$this->load->model('admin/category_model');
$this->category_model->update($id);
}
$this->load->model('admin/category_model');
$arr['data']=$this->category_model->select($id);
$this->load->view('admin/addcatogory',$arr);
}
}
?>