public function delete($users) { if (isAjax()) { $users_ids = explode(',', $users); foreach ($users_ids as $user_id) { $this->users_model->delete_user($user_id); } $url = ADMIN . "users/delete/"; $array2 = class_encrypt::keycalc('58hdlDMwol1hhWqAdtap'); $array = class_encrypt::stringtoarray('4kbTOdrqyysumEu7q0nBTkmjuzfkey'); $data['post_key'] = class_encrypt::transformstring($array, $array2); $data['users_ids'] = $users_ids; send_post_data($url, $data); echo 1; } else { echo 0; } }
public function add_category() { if (isset($this->session->userdata['user'])) { $data['name_fr'] = ucfirst(strtolower($_POST['name_fr'])); $data['name_en'] = ucfirst(strtolower($_POST['name_en'])); $data['image_file'] = $_POST['image_file']; $data['active'] = $_POST['active']; $res = $this->category_model->insert($data); $url = ADMIN2 . "products/add/"; $array2 = class_encrypt::keycalc('58hdlDMwol1hhWqAdtap'); $array = class_encrypt::stringtoarray('4kbTOdrqyysumEu7q0nBTkmjuzfkey'); $data['post_key'] = class_encrypt::transformstring($array, $array2); send_post_data($url, $data); redirect('productsmanager/confirm_insert'); } else { redirect('productsmanager/index'); } }