Gazelle/sections/reports/ajax_add_notes.php

29 lines
404 B
PHP
Raw Permalink Normal View History

2012-12-10 08:00:21 +00:00
<?php
2013-07-01 08:01:00 +00:00
if (!check_perms('site_moderate_forums') || empty($_POST['id'])) {
2012-12-10 08:00:21 +00:00
print
json_encode(
array(
'status' => 'failure'
)
);
die();
}
2013-10-30 08:01:19 +00:00
$ID = (int)$_POST['id'];
2012-12-10 08:00:21 +00:00
2013-07-01 08:01:00 +00:00
$Notes = str_replace("<br />", "\n", $_POST['notes']);
2012-12-10 08:00:21 +00:00
$Notes = db_string($Notes);
2013-10-30 08:01:19 +00:00
$DB->query("
UPDATE reports
SET Notes = '$Notes'
WHERE ID = '$ID'");
2012-12-10 08:00:21 +00:00
print
json_encode(
array(
'status' => 'success'
)
);
2012-12-12 08:00:17 +00:00
die();