header("Location:http://localhost/gobs/"); $_SESSION['msg'] = "You Are Not Authorized "; } elseif ($stat == 0 || $stat == "") { header("Location:http://localhost/gobs/"); $_SESSION['msg'] = "You Are Inactive Admin"; } elseif ($admin == 1 || $admin == 2) { echo " "; } else { header("Location:http://localhost/gobs/"); $_SESSION['msg'] = "You Are Not Authorized "; } $memo = new memo(); if (isset($_GET['del'])) { $del = $_GET['del']; $mmid = $_GET['mmid']; $delete = $memo->delete_memo($del); if ($delete) { $delete_cost_also = $memo->delete_cost_also($del); $delete_customer_also = $memo->delete_customer_also($del); if ($delete_customer_also) { $delete_sub_memo_also = $memo->delete_sub_memo_also($mmid); header("Location:memo.php"); $_SESSION['msg'] = "Memo Delete Successfull"; } } else { $msg = "Memo Delete Fail"; } } if (isset($_POST['submit'])) { extract($_POST); $create = $memo->memo($date, $time);