-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgreylisting_sender_delete.php
executable file
·38 lines (35 loc) · 1.15 KB
/
greylisting_sender_delete.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
require 'inc/functions.php';
require 'inc/common_header.php';
securePage();
require 'inc/bind.php';
if( isset( $_POST['yes'] ) ) {
$id = filter_var( $_GET['id'] , FILTER_SANITIZE_NUMBER_INT );
$domain = filter_var( $_GET['domain'] , FILTER_SANITIZE_STRING );
$delete = $apd->prepare( "DELETE FROM `greylisting_whitelists` WHERE `id` =:id LIMIT 1" );
$delete->execute( [ ':id' => $id ] );
header( "Location:domain_greylisting.php?domain=" . $domain );
}
?>
<html>
<head>
<?php
require 'inc/header.php';
?>
</head>
<body>
<?php require 'inc/topbar.php'; ?>
<div class="container">
<div class="row">
<div class="col">
<h1>Delete rule?</h1>
<form method="post">
<p>Are you sure you want to delete this policy?</p>
<a href="server.php" class="btn btn-danger">No</a>
<button type="submit" name="yes" class="btn btn-success">Yes</button>
</form>
</div>
</div>
</div>
</body>
</html>