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

- Created `Articles` class for rendering article views including full articles, miniature lists, and news sections.
- Added `Banners` class for handling banner displays.
- Introduced `Languages` class for rendering language options.
- Implemented `Menu` class for rendering page and menu structures.
- Developed `Newsletter` class for newsletter rendering.
- Created `Scontainers` class for rendering specific containers.
- Added `ShopCategory` class for managing shop category views and pagination.
- Implemented `ShopClient` class for client-related views including address management and login forms.
- Created `ShopPaymentMethod` class for displaying payment methods in the basket.
- Added `ShopProduct` class for generating product URLs.
- Introduced `ShopSearch` class for rendering a simple search form.
- Added `.htaccess` file in the plugins directory to enhance security by restricting access to sensitive files and directories.
This commit is contained in:
2026-02-21 23:00:54 +01:00
parent a605e0f4ad
commit fc45bbf20e
322 changed files with 35722 additions and 21849 deletions

View File

@@ -1,33 +1,33 @@
<div class="client-panel address-edit box">
<?= \front\view\ShopClient::client_menu( [
<?= \front\Views\ShopClient::clientMenu( [
'active_page' => 'addresses'
] );?>
<div class="box-title">
<?= ucfirst( \S::lang( 'adresy-do-wysylki' ) );?>
<?= ucfirst( \Shared\Helpers\Helpers::lang( 'adresy-do-wysylki' ) );?>
</div>
<form method="POST" class="box-mini" action="/shopClient/address_save" id="f-new-address">
<? if ( $this -> address['id'] ):?>
<input type="hidden" name="address_id" value="<?= $this -> address['id'];?>">
<? endif;?>
<div class="form-group">
<input type="text" name="name" required class="form-control" placeholder="<?= ucfirst( \S::lang( 'imie' ) );?>" value="<?= htmlspecialchars( $this -> address['name'] );?>">
<input type="text" name="name" required class="form-control" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang( 'imie' ) );?>" value="<?= htmlspecialchars( $this -> address['name'] );?>">
</div>
<div class="form-group">
<input type="text" name="surname" required class="form-control" placeholder="<?= ucfirst( \S::lang( 'nazwisko' ) );?>" value="<?= htmlspecialchars( $this -> address['surname'] );?>">
<input type="text" name="surname" required class="form-control" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang( 'nazwisko' ) );?>" value="<?= htmlspecialchars( $this -> address['surname'] );?>">
</div>
<div class="form-group">
<input type="text" name="street" required class="form-control" placeholder="<?= ucfirst( \S::lang( 'ulica-i-numer' ) );?>" value="<?= htmlspecialchars( $this -> address['street'] );?>">
<input type="text" name="street" required class="form-control" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang( 'ulica-i-numer' ) );?>" value="<?= htmlspecialchars( $this -> address['street'] );?>">
</div>
<div class="form-group row-flex">
<input type="text" name="postal_code" required class="form-control" pattern="[0-9]{2}-[0-9]{3}" title="Format xx-xxx" placeholder="<?= ucfirst( \S::lang( 'kod-pocztowy' ) );?>" value="<?= htmlspecialchars( $this -> address['postal_code'] );?>">
<input type="text" name="city" required class="form-control" placeholder="<?= ucfirst( \S::lang( 'miejscowosc' ) );?>" value="<?= htmlspecialchars( $this -> address['city'] );?>">
<input type="text" name="postal_code" required class="form-control" pattern="[0-9]{2}-[0-9]{3}" title="Format xx-xxx" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang( 'kod-pocztowy' ) );?>" value="<?= htmlspecialchars( $this -> address['postal_code'] );?>">
<input type="text" name="city" required class="form-control" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang( 'miejscowosc' ) );?>" value="<?= htmlspecialchars( $this -> address['city'] );?>">
</div>
<div class="form-group">
<input type="text" name="phone" required class="form-control" placeholder="<?= ucfirst( \S::lang( 'numer-telefonu' ) );?>" value="<?= htmlspecialchars( $this -> address['phone'] );?>">
<input type="text" name="phone" required class="form-control" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang( 'numer-telefonu' ) );?>" value="<?= htmlspecialchars( $this -> address['phone'] );?>">
</div>
<div class="form-group row-flex">
<a href="/panel-klienta/adresy" class="btn btn-dark"><?= ucfirst( \S::lang( 'anuluj' ) );?></a>
<button type="submit" class="btn btn-success"><?= ucfirst( \S::lang( 'zapisz' ) );?></button>
<a href="/panel-klienta/adresy" class="btn btn-dark"><?= ucfirst( \Shared\Helpers\Helpers::lang( 'anuluj' ) );?></a>
<button type="submit" class="btn btn-success"><?= ucfirst( \Shared\Helpers\Helpers::lang( 'zapisz' ) );?></button>
</div>
</form>
</div>

View File

@@ -1,11 +1,11 @@
<div class="client-panel client-addresses box">
<?= \front\view\ShopClient::client_menu( [
<?= \front\Views\ShopClient::clientMenu( [
'active_page' => 'addresses'
] );?>
<div class="box-title">
<?= ucfirst( \S::lang( 'adresy-do-wysylki' ) );?>
<?= ucfirst( \Shared\Helpers\Helpers::lang( 'adresy-do-wysylki' ) );?>
</div>
<a href="/panel-klienta/nowy-adres" class="btn btn-success btn-big"><?= ucfirst( \S::lang( 'dodaj-nowy-adres' ) );?></span></a>
<a href="/panel-klienta/nowy-adres" class="btn btn-success btn-big"><?= ucfirst( \Shared\Helpers\Helpers::lang( 'dodaj-nowy-adres' ) );?></span></a>
<? if ( is_array( $this -> addresses ) and count( $this -> addresses ) ):?>
<div class="addresses">
<? foreach ( $this -> addresses as $address ):?>
@@ -16,8 +16,8 @@
<br/><?= $address['postal_code'] . ' ' . $address['city'];?>
<br/><?= $address['phone'];?>
<div class="buttons">
<a href="/panel-klienta/edytuj-adres/<?= $address['id'];?>"><?= \S::lang( 'zmien' );?></a>
<a href="/panel-klienta/usun-adres/<?= $address['id'];?>" class="btn-delete text-danger"><?= \S::lang( 'usun' );?></a>
<a href="/panel-klienta/edytuj-adres/<?= $address['id'];?>"><?= \Shared\Helpers\Helpers::lang( 'zmien' );?></a>
<a href="/panel-klienta/usun-adres/<?= $address['id'];?>" class="btn-delete text-danger"><?= \Shared\Helpers\Helpers::lang( 'usun' );?></a>
</div>
</div>
<? endforeach;?>
@@ -35,8 +35,8 @@
$.alert(
{
title: '<?= ucfirst( \S::lang( 'potwierdz' ) );?>',
content: '<?= \S::lang( 'potwierdz-usuniecie-adresu' );?>',
title: '<?= ucfirst( \Shared\Helpers\Helpers::lang( 'potwierdz' ) );?>',
content: '<?= \Shared\Helpers\Helpers::lang( 'potwierdz-usuniecie-adresu' );?>',
type: 'orange',
closeIcon: true,
closeIconClass: 'fas fa-close',
@@ -50,7 +50,7 @@
{
confirm:
{
text: '<?= \S::lang( 'usun' );?>',
text: '<?= \Shared\Helpers\Helpers::lang( 'usun' );?>',
btnClass: 'btn-orange',
keys: ['enter'],
action: function()
@@ -60,7 +60,7 @@
},
cancel:
{
text: '<?= \S::lang( 'zamknij' );?>',
text: '<?= \Shared\Helpers\Helpers::lang( 'zamknij' );?>',
btnClass: 'btn-blue',
action: function() {}
}

View File

@@ -1,10 +1,10 @@
<div class="client-menu">
<ul>
<li>
<a href="/panel-klienta/zamowienia" title="<?= \S::lang( 'historia-zamowien' );?>" class="btn btn-success <? if ( $this -> active_page == 'orders' ):?>active<? endif;?>"><?= \S::lang( 'historia-zamowien' );?></a>
<a href="/panel-klienta/zamowienia" title="<?= \Shared\Helpers\Helpers::lang( 'historia-zamowien' );?>" class="btn btn-success <? if ( $this -> active_page == 'orders' ):?>active<? endif;?>"><?= \Shared\Helpers\Helpers::lang( 'historia-zamowien' );?></a>
</li>
<li>
<a href="/panel-klienta/adresy" title="<?= \S::lang( 'adresy' );?>" class="btn btn-success <? if ( $this -> active_page == 'addresses' ):?>active<? endif;?>"><?= \S::lang( 'adresy' );?></a>
<a href="/panel-klienta/adresy" title="<?= \Shared\Helpers\Helpers::lang( 'adresy' );?>" class="btn btn-success <? if ( $this -> active_page == 'addresses' ):?>active<? endif;?>"><?= \Shared\Helpers\Helpers::lang( 'adresy' );?></a>
</li>
</ul>
</div>

View File

@@ -1,15 +1,15 @@
<? global $lang;?>
<div class="client-panel client-orders-history box">
<?= \front\view\ShopClient::client_menu( [
<?= \front\Views\ShopClient::clientMenu( [
'active_page' => 'orders'
] );?>
<div class="box-title">
<?= ucfirst( \S::lang( 'historia-zamowien' ) );?>
<?= ucfirst( \Shared\Helpers\Helpers::lang( 'historia-zamowien' ) );?>
</div>
<? if ( is_array( $this -> orders ) ): foreach ( $this -> orders as $order ):?>
<?= \Tpl::view( 'shop-order/order-simple', [
<?= \Shared\Tpl\Tpl::view( 'shop-order/order-simple', [
'order' => $order,
'statuses' => \shop\Order::order_statuses()
'statuses' => ( new \Domain\Order\OrderRepository( $GLOBALS['mdb'] ) )->orderStatuses()
] );?>
<? endforeach; endif;?>
</div>

View File

@@ -1,20 +1,20 @@
<div class="user-login">
<div class="content">
<div class="box-title">
<?= ucfirst( \S::lang( 'logowanie' ) );?>
<?= ucfirst( \Shared\Helpers\Helpers::lang( 'logowanie' ) );?>
</div>
<form method="POST" action="/shopClient/login">
<input type="hidden" name="redirect" value="<?= $_SERVER['REQUEST_URI'];?>">
<div class="form-group">
<input type="email" name="email" required id="email" class="form-control" placeholder="<?= ucfirst( \S::lang( 'email' ) );?>">
<input type="email" name="email" required id="email" class="form-control" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang( 'email' ) );?>">
</div>
<div class="form-group">
<input type="password" name="password" required id="password" class="form-control" placeholder="<?= ucfirst( \S::lang( 'haslo' ) );?>">
<input type="password" name="password" required id="password" class="form-control" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang( 'haslo' ) );?>">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success"><?= ucfirst( \S::lang( 'zaloguj-sie' ) );?></button>
<span><?= \S::lang( 'nie-pamietasz-hasla' );?> <a href="/odzyskiwanie-hasla"><?= ucfirst( \S::lang( 'nowe-haslo' ) );?></a>.</span><br />
<span><?= \S::lang( 'nie-masz-konta' );?> <a href="/rejestracja"><?= ucfirst( \S::lang( 'zarejestruj-sie' ) );?></a>.
<button type="submit" class="btn btn-success"><?= ucfirst( \Shared\Helpers\Helpers::lang( 'zaloguj-sie' ) );?></button>
<span><?= \Shared\Helpers\Helpers::lang( 'nie-pamietasz-hasla' );?> <a href="/odzyskiwanie-hasla"><?= ucfirst( \Shared\Helpers\Helpers::lang( 'nowe-haslo' ) );?></a>.</span><br />
<span><?= \Shared\Helpers\Helpers::lang( 'nie-masz-konta' );?> <a href="/rejestracja"><?= ucfirst( \Shared\Helpers\Helpers::lang( 'zarejestruj-sie' ) );?></a>.
</div>
</form>
</div>

View File

@@ -2,6 +2,6 @@
<? if ( !$this -> client ):?>
<?= ucfirst( $lang['witaj'] );?>! <a href="/logowanie" title="Zaloguj się"> <?= ucfirst( $lang['zaloguj-sie'] );?></a> <?= $lang['lub'];?> <a href="/rejestracja" title="Rejestracja"><?= $lang['zarejestruj-sie'];?></a>
<? else:?>
<a href="/panel-klienta/zamowienia" title="<?= ucfirst( \S::lang( 'moje-konto' ) );?>" id="user-account"><span class="fa fa-user"></span><?= ucfirst( \S::lang( 'moje-konto' ) );?></a>
<a href="/wylogowanie" title="<?= ucfirst( \S::lang( 'wyloguj-sie' ) );?>" id="user-logout"><span class="fa fa-unlock"></span><?= ucfirst( \S::lang( 'wyloguj-sie' ) );?></a>
<a href="/panel-klienta/zamowienia" title="<?= ucfirst( \Shared\Helpers\Helpers::lang( 'moje-konto' ) );?>" id="user-account"><span class="fa fa-user"></span><?= ucfirst( \Shared\Helpers\Helpers::lang( 'moje-konto' ) );?></a>
<a href="/wylogowanie" title="<?= ucfirst( \Shared\Helpers\Helpers::lang( 'wyloguj-sie' ) );?>" id="user-logout"><span class="fa fa-unlock"></span><?= ucfirst( \Shared\Helpers\Helpers::lang( 'wyloguj-sie' ) );?></a>
<? endif; ?>

View File

@@ -1,14 +1,14 @@
<div class="user-login box">
<div class="content">
<div class="box-title">
<?= ucfirst( \S::lang( 'odzyskiwanie-hasla' ) );?>
<?= ucfirst( \Shared\Helpers\Helpers::lang( 'odzyskiwanie-hasla' ) );?>
</div>
<form method="POST" action="/shopClient/send_email_password_recovery" id="f-password-recovery">
<div class="form-group">
<input type="email" name="email" required id="email" class="form-control" placeholder="<?= ucfirst( \S::lang( 'email' ) );?>">
<input type="email" name="email" required id="email" class="form-control" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang( 'email' ) );?>">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success"><?= ucfirst( \S::lang( 'resetuj-haslo' ) );?></button>
<button type="submit" class="btn btn-success"><?= ucfirst( \Shared\Helpers\Helpers::lang( 'resetuj-haslo' ) );?></button>
</div>
</form>
</div>

View File

@@ -1,7 +1,7 @@
<div class="user-register box">
<div class="content">
<div class="box-title">
<?= \S::lang('zaloz-konto-klienta');?>
<?= \Shared\Helpers\Helpers::lang('zaloz-konto-klienta');?>
</div>
<form method="POST" action="/" id="f-user-register">
<input type="hidden" id="type" name="type" value="0">
@@ -9,29 +9,29 @@
<input type="hidden" id="firm_id" name="firm_id" value="<?= $this -> firm_id;?>">
<? endif;?>
<div class="form-group">
<input type="email" required id="email" class="form-control" placeholder="<?= ucfirst( \S::lang('email') );?>">
<input type="email" required id="email" class="form-control" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang('email') );?>">
</div>
<div class="form-group">
<input type="password" required id="password" pattern="^\S{6,}$" class="form-control" placeholder="<?= ucfirst( \S::lang('haslo') );?> (<?= \S::lang('min');?> 6 <?= \S::lang('znakow');?>)">
<input type="password" required id="password" pattern="^\S{6,}$" class="form-control" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang('haslo') );?> (<?= \Shared\Helpers\Helpers::lang('min');?> 6 <?= \Shared\Helpers\Helpers::lang('znakow');?>)">
</div>
<div class="form-group">
<input type="password" required id="password-repeat" pattern="^\S{6,}$" class="form-control" oninput="check_match(this)" placeholder="<?= ucfirst( \S::lang('powtorz-haslo') );?>">
<input type="password" required id="password-repeat" pattern="^\S{6,}$" class="form-control" oninput="check_match(this)" placeholder="<?= ucfirst( \Shared\Helpers\Helpers::lang('powtorz-haslo') );?>">
</div>
<div class="form-group agreement">
<input type="checkbox" required class="checkbox" name="agreement" id="agreement">
<label for="agreement">
<?
$text = str_replace( '[LINK-REGULAMIN]', '<a href="/regulamin">' . \S::lang('regulamin') . '</a>', \S::lang('rejestracja-akceptacja-regulaminu') );
echo $text = str_replace( '[LINK-POLITYKA-PRYWATNOSCI]', '<a href="/polityka-prywatnosci">' . \S::lang('polityke-prywatnosci') . '</a>', $text );
$text = str_replace( '[LINK-REGULAMIN]', '<a href="/regulamin">' . \Shared\Helpers\Helpers::lang('regulamin') . '</a>', \Shared\Helpers\Helpers::lang('rejestracja-akceptacja-regulaminu') );
echo $text = str_replace( '[LINK-POLITYKA-PRYWATNOSCI]', '<a href="/polityka-prywatnosci">' . \Shared\Helpers\Helpers::lang('polityke-prywatnosci') . '</a>', $text );
?>
</label>
</div>
<div class="form-group agreement-marketing">
<input type="checkbox" name="agreement-marketing" class="checkbox" id="agreement-marketing"> <label for="agreement-marketing"><?= \S::lang('rejestracja-zgoda-na-marketing');?></label>
<input type="checkbox" name="agreement-marketing" class="checkbox" id="agreement-marketing"> <label for="agreement-marketing"><?= \Shared\Helpers\Helpers::lang('rejestracja-zgoda-na-marketing');?></label>
</div>
<div class="form-group buttons">
<button type="submit" class="btn btn-success"><?= ucfirst( \S::lang('zarejestruj-sie') );?></button>
<span id="login"><?= ucfirst( \S::lang('masz-juz-konto') );?>? <a href="/logowanie"><?= ucfirst( \S::lang('zaloguj-sie') );?></a></span>
<button type="submit" class="btn btn-success"><?= ucfirst( \Shared\Helpers\Helpers::lang('zarejestruj-sie') );?></button>
<span id="login"><?= ucfirst( \Shared\Helpers\Helpers::lang('masz-juz-konto') );?>? <a href="/logowanie"><?= ucfirst( \Shared\Helpers\Helpers::lang('zaloguj-sie') );?></a></span>
</div>
</form>
</div>
@@ -63,8 +63,8 @@
{
alert1 = $.alert(
{
title: '<?= ucfirst( \S::lang('informacja') );?>',
content: '<?= \S::lang('prosze-czekac');?>',
title: '<?= ucfirst( \Shared\Helpers\Helpers::lang('informacja') );?>',
content: '<?= \Shared\Helpers\Helpers::lang('prosze-czekac');?>',
type: 'orange',
closeIcon: true,
closeIconClass: 'fas fa-close',
@@ -77,7 +77,7 @@
{
confirm:
{
text: '<?= \S::lang('zamknij');?>',
text: '<?= \Shared\Helpers\Helpers::lang('zamknij');?>',
btnClass: 'btn-orange',
keys: ['enter'],
action: function() {}
@@ -92,7 +92,7 @@
$.alert(
{
title: '<?= ucfirst( \S::lang('informacja') );?>',
title: '<?= ucfirst( \Shared\Helpers\Helpers::lang('informacja') );?>',
content: response.msg,
type: 'orange',
closeIcon: true,
@@ -107,7 +107,7 @@
{
confirm:
{
text: '<?= \S::lang('zamknij');?>',
text: '<?= \Shared\Helpers\Helpers::lang('zamknij');?>',
btnClass: 'btn-orange',
keys: ['enter'],
action: function() {}
@@ -129,7 +129,7 @@
function check_match(input)
{
if ( input.value !== document.getElementById( 'password' ).value )
input.setCustomValidity( '<?= \S::lang('podane-hasla-sa-rozne');?>');
input.setCustomValidity( '<?= \Shared\Helpers\Helpers::lang('podane-hasla-sa-rozne');?>');
else
input.setCustomValidity('');
}