File: /var/www/html/wp-content/themes/ormedia/keylabData/ie_statement/r_ie_statement.php
<?php
if(isset($_REQUEST['checking_api_file'])){
exit();
}
$property_id = $_REQUEST['property_id'];
$sql_statment = "select * from keylab_property_ie_statement";
$where = " where ";
if (!empty($property_id)){
$where = $where."property_id = ".$property_id." and ";
}
$where = substr($where, 0, -5);
if(strlen($where) > 5){
$sql_statment = $sql_statment.$where;
}
$sql_statment = $sql_statment.' ORDER BY ie_statement_id DESC';
$result = $wpdb->get_results($sql_statment);
$rv->list = $result;
foreach ($rv->list as $item){
$item->ie_statement_file = unserialize($item->ie_statement_file);
}
exit(json_encode($rv));
?>