Esempio n. 1
0
 public function delete($id)
 {
     if ($id) {
         $rs = new Staff($id);
         $rs->delete();
         set_notify('success', lang('delete_data_complete'));
     }
     redirect('staffs/admin/staffs');
 }
 public function delete($f3, $params)
 {
     $obj = new Staff($this->db);
     echo json_encode($obj->delete($params["ColorID"]));
 }
Esempio n. 3
0
}
if (isset($_POST['update'])) {
    $updatedOption = new Staff($db);
    $updatedOption->Id = $_POST['id'];
    $updatedOption->FirstName = $_POST['firstname'];
    $updatedOption->LastName = $_POST['lastname'];
    if ($updatedOption->update() == true) {
        header("location:staff.php");
    } else {
        echo "<script>alert('There was an error updating this item');window.location = 'staff.php' </script>";
    }
}
if (isset($_POST['delete'])) {
    $updatedOption = new Staff($db);
    $updatedOption->Id = $_POST['id'];
    if ($updatedOption->delete() == true) {
        header("location:staff.php");
    } else {
        echo "<script>alert('There was an error deleting this item');window.location = 'staff.php' </script>";
    }
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>