| 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/muj/modules/ttjs/code/ |
Upload File : |
<?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 PDSOExtendedDatatable
*
* @author Maroš
*/
namespace modules\ttjs\code;
use modules\ttjs\code\TtjsConfig as Config;
class PDSOOffersExtendedDatatable extends \modules\extendedDatatable\code\ExtendedDatatable {
private $currency;
public function __construct() {
parent::__construct("/modules/ttjs/", "pdso_offers_datatable");
$cnf = new Config();
$this->currency = $cnf->getConfig(Config::CURRENCY);
}
public function processRow($array, $key, $params = array()) {
if (intval(date("Ym", strtotime($array["created"]))) < intval(date('Ym', strtotime('last day of -1 month')))) {
$actions = array(
"<span data-toggle='tooltip' title='" . $this->t->_get("Zmazať") . "' class='btn readOnlyHidden btn-danger btn-xs disabled'><i class='fa fa-trash'></i></span>",
"<span data-toggle='tooltip' title='" . $this->t->_get("Zobraziť") . "' style='margin-left: 5px' class='btn btn-primary btn-xs' onclick='manageItem(" . $array["id"] . ", true)'><i class='fa fa-eye'></i></span>",
);
} else {
$actions = array(
"<span data-toggle='tooltip' title='" . $this->t->_get("Zmazať") . "' class='btn readOnlyHidden btn-danger btn-xs' onclick='deleteItem(" . $array["id"] . ")'><i class='fa fa-trash'></i></span>",
"<span data-toggle='tooltip' title='" . $this->t->_get("Zobraziť") . "' style='margin-left: 5px' class='btn btn-primary btn-xs' onclick='manageItem(" . $array["id"] . ")'><i class='fa fa-eye'></i></span>",
);
}
$array["approx_commission"] = number_format(floatval($array["approx_commission"]), 2, ",", " ") . " " . $this->currency;
$rating = array();
for ($i = 0; $i < $array["rating"]; $i++) {
$rating[] = "<i class='fa fa-star'></i>";
}
$array["rating"] = implode(" ", $rating);
$this->data[$key] = array(implode("", $actions)) + $array;
}
public function getFixedSqlCondition() {
return "pdso_offers.users_id=:pdso_offers_users_id";
}
public function getFixedBindArray() {
return array(
"pdso_offers_users_id" => $this->getPost("pdso_offers.users_id")
);
}
}