-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathacpajax.php
More file actions
37 lines (27 loc) · 894 Bytes
/
acpajax.php
File metadata and controls
37 lines (27 loc) · 894 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
35
36
37
<?php
session_start();
define('CORE_ACP', true);
@require_once('config.php');
@require_once('libs/lib.php');
defined('CONFIG') or die;
if (isset($_SESSION['pass'], $_GET['id'], $_GET['token']) && ($_SESSION['pass'] == $config['pass']))
{
require('acp/rss.php');
$id = $_GET['id'];
if (isset($_GET['delete']) && check_token('delete', 600))
{
$query = $db_link->prepare('DELETE FROM releases WHERE id = ?;');
$query->execute([ $id ]);
}
else if (check_token('edit', 600))
{
if (isset($_GET['name'], $_GET['url'], $_GET['cracker']))
{
$name = $_GET['name'];
$url = $_GET['url'];
$cracker = $_GET['cracker'];
$query = $db_link->prepare('UPDATE releases SET name = ?, url = ?, cracker = ? WHERE id = ?;');
$query->execute([ $name, $url, $cracker ]);
}
}
}