20 lines
785 B
PHP
20 lines
785 B
PHP
|
|
<?php header('Content-type: application/json');
|
||
|
|
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/include/analytics/');
|
||
|
|
include(PATHTOINCLUDES."base.php");
|
||
|
|
include(PATHTOINCLUDES."word_filter.php");
|
||
|
|
$args = array(
|
||
|
|
'thecid' => FILTER_VALIDATE_INT,
|
||
|
|
'thecment' =>FILTER_SANITIZE_STRING
|
||
|
|
);
|
||
|
|
$sanitizeinputs = filter_input_array(INPUT_POST, $args);
|
||
|
|
$thepost=$_POST["thecment"];
|
||
|
|
$thepost=strip_tags($thepost,"<strong><em><br>");
|
||
|
|
$thepost=filter_words($thepost);
|
||
|
|
$hc_cid=$_POST["thecid"];
|
||
|
|
$em="";
|
||
|
|
|
||
|
|
$sql="UPDATE `hc_comment` SET `hc_comment`.`hc_comment` = '".$thepost."' WHERE `hc_comment`.`hc_cid` = ".$hc_cid;
|
||
|
|
$query=$database->database_query($sql) or $em=$em.$database->database_error();
|
||
|
|
$arr = array ('error'=>$em);
|
||
|
|
echo json_encode($arr);
|
||
|
|
?>
|