403Webshell
Server IP : 64.202.187.69  /  Your IP : 216.73.217.74
Web Server : Apache
System : Linux 69.187.202.64.host.secureserver.net 3.10.0-1160.144.1.el7.tuxcare.els6.x86_64 #1 SMP Fri May 29 16:22:24 UTC 2026 x86_64
User : transmarket ( 1001)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/transmarket/translator/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/transmarket/translator/controllers/get_topup_history.php
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

include 'connection.php';
ini_set('memory_limit', '-1');

error_reporting(E_ALL);
ini_set('display_errors', 1);

$requestData = $_REQUEST;

$columns = array(
    0 => 'operator_name',
	1 => 'package_name',
	2 => 'tmn',
    3 => 'created_at',
    4 => 'status',	
);


$sql = 'SELECT t.*, p.offer as package_name, p.tmn, o.name as operator_name FROM `translator_claimed_topups` t LEFT JOIN tbl_packages p ON t.package_id = p.id LEFT JOIN tbl_operators o ON p.operator_id = o.id WHERE t.user_id = '.$_SESSION['tm_id'];

if (!empty($requestData['search']['value'])) {   // if there is a search parameter, $requestData['search']['value'] contains search parameter
    $sql.=" and (t.claimed_credits LIKE '" . $requestData['search']['value'] . "%') ";
}

$result = $mysqli->query($sql);

$totalData = $result->num_rows;
$totalFiltered = $totalData;

$sql.= " ORDER BY " . $columns[$requestData['order'][0]['column']] . " " . $requestData['order'][0]['dir'] . " LIMIT " . $requestData['start'] . " ," . $requestData['length'] . "   ";
$result = $mysqli->query($sql);
$data = array();

while ($row = $result->fetch_object()) {
    $nestedData = array();
	$nestedData[] = mb_convert_encoding(stripslashes($row->operator_name), "HTML-ENTITIES", "UTF-8");
	$nestedData[] = mb_convert_encoding(stripslashes($row->package_name), "HTML-ENTITIES", "UTF-8");
    $nestedData[] = $row->tmn;
    $nestedData[] = date('d M, Y h:i a', strtotime($row->created_at));

    if ($row->status == 0) {
        $nestedData[] = '<span style="background:orange; padding: 3px 12px; color: white;">Pending</span> ';
    } else if ($row->status == 1) {
        $nestedData[] = '<span style="background:green; padding: 3px 12px; color: white;">Paid</span> ';
    } else {
        $nestedData[] = '<span style="background:red; padding: 3px 12px; color: white;">Rejected</span> ';
    }

    $data[] = $nestedData;
}

$json_data = array(
    "draw" => intval($requestData['draw']), // for every request/draw by clientside , they send a number as a parameter, when they recieve a response/data they first check the draw number, so we are sending same number in draw. 
    "recordsTotal" => intval($totalData), // total number of records
    "recordsFiltered" => intval($totalFiltered), // total number of records after searching, if there is no searching then totalFiltered = totalData
    "data" => $data, // total data array
    "data1" => $requestData['start'], // total data array
    "data2" => $requestData['length'], // total data array
);

echo json_encode($json_data);  // send data as json format

Youez - 2016 - github.com/yon3zu
LinuXploit