Esempio n. 1
0
    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) {
    echo " ";
} else {
    header("Location:http://localhost/gobs/");
    $_SESSION['msg'] = "You Are Not Authorized ";
}
if (isset($_GET['edit'])) {
    if (isset($_POST['update'])) {
        $edit = $_GET['edit'];
        extract($_POST);
        $update = $client->update_client_list($edit, $name, $details, $date, $time);
        if ($update) {
            header("Location:client.php");
            $_SESSION['msg'] = "Client Name Update Successful";
        } else {
            $msg = "Client Name Update Fail";
        }
    }
} elseif (isset($_GET['del'])) {
    $del = $_GET['del'];
    $delete = $client->delete_client_list($del);
    if ($delete) {
        $del_client_info_also = $client->del_client_info_also($del);
        header("Location:client.php");
        $_SESSION['msg'] = "Client Delete Successful";
    }