| @@ 46-49 (lines=4) @@ | ||
| 43 | showMessage(lang('Specify the field name', 'cfcm'), false, 'r'); |
|
| 44 | exit; |
|
| 45 | } |
|
| 46 | if (!$this->input->post('label')) { |
|
| 47 | showMessage(lang('Specify <b>Label</b> field', 'cfcm'), false, 'r'); |
|
| 48 | exit; |
|
| 49 | } |
|
| 50 | if (!preg_match('/^[0-9a-z_]+$/i', $this->input->post('field_name'))) { |
|
| 51 | showMessage(lang('Field Name cant contain only Latin alphanumeric characters', 'cfcm'), false, 'r'); |
|
| 52 | exit; |
|
| @@ 132-135 (lines=4) @@ | ||
| 129 | $form->title = lang('Creating a group', 'cfcm'); |
|
| 130 | $form->type = 'group'; |
|
| 131 | if ($this->input->post()) { |
|
| 132 | if (!$this->input->post('name')) { |
|
| 133 | showMessage(lang('Specify the group name', 'cfcm'), false, 'r'); |
|
| 134 | exit; |
|
| 135 | } |
|
| 136 | ||
| 137 | if ($form->isValid()) { |
|
| 138 | $this->db->insert('content_field_groups', $form->getData()); |
|
| @@ 889-893 (lines=5) @@ | ||
| 886 | public function create_menu() { |
|
| 887 | ||
| 888 | //cp_check_perm('menu_create'); |
|
| 889 | if ($this->input->post('menu_name') == NULL) { |
|
| 890 | showMessage(lang('Name field sieve', 'menu'), '', 'r'); |
|
| 891 | ||
| 892 | exit; |
|
| 893 | } |
|
| 894 | $this->check_menu_data(); |
|
| 895 | ||
| 896 | $val = $this->form_validation; |
|
| @@ 974-977 (lines=4) @@ | ||
| 971 | ||
| 972 | public function check_menu_data() { |
|
| 973 | ||
| 974 | if ($this->input->post('menu_name') == NULL) { |
|
| 975 | showMessage(lang('The field is required to be filled in'), false, 'r'); |
|
| 976 | exit; |
|
| 977 | } |
|
| 978 | ||
| 979 | if ($this->db->get_where('menus', ['name' => $this->input->post('menu_name')])->num_rows() > 0) { |
|
| 980 | showMessage(lang('The menu with the same name has been created yet'), false, 'r'); |
|