This commit is contained in:
2026-03-28 11:06:12 +01:00
parent 29fc4d6edb
commit 913bad66bd
12 changed files with 136652 additions and 1152 deletions

394
.htaccess
View File

@@ -7,67 +7,25 @@ Options -Indexes
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
# Przekierowanie z http na https, jeśli nie zawiera www
# Przekierowanie z http na https, jesli nie zawiera www
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/(tpay-status|platnosc-status|przelewy24-status)$ [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Usuwanie końcowego slash'a dla niekatalogów
# Usuwanie koncowego slasha dla niekatalogów
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/admin/.*$ [NC] # Wyklucza ścieżki rozpoczynające się od "admin/"
RewriteCond %{REQUEST_URI} !^/admin/.*$ [NC]
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [R=301,L]
ErrorDocument 404 /index.php
RewriteCond %{REQUEST_URI} !^(.*)/libraries/(.*) [NC]
RewriteCond %{REQUEST_URI} !^(.*)/layout/(.*) [NC]
RewriteRule ^admin/([^/]*)/([^/]*)/(.*)$ admin/index.php?module=$1&action=$2&$3 [L]
RewriteRule ^admin/$ admin/index.php [L]
RewriteRule ^wyszukiwarka/(.*)/([0-9]*)$ index.php?module=search&action=search_results&query=$1&bs=$2 [L]
RewriteRule ^wyszukiwarka/(.*)$ index.php?module=search&action=search_results&query=$1&bs=1 [L]
RewriteRule ^zamowienie/([a-zA-Z0-9-]*)$ index.php?module=shop_order&action=order_details&order_hash=$1 [L]
RewriteRule ^potwierdzenie-platnosci/([a-zA-Z0-9-]*)$ index.php?module=shop_order&action=payment_confirmation&order_hash=$1 [L]
RewriteRule ^tpay-status$ index.php?module=shop_order&action=payment_status_tpay%{QUERY_STRING} [L]
RewriteRule ^platnosc-status$ index.php?module=shop_order&action=payment_status_hotpay%{QUERY_STRING} [L]
RewriteRule ^przelewy24-status$ index.php?module=shop_order&action=payment_status_przelewy24pl%{QUERY_STRING} [L]
RewriteRule ^koszyk$ index.php?module=shop_basket&action=main_view [L]
RewriteRule ^koszyk-podsumowanie$ index.php?module=shop_basket&action=summary_view [L]
RewriteRule ^zloz-zamowienie$ index.php?module=shop_basket&action=basket_save [L]
RewriteRule ^rejestracja$ index.php?module=shop_client&action=register_form [L]
RewriteRule ^logowanie$ index.php?module=shop_client&action=login_form [L]
RewriteRule ^wylogowanie$ index.php?module=shop_client&action=logout [L]
RewriteRule ^odzyskiwanie-hasla$ index.php?module=shop_client&action=recover_password [L]
RewriteRule ^panel-klienta/zamowienia$ index.php?module=shop_client&action=client_orders [L]
RewriteRule ^panel-klienta/adresy$ index.php?module=shop_client&action=client_addresses [L]
RewriteRule ^panel-klienta/nowy-adres$ index.php?module=shop_client&action=address_edit [L]
RewriteRule ^panel-klienta/edytuj-adres/([0-9]*)$ index.php?module=shop_client&action=address_edit&id=$1 [L]
RewriteRule ^panel-klienta/usun-adres/([0-9]*)$ index.php?module=shop_client&action=address_delete&id=$1 [L]
RewriteRule ^thumb/([0-9]*)/([0-9]*)/(.*)$ /libraries/thumb.php?img=$3&w=$1&h=$2 [L]
RewriteCond %{REQUEST_URI} ^/shopBasket/(.*)/(.*) [NC]
RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L]
RewriteCond %{REQUEST_URI} ^/shopClient/(.*)/(.*) [NC]
RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L]
RewriteCond %{REQUEST_URI} ^/shopProduct/(.*)/(.*) [NC]
RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L]
RewriteCond %{REQUEST_URI} ^/shopCoupon/(.*)/(.*) [NC]
RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L]
RewriteCond %{REQUEST_URI} ^/search/(.*)/(.*) [NC]
RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L]
RewriteCond %{REQUEST_URI} ^/shopBasket/(.*) [NC]
RewriteRule ^([^/]*)/([^/]*)$ index.php?module=$1&action=$2 [L]
RewriteCond %{REQUEST_URI} ^/shopClient/(.*) [NC]
RewriteRule ^([^/]*)/([^/]*)$ index.php?module=$1&action=$2 [L]
RewriteCond %{REQUEST_URI} ^/shopProduct/(.*) [NC]
RewriteRule ^([^/]*)/([^/]*)$ index.php?module=$1&action=$2 [L]
RewriteCond %{REQUEST_URI} ^/shopCoupon/(.*) [NC]
RewriteRule ^([^/]*)/([^/]*)$ index.php?module=$1&action=$2 [L]
RewriteCond %{REQUEST_URI} ^/search/(.*) [NC]
RewriteRule ^([^/]*)/([^/]*)$ index.php?module=$1&action=$2 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.php
RewriteRule ^ /%1 [R=301,L]
<IfModule mod_deflate.c>
@@ -116,356 +74,12 @@ ExpiresByType image/svg+xml "access plus 1 month"
Order Deny,Allow
Deny from all
</Files>
RewriteRule ^pl/$ index.php?a=change_language&id=pl [L]
RewriteRule ^newsletter/signin/$ index.php?module=newsletter&action=signin [L]
RewriteRule ^newsletter/confirm/hash=(.*)$ index.php?module=newsletter&action=confirm&hash=$1 [L]
RewriteRule ^newsletter/unsubscribe/hash=(.*)$ index.php?module=newsletter&action=unsubscribe&hash=$1 [L]
RewriteRule ^producenci$ index.php?module=shop_producer&action=list&layout_id=2&%{QUERY_STRING} [L]
RewriteRule ^producent/stlflix$ index.php?module=shop_producer&action=products&producer_id=23&layout_id=2&%{QUERY_STRING} [L]
RewriteRule ^producent/stlflix/([0-9]+)$ index.php?module=shop_producer&action=products&producer_id=23&layout_id=2&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^producent/signum-workshop$ index.php?module=shop_producer&action=products&producer_id=24&layout_id=2&%{QUERY_STRING} [L]
RewriteRule ^producent/signum-workshop/([0-9]+)$ index.php?module=shop_producer&action=products&producer_id=24&layout_id=2&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^producent/stlminiatures$ index.php?module=shop_producer&action=products&producer_id=25&layout_id=2&%{QUERY_STRING} [L]
RewriteRule ^producent/stlminiatures/([0-9]+)$ index.php?module=shop_producer&action=products&producer_id=25&layout_id=2&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezenty-dla$ index.php?category=121&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezenty-dla/([0-9]+)$ index.php?category=121&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezenty-dla/1$ prezenty-dla [R=301,L]
RewriteRule ^prezent-dla-niej$ index.php?category=155&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-niej/([0-9]+)$ index.php?category=155&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-niej/1$ prezent-dla-niej [R=301,L]
RewriteRule ^prezent-dla-babci$ index.php?category=122&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-babci/([0-9]+)$ index.php?category=122&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-babci/1$ prezent-dla-babci [R=301,L]
RewriteRule ^prezent-dla-dziewczyny$ index.php?category=157&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-dziewczyny/([0-9]+)$ index.php?category=157&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-dziewczyny/1$ prezent-dla-dziewczyny [R=301,L]
RewriteRule ^prezent-dla-mamy$ index.php?category=166&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-mamy/([0-9]+)$ index.php?category=166&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-mamy/1$ prezent-dla-mamy [R=301,L]
RewriteRule ^prezent-dla-niego$ index.php?category=156&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-niego/([0-9]+)$ index.php?category=156&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-niego/1$ prezent-dla-niego [R=301,L]
RewriteRule ^prezent-dla-chlopaka$ index.php?category=158&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-chlopaka/([0-9]+)$ index.php?category=158&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-chlopaka/1$ prezent-dla-chlopaka [R=301,L]
RewriteRule ^prezent-dla-dziadka$ index.php?category=123&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-dziadka/([0-9]+)$ index.php?category=123&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-dziadka/1$ prezent-dla-dziadka [R=301,L]
RewriteRule ^prezent-dla-taty$ index.php?category=169&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-taty/([0-9]+)$ index.php?category=169&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-taty/1$ prezent-dla-taty [R=301,L]
RewriteRule ^prezent-dla-dziecka$ index.php?category=124&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-dziecka/([0-9]+)$ index.php?category=124&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-dla-dziecka/1$ prezent-dla-dziecka [R=301,L]
RewriteRule ^inne-okazje$ index.php?category=104&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^inne-okazje/([0-9]+)$ index.php?category=104&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^inne-okazje/1$ inne-okazje [R=301,L]
RewriteRule ^prezent-na-i-komunie-swieta$ index.php?category=174&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-i-komunie-swieta/([0-9]+)$ index.php?category=174&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-i-komunie-swieta/1$ prezent-na-i-komunie-swieta [R=301,L]
RewriteRule ^podziekowania-dla-gosci-na-komunie$ index.php?category=187&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-dla-gosci-na-komunie/([0-9]+)$ index.php?category=187&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-dla-gosci-na-komunie/1$ podziekowania-dla-gosci-na-komunie [R=301,L]
RewriteRule ^pudelka-na-pieniadze-na-komunie$ index.php?category=202&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^pudelka-na-pieniadze-na-komunie/([0-9]+)$ index.php?category=202&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^pudelka-na-pieniadze-na-komunie/1$ pudelka-na-pieniadze-na-komunie [R=301,L]
RewriteRule ^prezenty-na-dzien-babci-i-dziadka$ index.php?category=118&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezenty-na-dzien-babci-i-dziadka/([0-9]+)$ index.php?category=118&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezenty-na-dzien-babci-i-dziadka/1$ prezenty-na-dzien-babci-i-dziadka [R=301,L]
RewriteRule ^breloczki-dla-babci-i-dziadka$ index.php?category=162&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^breloczki-dla-babci-i-dziadka/([0-9]+)$ index.php?category=162&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^breloczki-dla-babci-i-dziadka/1$ breloczki-dla-babci-i-dziadka [R=301,L]
RewriteRule ^kubki-na-dzien-babci-i-dziadka$ index.php?category=195&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^kubki-na-dzien-babci-i-dziadka/([0-9]+)$ index.php?category=195&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^kubki-na-dzien-babci-i-dziadka/1$ kubki-na-dzien-babci-i-dziadka [R=301,L]
RewriteRule ^magnesy-na-dzien-babci-i-dziadka$ index.php?category=159&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^magnesy-na-dzien-babci-i-dziadka/([0-9]+)$ index.php?category=159&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^magnesy-na-dzien-babci-i-dziadka/1$ magnesy-na-dzien-babci-i-dziadka [R=301,L]
RewriteRule ^statuetki-na-dzien-babci-i-dziadka$ index.php?category=209&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^statuetki-na-dzien-babci-i-dziadka/([0-9]+)$ index.php?category=209&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^statuetki-na-dzien-babci-i-dziadka/1$ statuetki-na-dzien-babci-i-dziadka [R=301,L]
RewriteRule ^tabliczki-na-dzien-babci-i-dziadka$ index.php?category=160&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^tabliczki-na-dzien-babci-i-dziadka/([0-9]+)$ index.php?category=160&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^tabliczki-na-dzien-babci-i-dziadka/1$ tabliczki-na-dzien-babci-i-dziadka [R=301,L]
RewriteRule ^zakladki-na-dzien-babci-i-dziadka$ index.php?category=161&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zakladki-na-dzien-babci-i-dziadka/([0-9]+)$ index.php?category=161&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^zakladki-na-dzien-babci-i-dziadka/1$ zakladki-na-dzien-babci-i-dziadka [R=301,L]
RewriteRule ^prezent-na-boze-narodzenie$ index.php?category=145&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-boze-narodzenie/([0-9]+)$ index.php?category=145&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-boze-narodzenie/1$ prezent-na-boze-narodzenie [R=301,L]
RewriteRule ^bombki$ index.php?category=149&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^bombki/([0-9]+)$ index.php?category=149&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^bombki/1$ bombki [R=301,L]
RewriteRule ^kartki-swiateczne$ index.php?category=150&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^kartki-swiateczne/([0-9]+)$ index.php?category=150&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^kartki-swiateczne/1$ kartki-swiateczne [R=301,L]
RewriteRule ^swiateczne-dodatki$ index.php?category=197&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^swiateczne-dodatki/([0-9]+)$ index.php?category=197&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^swiateczne-dodatki/1$ swiateczne-dodatki [R=301,L]
RewriteRule ^wianki-swiateczne$ index.php?category=151&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^wianki-swiateczne/([0-9]+)$ index.php?category=151&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^wianki-swiateczne/1$ wianki-swiateczne [R=301,L]
RewriteRule ^prezenty-z-okazji-chrztu$ index.php?category=107&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezenty-z-okazji-chrztu/([0-9]+)$ index.php?category=107&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezenty-z-okazji-chrztu/1$ prezenty-z-okazji-chrztu [R=301,L]
RewriteRule ^dekoracje-i-akcesoria-na-chrzest$ index.php?category=153&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^dekoracje-i-akcesoria-na-chrzest/([0-9]+)$ index.php?category=153&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^dekoracje-i-akcesoria-na-chrzest/1$ dekoracje-i-akcesoria-na-chrzest [R=301,L]
RewriteRule ^pamiatki-na-chrzest$ index.php?category=208&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^pamiatki-na-chrzest/([0-9]+)$ index.php?category=208&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^pamiatki-na-chrzest/1$ pamiatki-na-chrzest [R=301,L]
RewriteRule ^podziekowania-na-chrzest$ index.php?category=114&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-na-chrzest/([0-9]+)$ index.php?category=114&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-na-chrzest/1$ podziekowania-na-chrzest [R=301,L]
RewriteRule ^podziekowania-dla-chrzestnych$ index.php?category=207&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-dla-chrzestnych/([0-9]+)$ index.php?category=207&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-dla-chrzestnych/1$ podziekowania-dla-chrzestnych [R=301,L]
RewriteRule ^podziekowania-dla-gosci-na-chrzest$ index.php?category=206&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-dla-gosci-na-chrzest/([0-9]+)$ index.php?category=206&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-dla-gosci-na-chrzest/1$ podziekowania-dla-gosci-na-chrzest [R=301,L]
RewriteRule ^prosby-o-bycie-rodzicem-chrzestnym$ index.php?category=116&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prosby-o-bycie-rodzicem-chrzestnym/([0-9]+)$ index.php?category=116&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prosby-o-bycie-rodzicem-chrzestnym/1$ prosby-o-bycie-rodzicem-chrzestnym [R=301,L]
RewriteRule ^pudelka-na-pieniadze-na-chrzest$ index.php?category=182&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^pudelka-na-pieniadze-na-chrzest/([0-9]+)$ index.php?category=182&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^pudelka-na-pieniadze-na-chrzest/1$ pudelka-na-pieniadze-na-chrzest [R=301,L]
RewriteRule ^tabliczki-z-modlitwa$ index.php?category=115&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^tabliczki-z-modlitwa/([0-9]+)$ index.php?category=115&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^tabliczki-z-modlitwa/1$ tabliczki-z-modlitwa [R=301,L]
RewriteRule ^zaproszenia-na-chrzest-swiety$ index.php?category=113&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zaproszenia-na-chrzest-swiety/([0-9]+)$ index.php?category=113&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^zaproszenia-na-chrzest-swiety/1$ zaproszenia-na-chrzest-swiety [R=301,L]
RewriteRule ^prezent-na-dzien-chlopaka$ index.php?category=141&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-chlopaka/([0-9]+)$ index.php?category=141&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-chlopaka/1$ prezent-na-dzien-chlopaka [R=301,L]
RewriteRule ^breloczki-dla-chlopaka$ index.php?category=193&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^breloczki-dla-chlopaka/([0-9]+)$ index.php?category=193&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^breloczki-dla-chlopaka/1$ breloczki-dla-chlopaka [R=301,L]
RewriteRule ^kubki-dla-chlopaka$ index.php?category=194&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^kubki-dla-chlopaka/([0-9]+)$ index.php?category=194&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^kubki-dla-chlopaka/1$ kubki-dla-chlopaka [R=301,L]
RewriteRule ^prezent-na-dzien-dziewczyn$ index.php?category=144&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-dziewczyn/([0-9]+)$ index.php?category=144&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-dziewczyn/1$ prezent-na-dzien-dziewczyn [R=301,L]
RewriteRule ^prezent-na-dzien-dziecka$ index.php?category=112&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-dziecka/([0-9]+)$ index.php?category=112&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-dziecka/1$ prezent-na-dzien-dziecka [R=301,L]
RewriteRule ^breloczki-dla-dzieci$ index.php?category=126&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^breloczki-dla-dzieci/([0-9]+)$ index.php?category=126&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^breloczki-dla-dzieci/1$ breloczki-dla-dzieci [R=301,L]
RewriteRule ^zakladki-do-ksiazek-dla-dziecka$ index.php?category=117&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zakladki-do-ksiazek-dla-dziecka/([0-9]+)$ index.php?category=117&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^zakladki-do-ksiazek-dla-dziecka/1$ zakladki-do-ksiazek-dla-dziecka [R=301,L]
RewriteRule ^prezent-na-dzien-matki$ index.php?category=164&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-matki/([0-9]+)$ index.php?category=164&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-matki/1$ prezent-na-dzien-matki [R=301,L]
RewriteRule ^breloczki-dla-mamy$ index.php?category=165&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^breloczki-dla-mamy/([0-9]+)$ index.php?category=165&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^breloczki-dla-mamy/1$ breloczki-dla-mamy [R=301,L]
RewriteRule ^kubki-na-dzien-matki$ index.php?category=190&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^kubki-na-dzien-matki/([0-9]+)$ index.php?category=190&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^kubki-na-dzien-matki/1$ kubki-na-dzien-matki [R=301,L]
RewriteRule ^skrzynki-na-wino$ index.php?category=188&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^skrzynki-na-wino/([0-9]+)$ index.php?category=188&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^skrzynki-na-wino/1$ skrzynki-na-wino [R=301,L]
RewriteRule ^tabliczki-na-dzien-matki$ index.php?category=170&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^tabliczki-na-dzien-matki/([0-9]+)$ index.php?category=170&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^tabliczki-na-dzien-matki/1$ tabliczki-na-dzien-matki [R=301,L]
RewriteRule ^prezent-na-dzien-ojca$ index.php?category=167&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-ojca/([0-9]+)$ index.php?category=167&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-ojca/1$ prezent-na-dzien-ojca [R=301,L]
RewriteRule ^breloczki-dla-taty$ index.php?category=168&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^breloczki-dla-taty/([0-9]+)$ index.php?category=168&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^breloczki-dla-taty/1$ breloczki-dla-taty [R=301,L]
RewriteRule ^prezent-na-dzien-nauczyciela$ index.php?category=196&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-nauczyciela/([0-9]+)$ index.php?category=196&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-dzien-nauczyciela/1$ prezent-na-dzien-nauczyciela [R=301,L]
RewriteRule ^prezenty-z-okazji-narodzin-dziecka$ index.php?category=105&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezenty-z-okazji-narodzin-dziecka/([0-9]+)$ index.php?category=105&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezenty-z-okazji-narodzin-dziecka/1$ prezenty-z-okazji-narodzin-dziecka [R=301,L]
RewriteRule ^magnesy-na-narodziny-dziecka$ index.php?category=154&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^magnesy-na-narodziny-dziecka/([0-9]+)$ index.php?category=154&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^magnesy-na-narodziny-dziecka/1$ magnesy-na-narodziny-dziecka [R=301,L]
RewriteRule ^metryczki-dzieciece$ index.php?category=125&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^metryczki-dzieciece/([0-9]+)$ index.php?category=125&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^metryczki-dzieciece/1$ metryczki-dzieciece [R=301,L]
RewriteRule ^tabliczki-do-zdjec$ index.php?category=110&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^tabliczki-do-zdjec/([0-9]+)$ index.php?category=110&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^tabliczki-do-zdjec/1$ tabliczki-do-zdjec [R=301,L]
RewriteRule ^prezent-na-odejscie-z-pracy$ index.php?category=198&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-odejscie-z-pracy/([0-9]+)$ index.php?category=198&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-odejscie-z-pracy/1$ prezent-na-odejscie-z-pracy [R=301,L]
RewriteRule ^prezent-na-slub$ index.php?category=184&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-slub/([0-9]+)$ index.php?category=184&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-slub/1$ prezent-na-slub [R=301,L]
RewriteRule ^podziekowania-slubne$ index.php?category=203&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-slubne/([0-9]+)$ index.php?category=203&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-slubne/1$ podziekowania-slubne [R=301,L]
RewriteRule ^podziekowania-dla-rodzicow$ index.php?category=204&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-dla-rodzicow/([0-9]+)$ index.php?category=204&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-dla-rodzicow/1$ podziekowania-dla-rodzicow [R=301,L]
RewriteRule ^podziekowania-dla-gosci-weselnych$ index.php?category=191&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-dla-gosci-weselnych/([0-9]+)$ index.php?category=191&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^podziekowania-dla-gosci-weselnych/1$ podziekowania-dla-gosci-weselnych [R=301,L]
RewriteRule ^pudelka-na-pieniadze-na-slub$ index.php?category=205&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^pudelka-na-pieniadze-na-slub/([0-9]+)$ index.php?category=205&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^pudelka-na-pieniadze-na-slub/1$ pudelka-na-pieniadze-na-slub [R=301,L]
RewriteRule ^skrzynki-na-wino-na-slub$ index.php?category=185&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^skrzynki-na-wino-na-slub/([0-9]+)$ index.php?category=185&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^skrzynki-na-wino-na-slub/1$ skrzynki-na-wino-na-slub [R=301,L]
RewriteRule ^prezent-na-urodziny$ index.php?category=181&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-urodziny/([0-9]+)$ index.php?category=181&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezent-na-urodziny/1$ prezent-na-urodziny [R=301,L]
RewriteRule ^k-199-prezent-na-wieczor-panienski$ index.php?category=199&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^k-199-prezent-na-wieczor-panienski/([0-9]+)$ index.php?category=199&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^k-199-prezent-na-wieczor-panienski/1$ k-199-prezent-na-wieczor-panienski [R=301,L]
RewriteRule ^prezenty-na-wielkanoc$ index.php?category=111&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezenty-na-wielkanoc/([0-9]+)$ index.php?category=111&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezenty-na-wielkanoc/1$ prezenty-na-wielkanoc [R=301,L]
RewriteRule ^dekoracje-i-ozdoby$ index.php?category=108&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^dekoracje-i-ozdoby/([0-9]+)$ index.php?category=108&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^dekoracje-i-ozdoby/1$ dekoracje-i-ozdoby [R=301,L]
RewriteRule ^dekoracja-scienne$ index.php?category=152&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^dekoracja-scienne/([0-9]+)$ index.php?category=152&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^dekoracja-scienne/1$ dekoracja-scienne [R=301,L]
RewriteRule ^dekoracje-i-ozdoby-do-pokoju-dziecka$ index.php?category=109&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^dekoracje-i-ozdoby-do-pokoju-dziecka/([0-9]+)$ index.php?category=109&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^dekoracje-i-ozdoby-do-pokoju-dziecka/1$ dekoracje-i-ozdoby-do-pokoju-dziecka [R=301,L]
RewriteRule ^dodatki-do-pokoju$ index.php?category=175&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^dodatki-do-pokoju/([0-9]+)$ index.php?category=175&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^dodatki-do-pokoju/1$ dodatki-do-pokoju [R=301,L]
RewriteRule ^girlandy$ index.php?category=163&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^girlandy/([0-9]+)$ index.php?category=163&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^girlandy/1$ girlandy [R=301,L]
RewriteRule ^napisy-do-pokoju-dziecka$ index.php?category=171&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^napisy-do-pokoju-dziecka/([0-9]+)$ index.php?category=171&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^napisy-do-pokoju-dziecka/1$ napisy-do-pokoju-dziecka [R=301,L]
RewriteRule ^wieszaki-drewniane$ index.php?category=173&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^wieszaki-drewniane/([0-9]+)$ index.php?category=173&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^wieszaki-drewniane/1$ wieszaki-drewniane [R=301,L]
RewriteRule ^prezenty-wg-rodzaju$ index.php?category=176&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^prezenty-wg-rodzaju/([0-9]+)$ index.php?category=176&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^prezenty-wg-rodzaju/1$ prezenty-wg-rodzaju [R=301,L]
RewriteRule ^breloki-do-kluczy$ index.php?category=177&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^breloki-do-kluczy/([0-9]+)$ index.php?category=177&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^breloki-do-kluczy/1$ breloki-do-kluczy [R=301,L]
RewriteRule ^kubki$ index.php?category=189&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^kubki/([0-9]+)$ index.php?category=189&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^kubki/1$ kubki [R=301,L]
RewriteRule ^magnesy$ index.php?category=179&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^magnesy/([0-9]+)$ index.php?category=179&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^magnesy/1$ magnesy [R=301,L]
RewriteRule ^medale$ index.php?category=180&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^medale/([0-9]+)$ index.php?category=180&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^medale/1$ medale [R=301,L]
RewriteRule ^ozdoby-wielkanocne$ index.php?category=186&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^ozdoby-wielkanocne/([0-9]+)$ index.php?category=186&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^ozdoby-wielkanocne/1$ ozdoby-wielkanocne [R=301,L]
RewriteRule ^pudelka-na-pieniadze$ index.php?category=201&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^pudelka-na-pieniadze/([0-9]+)$ index.php?category=201&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^pudelka-na-pieniadze/1$ pudelka-na-pieniadze [R=301,L]
RewriteRule ^skrzynki-na-alkohol$ index.php?category=183&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^skrzynki-na-alkohol/([0-9]+)$ index.php?category=183&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^skrzynki-na-alkohol/1$ skrzynki-na-alkohol [R=301,L]
RewriteRule ^statuetki$ index.php?category=200&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^statuetki/([0-9]+)$ index.php?category=200&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^statuetki/1$ statuetki [R=301,L]
RewriteRule ^tabliczki-z-grawerem$ index.php?category=192&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^tabliczki-z-grawerem/([0-9]+)$ index.php?category=192&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^tabliczki-z-grawerem/1$ tabliczki-z-grawerem [R=301,L]
RewriteRule ^zakladki-do-ksiazek$ index.php?category=178&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zakladki-do-ksiazek/([0-9]+)$ index.php?category=178&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^zakladki-do-ksiazek/1$ zakladki-do-ksiazek [R=301,L]
RewriteRule ^zawieszki$ index.php?category=146&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zawieszki/([0-9]+)$ index.php?category=146&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^zawieszki/1$ zawieszki [R=301,L]
RewriteRule ^figurki-3d$ index.php?category=127&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-3d/([0-9]+)$ index.php?category=127&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-3d/1$ figurki-3d [R=301,L]
RewriteRule ^figurki-centaury$ index.php?category=134&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-centaury/([0-9]+)$ index.php?category=134&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-centaury/1$ figurki-centaury [R=301,L]
RewriteRule ^figurki-czlowiek$ index.php?category=132&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-czlowiek/([0-9]+)$ index.php?category=132&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-czlowiek/1$ figurki-czlowiek [R=301,L]
RewriteRule ^figurki-demony$ index.php?category=139&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-demony/([0-9]+)$ index.php?category=139&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-demony/1$ figurki-demony [R=301,L]
RewriteRule ^figurki-elfy$ index.php?category=128&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-elfy/([0-9]+)$ index.php?category=128&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-elfy/1$ figurki-elfy [R=301,L]
RewriteRule ^figurki-ghule$ index.php?category=135&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-ghule/([0-9]+)$ index.php?category=135&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-ghule/1$ figurki-ghule [R=301,L]
RewriteRule ^figurki-gnomy$ index.php?category=129&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-gnomy/([0-9]+)$ index.php?category=129&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-gnomy/1$ figurki-gnomy [R=301,L]
RewriteRule ^figurki-krasnoludow$ index.php?category=133&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-krasnoludow/([0-9]+)$ index.php?category=133&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-krasnoludow/1$ figurki-krasnoludow [R=301,L]
RewriteRule ^figurki-orki$ index.php?category=131&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-orki/([0-9]+)$ index.php?category=131&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-orki/1$ figurki-orki [R=301,L]
RewriteRule ^figurki-smoki$ index.php?category=136&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-smoki/([0-9]+)$ index.php?category=136&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-smoki/1$ figurki-smoki [R=301,L]
RewriteRule ^figurki-trolle$ index.php?category=138&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-trolle/([0-9]+)$ index.php?category=138&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-trolle/1$ figurki-trolle [R=301,L]
RewriteRule ^figurki-wampiry$ index.php?category=137&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-wampiry/([0-9]+)$ index.php?category=137&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-wampiry/1$ figurki-wampiry [R=301,L]
RewriteRule ^figurki-zombie$ index.php?category=130&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-zombie/([0-9]+)$ index.php?category=130&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-zombie/1$ figurki-zombie [R=301,L]
RewriteRule ^figurki-inne$ index.php?category=140&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^figurki-inne/([0-9]+)$ index.php?category=140&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^figurki-inne/1$ figurki-inne [R=301,L]
RewriteCond %{REQUEST_URI} ^/home$
RewriteRule ^(.*)$ http://www.pomysloweprezenty.pl/ [R=permanent,L]
RewriteCond %{REQUEST_URI} ^/home-1$
RewriteRule ^(.*)$ http://www.pomysloweprezenty.pl/ [R=permanent,L]
RewriteRule ^$ index.php?a=page&id=121&lang=pl [L]
RewriteRule ^home$ index.php?a=page&id=121&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^home/([0-9]+)$ index.php?a=page&id=121&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^home/1$ home [R=301,L]
RewriteRule ^kontakt$ index.php?a=page&id=219&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^kontakt/([0-9]+)$ index.php?a=page&id=219&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^kontakt/1$ kontakt [R=301,L]
RewriteRule ^regulamin$ index.php?a=page&id=122&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^regulamin/([0-9]+)$ index.php?a=page&id=122&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^regulamin/1$ regulamin [R=301,L]
RewriteRule ^dostawa$ index.php?a=page&id=123&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^dostawa/([0-9]+)$ index.php?a=page&id=123&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^dostawa/1$ dostawa [R=301,L]
RewriteRule ^formy-platnosci$ index.php?a=page&id=124&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^formy-platnosci/([0-9]+)$ index.php?a=page&id=124&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^formy-platnosci/1$ formy-platnosci [R=301,L]
RewriteRule ^zwroty-i-reklamacje$ index.php?a=page&id=125&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zwroty-i-reklamacje/([0-9]+)$ index.php?a=page&id=125&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^zwroty-i-reklamacje/1$ zwroty-i-reklamacje [R=301,L]
RewriteRule ^dev$ index.php?a=page&id=205&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^dev/([0-9]+)$ index.php?a=page&id=205&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^dev/1$ dev [R=301,L]
RewriteRule ^blog$ index.php?a=page&id=173&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^blog/([0-9]+)$ index.php?a=page&id=173&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^blog/1$ blog [R=301,L]
RewriteRule ^tradycje-swiat-bozego-narodzenia-w-polsce$ index.php?article=23&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^swiateczne-zyczenia-bozonarodzeniowe$ index.php?article=24&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^dzien-pluszowego-misia-co-to-za-swieto-kiedy-wypada-i-jaka-jest-jego-historia$ index.php?article=25&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^najlepsze-zyczenia-na-dzien-babci-i-dziadka$ index.php?article=26&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zyczenia-i-wierszyki-dla-taty-na-dzien-ojca$ index.php?article=27&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zyczenia-na-dzien-chlopaka-smieszne-i-oryginalne$ index.php?article=28&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zyczenia-na-dzien-nauczyciela-madre-zabawne-krotkie$ index.php?article=29&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zyczenia-na-roczek-dla-chlopca-i-dziewczynki$ index.php?article=30&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zyczenia-na-chrzest-dla-chlopca-i-dziewczynki$ index.php?article=31&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^najpiekniejsze-cytaty-o-dzieciach-ktore-powinienes-znac$ index.php?article=32&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zyczenia-noworoczne-2025-najlepsze-zyczenia-na-nowy-rok$ index.php?article=33&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zyczenia-na-walentynki-2025-najpiekniejsze-oryginalne$ index.php?article=34&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^zyczenia-na-dzien-kobiet-piekne-i-oryginalne$ index.php?article=35&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^najlepsze-zyczenia-wielkanocne-oryginalne-smieszne-krotkie$ index.php?article=36&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^najpiekniejsze-i-oryginalne-zyczenia-z-okazji-slubu$ index.php?article=37&lang=pl&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]

2
.vscode/ftp-kr.json vendored
View File

@@ -6,7 +6,7 @@
"protocol": "ftp",
"port": 0,
"fileNameEncoding": "utf8",
"autoUpload": true,
"autoUpload": false,
"autoDelete": false,
"autoDownload": false,
"ignoreRemoteModification": true,

9
.vscode/sftp.json vendored
View File

@@ -6,7 +6,12 @@
"username": "www@pomysloweprezenty.pl",
"password": "vx6HmtcdGraQTBwj3BDV",
"remotePath": "/public_html",
"uploadOnSave": false,
"uploadOnSave": true,
"useTempFile": false,
"openSsh": false
"openSsh": false,
"ignore": [
".vscode",
".git",
".DS_Store"
]
}

View File

@@ -8,6 +8,12 @@ function __autoload_my_classes( $classname )
if ( file_exists( $f ) )
require_once( $f );
else
{
$f = 'autoload/' . implode( '/' , $q ) . '/' . $c . '.php';
if ( file_exists( $f ) )
require_once( $f );
}
}
spl_autoload_register( '__autoload_my_classes' );
date_default_timezone_set( 'Europe/Warsaw' );
@@ -28,55 +34,57 @@ $mdb = new medoo( [
'charset' => 'utf8'
] );
if ( !$lang_id = \S::get_session( 'current-lang' ) )
$langRepo = new \Domain\Languages\LanguagesRepository( $mdb );
if ( !$lang_id = \Shared\Helpers\Helpers::get_session( 'current-lang' ) )
{
$lang_id = \front\factory\Languages::default_language();
\S::set_session( 'current-lang', $lang_id );
$lang_id = $langRepo->defaultLanguage();
\Shared\Helpers\Helpers::set_session( 'current-lang', $lang_id );
}
if ( !$lang = \S::get_session( 'lang' ) )
if ( !$lang = \Shared\Helpers\Helpers::get_session( 'lang' ) )
{
$lang = \front\factory\Languages::lang_translations();
\S::set_session( 'lang', $lang );
$lang = $langRepo->translations();
\Shared\Helpers\Helpers::set_session( 'lang', $lang );
}
\front\controls\Site::check_url_params();
\front\App::checkUrlParams();
if ( !$settings = \S::get_session( 'settings' ) )
if ( !$settings = \Shared\Helpers\Helpers::get_session( 'settings' ) )
{
$settings = \front\factory\Settings::settings_details();
\S::set_session( 'settings', $settings );
$settings = ( new \Domain\Settings\SettingsRepository( $mdb ) )->allSettings();
\Shared\Helpers\Helpers::set_session( 'settings', $settings );
}
$a = \S::get( 'a' );
$a = \Shared\Helpers\Helpers::get( 'a' );
if ( $a == 'basket_change_transport' )
{
\S::set_session( 'transport_id', \S::get( 'transport_id' ) );
\Shared\Helpers\Helpers::set_session( 'transport_id', \Shared\Helpers\Helpers::get( 'transport_id' ) );
$basket = \S::get_session( 'basket' );
$basket_summary = \front\factory\ShopBasket::summary_price( $basket, null );
$transport_cost = \front\factory\ShopTransport::transport_cost( \S::get( 'transport_id' ) );
$basket = \Shared\Helpers\Helpers::get_session( 'basket' );
$basket_summary = \Domain\Basket\BasketCalculator::summaryPrice( $basket, null, $lang_id );
$transport_cost = ( new \Domain\Transport\TransportRepository( $mdb ) )->transportCostCached( \Shared\Helpers\Helpers::get( 'transport_id' ) );
echo json_encode( [ 'summary' => \S::decimal( $basket_summary + $transport_cost ) . ' zł' ] );
echo json_encode( [ 'summary' => \Shared\Helpers\Helpers::decimal( $basket_summary + $transport_cost ) . ' zł' ] );
exit;
}
if ( $a == 'change_payment' )
{
\S::set_session( 'payment_method_id', \S::get( 'payment_method_id' ) );
$transports = \front\factory\ShopTransport::transports_list( \S::get( 'payment_method_id' ) );
\Shared\Helpers\Helpers::set_session( 'payment_method_id', \Shared\Helpers\Helpers::get( 'payment_method_id' ) );
$transports = ( new \Domain\Transport\TransportRepository( $mdb ) )->forPaymentMethod( (int)\Shared\Helpers\Helpers::get( 'payment_method_id' ) );
echo json_encode( [ 'transports' => $transports ] );
exit;
}
if ( $a == 'contact_form' )
{
if ( ( !\S::get( 'email' ) and \S::get( 'phone' ) ) )
if ( ( !\Shared\Helpers\Helpers::get( 'email' ) and \Shared\Helpers\Helpers::get( 'phone' ) ) )
$response = [ 'status' => 'error' ];
else
{
if ( \S::send_email( $settings['contact_email'], \S::get( 'subject' ), \S::get( 'text' ) . '<p>Nr telefonu: ' . \S::get( 'phone' ) . '</p><p>Email: ' . \S::get( 'email' ) . '</p>', \S::get( 'email' ) ) )
if ( \Shared\Helpers\Helpers::send_email( $settings['contact_email'], \Shared\Helpers\Helpers::get( 'subject' ), \Shared\Helpers\Helpers::get( 'text' ) . '<p>Nr telefonu: ' . \Shared\Helpers\Helpers::get( 'phone' ) . '</p><p>Email: ' . \Shared\Helpers\Helpers::get( 'email' ) . '</p>', \Shared\Helpers\Helpers::get( 'email' ) ) )
$response = [ 'status' => 'ok' ];
}
@@ -92,6 +100,6 @@ if ( $a == 'cookie_close' )
if ( $a == 'banner_close' )
{
\S::set_session( 'banner_close', true );
\Shared\Helpers\Helpers::set_session( 'banner_close', true );
}
?>

69
api.php
View File

@@ -9,6 +9,12 @@ function __autoload_my_classes( $classname )
if ( file_exists( $f ) )
require_once( $f );
else
{
$f = 'autoload/' . implode( '/', $q ) . '/' . $c . '.php';
if ( file_exists( $f ) )
require_once( $f );
}
}
spl_autoload_register( '__autoload_my_classes' );
@@ -19,19 +25,62 @@ require_once 'libraries/medoo/medoo.php';
require_once 'libraries/phpmailer/class.phpmailer.php';
require_once 'libraries/phpmailer/class.smtp.php';
session_start();
// Detect API request (stateless, no session)
$isApiRequest = isset( $_GET['endpoint'] );
if ( !isset( $_SESSION[ 'check' ] ) )
if ( !$isApiRequest )
{
session_start();
if ( !isset( $_SESSION[ 'check' ] ) )
{
session_regenerate_id();
$_SESSION[ 'check' ] = true;
$_SESSION[ 'ip' ] = $_SERVER[ 'REMOTE_ADDR' ];
}
}
if ( $_SESSION[ 'ip' ] !== $_SERVER[ 'REMOTE_ADDR' ] )
{
if ( $_SESSION[ 'ip' ] !== $_SERVER[ 'REMOTE_ADDR' ] )
{
session_destroy();
header( 'Location: /' );
exit;
}
}
// --- API routing (ordersPRO) ---
if ( $isApiRequest )
{
if ( !headers_sent() )
header( 'Content-Type: application/json; charset=utf-8' );
try
{
$mdb = new medoo( [
'database_type' => 'mysql',
'database_name' => $database[ 'name' ],
'server' => $database[ 'host' ],
'username' => $database[ 'user' ],
'password' => $database[ 'password' ],
'charset' => 'utf8'
] );
$settingsRepo = new \Domain\Settings\SettingsRepository( $mdb );
$router = new \api\ApiRouter( $mdb, $settingsRepo );
$router->handle();
}
catch ( \Throwable $e )
{
if ( !headers_sent() )
header( 'Content-Type: application/json; charset=utf-8' );
http_response_code( 500 );
echo json_encode( [
'status' => 'error',
'code' => 'INTERNAL_ERROR',
'message' => 'Internal server error'
], JSON_UNESCAPED_UNICODE );
}
exit;
}
@@ -44,16 +93,18 @@ $mdb = new medoo( [
'charset' => 'utf8'
] );
$settings = \front\factory\Settings::settings_details();
$settingsRepo = new \Domain\Settings\SettingsRepository( $mdb );
$settings = $settingsRepo->allSettings();
if ( \S::get( 'ekomi_csv' ) )
// --- Ekomi CSV export ---
if ( \Shared\Helpers\Helpers::get( 'ekomi_csv' ) )
{
$csv_array = [ [ 'ORDER_ID', 'MAIL', 'FIRST_NAME', 'LAST_NAME', 'PRODUCT_ID', 'PRODUCT_NAME' ] ];
$orders_id = $mdb -> select( 'pp_shop_order_statuses', 'order_id', [ 'AND' => [ 'status_id' => 6, 'date[~]' => date( 'Y-m-d', strtotime( '-1 day', time() ) ) ] ] );
$orders_id = array_unique( $orders_id );
if ( \S::is_array_fix( $orders_id ) )
if ( \Shared\Helpers\Helpers::is_array_fix( $orders_id ) )
{
foreach ( $orders_id as $order_id )
{
@@ -61,7 +112,7 @@ if ( \S::get( 'ekomi_csv' ) )
if ( $order )
{
$products = $mdb -> select( 'pp_shop_order_products', '*', [ 'order_id' => $order['id'] ] );
if ( \S::is_array_fix( $products ) ) foreach ( $products as $product )
if ( \Shared\Helpers\Helpers::is_array_fix( $products ) ) foreach ( $products as $product )
{
$csv_array[] = [ $order['id'], $order['client_email'], $order['client_name'], $order['client_surname'], $product['product_id'], $product['name'] ];
}

View File

@@ -1,6 +1,4 @@
<?php
use shop\Order;
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED );
function __autoload_my_classes( $classname )
@@ -11,6 +9,12 @@ function __autoload_my_classes( $classname )
if ( file_exists( $f ) )
require_once( $f );
else
{
$f = 'autoload/' . implode( '/', $q ) . '/' . $c . '.php';
if ( file_exists( $f ) )
require_once( $f );
}
}
spl_autoload_register( '__autoload_my_classes' );
@@ -52,12 +56,12 @@ if ( !$config['trustmate']['enabled'] )
exit;
}
$settings = \front\factory\Settings::settings_details();
$settings = ( new \Domain\Settings\SettingsRepository( $mdb ) )->allSettings();
$order_id = $mdb -> get( 'pp_shop_orders', '*', [ 'AND' => [ 'status' => 6, 'trustmate_send' => 0 ] ] );
if ( is_array( $order_id ) and $order_id['id'] )
{
$order = \front\factory\ShopOrder::order_details( $order_id['id'] );
$order = ( new \Domain\Order\OrderRepository( $mdb ) )->orderDetailsFrontend( $order_id['id'] );
?>
<!DOCTYPE html>
<head>
@@ -73,13 +77,14 @@ if ( is_array( $order_id ) and $order_id['id'] )
{
'local_id': <?= (int)$product['product_id'];?>,
'name': '<?= $product['name'];?>',
'product_url': 'https://pomysloweprezenty.pl<?= \front\factory\ShopProduct::product_url( new \shop\Product( $product['product_id'] ) );?>',
"image_url": "https://pomysloweprezenty.pl<?= \front\factory\ShopProduct::product_image( $product['product_id'] );?>"
'product_url': 'https://pomysloweprezenty.pl<?= \front\Views\ShopProduct::productUrl( ( new \Domain\Product\ProductRepository( $mdb ) )->findCached( $product['product_id'], 'pl' ) );?>',
"image_url": "https://pomysloweprezenty.pl<?= ( new \Domain\Product\ProductRepository( $mdb ) )->getFirstImageCached( (int)$product['product_id'] );?>"
}<? if ( $product != end( $order['products'] ) ) echo ',';?>
<? endforeach;?>
];
</script>
<script type="text/javascript" src='https://trustmate.io/api/invitation/script'></script>
</script>
</head>
<body>
<h1>TrustMate Cron</h1>

View File

@@ -521,6 +521,17 @@ $processor->registerHandler( \Domain\CronJob\CronJobType::APILO_SEND_ORDER, func
{
$mdb->update( 'pp_shop_orders', [ 'apilo_order_id' => $response['id'] ], [ 'id' => $order['id'] ] );
\Domain\Integrations\ApiloLogger::log( $mdb, 'send_order', (int)$order['id'], 'Zamówienie wysłane do Apilo (apilo_order_id: ' . $response['id'] . ')', [ 'http_code' => $http_code_send, 'response' => $response ] );
// Wyczyść stare stuck joby sync_payment/sync_status dla tego zamówienia
$orderPayloadJson = json_encode(['order_id' => (int)$order['id']]);
$mdb->delete('pp_cron_jobs', [
'AND' => [
'job_type' => [\Domain\CronJob\CronJobType::APILO_SYNC_PAYMENT, \Domain\CronJob\CronJobType::APILO_SYNC_STATUS],
'payload' => $orderPayloadJson,
'status' => [\Domain\CronJob\CronJobType::STATUS_PENDING, \Domain\CronJob\CronJobType::STATUS_FAILED],
]
]);
echo '<p>Wysłałem zamówienie do apilo.com: ID: ' . $order['id'] . ' - ' . $response['id'] . '</p>';
}
}
@@ -760,7 +771,8 @@ $processor->registerHandler( \Domain\CronJob\CronJobType::TRUSTMATE_INVITATION,
$result = $processor->run( 20 );
// Powiadomienie mailowe o trwale nieudanych zadaniach Apilo
// Powiadomienie mailowe o problemach Apilo
// 1. Trwale failed joby (nie-order: token, product sync itp.)
$failedApiloJobs = $mdb->select('pp_cron_jobs', ['id', 'job_type', 'last_error', 'payload', 'attempts', 'completed_at'], [
'AND' => [
'status' => 'failed',
@@ -768,16 +780,51 @@ $failedApiloJobs = $mdb->select('pp_cron_jobs', ['id', 'job_type', 'last_error',
'completed_at[>=]' => date('Y-m-d H:i:s', time() - 120),
]
]);
if (!empty($failedApiloJobs)) {
$emailBody = "Następujące zadania Apilo zakończyły się trwałym błędem (wyczerpano limit prób):\n\n";
foreach ($failedApiloJobs as $fj) {
$emailBody .= "Job #" . $fj['id'] . " (" . $fj['job_type'] . ")\n";
$emailBody .= " Payload: " . $fj['payload'] . "\n";
// 2. Order joby z wieloma próbami (infinite retry, ale wymagają uwagi)
$stuckOrderJobs = $mdb->select('pp_cron_jobs', ['id', 'job_type', 'last_error', 'payload', 'attempts', 'scheduled_at'], [
'AND' => [
'status' => 'pending',
'job_type' => [\Domain\CronJob\CronJobType::APILO_SEND_ORDER, \Domain\CronJob\CronJobType::APILO_SYNC_PAYMENT, \Domain\CronJob\CronJobType::APILO_SYNC_STATUS],
'attempts[>=]' => 10,
]
]);
$allProblems = array_merge($failedApiloJobs, $stuckOrderJobs);
if (!empty($allProblems)) {
$emailBody = "";
$orderNumbers = [];
foreach ($allProblems as $fj) {
$payloadData = is_string($fj['payload']) ? json_decode($fj['payload'], true) : $fj['payload'];
$orderId = isset($payloadData['order_id']) ? (int)$payloadData['order_id'] : 0;
$isOrderJob = \Domain\CronJob\CronJobType::isOrderRelatedApiloJob($fj['job_type']);
$statusLabel = $isOrderJob ? 'PONAWIANY CO 30 MIN' : 'TRWAŁY BŁĄD';
$emailBody .= "Job #" . $fj['id'] . " (" . $fj['job_type'] . ") — " . $statusLabel . "\n";
if ($orderId > 0) {
$order = $mdb->get('pp_shop_orders', ['id', 'client_name', 'client_surname', 'date_order', 'summary'], ['id' => $orderId]);
if ($order) {
$emailBody .= " Zamówienie: #" . $order['id'] . "\n";
$emailBody .= " Klient: " . trim($order['client_name'] . ' ' . $order['client_surname']) . "\n";
$emailBody .= " Data zamówienia: " . $order['date_order'] . "\n";
$emailBody .= " Kwota: " . $order['summary'] . " PLN\n";
$orderNumbers[] = '#' . $order['id'];
}
}
$emailBody .= " Próby: " . $fj['attempts'] . "\n";
$emailBody .= " Błąd: " . $fj['last_error'] . "\n";
$emailBody .= " Data: " . $fj['completed_at'] . "\n\n";
$emailBody .= " Data: " . ($fj['completed_at'] ? $fj['completed_at'] : $fj['scheduled_at']) . "\n\n";
}
\Shared\Helpers\Helpers::send_email('biuro@project-pro.pl', 'shopPRO: Trwały błąd synchronizacji Apilo (' . count($failedApiloJobs) . ' zadań)', $emailBody);
$subject = 'shopPRO: Problemy synchronizacji Apilo';
if (!empty($orderNumbers)) {
$subject .= ' — zamówienia ' . implode(', ', array_unique($orderNumbers));
}
$subject .= ' (' . count($allProblems) . ' zadań)';
\Shared\Helpers\Helpers::send_email('biuro@project-pro.pl', $subject, $emailBody);
}
echo '<hr>';

View File

@@ -8,6 +8,12 @@ function __autoload_my_classes( $classname )
if ( file_exists( $f ) )
require_once( $f );
else
{
$f = 'autoload/' . implode( '/' , $q ) . '/' . $c . '.php';
if ( file_exists( $f ) )
require_once( $f );
}
}
spl_autoload_register( '__autoload_my_classes' );
date_default_timezone_set( 'Europe/Warsaw' );
@@ -26,7 +32,7 @@ $mdb = new medoo( [
'charset' => 'utf8'
] );
if ( $file_id = \S::get( 'file' ) )
if ( $file_id = \Shared\Helpers\Helpers::get( 'file' ) )
{
$result = $mdb -> get( 'pp_articles_files', [ 'src' ], [ 'id' => $file_id ] );
if ( $result )

File diff suppressed because it is too large Load Diff

152
index.php
View File

@@ -9,6 +9,12 @@ function __autoload_my_classes( $classname )
if ( file_exists( $f ) )
require_once( $f );
else
{
$f = 'autoload/' . implode( '/', $q ) . '/' . $c . '.php';
if ( file_exists( $f ) )
require_once( $f );
}
}
spl_autoload_register( '__autoload_my_classes' );
@@ -16,17 +22,9 @@ date_default_timezone_set( 'Europe/Warsaw' );
require_once 'config.php';
require_once 'libraries/medoo/medoo.php';
require_once 'libraries/rb.php';
require_once 'libraries/phpmailer/class.phpmailer.php';
require_once 'libraries/phpmailer/class.smtp.php';
\R::setup( 'mysql:host=' . $database[ 'host' ] . ';dbname=' . $database[ 'name' ], $database[ 'user' ], $database[ 'password' ] );
\R::ext( 'xdispense', function ( $type )
{
return R::getRedBean() -> dispense( $type );
} );
$pdo = \R::getPDO();
session_start();
if ( !isset( $_SESSION[ 'check' ] ) )
@@ -53,26 +51,71 @@ $mdb = new medoo( [
'time_debug' => $database['time_debug']
] );
\front\controls\Site::check_url_params();
// check routes
$parsed_url = parse_url($_SERVER['REQUEST_URI']);
$request_uri = ltrim($parsed_url['path'], '/');
$query_string = isset($parsed_url['query']) ? $parsed_url['query'] : '';
parse_str($query_string, $query_params);
if ( !$lang_id = \S::get_session( 'current-lang' ) )
if ($request_uri != '')
{
$lang_id = \front\factory\Languages::default_language();
\S::set_session( 'current-lang', $lang_id );
$cache = new \Shared\Cache\CacheHandler();
$cacheKey = 'pp_routes:all';
$routesCached = $cache->get($cacheKey);
if ($routesCached === false || $routesCached === null)
{
$routes = $mdb->select('pp_routes', '*');
$cache->set($cacheKey, $routes, 86400);
}
else
{
$routes = unserialize($routesCached);
}
foreach ($routes as $route)
{
$pattern = $route['pattern'];
$destination = $route['destination'];
if (preg_match("#^" . $pattern . "#", $request_uri, $matches))
{
// Replace placeholders in the destination with matches from the request URI
$destination = preg_replace("#^" . $pattern . "#", $destination, $request_uri);
// Parse the destination string to extract GET parameters
parse_str(parse_url($destination, PHP_URL_QUERY), $destination_params);
// Merge the destination params with query params from the URL
$_GET = array_merge($destination_params, $query_params);
break;
}
}
}
if ( !$lang = \S::get_session( 'lang-' . $lang_id ) )
\front\App::checkUrlParams();
$langRepo = new \Domain\Languages\LanguagesRepository( $mdb );
if ( !$lang_id = \Shared\Helpers\Helpers::get_session( 'current-lang' ) )
{
$lang = \front\factory\Languages::lang_translations( $lang_id );
\S::set_session( 'lang-' . $lang_id, $lang );
$lang_id = $langRepo->defaultLanguage();
\Shared\Helpers\Helpers::set_session( 'current-lang', $lang_id );
}
$settings = \front\factory\Settings::settings_details();
$client = \S::get_session( 'client' );
if ( \S::get( 'action' ) == 'htaccess' )
if ( !$lang = \Shared\Helpers\Helpers::get_session( 'lang-' . $lang_id ) )
{
\S::htacces( '' );
$lang = $langRepo->translations( $lang_id );
\Shared\Helpers\Helpers::set_session( 'lang-' . $lang_id, $lang );
}
$settings = ( new \Domain\Settings\SettingsRepository( $mdb ) )->allSettings();
$client = \Shared\Helpers\Helpers::get_session( 'client' );
if ( \Shared\Helpers\Helpers::get( 'action' ) == 'htaccess' )
{
\Shared\Helpers\Helpers::htacces( '' );
unlink( 'install.php' );
unlink( 'update.zip' );
header( 'Location: /' );
@@ -91,58 +134,39 @@ if ( $request_uri != '' )
}
}
// check routes
$parsed_url = parse_url($_SERVER['REQUEST_URI']);
$request_uri = ltrim($parsed_url['path'], '/');
$query_string = isset($parsed_url['query']) ? $parsed_url['query'] : '';
parse_str($query_string, $query_params);
$pagesRepo = new \Domain\Pages\PagesRepository( $mdb );
if ($request_uri != '')
if ( \Shared\Helpers\Helpers::get( 'a' ) == 'page' and \Shared\Helpers\Helpers::get( 'id' ) )
{
$matched = false;
$routes = $mdb->select('pp_routes', '*');
foreach ($routes as $route)
{
$pattern = $route['pattern'];
$destination = $route['destination'];
if (preg_match("#^" . $pattern . "#", $request_uri, $matches))
{
// Replace placeholders in the destination with matches from the request URI
$destination = preg_replace("#^" . $pattern . "#", $destination, $request_uri);
// Parse the destination string to extract GET parameters
parse_str(parse_url($destination, PHP_URL_QUERY), $destination_params);
// Merge the destination params with query params from the URL
$_GET = array_merge($destination_params, $query_params);
$matched = true;
break;
}
}
$page = $pagesRepo->frontPageDetails( \Shared\Helpers\Helpers::get( 'id' ), $lang_id );
\Shared\Helpers\Helpers::set_session( 'page', $page );
}
if ( \S::get( 'a' ) == 'page' and \S::get( 'id' ) )
if ( !is_array( $page ) or !(int)$page['id'] )
{
$page = \front\factory\Pages::page_details( \S::get( 'id' ) );
\S::set_session( 'page', $page );
$page = \Shared\Helpers\Helpers::get_session( 'page' );
}
if ( \S::get( 'devel' ) )
if ( !is_array( $page ) or !(int)$page['id'] )
{
$page = $pagesRepo->frontPageDetails( '', $lang_id );
\Shared\Helpers\Helpers::set_session( 'page', $page );
}
if ( \Shared\Helpers\Helpers::get( 'devel' ) )
$settings[ 'devel' ] = true;
$out = \front\view\Site::show();
$out = \front\LayoutEngine::show();
if ( !isset( $_COOKIE[ "cookie_information" ] ) )
$out = strrev( implode( strrev( \front\view\Site::cookie_information() . '</body>' ), explode( strrev( '</body>' ), strrev( $out ), 2 ) ) );
$out = strrev( implode( strrev( \front\LayoutEngine::cookieInformation() . '</body>' ), explode( strrev( '</body>' ), strrev( $out ), 2 ) ) );
if ( $settings[ 'statistic_code' ] )
$out = strrev( implode( strrev( $settings[ 'statistic_code' ] . '</body>' ), explode( strrev( '</body>' ), strrev( $out ), 2 ) ) );
/* wysyłka newslettera w tle */
\front\factory\Newsletter::newsletter_send( 1 );
$newsletterRepo = new \Domain\Newsletter\NewsletterRepository( $mdb );
$newsletterRepo->sendQueued( 1, $_SERVER['SERVER_NAME'], !empty( $settings['ssl'] ), $lang['wypisz-sie'] ?? 'Wypisz się' );
$dom = new DOMDocument( '1.0', 'UTF-8' );
$dom -> loadHTML( $out );
@@ -199,13 +223,13 @@ if ( $settings[ 'piksel' ] )
"track",
"ViewCategory", {
content_category: "kategoria",
content_name: "' . htmlspecialchars( str_replace( '"', '', \front\factory\ShopCategory::category_name( $category[ 'id' ] ) ) ) . '",
content_ids: ["' . implode( ',', \shop\Category::get_category_products_id( $category['id'] ) ) . '"],
content_name: "' . htmlspecialchars( str_replace( '"', '', ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->categoryName( (int)$category['id'], $lang_id ) ) ) . '",
content_ids: ["' . implode( ',', ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->getCategoryProductIds( (int)$category['id'] ) ) . '"],
content_type: "product"
});';
if ( \S::get( 'product' ) )
$piskel_code .= PHP_EOL . 'fbq( "track", "ViewContent", { content_category: "produkt", content_name: "' . htmlspecialchars( str_replace( '"', '', \front\factory\ShopProduct::product_name( \S::get( 'product' ) ) ) ) . '", content_ids: ["' . \S::get( 'product' ) . '"], content_type: "product" });';
if ( \Shared\Helpers\Helpers::get( 'product' ) )
$piskel_code .= PHP_EOL . 'fbq( "track", "ViewContent", { content_category: "produkt", content_name: "' . htmlspecialchars( str_replace( '"', '', ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->getProductNameCached( (int)\Shared\Helpers\Helpers::get( 'product' ), $lang_id ) ) ) . '", content_ids: ["' . \Shared\Helpers\Helpers::get( 'product' ) . '"], content_type: "product" });';
$element -> nodeValue = $piskel_code;
@@ -215,13 +239,13 @@ if ( $settings[ 'piksel' ] )
/* end piksel */
/* meta tagi Facebook */
if ( \S::get( 'product' ) )
if ( \Shared\Helpers\Helpers::get( 'product' ) )
{
$url = preg_replace( '#^(http(s)?://)?w{3}\.#', '$1', $_SERVER[ 'SERVER_NAME' ] );
$head = $dom -> getElementsByTagName( 'head' ) -> item( 0 );
$product = \front\factory\ShopProduct::product_details( \S::get( 'product' ), $lang_id );
$product = ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->productDetailsFrontCached( (int)\Shared\Helpers\Helpers::get( 'product' ), $lang_id );
$product_image = $product[ 'images' ][ 0 ][ 'src' ];
if ( $product_image and file_exists( substr( $product_image, 1, strlen( $product_image ) ) ) )
{
@@ -252,7 +276,7 @@ if ( \S::get( 'product' ) )
$node = $head -> appendChild( $dom -> createElement( 'meta' ) );
$node -> setAttribute( 'property', 'product:price:amount' );
$node -> setAttribute( 'content', $product[ 'price_brutto_promo' ] ? \S::normalize_decimal( $product[ 'price_brutto_promo' ] ) : \S::normalize_decimal( $product[ 'price_brutto' ] ) );
$node -> setAttribute( 'content', $product[ 'price_brutto_promo' ] ? \Shared\Helpers\Helpers::normalize_decimal( $product[ 'price_brutto_promo' ] ) : \Shared\Helpers\Helpers::normalize_decimal( $product[ 'price_brutto' ] ) );
$node = $head -> appendChild( $dom -> createElement( 'meta' ) );
$node -> setAttribute( 'property', 'product:price:currency' );
@@ -313,7 +337,7 @@ if ( $settings['generate_webp'] )
if ( strpos( $img_src, '/' ) === 0 )
$img_src = substr( $img_src, 1, strlen( $img_src ) );
$img_webp = \S::generate_webp_image( $img_src, 85 );
$img_webp = \Shared\Helpers\Helpers::generate_webp_image( $img_src, 85 );
if ( $img_webp !== false )
{
$img -> setAttribute( 'src', '/' . $img_webp );

File diff suppressed because it is too large Load Diff

128508
tpay.txt

File diff suppressed because it is too large Load Diff