35 lines
703 B
PHP
35 lines
703 B
PHP
<?php header('Content-type: application/json');
|
|
|
|
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/include/analytics/');
|
|
|
|
include(PATHTOINCLUDES."base.php");
|
|
|
|
$args = array(
|
|
|
|
'thepid' => FILTER_VALIDATE_INT,
|
|
|
|
'thestatus' => FILTER_SANITIZE_STRING
|
|
|
|
);
|
|
|
|
$sanitizeinputs = filter_input_array(INPUT_POST, $args);
|
|
|
|
$hc_pid=$_POST["thepid"];
|
|
|
|
$hc_status=$_POST["thestatus"];
|
|
|
|
$em="";
|
|
|
|
|
|
|
|
$sql="UPDATE `halloween_contest` SET `halloween_contest`.`hcapproved` = '".$hc_status."' WHERE `halloween_contest`.`hcidu` = ".$hc_pid;
|
|
|
|
$query=$database->database_query($sql) or $em .= $database->database_error();
|
|
|
|
|
|
|
|
$arr = array ('error'=>$em);
|
|
|
|
echo json_encode($arr);
|
|
|
|
?>
|