-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathvalide.php
More file actions
34 lines (27 loc) · 924 Bytes
/
Copy pathvalide.php
File metadata and controls
34 lines (27 loc) · 924 Bytes
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
<?php
require_once 'config.php';
require_once 'fct/fct_mysql.php';
$username = null;
if (isset($_SESSION['username'])) {
// Add a shaarli URL.
if($_POST['id']) {
$mysqli = shaarliMyConnect();
if(isset($_POST['do']) && $_POST['do'] == 'bloquer') {
bloquerRss($mysqli, $_POST['id']);
}elseif(isset($_POST['do']) && $_POST['do'] == 'valider') {
validerRss($mysqli, $_POST['id']);
}elseif(isset($_POST['do']) && $_POST['do'] == 'bloquerLien') {
bloquerLien($mysqli, $_POST['id']);
}elseif(isset($_POST['do']) && $_POST['do'] == 'validerLien') {
validerLien($mysqli, $_POST['id']);
}
shaarliMyDisconnect($mysqli);
header('HTTP/1.1 200 OK', true, 200);
return;
}
}else{
header('HTTP/1.1 401 Unauthorized', true, 401);
return;
}
header('HTTP/1.1 401 Bad Request', true, 400);
return;