Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html /
asiafoodco.com /
shop /
classes /
Delete
Unzip
Name
Size
Permission
Date
Action
cache
[ DIR ]
drwxr-x---
2025-11-08 11:17
controller
[ DIR ]
drwxr-x---
2025-11-08 11:17
db
[ DIR ]
drwxr-x---
2025-11-08 11:17
exception
[ DIR ]
drwxr-x---
2025-11-08 11:17
helper
[ DIR ]
drwxr-x---
2025-11-08 11:17
log
[ DIR ]
drwxr-x---
2025-11-08 11:17
module
[ DIR ]
drwxr-x---
2025-11-08 11:17
order
[ DIR ]
drwxr-x---
2025-11-08 11:17
pdf
[ DIR ]
drwxr-x---
2025-11-08 11:17
range
[ DIR ]
drwxr-x---
2025-11-08 11:17
shop
[ DIR ]
drwxr-x---
2025-11-08 11:17
stock
[ DIR ]
drwxr-x---
2025-11-08 11:17
tax
[ DIR ]
drwxr-x---
2025-11-08 11:17
tree
[ DIR ]
drwxr-x---
2025-11-08 11:17
webservice
[ DIR ]
drwxr-x---
2025-11-08 11:17
Address.php
12.64
KB
-rwxr-x---
2018-05-03 14:19
AddressFormat.php
16.96
KB
-rwxr-x---
2018-05-03 14:19
AdminTab.php
95.52
KB
-rwxr-x---
2018-05-03 14:19
Alias.php
3.71
KB
-rwxr-x---
2018-05-03 14:19
Attachment.php
5.85
KB
-rwxr-x---
2018-05-03 14:19
Attribute.php
10.76
KB
-rwxr-x---
2018-05-03 14:19
AttributeGroup.php
9.91
KB
-rwxr-x---
2018-05-03 14:19
CMS.php
7.16
KB
-rwxr-x---
2018-05-03 14:19
CMSCategory.php
20.26
KB
-rwxr-x---
2018-05-03 14:19
CSV.php
2.69
KB
-rwxr-x---
2018-05-03 14:19
Carrier.php
42.79
KB
-rwxr-x---
2018-05-03 14:19
Cart.php
127.88
KB
-rwxr-x---
2018-05-03 14:19
CartRule.php
53.52
KB
-rwxr-x---
2018-05-03 14:19
Category.php
54.72
KB
-rwxr-x---
2018-05-03 14:19
Chart.php
4.48
KB
-rwxr-x---
2018-05-03 14:19
Combination.php
9.76
KB
-rwxr-x---
2018-05-03 14:19
CompareProduct.php
4.75
KB
-rwxr-x---
2018-05-03 14:19
Configuration.php
17.81
KB
-rwxr-x---
2018-05-03 14:19
ConfigurationKPI.php
4.93
KB
-rwxr-x---
2018-05-03 14:19
ConfigurationTest.php
8.6
KB
-rwxr-x---
2018-05-03 14:19
Connection.php
8.67
KB
-rwxr-x---
2018-05-03 14:19
ConnectionsSource.php
4.45
KB
-rwxr-x---
2018-05-03 14:19
Contact.php
2.84
KB
-rwxr-x---
2018-05-03 14:19
Context.php
4.69
KB
-rwxr-x---
2018-05-03 14:19
Cookie.php
11.15
KB
-rwxr-x---
2018-05-03 14:19
Country.php
11.84
KB
-rwxr-x---
2018-05-03 14:19
County.php
3.22
KB
-rwxr-x---
2018-05-03 14:19
Currency.php
12.85
KB
-rwxr-x---
2018-05-03 14:19
Customer.php
27.11
KB
-rwxr-x---
2018-05-03 14:19
CustomerMessage.php
3.63
KB
-rwxr-x---
2018-05-03 14:19
CustomerThread.php
7.03
KB
-rwxr-x---
2018-05-03 14:19
Customization.php
4.46
KB
-rwxr-x---
2018-05-03 14:19
DateRange.php
2.08
KB
-rwxr-x---
2018-05-03 14:19
Delivery.php
2.8
KB
-rwxr-x---
2018-05-03 14:19
Discount.php
7.4
KB
-rwxr-x---
2018-05-03 14:19
Dispatcher.php
28.81
KB
-rwxr-x---
2018-05-03 14:19
Employee.php
13.4
KB
-rwxr-x---
2018-05-03 14:19
Feature.php
10.15
KB
-rwxr-x---
2018-05-03 14:19
FeatureValue.php
6.11
KB
-rwxr-x---
2018-05-03 14:19
FileUploader.php
9.02
KB
-rwxr-x---
2018-05-03 14:19
Gender.php
2.06
KB
-rwxr-x---
2018-05-03 14:19
Group.php
11.13
KB
-rwxr-x---
2018-05-03 14:19
GroupReduction.php
8.05
KB
-rwxr-x---
2018-05-03 14:19
Guest.php
6.25
KB
-rwxr-x---
2018-05-03 14:19
Hook.php
23.36
KB
-rwxr-x---
2018-05-03 14:19
Image.php
20.18
KB
-rwxr-x---
2018-05-03 14:19
ImageManager.php
14.55
KB
-rwxr-x---
2018-05-03 14:19
ImageType.php
4.99
KB
-rwxr-x---
2018-05-03 14:19
Language.php
31.94
KB
-rwxr-x---
2018-05-03 14:19
Link.php
23.51
KB
-rwxr-x---
2018-05-03 14:19
LocalizationPack.php
13.46
KB
-rwxr-x---
2018-05-03 14:19
Mail.php
16.12
KB
-rwxr-x---
2018-05-03 14:19
Manufacturer.php
14.33
KB
-rwxr-x---
2018-05-03 14:19
Media.php
29.56
KB
-rwxr-x---
2018-05-03 14:19
Message.php
5.28
KB
-rwxr-x---
2018-05-03 14:19
Meta.php
14.7
KB
-rwxr-x---
2018-05-03 14:19
Notification.php
5.54
KB
-rwxr-x---
2018-05-03 14:19
ObjectModel.php
51.85
KB
-rwxr-x---
2018-05-03 14:19
Pack.php
8.91
KB
-rwxr-x---
2018-05-03 14:19
Page.php
3.69
KB
-rwxr-x---
2018-05-03 14:19
PaymentCC.php
2.34
KB
-rwxr-x---
2018-05-03 14:19
PaymentModule.php
40.95
KB
-rwxr-x---
2018-05-03 14:19
PrestaShopBackup.php
8.64
KB
-rwxr-x---
2018-05-03 14:19
PrestaShopCollection.php
16.84
KB
-rwxr-x---
2018-05-03 14:19
PrestaShopLogger.php
5.38
KB
-rwxr-x---
2018-05-03 14:19
Product.php
190.49
KB
-rwxr-x---
2018-05-03 14:19
ProductDownload.php
8.74
KB
-rwxr-x---
2018-05-03 14:19
ProductSale.php
10.32
KB
-rwxr-x---
2018-05-03 14:19
ProductSupplier.php
6.71
KB
-rwxr-x---
2018-05-03 14:19
Profile.php
4.52
KB
-rwxr-x---
2018-05-03 14:19
QuickAccess.php
2.4
KB
-rwxr-x---
2018-05-03 14:19
Referrer.php
14.72
KB
-rwxr-x---
2018-05-03 14:19
RequestSql.php
15.4
KB
-rwxr-x---
2018-05-03 14:19
Risk.php
2.16
KB
-rwxr-x---
2018-05-03 14:19
Scene.php
8.28
KB
-rwxr-x---
2018-05-03 14:19
Search.php
30.58
KB
-rwxr-x---
2018-05-03 14:19
SearchEngine.php
2.25
KB
-rwxr-x---
2018-05-03 14:19
SpecificPrice.php
16.21
KB
-rwxr-x---
2018-05-03 14:19
SpecificPriceRule.php
10.71
KB
-rwxr-x---
2018-05-03 14:19
State.php
5.91
KB
-rwxr-x---
2018-05-03 14:19
Store.php
4.34
KB
-rwxr-x---
2018-05-03 14:19
Supplier.php
12.48
KB
-rwxr-x---
2018-05-03 14:19
Tab.php
16.66
KB
-rwxr-x---
2018-05-03 14:19
Tag.php
6.85
KB
-rwxr-x---
2018-05-03 14:19
Theme.php
8.01
KB
-rwxr-x---
2018-05-03 14:19
Tools.php
93.71
KB
-rwxr-x---
2018-05-03 14:19
Translate.php
8.54
KB
-rwxr-x---
2018-05-03 14:19
TranslatedConfiguration.php
3.59
KB
-rwxr-x---
2018-05-03 14:19
Upgrader.php
9.07
KB
-rwxr-x---
2018-05-03 14:19
Uploader.php
6.49
KB
-rwxr-x---
2018-05-03 14:19
Validate.php
27.13
KB
-rwxr-x---
2018-05-03 14:19
Zone.php
2.98
KB
-rwxr-x---
2018-05-03 14:19
index.php
1.24
KB
-rwxr-x---
2018-05-03 14:19
Save
Rename
<?php /* * 2007-2014 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <contact@prestashop.com> * @copyright 2007-2014 PrestaShop SA * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ class CurrencyCore extends ObjectModel { public $id; /** @var string Name */ public $name; /** @var string Iso code */ public $iso_code; /** @var string Iso code numeric */ public $iso_code_num; /** @var string Symbol for short display */ public $sign; /** @var int bool used for displaying blank between sign and price */ public $blank; /** @var string exchange rate from euros */ public $conversion_rate; /** @var boolean True if currency has been deleted (staying in database as deleted) */ public $deleted = 0; /** @var int ID used for displaying prices */ public $format; /** @var int bool Display decimals on prices */ public $decimals; /** @var int bool active */ public $active; /** * @see ObjectModel::$definition */ public static $definition = array( 'table' => 'currency', 'primary' => 'id_currency', 'multilang_shop' => true, 'fields' => array( 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), 'iso_code' => array('type' => self::TYPE_STRING, 'validate' => 'isLanguageIsoCode', 'required' => true, 'size' => 3), 'iso_code_num' => array('type' => self::TYPE_STRING, 'validate' => 'isNumericIsoCode', 'size' => 3), 'blank' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), 'sign' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 8), 'format' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'decimals' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), 'conversion_rate' =>array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat', 'required' => true, 'shop' => true), 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), ), ); /** @var array Currency cache */ static protected $currencies = array(); protected static $countActiveCurrencies = array(); protected $webserviceParameters = array( 'objectsNodeName' => 'currencies', ); /** * contains the sign to display before price, according to its format * @var string */ public $prefix = null; /** * contains the sign to display after price, according to its format * @var string */ public $suffix = null; public function __construct($id = null, $id_lang = null, $id_shop = null) { parent::__construct($id, $id_lang, $id_shop); // prefix and suffix are convenient shortcut for displaying // price sign before or after the price number $this->prefix = $this->format % 2 != 0 ? $this->sign.' ' : ''; $this->suffix = $this->format % 2 == 0 ? ' '.$this->sign : ''; } /** * Overriding check if currency rate is not empty and if currency with the same iso code already exists. * If it's true, currency is not added. * * @see ObjectModelCore::add() */ public function add($autodate = true, $nullValues = false) { if ((float)$this->conversion_rate <= 0) return false; return Currency::exists($this->iso_code, $this->iso_code_num) ? false : parent::add($autodate, $nullValues); } public function update($autodate = true, $nullValues = false) { if ((float)$this->conversion_rate <= 0) return false; return parent::update($autodate, $nullValues); } /** * Check if a curency already exists. * * @param int|string $iso_code int for iso code number string for iso code * @return boolean */ public static function exists($iso_code, $iso_code_num, $id_shop = 0) { if (is_int($iso_code)) $id_currency_exists = Currency::getIdByIsoCodeNum((int)$iso_code_num, (int)$id_shop); else $id_currency_exists = Currency::getIdByIsoCode($iso_code, (int)$id_shop); if ($id_currency_exists) return true; else return false; } public function deleteSelection($selection) { if (!is_array($selection)) return false; $res = array(); foreach ($selection as $id) { $obj = new Currency((int)$id); $res[$id] = $obj->delete(); } foreach ($res as $value) if (!$value) return false; return true; } public function delete() { if ($this->id == Configuration::get('PS_CURRENCY_DEFAULT')) { $result = Db::getInstance()->getRow('SELECT `id_currency` FROM '._DB_PREFIX_.'currency WHERE `id_currency` != '.(int)($this->id).' AND `deleted` = 0'); if (!$result['id_currency']) return false; Configuration::updateValue('PS_CURRENCY_DEFAULT', $result['id_currency']); } $this->deleted = 1; return $this->update(); } /** * Return formated sign * * @param string $side left or right * @return string formated sign */ public function getSign($side = null) { if (!$side) return $this->sign; $formated_strings = array( 'left' => $this->sign.' ', 'right' => ' '.$this->sign ); $formats = array( 1 => array('left' => &$formated_strings['left'], 'right' => ''), 2 => array('left' => '', 'right' => &$formated_strings['right']), 3 => array('left' => &$formated_strings['left'], 'right' => ''), 4 => array('left' => '', 'right' => &$formated_strings['right']), 5 => array('left' => '', 'right' => &$formated_strings['right']) ); if (isset($formats[$this->format][$side])) return ($formats[$this->format][$side]); return $this->sign; } /** * Return available currencies * * @return array Currencies */ public static function getCurrencies($object = false, $active = true, $group_by = false) { $tab = Db::getInstance()->executeS(' SELECT * FROM `'._DB_PREFIX_.'currency` c '.Shop::addSqlAssociation('currency', 'c'). ' WHERE `deleted` = 0'. ($active ? ' AND c.`active` = 1' : ''). ($group_by ? ' GROUP BY c.`id_currency`' : ''). ' ORDER BY `name` ASC'); if ($object) foreach ($tab as $key => $currency) $tab[$key] = Currency::getCurrencyInstance($currency['id_currency']); return $tab; } public static function getCurrenciesByIdShop($id_shop = 0) { return Db::getInstance()->executeS(' SELECT * FROM `'._DB_PREFIX_.'currency` c LEFT JOIN `'._DB_PREFIX_.'currency_shop` cs ON (cs.`id_currency` = c.`id_currency`) '.($id_shop ? ' WHERE cs.`id_shop` = '.(int)$id_shop : '').' ORDER BY `name` ASC'); } public static function getPaymentCurrenciesSpecial($id_module, $id_shop = null) { if (is_null($id_shop)) $id_shop = Context::getContext()->shop->id; $sql = 'SELECT * FROM '._DB_PREFIX_.'module_currency WHERE id_module = '.(int)$id_module.' AND id_shop ='.(int)$id_shop; return Db::getInstance()->getRow($sql); } public static function getPaymentCurrencies($id_module, $id_shop = null) { if (is_null($id_shop)) $id_shop = Context::getContext()->shop->id; $sql = 'SELECT c.* FROM `'._DB_PREFIX_.'module_currency` mc LEFT JOIN `'._DB_PREFIX_.'currency` c ON c.`id_currency` = mc.`id_currency` WHERE c.`deleted` = 0 AND mc.`id_module` = '.(int)$id_module.' AND c.`active` = 1 AND mc.id_shop = '.(int)$id_shop.' ORDER BY c.`name` ASC'; return Db::getInstance()->executeS($sql); } public static function checkPaymentCurrencies($id_module, $id_shop = null) { if (empty($id_module)) return false; if (is_null($id_shop)) $id_shop = Context::getContext()->shop->id; $sql = 'SELECT * FROM `'._DB_PREFIX_.'module_currency` WHERE `id_module` = '.(int)$id_module.' AND `id_shop` = '.(int)$id_shop; return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); } public static function getCurrency($id_currency) { return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' SELECT * FROM `'._DB_PREFIX_.'currency` WHERE `deleted` = 0 AND `id_currency` = '.(int)($id_currency)); } /** * @static * @param $iso_code * @param int $id_shop * @return int */ public static function getIdByIsoCode($iso_code, $id_shop = 0) { $cache_id = 'Currency::getIdByIsoCode_'.pSQL($iso_code).'-'.(int)$id_shop; if (!Cache::isStored($cache_id)) { $query = Currency::getIdByQuery($id_shop); $query->where('iso_code = \''.pSQL($iso_code).'\''); $result = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query->build()); Cache::store($cache_id, $result); } return Cache::retrieve($cache_id); } /** * @static * @param $iso_code * @param int $id_shop * @return int */ public static function getIdByIsoCodeNum($iso_code_num, $id_shop = 0) { $query = Currency::getIdByQuery($id_shop); $query->where('iso_code_num = \''.pSQL($iso_code_num).'\''); return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query->build()); } /** * @static * @param int $id_shop * @return DbQuery */ public static function getIdByQuery($id_shop = 0) { $query = new DbQuery(); $query->select('c.id_currency'); $query->from('currency', 'c'); $query->where('deleted = 0'); if (Shop::isFeatureActive() && $id_shop > 0) { $query->leftJoin('currency_shop', 'cs', 'cs.id_currency = c.id_currency'); $query->where('id_shop = '.(int)$id_shop); } return $query; } /** * Refresh the currency exchange rate * The XML file define exchange rate for each from a default currency ($isoCodeSource). * * @param $data XML content which contains all the exchange rates * @param $isoCodeSource The default currency used in the XML file * @param $defaultCurrency The default currency object */ public function refreshCurrency($data, $isoCodeSource, $defaultCurrency) { // fetch the exchange rate of the default currency $exchange_rate = 1; if ($defaultCurrency->iso_code != $isoCodeSource) { foreach ($data->currency as $currency) if ($currency['iso_code'] == $defaultCurrency->iso_code) { $exchange_rate = round((float)$currency['rate'], 6); break; } } if ($defaultCurrency->iso_code == $this->iso_code) $this->conversion_rate = 1; else { if ($this->iso_code == $isoCodeSource) $rate = 1; else { foreach ($data->currency as $obj) if ($this->iso_code == strval($obj['iso_code'])) { $rate = (float)$obj['rate']; break; } } if (isset($rate)) $this->conversion_rate = round($rate / $exchange_rate, 6); } $this->update(); } public static function getDefaultCurrency() { $id_currency = (int)Configuration::get('PS_CURRENCY_DEFAULT'); if ($id_currency == 0) return false; return new Currency($id_currency); } public static function refreshCurrencies() { // Parse if (!$feed = Tools::simplexml_load_file('http://api.prestashop.com/xml/currencies.xml')) return Tools::displayError('Cannot parse feed.'); // Default feed currency (EUR) $isoCodeSource = strval($feed->source['iso_code']); if (!$default_currency = Currency::getDefaultCurrency()) return Tools::displayError('No default currency'); $currencies = Currency::getCurrencies(true, false); foreach ($currencies as $currency) if ($currency->id != $default_currency->id) $currency->refreshCurrency($feed->list, $isoCodeSource, $default_currency); } /** * Get current currency * * @deprecated as of 1.5 use $context->currency instead * @return Currency */ public static function getCurrent() { Tools::displayAsDeprecated(); return Context::getContext()->currency; } public static function getCurrencyInstance($id) { if (!isset(self::$currencies[$id])) self::$currencies[(int)($id)] = new Currency($id); return self::$currencies[(int)($id)]; } public static function countActiveCurrencies($id_shop = null) { if ($id_shop === null) $id_shop = (int)Context::getContext()->shop->id; if (!isset(self::$countActiveCurrencies[$id_shop])) self::$countActiveCurrencies[$id_shop] = Db::getInstance()->getValue(' SELECT COUNT(DISTINCT c.id_currency) FROM `'._DB_PREFIX_.'currency` c LEFT JOIN '._DB_PREFIX_.'currency_shop cs ON (cs.id_currency = c.id_currency AND cs.id_shop = '.(int)$id_shop.') WHERE c.`active` = 1 '); return self::$countActiveCurrencies[$id_shop]; } public static function isMultiCurrencyActivated($id_shop = null) { return (Currency::countActiveCurrencies($id_shop) > 1); } }