示例#1
0
        $usertype = $business->get_user_type($username);
        if ($usertype == 'admin') {
        } else {
            echo '<script>console.log("not authorized");</script>';
            header('Location: ./../states/root.login/login.php');
            exit;
        }
    } else {
        echo '<script>console.log("wrong token");</script>';
        header('Location: ./../states/root.login/login.php');
        exit;
    }
} else {
    echo '<script>console.log("no token found");</script>';
    header('Location: ./../states/root.login/login.php');
    exit;
}
if (isset($_GET['ids'])) {
    echo '<script>console.log("lol");</script>';
    $ids = unserialize($_GET['ids']);
    foreach ($ids as $id) {
        $business->delete_student($id);
        $business->delete_user($id);
    }
}
if (isset($_GET['id'])) {
    $business->delete_student($_GET['id']);
    $business->delete_user($_GET['id']);
}
//header('Location: ./list.php');
//exit();