uawdijnntqw1x1x1
IP : 18.225.98.177
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,parse_ini_file,show_source,eval,open_base,symlink
OS : Linux
PATH:
/
home
/
sudancam
/
public_html
/
0d544
/
..
/
..
/
.trash
/
.
/
catalog.2
/
model
/
.
/
tool
/
..
/
account
/
download.php
/
/
<?php class ModelAccountDownload extends Model { public function getDownload($download_id) { $implode = array(); $order_statuses = $this->config->get('config_complete_status'); foreach ($order_statuses as $order_status_id) { $implode[] = "o.order_status_id = '" . (int)$order_status_id . "'"; } if ($implode) { $query = $this->db->query("SELECT d.filename, d.mask FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_product op ON (o.order_id = op.order_id) LEFT JOIN " . DB_PREFIX . "product_to_download p2d ON (op.product_id = p2d.product_id) LEFT JOIN " . DB_PREFIX . "download d ON (p2d.download_id = d.download_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND (" . implode(" OR ", $implode) . ") AND d.download_id = '" . (int)$download_id . "'"); return $query->row; } else { return; } } public function getDownloads($start = 0, $limit = 20) { if ($start < 0) { $start = 0; } if ($limit < 1) { $limit = 20; } $implode = array(); $order_statuses = $this->config->get('config_complete_status'); foreach ($order_statuses as $order_status_id) { $implode[] = "o.order_status_id = '" . (int)$order_status_id . "'"; } if ($implode) { $query = $this->db->query("SELECT DISTINCT op.order_product_id, d.download_id, o.order_id, o.date_added, dd.name, d.filename FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_product op ON (o.order_id = op.order_id) LEFT JOIN " . DB_PREFIX . "product_to_download p2d ON (op.product_id = p2d.product_id) LEFT JOIN " . DB_PREFIX . "download d ON (p2d.download_id = d.download_id) LEFT JOIN " . DB_PREFIX . "download_description dd ON (d.download_id = dd.download_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND dd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND (" . implode(" OR ", $implode) . ") ORDER BY o.date_added DESC LIMIT " . (int)$start . "," . (int)$limit); return $query->rows; } else { return array(); } } public function getTotalDownloads() { $implode = array(); $order_statuses = $this->config->get('config_complete_status'); foreach ($order_statuses as $order_status_id) { $implode[] = "o.order_status_id = '" . (int)$order_status_id . "'"; } if ($implode) { $query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_product op ON (o.order_id = op.order_id) LEFT JOIN " . DB_PREFIX . "product_to_download p2d ON (op.product_id = p2d.product_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND (" . implode(" OR ", $implode) . ")"); return $query->row['total']; } else { return 0; } } }
/home/sudancam/public_html/0d544/../../.trash/./catalog.2/model/./tool/../account/download.php