Add view classes for articles, banners, languages, menu, newsletter, containers, shop categories, clients, payment methods, products, and search

- Created Articles.php for rendering article views including full articles, miniature lists, and news sections.
- Added Banners.php for handling banner displays.
- Introduced Languages.php for rendering language options.
- Implemented Menu.php for dynamic menu rendering.
- Developed Newsletter.php for newsletter view rendering.
- Created Scontainers.php for rendering specific containers.
- Added ShopCategory.php for category descriptions and product listings.
- Introduced ShopClient.php for managing client-related views such as address editing and order history.
- Implemented ShopPaymentMethod.php for displaying payment methods in the basket.
- Created ShopProduct.php for generating product URLs.
- Added ShopSearch.php for rendering a simple search form.
- Added .htaccess file to enhance security by restricting access to sensitive files and directories.
This commit is contained in:
2026-02-21 23:00:15 +01:00
parent b51244c1d6
commit 3ecbe628dc
435 changed files with 44107 additions and 31270 deletions

View File

@@ -41,7 +41,7 @@ ob_start();
</ul>
<div class="resp-tabs-container settings-tabs">
<div>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Nazwa firmy',
'name' => 'firm_name',
@@ -49,7 +49,7 @@ ob_start();
'value' => $this -> settings['firm_name']
)
);?>
<?= \Html::textarea(
<?= \Shared\Html\Html::textarea(
array(
'label' => 'Dodatkowe informacje',
'name' => 'additional_info',
@@ -57,14 +57,14 @@ ob_start();
'value' => $this -> settings['additional_info']
)
);?>
<?= \Html::input_switch(
<?= \Shared\Html\Html::input_switch(
array(
'label' => 'Mapa',
'name' => 'google_maps',
'checked' => $this -> settings['google_maps'] == 1 ? true : false
)
);?>
<?= \Html::textarea(
<?= \Shared\Html\Html::textarea(
array(
'label' => 'Mapa - adres',
'name' => 'firm_adress',
@@ -74,7 +74,7 @@ ob_start();
);?>
</div>
<div>
<?= \Html::textarea(
<?= \Shared\Html\Html::textarea(
array(
'label' => 'Dane do przelewu',
'name' => 'shop_bank_account_info',
@@ -84,54 +84,54 @@ ob_start();
'ckeditor' => true
)
);?>
<?= \Html::input( [
<?= \Shared\Html\Html::input( [
'label' => 'Klucz API HotPay',
'name' => 'hotpay_api',
'id' => 'hotpay_api',
'value' => $this -> settings['hotpay_api']
] );?>
<?= \Html::input_switch( [
<?= \Shared\Html\Html::input_switch( [
'label' => 'Tpay.com - tryb sandbox',
'name' => 'tpay_sandbox',
'checked' => $this -> settings['tpay_sandbox'] == 1 ? true : false
] );?>
<?= \Html::input( [
<?= \Shared\Html\Html::input( [
'label' => 'Tpay.com ID',
'name' => 'tpay_id',
'id' => 'tpay_id',
'value' => $this -> settings['tpay_id']
] );?>
<?= \Html::input( [
<?= \Shared\Html\Html::input( [
'label' => 'Tpay.com - kod bezpieczeństwa',
'name' => 'tpay_security_code',
'id' => 'tpay_security_code',
'value' => $this -> settings['tpay_security_code']
] );?>
<?= \Html::input_switch( [
<?= \Shared\Html\Html::input_switch( [
'label' => 'Przelewy24.pl - tryb sandbox',
'name' => 'przelewy24_sandbox',
'checked' => $this -> settings['przelewy24_sandbox'] == 1 ? true : false
] );?>
<?= \Html::input( [
<?= \Shared\Html\Html::input( [
'label' => 'Przelewy24.pl - merchant ID',
'name' => 'przelewy24_merchant_id',
'id' => 'przelewy24_merchant_id',
'value' => $this -> settings['przelewy24_merchant_id']
] );?>
<?= \Html::input( [
<?= \Shared\Html\Html::input( [
'label' => 'Przelewy24.pl - klucz CRC',
'name' => 'przelewy24_crc_key',
'id' => 'przelewy24_crc_key',
'value' => $this -> settings['przelewy24_crc_key']
] );?>
<?= \Html::input( [
<?= \Shared\Html\Html::input( [
'label' => 'Darmowa dostawa od',
'class' => 'number-format',
'name' => 'free_delivery',
'id' => 'free_delivery',
'value' => $this -> settings['free_delivery']
] );?>
<?= \Html::input( [
<?= \Shared\Html\Html::input( [
'label' => 'Orlen Paczka map token',
'name' => 'orlen_paczka_map_token',
'id' => 'orlen_paczka_map_token',
@@ -143,7 +143,7 @@ ob_start();
<ul class="resp-tabs-list languages-main htabs">
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
<? if ( $lg['status'] ):?>
<li><? if ( $lg['id'] == \front\factory\Languages::default_language() ) echo '<i class="fa fa-star fa-lg text-system" title="Język domyślny"></i> ';?><?= $lg['name'];?></a></li>
<li><? if ( $lg['id'] == ( new \Domain\Languages\LanguagesRepository( $GLOBALS['mdb'] ) )->defaultLanguage() ) echo '<i class="fa fa-star fa-lg text-system" title="Język domyślny"></i> ';?><?= $lg['name'];?></a></li>
<? endif;?>
<? endforeach; endif;?>
</ul>
@@ -161,7 +161,7 @@ ob_start();
?>
<? if ( $lg['status'] ):?>
<div>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Komunikat gdy stan magazynowy równy 0',
'name' => 'warehouse_message_zero[' . $lg['id'] . ']',
@@ -170,7 +170,7 @@ ob_start();
'inline' => true
)
);?>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Komunikat gdy stan magazynowy większy niż 0',
'name' => 'warehouse_message_nonzero[' . $lg['id'] . ']',
@@ -187,14 +187,14 @@ ob_start();
</div>
</div>
<div>
<?= \Html::input_switch(
<?= \Shared\Html\Html::input_switch(
array(
'label' => 'Formularz kontaktowy',
'name' => 'contact_form',
'checked' => $this -> settings['contact_form'] == 1 ? true : false
)
);?>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Email kontaktowy',
'name' => 'contact_email',
@@ -202,7 +202,7 @@ ob_start();
'value' => $this -> settings['contact_email']
)
);?>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Email - host',
'name' => 'email_host',
@@ -210,7 +210,7 @@ ob_start();
'value' => $this -> settings['email_host']
)
);?>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Email - port',
'name' => 'email_port',
@@ -218,7 +218,7 @@ ob_start();
'value' => $this -> settings['email_port']
)
);?>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Email - login',
'name' => 'email_login',
@@ -226,7 +226,7 @@ ob_start();
'value' => $this -> settings['email_login']
)
);?>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Email - hasło',
'name' => 'email_password',
@@ -236,7 +236,7 @@ ob_start();
);?>
</div>
<div>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Facebook link',
'name' => 'facebook_link',
@@ -252,7 +252,7 @@ ob_start();
]
);
?>
<?= \Html::textarea(
<?= \Shared\Html\Html::textarea(
array(
'label' => 'Kod statystyk',
'name' => 'statistic_code',
@@ -261,7 +261,7 @@ ob_start();
'rows' => 10
)
);?>
<?= \Html::textarea(
<?= \Shared\Html\Html::textarea(
array(
'label' => 'Własne reguły htacess',
'name' => 'htaccess',
@@ -270,7 +270,7 @@ ob_start();
'rows' => 10
)
);?>
<?= \Html::textarea(
<?= \Shared\Html\Html::textarea(
array(
'label' => 'Własne reguły robots.txt',
'name' => 'robots',
@@ -281,7 +281,7 @@ ob_start();
);?>
</div>
<div>
<?= \Html::input_switch(
<?= \Shared\Html\Html::input_switch(
array(
'label' => 'Aktualizacja',
'name' => 'update',
@@ -296,31 +296,31 @@ ob_start();
]
);
?>
<?= \Html::input_switch(
<?= \Shared\Html\Html::input_switch(
array(
'label' => 'Strona konstrukcyjna',
'name' => 'devel',
'checked' => $this -> settings['devel'] == 1 ? true : false
)
);?>
<?= \Html::input_switch( [
<?= \Shared\Html\Html::input_switch( [
'label' => 'Lazy loading obrazów',
'name' => 'lazy_loading',
'checked' => $this -> settings['lazy_loading'] == 1 ? true : false
] );?>
<?= \Html::input_switch( [
<?= \Shared\Html\Html::input_switch( [
'label' => 'Generowanie obrazków WEBP',
'name' => 'generate_webp',
'checked' => $this -> settings['generate_webp'] == 1 ? true : false
] );?>
<?= \Html::input_switch( [
<?= \Shared\Html\Html::input_switch( [
'label' => 'Infinitescroll',
'name' => 'infinitescroll',
'checked' => $this -> settings['infinitescroll'] == 1 ? true : false
] );?>
<?= \Html::input_switch(
<?= \Shared\Html\Html::input_switch(
array(
'label' => 'Htaccess cache',
'name' => 'htaccess_cache',
@@ -335,14 +335,14 @@ ob_start();
'id' => 'google_tag_manager_id',
'value' => $this -> settings['google_tag_manager_id']
] ); ?>
<?= \Html::textarea( [
<?= \Shared\Html\Html::textarea( [
'label' => 'Własny kod GTM JS (bez tagu script)',
'name' => 'own_gtm_js',
'id' => 'own_gtm_js',
'value' => $this -> settings['own_gtm_js'],
'rows' => 10
] );?>
<?= \Html::textarea( [
<?= \Shared\Html\Html::textarea( [
'label' => 'Własny kod GTM HTML',
'name' => 'own_gtm_html',
'id' => 'own_gtm_html',
@@ -355,19 +355,17 @@ ob_start();
<?
$out = ob_get_clean();
$grid = new \gridEdit;
$grid -> id = 'settings-edit';
$grid -> gdb_opt = $gdb;
$grid -> include_plugins = true;
$grid -> title = 'Edycja ustawień';
$grid -> actions = [
'save' => [ 'url' => '/admin/settings/settings_save/', 'back_url' => '/admin/settings/view/' ],
];
$grid -> external_code = $out;
echo $grid -> draw();
$gridId = 'settings-edit';
$gridTitle = 'Edycja ustawień';
$gridSaveUrl = '/admin/settings/save/';
$gridBackUrl = '';
$gridHidden = [];
$gridContent = $out;
$gridPersist = true;
include __DIR__ . '/../components/grid-edit-replacement.php';
?>
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>
<style type="text/css">#g-edit-cancel { display: none; }</style>
<style type="text/css">#g-edit-cancel, #g-edit-save.btn-system { display: none; }</style>
<script type="text/javascript">
$( document).ready( function ()
{
@@ -377,4 +375,4 @@ echo $grid -> draw();
html: true
});
});
</script>
</script>