@@ 42-48 (lines=7) @@ | ||
39 | return FALSE; |
|
40 | } |
|
41 | ||
42 | if ($this->db->table_exists('mod_banner_groups')) { |
|
43 | $this->db->set('name', $name)->insert('mod_banner_groups'); |
|
44 | } else { |
|
45 | $this->banner_model->createGroupsTable(); |
|
46 | ||
47 | $this->db->set('name', $name)->insert('mod_banner_groups'); |
|
48 | } |
|
49 | if (!$this->db->_error_message()) { |
|
50 | echo $this->db->insert_id(); |
|
51 | } else { |
|
@@ 58-64 (lines=7) @@ | ||
55 | ||
56 | public function delGroup() { |
|
57 | $name = $this->input->post('name'); |
|
58 | if ($this->db->table_exists('mod_banner_groups')) { |
|
59 | $this->db->where('name', $name[0])->delete('mod_banner_groups'); |
|
60 | } else { |
|
61 | $this->banner_model->createGroupsTable(); |
|
62 | ||
63 | $this->db->where('name', $name[0])->delete('mod_banner_groups'); |
|
64 | } |
|
65 | if (!$this->db->_error_message()) { |
|
66 | echo 1; |
|
67 | } else { |