Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- class ModelExtensionAdminProductFilter extends Model
- {
- private $host;
- public function getProductImage($product_id, $license_key)
- {
- if ($this->checkLicense($license_key)) {
- $query = $this->db->query('SELECT image FROM ' . DB_PREFIX . 'product WHERE product_id = \'' . (int) $product_id . '\'');
- return $query->row['image'];
- }
- else {
- return false;
- }
- }
- public function editProductImage($product_id, $product_image, $license_key)
- {
- if ($this->checkLicense($license_key)) {
- $this->db->query('UPDATE ' . DB_PREFIX . 'product SET image = \'' . $this->db->escape($product_image) . '\' WHERE product_id = \'' . (int) $product_id . '\'');
- }
- }
- public function editProductImages($product_id, $product_images, $license_key)
- {
- if ($this->checkLicense($license_key)) {
- $this->db->query('DELETE FROM ' . DB_PREFIX . 'product_image WHERE product_id = \'' . (int) $product_id . '\'');
- if (isset($product_images)) {
- foreach ($product_images as $product_image) {
- $this->db->query('INSERT INTO ' . DB_PREFIX . 'product_image SET product_id = \'' . (int) $product_id . '\', image = \'' . $this->db->escape($product_image['image']) . '\', sort_order = \'' . (int) $product_image['sort_order'] . '\'');
- }
- }
- }
- }
- public function getProductNames($product_id, $license_key)
- {
- if ($this->checkLicense($license_key)) {
- $query = $this->db->query('SELECT language_id, `name` FROM ' . DB_PREFIX . 'product_description WHERE product_id = \'' . (int) $product_id . '\'');
- return $query->rows;
- }
- else {
- return [];
- }
- }
- public function editProductNames($product_id, $language_id, $name, $license_key)
- {
- if ($this->checkLicense($license_key)) {
- $this->db->query('UPDATE ' . DB_PREFIX . 'product_description SET name = \'' . $this->db->escape($name) . '\' WHERE language_id = \'' . (int) $language_id . '\' AND product_id = \'' . (int) $product_id . '\'');
- }
- }
- public function getProductModel($product_id)
- {
- $query = $this->db->query('SELECT model FROM ' . DB_PREFIX . 'product WHERE product_id = \'' . (int) $product_id . '\'');
- return $query->row['model'];
- }
- public function editProductModel($product_id, $model)
- {
- $this->db->query('UPDATE ' . DB_PREFIX . 'product SET model = \'' . $this->db->escape($model) . '\' WHERE product_id = \'' . (int) $product_id . '\'');
- }
- public function getProductSku($product_id)
- {
- $query = $this->db->query('SELECT sku FROM ' . DB_PREFIX . 'product WHERE product_id = \'' . (int) $product_id . '\'');
- return $query->row['sku'];
- }
- public function editProductSku($product_id, $sku)
- {
- $this->db->query('UPDATE ' . DB_PREFIX . 'product SET sku = \'' . $this->db->escape($sku) . '\' WHERE product_id = \'' . (int) $product_id . '\'');
- }
- public function getProductManufacturerID($product_id, $license_key)
- {
- if ($this->checkLicense($license_key)) {
- $query = $this->db->query('SELECT manufacturer_id FROM ' . DB_PREFIX . 'product WHERE product_id = \'' . (int) $product_id . '\'');
- return $query->row['manufacturer_id'];
- }
- else {
- return false;
- }
- }
- public function editProductManufacturerID($product_id, $manufacturer_id, $license_key)
- {
- if ($this->checkLicense($license_key)) {
- ....................................................................................
- ...................................................
- ........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement