public function Update($id) { if ($_POST['manager_password'] == '') { unset($_POST['manager_password']); } else { $_POST['manager_password'] = Password($_POST['manager_password']); } if (isset($_POST['allow'])) { $_POST['manager_permission'] = implode(',', $_POST['allow']); unset($_POST['allow']); } if ($this->model->Edit($id, $_POST)) { Redirect(UR_MP . 'Manager/Edit/' . $id); } else { TNotification::Add(_lg("You can't edit this manager this protected"), NF_WARNING); Redirect(UR_MP . 'Manager/Edit/' . $id); } }
/** * add notifcation * @param mixed $array_check array of argumans */ public function _notifiControl() { return FALSE; if (isset($array_check[0])) { if ($array_check[0] == 'delete') { TNotification::Add(self::$_main_title . _lg(" has been delete"), 'success'); } elseif ($array_check[0] == 'do') { TNotification::Add(_lg("Bulk action do successfully"), 'success'); } } if (isset($array_check[1])) { if ($array_check[1] == 'create') { TNotification::Add(self::$_main_title . _lg(" has been create"), 'success'); } elseif ($array_check[1] == 'edit') { TNotification::Add(self::$_main_title . _lg(" has been update"), 'success'); } } }