>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
include_once('head.php');
// Only accept reports from logged in users
if(!isset($_SESSION['id'])){header('Location: '.BASEURL.'/login?returnto='.urlencode($_SERVER['REQUEST_URI']));}
include_once('nonce.php');
include_once('rpc.php');
$target=$path[2];
for($i=3; $i$_SESSION['name'],
'reason'=>$reason,
'target'=>$target);
$res=rpc_post($item[1], 'report', $obj);
if(isset($res['status']) && strtoupper($res['status'])=='OK')
{
print(''._('Report received').'
');
include_once('foot.php');
exit();
}
}
// Get the name of the target
$obj=rpc_get($item[1], 'thing/'.explode('@',$path[3])[0]);
$targetname=htmlentities($target.'@'.$item[1].' ('.($path[2]=='thing'?'':'on ').$obj['name'].')');
?>