One Hat Cyber Team
Your IP :
172.69.130.198
Server IP :
188.114.97.3
Server :
Linux thuru 6.5.11-4-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-4 (2023-11-20T10:19Z) x86_64
Server Software :
Apache/2.4.51 (Unix) OpenSSL/1.0.2k-fips
PHP Version :
7.3.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
thuruk
/
public_html
/
App
/
New
/
View File Name :
getNewsFeed.php
<?php include("connections.php"); //database connection $json; $endvalue =isset($_REQUEST['endvalue'])?$_REQUEST['endvalue']:""; $startvalue = isset($_REQUEST['startvalue'])?$_REQUEST['startvalue']:""; $session_id =$_REQUEST['session_id'];//isset($_REQUEST['session_id'])?$_REQUEST['session_id']:""; $type = $_REQUEST['type'];//isset($_REQUEST['type'])?$_REQUEST['type']:""; // $session =$_GET['session_id']; // $type = $_GET['type']; /* $endvalue = mysqli_real_escape_string($connect,$_POST['endvalue']); $startvalue = mysqli_real_escape_string($connect,$_POST['startvalue']); $session = mysqli_real_escape_string($connect,$_POST['session_id']); $type = mysqli_real_escape_string($connect,$_POST['type']);*/ $query=""; if($session_id !="5f0e6bfbafe255ds003434349") { $json['status'] = 400; $json['msg'] = 'Session Expired'; } else { $rsData = array(); if($type =="personal"){ $user_id = isset($_POST['user_id'])?$_POST['user_id']:""; $query="SELECT * FROM `users` inner join `newuser_plants` WHERE users.user_id=newuser_plants.user_id AND users.user_id ='$user_id' ORDER BY newuser_plants.created_date DESC"; }else if($type =="test"){ $newstart = $startvalue -1; $query="SELECT * FROM `users` inner join `newuser_plants` WHERE users.user_id=newuser_plants.user_id ORDER BY newuser_plants.created_date DESC LIMIT $newstart,$endvalue"; } else{ $query="SELECT * FROM `users` inner join `newuser_plants` WHERE users.user_id=newuser_plants.user_id AND newuser_plants.status='activate' ORDER BY newuser_plants.created_date DESC "; } $count_query="SELECT * FROM `users` inner join `newuser_plants` WHERE users.user_id=newuser_plants.user_id ORDER BY newuser_plants.created_date DESC"; $count_rs = mysqli_query($connect,$count_query) or die(mysqli_error($connect)); $row_count = mysqli_num_rows($count_rs); $rs = mysqli_query($connect,$query) or die(mysqli_error($connect)); $word_array=array(); if($rs){ while ($row = mysqli_fetch_assoc($rs)) { $word_array[] = $row; } /* foreach($rs as $k => $v){ /*$rsData[$k]['plant_name'] = $v['plant_name']; $rsData[$k]['user_plant_id'] = $v['user_plant_id']; $rsData[$k]['user_id'] = $v['user_id']; $rsData[$k]['plant_description'] = $v['plant_description']; $rsData[$k]['created_date'] = $v['created_date']; $rsData[$k]['plant_image'] = $v['plant_image']; $rsData[$k]['location'] = $v['location']; $rsData[$k]['height'] = $v['height'];javascript:void(0) $rsData[$k]['created_time'] = $v['created_time']; $rsData[$k]['lat'] = $v['lat']; $rsData[$k]['lng'] = $v['lng']; $rsData[$k]['status'] = $v['status']; $rsData[$k]['user_id'] = $v['user_id']; $rsData[$k]['name'] = $v['name']; $rsData[$k]['plant_name'] = $v['plant_name']; $rsData[$k]['plant_description'] = str_replace( array("#", "'", ";","?"), '', $v['plant_description']); $rsData[$k]['created_date'] = $v['created_date']; //$rsData[$k]['plant_image'] = $v['plant_image']; //$rsData[$k]['location'] = $v['location']; //$rsData[$k]['user_plant_id'] = $v['user_plant_id']; // $rsData[$k]['status'] = $v['status']; // $rsData[$k]['profile'] = $v['profile']; }*/ } $json['count'] =$row_count; //$row_count; $json['status'] = 200; $json['msg'] = 'Success'; $json['data'] = $word_array; } // header("Content-Type: application/json"); echo json_encode($json); ?>