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

@@ -1,7 +1,7 @@
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
<?
\S::set_session( 'admin', true );
\Shared\Helpers\Helpers::set_session( 'admin', true );
global $db;
$_SESSION['rfm_akey'] = bin2hex(random_bytes(16));
@@ -19,7 +19,7 @@ ob_start();
</ul>
<div class="resp-tabs-container settings-tabs">
<div>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Nazwa',
'name' => 'name',
@@ -28,7 +28,7 @@ ob_start();
'class' => 'require'
) );
?>
<?= \Html::input_switch(
<?= \Shared\Html\Html::input_switch(
array(
'label' => 'Aktywny',
'name' => 'status',
@@ -46,7 +46,7 @@ ob_start();
)
);
?>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Data zakończenia',
'name' => 'date_end',
@@ -55,7 +55,7 @@ ob_start();
'class' => 'date'
) );
?>
<?= \Html::input_switch(
<?= \Shared\Html\Html::input_switch(
array(
'label' => 'Slajder / Strona główna',
'name' => 'home_page',
@@ -78,18 +78,18 @@ ob_start();
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
<? if ( $lg['status'] ):?>
<div>
<?= \Html::input_icon(
<?= \Shared\Html\Html::input_icon(
array(
'label' => 'Obraz',
'name' => 'src[' . $lg['id'] . ']',
'id' => 'src_' . $lg['id'],
'value' => $this -> banner['languages'][ $lg['id'] ]['src'],
'icon_content' => 'przeglądaj',
'icon_js' => "window.open ( 'http://" . $_SERVER['SERVER_NAME'] . "/libraries/filemanager-9.14.2/dialog.php?type=1&popup=1&field_id=src_" . $lg['id'] . "&akey=" . $rfmAkeyJS . "', 'mywindow', 'location=1,status=1,scrollbars=1, width=1100,height=700');"
'icon_js' => "window.open ( '/libraries/filemanager-9.14.2/dialog.php?type=1&popup=1&field_id=src_" . $lg['id'] . "&akey=" . $rfmAkeyJS . "', 'mywindow', 'location=1,status=1,scrollbars=1, width=1100,height=700');"
)
);
?>
<?= \Html::input(
<?= \Shared\Html\Html::input(
array(
'label' => 'Url',
'name' => 'url[' . $lg['id'] . ']',
@@ -98,7 +98,7 @@ ob_start();
)
);
?>
<?= \Html::textarea(
<?= \Shared\Html\Html::textarea(
array(
'label' => 'Kod html',
'name' => 'html[' . $lg['id'] . ']',
@@ -107,7 +107,7 @@ ob_start();
)
);
?>
<?= \Html::textarea(
<?= \Shared\Html\Html::textarea(
array(
'label' => 'Treść',
'name' => 'text[' . $lg['id'] . ']',
@@ -136,26 +136,14 @@ ob_start();
<?
$out = ob_get_clean();
$grid = new \gridEdit;
$grid -> id = 'banner-edit';
$grid -> gdb_opt = $gdb;
$grid -> include_plugins = true;
$grid -> title = 'Edycja baneru';
$grid -> fields = [
[
'db' => 'id',
'type' => 'hidden',
'value' => $this -> banner['id']
]
];
$grid -> external_code = $out;
$grid -> actions = [
'save' => [ 'url' => '/admin/banners/banner_save/', 'back_url' => '/admin/banners/view_list/' ],
'cancel' => [ 'url' => '/admin/banners/view_list/' ]
];
$grid -> persist_edit = true;
$grid -> id_param = 'id';
echo $grid -> draw();
$gridId = 'banner-edit';
$gridTitle = 'Edycja baneru';
$gridSaveUrl = '/admin/banners/save/';
$gridBackUrl = '/admin/banners/list/';
$gridHidden = [['name' => 'id', 'value' => $this -> banner['id']]];
$gridContent = $out;
$gridPersist = true;
include __DIR__ . '/../components/grid-edit-replacement.php';
?>
<script type="text/javascript">
$(function ()
@@ -182,4 +170,4 @@ echo $grid -> draw();
});
</script>
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>