| @@ 536-554 (lines=19) @@ | ||
| 533 | $mid = $this->input->post('mid'); |
|
| 534 | $row = $this->db->where('id', $mid)->get('components')->row(); |
|
| 535 | ||
| 536 | if (count($row) > 0) { |
|
| 537 | $enabled = $row->enabled; |
|
| 538 | if ($enabled) { |
|
| 539 | $enabled = 0; |
|
| 540 | $status = lang('Disable', 'admin'); |
|
| 541 | } else { |
|
| 542 | $enabled = 1; |
|
| 543 | $status = lang('Enable', 'admin'); |
|
| 544 | } |
|
| 545 | ||
| 546 | $this->db->where('id', $mid)->set('enabled', $enabled)->update('components'); |
|
| 547 | ||
| 548 | $row->enabled = $enabled; |
|
| 549 | $nameModule = $this->get_module_info($row->identif)['menu_name']; |
|
| 550 | ||
| 551 | $message = lang('Change URL access. Module : ', 'admin') . ' ' |
|
| 552 | . $nameModule . '. ' . lang('Status', 'admin') . ' : ' . $status . '.'; |
|
| 553 | $this->lib_admin->log($message); |
|
| 554 | } |
|
| 555 | } |
|
| 556 | } |
|
| 557 | ||
| @@ 561-577 (lines=17) @@ | ||
| 558 | public function change_show_in_menu() { |
|
| 559 | $id = $this->input->post('id'); |
|
| 560 | $row = $this->db->where('id', (int) $id)->get('components')->row(); |
|
| 561 | if (count($row) > 0) { |
|
| 562 | $in_menu = $row->in_menu; |
|
| 563 | if ($in_menu == 1) { |
|
| 564 | $in_menu = 0; |
|
| 565 | $status = lang('Disable', 'admin'); |
|
| 566 | } else { |
|
| 567 | $in_menu = 1; |
|
| 568 | $status = lang('Enable', 'admin'); |
|
| 569 | } |
|
| 570 | $this->db->where('id', (int) $id)->set('in_menu', $in_menu)->update('components'); |
|
| 571 | ||
| 572 | $nameModule = $this->get_module_info($row->identif)['menu_name']; |
|
| 573 | ||
| 574 | $message = lang('Change Show in menu. Module : ', 'admin') . ' ' |
|
| 575 | . $nameModule . '. ' . lang('Status', 'admin') . ' : ' . $status . '.'; |
|
| 576 | $this->lib_admin->log($message); |
|
| 577 | } |
|
| 578 | } |
|
| 579 | ||
| 580 | public function save_components_positions() { |
|