51 lines
794 B
PHP
51 lines
794 B
PHP
|
|
<?php header('Content-type: application/json');
|
||
|
|
|
||
|
|
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/include/analytics/');
|
||
|
|
|
||
|
|
include(PATHTOINCLUDES."base.php");
|
||
|
|
|
||
|
|
date_default_timezone_set('UTC');
|
||
|
|
|
||
|
|
$em="";
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
$filters = array
|
||
|
|
|
||
|
|
(
|
||
|
|
|
||
|
|
"theadid" => array
|
||
|
|
|
||
|
|
(
|
||
|
|
|
||
|
|
"filter"=>FILTER_SANITIZE_NUMBER_INT
|
||
|
|
|
||
|
|
),
|
||
|
|
|
||
|
|
);
|
||
|
|
|
||
|
|
$result = filter_input_array(INPUT_GET, $filters);
|
||
|
|
|
||
|
|
if(isset($_GET["theadid"]))
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
$theadid=$_GET["theadid"];
|
||
|
|
|
||
|
|
$sql="UPDATE `community_user_ads` SET `community_user_ads`.`trash` = 1 WHERE `community_user_ads`.`adid` = ".$theadid;
|
||
|
|
|
||
|
|
$query=$database->database_query($sql) or $em=$em.$database->database_error();
|
||
|
|
|
||
|
|
$arr = array ('error' => $em);
|
||
|
|
|
||
|
|
echo json_encode($arr);
|
||
|
|
|
||
|
|
exit();
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
$arr = array ('error' => 'Get not set');
|
||
|
|
|
||
|
|
echo json_encode($arr);
|
||
|
|
|
||
|
|
?>
|