diff --git a/.htaccess b/.htaccess index ae8418a..8d7442f 100644 --- a/.htaccess +++ b/.htaccess @@ -12,6 +12,7 @@ RewriteCond %{REQUEST_FILENAME} !-d [NC] RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC] RewriteRule ^(.*)/$ https://%{HTTP_HOST}/$1 [L,R=301] + ErrorDocument 404 /404.html RewriteCond %{REQUEST_URI} !^(.*)/libraries/(.*) [NC] @@ -79,7 +80,7 @@ RewriteRule ^pl/$ index.php?a=change_language&id=pl [L] RewriteRule ^$ index.php?a=page&id=1&lang=pl&%{QUERY_STRING} [L] -RewriteCond %{REQUEST_URI} ^/home$ +RewriteCond %{REQUEST_URI} ^/home(|/)$ RewriteRule ^(.*)$ https://inwestprofil.pl/ [R=301,L] RewriteCond %{REQUEST_URI} ^/home/s/1$ RewriteRule ^(.*)$ https://inwestprofil.pl/ [R=301,L] @@ -102,30 +103,30 @@ RewriteRule ^okna(|/)$ index.php?a=page&id=2&lang=pl&%{QUERY_STRING} [L] RewriteRule ^okna/s/1(|/)$ okna [R=301,L] RewriteRule ^okna/s/([0-9]+)(|/)$ index.php?a=page&id=2&lang=pl&bs=$1&%{QUERY_STRING} [L] -RewriteRule ^okna-pvc(|/)$ index.php?a=page&id=3&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^okna-pvc/s/1(|/)$ okna-pvc [R=301,L] -RewriteRule ^okna-pvc/s/([0-9]+)(|/)$ index.php?a=page&id=3&lang=pl&bs=$1&%{QUERY_STRING} [L] - RewriteRule ^galeria-realizacje(|/)$ index.php?a=page&id=28&lang=pl&%{QUERY_STRING} [L] RewriteRule ^galeria-realizacje/s/1(|/)$ galeria-realizacje [R=301,L] RewriteRule ^galeria-realizacje/s/([0-9]+)(|/)$ index.php?a=page&id=28&lang=pl&bs=$1&%{QUERY_STRING} [L] -RewriteRule ^galeria-rynki-zagraniczne(|/)$ index.php?a=page&id=29&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^galeria-rynki-zagraniczne/s/1(|/)$ galeria-rynki-zagraniczne [R=301,L] -RewriteRule ^galeria-rynki-zagraniczne/s/([0-9]+)(|/)$ index.php?a=page&id=29&lang=pl&bs=$1&%{QUERY_STRING} [L] +RewriteRule ^okna-pvc(|/)$ index.php?a=page&id=3&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna-pvc/s/1(|/)$ okna-pvc [R=301,L] +RewriteRule ^okna-pvc/s/([0-9]+)(|/)$ index.php?a=page&id=3&lang=pl&bs=$1&%{QUERY_STRING} [L] RewriteRule ^okna-pvc-euro-70(|/)$ index.php?a=page&id=34&lang=pl&%{QUERY_STRING} [L] RewriteRule ^okna-pvc-euro-70/s/1(|/)$ okna-pvc-euro-70 [R=301,L] RewriteRule ^okna-pvc-euro-70/s/([0-9]+)(|/)$ index.php?a=page&id=34&lang=pl&bs=$1&%{QUERY_STRING} [L] -RewriteRule ^polityka-prywatnosci(|/)$ index.php?a=page&id=58&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^polityka-prywatnosci/s/1(|/)$ polityka-prywatnosci [R=301,L] -RewriteRule ^polityka-prywatnosci/s/([0-9]+)(|/)$ index.php?a=page&id=58&lang=pl&bs=$1&%{QUERY_STRING} [L] +RewriteRule ^galeria-rynki-zagraniczne(|/)$ index.php?a=page&id=29&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^galeria-rynki-zagraniczne/s/1(|/)$ galeria-rynki-zagraniczne [R=301,L] +RewriteRule ^galeria-rynki-zagraniczne/s/([0-9]+)(|/)$ index.php?a=page&id=29&lang=pl&bs=$1&%{QUERY_STRING} [L] RewriteRule ^okna-pvc-brillant(|/)$ index.php?a=page&id=35&lang=pl&%{QUERY_STRING} [L] RewriteRule ^okna-pvc-brillant/s/1(|/)$ okna-pvc-brillant [R=301,L] RewriteRule ^okna-pvc-brillant/s/([0-9]+)(|/)$ index.php?a=page&id=35&lang=pl&bs=$1&%{QUERY_STRING} [L] +RewriteRule ^polityka-prywatnosci(|/)$ index.php?a=page&id=58&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^polityka-prywatnosci/s/1(|/)$ polityka-prywatnosci [R=301,L] +RewriteRule ^polityka-prywatnosci/s/([0-9]+)(|/)$ index.php?a=page&id=58&lang=pl&bs=$1&%{QUERY_STRING} [L] + RewriteRule ^okna-pvc-synego(|/)$ index.php?a=page&id=36&lang=pl&%{QUERY_STRING} [L] RewriteRule ^okna-pvc-synego/s/1(|/)$ okna-pvc-synego [R=301,L] RewriteRule ^okna-pvc-synego/s/([0-9]+)(|/)$ index.php?a=page&id=36&lang=pl&bs=$1&%{QUERY_STRING} [L] @@ -366,14 +367,14 @@ RewriteRule ^lezansk(|/)$ index.php?a=page&id=80&lang=pl&%{QUERY_STRING} [L] RewriteRule ^lezansk/s/1(|/)$ lezansk [R=301,L] RewriteRule ^lezansk/s/([0-9]+)(|/)$ index.php?a=page&id=80&lang=pl&bs=$1&%{QUERY_STRING} [L] -RewriteRule ^dev(|/)$ index.php?a=page&id=75&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^dev/s/1(|/)$ dev [R=301,L] -RewriteRule ^dev/s/([0-9]+)(|/)$ index.php?a=page&id=75&lang=pl&bs=$1&%{QUERY_STRING} [L] - RewriteRule ^lancut(|/)$ index.php?a=page&id=81&lang=pl&%{QUERY_STRING} [L] RewriteRule ^lancut/s/1(|/)$ lancut [R=301,L] RewriteRule ^lancut/s/([0-9]+)(|/)$ index.php?a=page&id=81&lang=pl&bs=$1&%{QUERY_STRING} [L] +RewriteRule ^dev(|/)$ index.php?a=page&id=75&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^dev/s/1(|/)$ dev [R=301,L] +RewriteRule ^dev/s/([0-9]+)(|/)$ index.php?a=page&id=75&lang=pl&bs=$1&%{QUERY_STRING} [L] + RewriteRule ^mielec(|/)$ index.php?a=page&id=82&lang=pl&%{QUERY_STRING} [L] RewriteRule ^mielec/s/1(|/)$ mielec [R=301,L] RewriteRule ^mielec/s/([0-9]+)(|/)$ index.php?a=page&id=82&lang=pl&bs=$1&%{QUERY_STRING} [L] @@ -406,139 +407,147 @@ RewriteRule ^unia-europejska(|/)$ index.php?a=page&id=73&lang=pl&%{QUERY_STRING} RewriteRule ^unia-europejska/s/1(|/)$ unia-europejska [R=301,L] RewriteRule ^unia-europejska/s/([0-9]+)(|/)$ index.php?a=page&id=73&lang=pl&bs=$1&%{QUERY_STRING} [L] -RewriteRule ^budowa-nowego-biura-glownego-w-bajdach(|/)$ index.php?article=2&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^okna-antywlamaniowe-pcv-w-klasie-rc3(|/)$ index.php?article=3&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^okna-energooszczedne-jakie-wybrac(|/)$ index.php?article=4&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^drzwi-przesuwne-na-co-zwrocic-uwage(|/)$ index.php?article=7&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^rolety-zewnetrzne-zalety-i-rodzaje(|/)$ index.php?article=8&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^okna-przesuwne-synego-slide-nowa-lekkosc-otwierania(|/)$ index.php?article=9&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^realizacja-slusarki-aluminiowej-w-szklane-lniane(|/)$ index.php?article=10&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^fasady-aluminiowe-w-galerii-portius-krosno(|/)$ index.php?article=11&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^nowoczesne-okna-pcv-rodzaje-zalety-parametry-wykonanie(|/)$ index.php?article=12&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^cieple-okna-czyli-jakie(|/)$ index.php?article=13&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^najwazniejsze-parametry-okien(|/)$ index.php?article=14&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^okna-antywlamaniowe(|/)$ index.php?article=15&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^lakierowane-okna-pvc(|/)$ index.php?a=page&id=87&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^lakierowane-okna-pvc/s/1(|/)$ lakierowane-okna-pvc [R=301,L] +RewriteRule ^lakierowane-okna-pvc/s/([0-9]+)(|/)$ index.php?a=page&id=87&lang=pl&bs=$1&%{QUERY_STRING} [L] RewriteRule ^produkcja-pvc(|/)$ index.php?article=19&lang=pl&%{QUERY_STRING} [L] RewriteRule ^produkcja-drewno(|/)$ index.php?article=20&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^produkcja-aluminium(|/)$ index.php?article=21&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^budownictwo-mieszkaniowe-jednorodzinne(|/)$ index.php?article=22&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^budownictwo-mieszkaniowe-wielorodzinne(|/)$ index.php?article=23&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^budownictwo-biurowe(|/)$ index.php?article=24&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^budownictwo-uzytecznosci-publicznej(|/)$ index.php?article=25&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^rynki-zagraniczne(|/)$ index.php?article=26&lang=pl&%{QUERY_STRING} [L] - RewriteRule ^galeria-rynki-zagraniczne(|/)$ index.php?article=28&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^a-51-drzwi-wejsciowe-pvc-synego(|/)$ index.php?article=51&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-aluminiowe-econoline(|/)$ index.php?article=37&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-pvc-uchylno-przesuwne-psk(|/)$ index.php?article=35&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-pvc-brillant(|/)$ index.php?article=33&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^realizacja-slusarki-aluminiowej-w-szklane-lniane(|/)$ index.php?article=10&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^fasady-aluminiowe-w-galerii-portius-krosno(|/)$ index.php?article=11&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-antywlamaniowe-pcv-w-klasie-rc3(|/)$ index.php?article=3&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^budowa-nowego-biura-glownego-w-bajdach(|/)$ index.php?article=2&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-antywlamaniowe(|/)$ index.php?article=15&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^cieple-okna-czyli-jakie(|/)$ index.php?article=13&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^najwazniejsze-parametry-okien(|/)$ index.php?article=14&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^galeria-rynki-zagraniczne-niemcy(|/)$ index.php?article=31&lang=pl&%{QUERY_STRING} [L] + RewriteRule ^galeria-rynki-zagraniczne-anglia(|/)$ index.php?article=29&lang=pl&%{QUERY_STRING} [L] RewriteRule ^galeria-rynki-zagraniczne-francja(|/)$ index.php?article=30&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^galeria-rynki-zagraniczne-niemcy(|/)$ index.php?article=31&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^rynki-zagraniczne(|/)$ index.php?article=26&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^okna-pvc-brillant(|/)$ index.php?article=33&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^budownictwo-mieszkaniowe-wielorodzinne(|/)$ index.php?article=23&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^okna-pvc-uchylno-przesuwne-psk(|/)$ index.php?article=35&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^budownictwo-uzytecznosci-publicznej(|/)$ index.php?article=25&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^okna-aluminiowe-econoline(|/)$ index.php?article=37&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^budownictwo-biurowe(|/)$ index.php?article=24&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^a-51-drzwi-wejsciowe-pvc-synego(|/)$ index.php?article=51&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^budownictwo-mieszkaniowe-jednorodzinne(|/)$ index.php?article=22&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^duze-okna-plusy-i-minusy(|/)$ index.php?article=67&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^produkcja-aluminium(|/)$ index.php?article=21&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^okna-narozne-zalety-wady-rodzaje(|/)$ index.php?article=68&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^nowoczesne-okna-pcv-rodzaje-zalety-parametry-wykonanie(|/)$ index.php?article=12&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^jak-zamontowac-rolety-zewnetrzne(|/)$ index.php?article=69&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna-przesuwne-synego-slide-nowa-lekkosc-otwierania(|/)$ index.php?article=9&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^otwor-pod-brame-garazowa-jak-przygotowac(|/)$ index.php?article=82&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna-energooszczedne-jakie-wybrac(|/)$ index.php?article=4&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^okna-pcv-czy-drewniane-ktore-wybrac(|/)$ index.php?article=83&lang=pl&%{QUERY_STRING} [L] - -RewriteRule ^czy-balustrady-aluminiowe-sprawdza-sie-na-balkonie(|/)$ index.php?article=84&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^drzwi-przesuwne-na-co-zwrocic-uwage(|/)$ index.php?article=7&lang=pl&%{QUERY_STRING} [L] RewriteRule ^okna-3-szybowe-co-warto-o-nich-wiedziec(|/)$ index.php?article=86&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^rolety-nadstawne-wady-zalety-dzialanie-i-montaz(|/)$ index.php?article=87&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^otwor-pod-brame-garazowa-jak-przygotowac(|/)$ index.php?article=82&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-zamontowac-rolety-zewnetrzne(|/)$ index.php?article=69&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-narozne-zalety-wady-rodzaje(|/)$ index.php?article=68&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^duze-okna-plusy-i-minusy(|/)$ index.php?article=67&lang=pl&%{QUERY_STRING} [L] RewriteRule ^drzwi-tarasowe-jakie-wybrac(|/)$ index.php?article=88&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^rolety-podtynkowe-czym-sa-i-co-warto-o-nich-wiedziec(|/)$ index.php?article=89&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^czy-balustrady-aluminiowe-sprawdza-sie-na-balkonie(|/)$ index.php?article=84&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-pcv-czy-drewniane-ktore-wybrac(|/)$ index.php?article=83&lang=pl&%{QUERY_STRING} [L] RewriteRule ^a-90-informacja-o-wynikach-postepowania-ofertowego-na-dostawe-srodkow-trwalych(|/)$ index.php?article=90&lang=pl&%{QUERY_STRING} [L] RewriteRule ^a-91-zapytanie-ofertowe-nr-1/dst-dotyczace-dostawy-centrum-obrobczego(|/)$ index.php?article=91&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^rolety-podtynkowe-czym-sa-i-co-warto-o-nich-wiedziec(|/)$ index.php?article=89&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^rolety-nadstawne-wady-zalety-dzialanie-i-montaz(|/)$ index.php?article=87&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^rolety-zewnetrzne-zalety-i-rodzaje(|/)$ index.php?article=8&lang=pl&%{QUERY_STRING} [L] + RewriteRule ^cieply-montaz-okien-co-to-jest-i-czy-warto-go-zastosowac(|/)$ index.php?article=92&lang=pl&%{QUERY_STRING} [L] RewriteRule ^brama-garazowa-segmentowa-budowa-i-montaz(|/)$ index.php?article=93&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^a-94-model-al8-mix-1-100x20-40x20-20x20-50mm(|/)$ index.php?article=94&lang=pl&%{QUERY_STRING} [L] - RewriteRule ^a-95-model-al9-mix-2-80x20-40x20-50mm(|/)$ index.php?article=95&lang=pl&%{QUERY_STRING} [L] RewriteRule ^a-96-model-al10-mix-3-80x20-20x20-50mm(|/)$ index.php?article=96&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^a-97-model-al11-zaluzja(|/)$ index.php?article=97&lang=pl&%{QUERY_STRING} [L] - RewriteRule ^a-98-model-al12-100x20(|/)$ index.php?article=98&lang=pl&%{QUERY_STRING} [L] RewriteRule ^a-99-model-al13-150x20(|/)$ index.php?article=99&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^a-102-ogrodzenia-konsport-box-1(|/)$ index.php?article=102&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^a-94-model-al8-mix-1-100x20-40x20-20x20-50mm(|/)$ index.php?article=94&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^a-103-ogrodzenia-konsport-box-2(|/)$ index.php?article=103&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^a-97-model-al11-zaluzja(|/)$ index.php?article=97&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-102-ogrodzenia-konsport-box-1(|/)$ index.php?article=102&lang=pl&%{QUERY_STRING} [L] RewriteRule ^a-104-ogrodzenia-konsport-box-3(|/)$ index.php?article=104&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^a-105-ogrodzenia-konsport-box-4(|/)$ index.php?article=105&lang=pl&%{QUERY_STRING} [L] - RewriteRule ^a-106-ogrodzenia-konsport-box-5(|/)$ index.php?article=106&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^a-107-ogrodzenia-konsport-box-6(|/)$ index.php?article=107&lang=pl&%{QUERY_STRING} [L] - RewriteRule ^a-108-ogrodzenia-konsport-box-7(|/)$ index.php?article=108&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^a-109-ogrodzenia-konsport-box-8(|/)$ index.php?article=109&lang=pl&%{QUERY_STRING} [L] - RewriteRule ^a-110-ogrodzenia-konsport-box-9(|/)$ index.php?article=110&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^a-111-ogrodzenia-konsport-box-10(|/)$ index.php?article=111&lang=pl&%{QUERY_STRING} [L] - RewriteRule ^a-112-ogrodzenia-konsport-box-11(|/)$ index.php?article=112&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^a-103-ogrodzenia-konsport-box-2(|/)$ index.php?article=103&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-105-ogrodzenia-konsport-box-4(|/)$ index.php?article=105&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-107-ogrodzenia-konsport-box-6(|/)$ index.php?article=107&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-109-ogrodzenia-konsport-box-8(|/)$ index.php?article=109&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-111-ogrodzenia-konsport-box-10(|/)$ index.php?article=111&lang=pl&%{QUERY_STRING} [L] + RewriteRule ^bramy-wjazdowe-wszystko-co-warto-wiedziec-przed-jej-zakupem(|/)$ index.php?article=113&lang=pl&%{QUERY_STRING} [L] -RewriteRule ^jakie-drzwi-wybrac-drzwi-wejsciowe-aluminiowe-drewniane-czy-z-pcv(|/)$ index.php?article=114&lang=pl&%{QUERY_STRING} [L] - RewriteRule ^a-115-informacja-o-dotacji(|/)$ index.php?article=115&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^jakie-drzwi-wybrac-drzwi-wejsciowe-aluminiowe-drewniane-czy-z-pcv(|/)$ index.php?article=114&lang=pl&%{QUERY_STRING} [L] + RewriteRule ^a-116-informacja-o-dotacji-2(|/)$ index.php?article=116&lang=pl&%{QUERY_STRING} [L] RewriteRule ^okna-aluminiowe-najwazniejsze-zalety-i-wady(|/)$ index.php?article=117&lang=pl&%{QUERY_STRING} [L] + RewriteRule ^a-119-czyste-powietrze(|/)$ index.php?article=119&lang=pl&%{QUERY_STRING} [L] - RewriteRule ^projekt-transformacja-przedsiebiorstwa-inwest-profil-w-kierunku-przemyslu-40(|/)$ index.php?article=121&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^a-122-lakierowane-okna-pvc(|/)$ index.php?article=122&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^regulamin-promocji(|/)$ index.php?article=124&lang=pl&%{QUERY_STRING} [L] + RewriteCond %{HTTP_HOST} ^inwestprofil.pl$ [NC] RewriteRule ^kontakt-sent$ index.php?a=page&id=24&lang=pl&msg=wiadomosc-zostala-wyslana [L] Redirect 301 /okna-pvc-profil-euro-design-70 /okna diff --git a/admin/ajax.php b/admin/ajax.php new file mode 100644 index 0000000..0d6e50c --- /dev/null +++ b/admin/ajax.php @@ -0,0 +1,39 @@ + 'mysql', + 'database_name' => $database['name'], + 'server' => $database['host'], + 'username' => $database['user'], + 'password' => $database['password'], + 'charset' => 'utf8' + ] ); + +require_once 'ajax/pages.php'; +require_once 'ajax/articles.php'; +require_once 'ajax/users.php'; +require_once 'ajax/newsletter.php'; +?> \ No newline at end of file diff --git a/admin/ajax/articles.php b/admin/ajax/articles.php new file mode 100644 index 0000000..dcce26a --- /dev/null +++ b/admin/ajax/articles.php @@ -0,0 +1,55 @@ + 'error', 'msg' => 'Podczas usuwania zdjecia wystąpił błąd. Proszę spróbować ponownie.' ]; + + if ( \admin\factory\Articles::delete_img( \S::get( 'image_id' ) ) ) + $response = [ 'status' => 'ok' ]; + + echo json_encode( $response ); + exit; +} + +if ( $a == 'article_file_delete' ) +{ + $response = [ 'status' => 'error', 'msg' => 'Podczas usuwania załącznika wystąpił błąd. Proszę spróbować ponownie.' ]; + + if ( \admin\factory\Articles::delete_file( \S::get( 'file_id' ) ) ) + $response = [ 'status' => 'ok' ]; + + echo json_encode( $response ); + exit; +} + +if ( $a == 'article_image_alt_change' ) +{ + $response = [ 'status' => 'error', 'msg' => 'Podczas zmiany atrybutu alt zdjęcia wystąpił błąd. Proszę spróbować ponownie.' ]; + + if ( \admin\factory\Articles::image_alt_change( \S::get( 'image_id' ), \S::get( 'image_alt' ) ) ) + $response = [ 'status' => 'ok' ]; + + echo json_encode( $response ); + exit; +} + +if ( $a == 'article_file_name_change' ) +{ + $response = [ 'status' => 'error', 'msg' => 'Podczas zmiany nazwy załącznika wystąpił błąd. Proszę spróbować ponownie.' ]; + + if ( \admin\factory\Articles::file_name_change( \S::get( 'file_id' ), \S::get( 'file_name' ) ) ) + $response = [ 'status' => 'ok' ]; + + echo json_encode( $response ); + exit; +} + +if ( $a == 'google_url_preview_article' ) +{ + if ( \S::get( 'article_id' ) ) + echo $_SERVER['SERVER_NAME'] . '/a-' . \S::get( 'article_id' ) . '-' . \S::seo( \S::get( 'title' ) ); + else + echo $_SERVER['SERVER_NAME'] . '/a-' . ( \S::max_db_value( 'pp_articles', 'id' ) + 1 ) . '-' . \S::seo( \S::get( 'title' ) ); +} diff --git a/admin/ajax/newsletter.php b/admin/ajax/newsletter.php new file mode 100644 index 0000000..8df8c2b --- /dev/null +++ b/admin/ajax/newsletter.php @@ -0,0 +1,17 @@ + 'error', 'msg' => 'Podczas zapisywania kolejności wyświetlania artykułów wystąpił błąd. Proszę spróbować ponownie.']; + + if (\admin\factory\Pages::save_articles_order(\S::get('page_id'), \S::get('articles'))) + $response = ['status' => 'ok']; + + echo json_encode($response); + exit; +} + +if ($a == 'save_pages_order') { + $response = ['status' => 'error', 'msg' => 'Podczas zapisywania kolejności stron wystąpił błąd. Proszę spróbować ponownie.']; + + if (\admin\factory\Pages::save_pages_order(\S::get('menu_id'), \S::get('pages'))) + $response = ['status' => 'ok']; + + echo json_encode($response); + exit; +} + +if ($a == 'generate_seo_link') { + $response = ['status' => 'error', 'msg' => 'Podczas generowania pola "seo link" wystąpił błąd. Proszę spróbować ponownie.']; + + if ($seo_link = \admin\factory\Pages::generate_seo_link(\S::get('title'), \S::get('page_id'), \S::get('article_id'), \S::get('lang'), \S::get('pid'))) + $response = ['status' => 'ok', 'seo_link' => $seo_link]; + + echo json_encode($response); + exit; +} + +if ($a == 'cookie_menus') { + $array = unserialize($_COOKIE['cookie_menus']); + + if ($array[\S::get('menu_id')] == 0) + $array[\S::get('menu_id')] = 1; + else + $array[\S::get('menu_id')] = 0; + + $array = serialize($array); + + setcookie('cookie_menus', $array, time() + 3600 * 24 * 365); +} + +if ($a == 'cookie_pages') { + $array = unserialize($_COOKIE['cookie_pages']); + + if ($array[\S::get('page_id')] == 0) + $array[\S::get('page_id')] = 1; + else + $array[\S::get('page_id')] = 0; + + $array = serialize($array); + + setcookie('cookie_pages', $array, time() + 3600 * 24 * 365); +} + +if ( $a == 'google_url_preview' ) +{ + $settings = \front\factory\Settings::settings_details(); + $structure = $settings['links_structure']; + + if ( $structure ) + { + if ( \S::get( 'page_id' ) ) + { + $seo_link = \admin\factory\Pages::google_url_preview(\S::get('page_id'), \S::get('title'), \S::get('lang_id'), \S::get('pid'), 0, \S::get('seo_link')); + echo $seo_link; + } + else + { + $seo_link = \admin\factory\Pages::google_url_preview(0, \S::get('title'), \S::get('lang_id'), \S::get('pid'), \S::max_db_value('pp_pages', 'id') + 1, \S::get('seo_link')); + echo $seo_link; + } + } + else + { + if ( \S::get( 'seo_link' ) ) + echo \S::get( 'seo_link' ); + else + { + if ( \S::get( 'page_id' ) ) + echo $prefix . 's-' . \S::get('page_id') . '-' . \S::seo(\S::get('title')); + else + echo $prefix . 's-' . ( \S::max_db_value('pp_pages', 'id') + 1 ) . '-' . \S::seo(\S::get('title')); + } + } +} diff --git a/admin/ajax/users.php b/admin/ajax/users.php new file mode 100644 index 0000000..43809be --- /dev/null +++ b/admin/ajax/users.php @@ -0,0 +1,10 @@ + 'mysql', + 'database_name' => $database['name'], + 'server' => $database['host'], + 'username' => $database['user'], + 'password' => $database['password'], + 'charset' => 'utf8' + ] ); + +$user = \S::get_session( 'user' , true ); + +\admin\Site::special_actions(); + +$domain = preg_replace( '#^(http(s)?://)?w{3}\.#', '$1', $_SERVER['SERVER_NAME'] ); +$cookie_name = str_replace( '.', '-', $domain ); + +if ( isset( $_COOKIE[$cookie_name] ) && !isset( $_SESSION['user'] ) ) +{ + $obj = json_decode( $_COOKIE[$cookie_name] ); + $login = $obj -> {'login'}; + $password = $obj -> {'hash'}; + + if ( $mdb -> get( 'pp_users', '*', + [ 'AND' => + [ 'login' => $login, 'status' => 1, 'password' => $password, + 'OR' => [ 'active_to[>=]' => date( 'Y-m-d' ), 'active_to' => null ] + ] + ] ) ) + { + \S::set_session( 'user', \admin\factory\Users::details( $login ) ); + header( 'Location: /admin/articles/view_list/' ); + exit; + } +} +echo \admin\view\Page::show(); +?> \ No newline at end of file diff --git a/autoload/.1645554992.suspected b/admin/ip.conf similarity index 100% rename from autoload/.1645554992.suspected rename to admin/ip.conf diff --git a/admin/templates/.htaccess b/admin/templates/.htaccess new file mode 100644 index 0000000..4aba16f --- /dev/null +++ b/admin/templates/.htaccess @@ -0,0 +1,20 @@ +# Wyłącz listowanie +Options -Indexes + +# Domyślnie blokujemy wszystko… +Require all denied + +# …a dopiero potem pozwalamy na pliki statyczne + + Require all granted + + +# Twardo blokuj cokolwiek, co mogłoby się wykonać + + Require all denied + + +# Nie serwuj plików ukrytych (.env itp.) + + Require all denied + \ No newline at end of file diff --git a/admin/templates/articles/article-edit.php b/admin/templates/articles/article-edit.php new file mode 100644 index 0000000..4a3bbeb --- /dev/null +++ b/admin/templates/articles/article-edit.php @@ -0,0 +1,1205 @@ + + + + $this -> user['id'], + 'expires' => time() + 60*20 +]; + +$_SESSION['rfm_akey'] = bin2hex(random_bytes(16)); +$_SESSION['rfm_akey_expires'] = time() + 20*60; +$_SESSION['can_use_rfm'] = true; +$rfmAkeyJS = $_SESSION['rfm_akey']; + +ob_start(); +?> +
+ +
+
+
+
    + languages ) ): foreach ( $this -> languages as $lg ):?> + +
  • ';?>
  • + + +
+
+ languages ) ): foreach ( $this -> languages as $lg ):?> + languages ) ) foreach ( $this -> languages as $lg_tmp ) + { + if ( $lg_tmp['id'] != $lg['id'] ) + $languages[ $lg_tmp['id'] ] = $lg_tmp['name']; + } + ?> + +
+ 'Wyświetlaj treść z wersji', + 'name' => 'copy_from', + 'values' => $languages, + 'value' => $this -> article['languages'][ $lg['id'] ]['copy_from'], + ) + );?> + 'Tytuł', + 'name' => 'title', + 'id' => 'title_' . $lg['id'], + 'value' => $this -> article['languages'][ $lg['id'] ]['title'], + 'inline' => true, + 'js_key' => 'google_preview( "' . $lg['id'] . '" ); return false;' + ) + );?> + 'Zdjęcie tytułowe', + 'name' => 'main_image', + 'id' => 'main_image_' . $lg['id'], + 'value' => $this -> article['languages'][ $lg['id'] ]['main_image'], + 'icon_content' => 'przeglądaj', + 'inline' => true, + 'icon_js' => "window.open ( '/libraries/filemanager-9.14.1/dialog.php?type=1&popup=1&field_id=main_image_" . $lg['id'] . "&akey=" . $rfmAkeyJS . "', 'mywindow', 'location=1,status=1,scrollbars=1, width=1100,height=700');" + ] ); + ?> + 'Wstęp', + 'name' => 'entry', + 'id' => 'entry_' . $lg['id'], + 'value' => $this -> article['languages'][ $lg['id'] ]['entry'], + 'inline' => true + ) + );?> + 'Treść', + 'name' => 'text', + 'id' => 'text_' . $lg['id'], + 'value' => $this -> article['languages'][ $lg['id'] ]['text'], + 'inline' => true + ) + );?> + 'Spis treści', + 'name' => 'table_of_contents', + 'id' => 'table_of_contents_' . $lg['id'], + 'value' => $this -> article['languages'][ $lg['id'] ]['table_of_contents'], + 'inline' => true + ] );?> + +
+ + +
+
+
+
+
+ authors ) ): + foreach ( $this -> authors as $author ): + $authors[ $author['id'] ] = $author['author']; + endforeach; + endif; + ?> + 'Autor', + 'name' => "id_author", + 'id' => 'id_author', + 'values' => $authors, + 'value' => $this -> article['id_author'] + ] );?> + 'Opublikowany', + 'name' => 'status', + 'checked' => $this -> article['status'] == 1 or !$this -> article['id'] ? true : false + ) + );?> + 'Artykuł priorytetowy', + 'name' => 'priority', + 'checked' => $this -> article['priority'] == 1 ? true : false + ) + );?> + 'Pokaż tytuł', + 'name' => 'show_title', + 'checked' => $this -> article['show_title'] == 1 ? true : false + ) + );?> + 'Pokaż spis treści', + 'name' => 'show_table_of_contents', + 'checked' => $this -> article['show_table_of_contents'] == 1 ? true : false + ] );?> + 'Pokaż datę dodania', + 'name' => 'show_date_add', + 'checked' => $this -> article['show_date_add'] == 1 ? true : false + ) + );?> + 'Data dodania', + 'class' => 'date-time', + 'name' => 'date_add', + 'id' => 'date_add', + 'value' => $this -> article['date_add'] + ] );?> + 'Pokaż datę modyfikacji', + 'name' => 'show_date_modify', + 'checked' => $this -> article['show_date_modify'] == 1 ? true : false + ) + );?> + 'Data modyfikacji', + 'class' => 'date-time', + 'name' => 'date_modify', + 'id' => 'date_modify', + 'value' => $this -> article['date_modify'] + ) + );?> + 'Powtórz wprowadzenie', + 'name' => 'repeat_entry', + 'checked' => $this -> article['repeat_entry'] == 1 ? true : false + ) + );?> + 'Linki do portali społecznościowych', + 'name' => 'social_icons', + 'checked' => $this -> article['social_icons'] == 1 ? true : false + ) + ); ?> + 'Zabezpiecz hasłem', + 'name' => 'password', + 'id' => 'password', + 'value' => $this -> article['password'] + ) + );?> + 'Moduł Pixieset', + 'name' => "pixieset", + 'id' => 'pixieset', + 'values' => [ 0 => 'wyłączony', 1 => 'pobieranie', 2 => 'pobieranie i wybieranie' ], + 'value' => $this -> article['pixieset'] + ] );?> + + 'Data wydarzenia', + 'class' => 'date-range', + 'name' => 'event_date', + 'id' => 'event_date', + 'value' => ( $this -> article['date_start' ] and $this -> article['date_end'] ) ? $this -> article['date_start'] . ' - ' . $this -> article['date_end'] : '', + 'icon_class' => 'date-range-icon', + 'icon_content' => '' + ) + );?> + +
+ +
+
+ +
+ +
+
+
+
+ +
+
+
    + languages ) ): foreach ( $this -> languages as $lg ):?> + +
  • ';?>
  • + + +
+
+ languages ) ): foreach ( $this -> languages as $lg ):?> + +
+ 'Link SEO', + 'name' => 'seo_link', + 'id' => 'seo_link_' . $lg['id'], + 'value' => $this -> article['languages' ][ $lg['id'] ]['seo_link'], + 'icon_content' => 'generuj', + 'icon_js' => 'generate_seo_links( "' . $lg['id'] . '", $( "#title_' . $lg['id'] . '" ).val(), ' . (int)$this -> article['id'] . ' );', + 'js_key' => 'google_preview( "' . $lg['id'] . '" ); return false;' + ) + );?> + 'Meta title', + 'name' => 'meta_title', + 'id' => 'meta_title_' . $lg['id'], + 'value' => $this -> article['languages'][ $lg['id'] ]['meta_title'], + 'js_key' => 'google_preview( "' . $lg['id'] . '" ); return false;' + ) + );?> + 'Meta description', + 'name' => 'meta_description', + 'id' => 'meta_description_' . $lg['id'], + 'value' => $this -> article['languages'][ $lg['id'] ]['meta_description'], + 'js_key' => 'google_preview( "' . $lg['id'] . '" ); return false;' + ) + );?> + 'Meta keywords', + 'name' => 'meta_keywords', + 'id' => 'meta_keywords_' . $lg['id'], + 'value' => $this -> article['languages'][ $lg['id'] ]['meta_keywords'] + ) + );?> +
+ +
+
+
+
+
+
+
+
+ 'Blokuj indeksację', + 'name' => "noindex", + 'id' => 'noindex_' . $lg['id'], + 'values' => array( + 0 => 'nie', 1 => 'tak' + ), + 'value' => $this -> article['languages'][ $lg['id'] ]['noindex'] == 1 ? 1 : 0 + ) + );?> + 'Blokuj bezpośredni dostęp', + 'name' => "block_direct_access", + 'id' => 'block_direct_access_' . $lg['id'], + 'values' => array( + 0 => 'nie', 1 => 'tak' + ), + 'value' => $this -> article['languages'][ $lg['id'] ]['block_direct_access'] == 1 ? 1 : 0 + ) + );?> +
+ + +
+
+
+
+
+ layouts ) ): foreach ( $this -> layouts as $layout ): + $layouts[ $layout['id'] ] = $layout['name']; + endforeach; endif; + ?> + 'Szablon', + 'name' => 'layout_id', + 'id' => 'layout_id', + 'values' => $layouts, + 'value' => $this -> article['layout_id'] + ) + );?> +
+ +
+ menus ) ) foreach ( $this -> menus as $menu ) + { + ?> + + +
+
+
+
+
+
    + article['images'] ) ): foreach ( $this -> article['images'] as $img ): + ?> +
  • + + + + + +
  • + +
+
You browser doesn't have Flash installed.
+
+
+
    + article['files'] ) ): foreach ( $this -> article['files'] as $file ): + + if ( $file['name'] ) + $name = $file['name']; + else + { + $name = explode( '/', $file['src'] ); + $name = $name[ count( $name ) - 1 ]; + } + ?> +
  • +
    + + + + +
    +
  • + +
+
You browser doesn't have Flash installed.
+
+ additional_params_lon ) and count( $this -> additional_params_lon ) or is_array( $this -> additional_params_loff ) and count( $this -> additional_params_loff ) ):?> +
+ article['params'] ) ) foreach ( $this -> article['params'] as $param ) + $params[ $param['param_id'] . '_' . $param['language_id'] ] = $param['value']; + ?> + additional_params_loff ) and count( $this -> additional_params_loff ) ):?> + additional_params_loff as $param ):?> + + $param['display_name'], + 'class' => 'date', + 'name' => 'ap_' . $param['name'], + 'id' => 'ap_' . $param['name'], + 'value' => $params[ $param['id'] . '_' ] + ) + );?> + + + $param['display_name'], + 'name' => 'ap_' . $param['name'], + 'id' => 'ap_' . $param['name'], + 'checked' => $params[ $param['id'] . '_' ] == 'on' ? true : false + ) + );?> + + + $param['display_name'], + 'name' => 'ap_' . $param['name'], + 'id' => 'ap_' . $param['name'], + 'value' => $params[ $param['id'] . '_' ] + ) + );?> + + + $param['display_name'], + 'name' => 'ap_' . $param['name'], + 'id' => 'ap_' . $param['name'], + 'value' => $params[ $param['id'] . '_' ], + 'inline' => true + ) + );?> + + + + + additional_params_lon ) and count( $this -> additional_params_lon ) ):?> +
+
    + languages ) ): foreach ( $this -> languages as $lg ):?> + +
  • ';?>
  • + + +
+
+ languages ) ): foreach ( $this -> languages as $lg ):?> + +
+ additional_params_lon as $param ):?> + + $param['display_name'], + 'name' => 'ap_' . $param['name'] . '_' . $lg['id'], + 'id' => 'ap_' . $param['name'] . '_' . $lg['id'], + 'value' => $params[ $param['id'] . '_' . $lg['id'] ] + ) + );?> + + + $param['display_name'], + 'name' => 'ap_' . $param['name'] . '_' . $lg['id'], + 'id' => 'ap_' . $param['name'] . '_' . $lg['id'], + 'value' => $params[ $param['id'] . '_' . $lg['id'] ], + 'inline' => true + ) + );?> + + + +
+ + +
+
+ +
+ +
+
Zdjęcia wybrane przez użytkownika (wymagany włączony moduł Pixieset)
+ article['images'] ) ):?> +
    + article['images'] as $image ):?> + +
  • + + +
+ +
+
+
+ id = 'article-edit'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Edycja artykułu'; +$grid -> fields = [ + [ + 'db' => 'id', + 'type' => 'hidden', + 'value' => $this -> article['id'] + ] + ]; +$grid -> actions = [ + 'save' => [ 'url' => '/admin/articles/article_save/', 'back_url' => '/admin/articles/view_list/' ], + 'cancel' => [ 'url' => '/admin/articles/view_list/' ] + ]; +$grid -> external_code = $out; +$grid -> persist_edit = true; +$grid -> id_param = 'id'; + +echo $grid -> draw(); +?> + + + + + + + + + + \ No newline at end of file diff --git a/admin/templates/articles/articles-archive-list.php b/admin/templates/articles/articles-archive-list.php new file mode 100644 index 0000000..2cd5df4 --- /dev/null +++ b/admin/templates/articles/articles-archive-list.php @@ -0,0 +1,67 @@ + gdb_opt = $gdb; +$grid -> sql = 'SELECT *' + . 'FROM ( ' + . 'SELECT ' + . 'id, date_add, date_modify, status, ' + . '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title ' + . 'FROM ' + . 'pp_articles AS pa WHERE status = -1 ' + . ') AS q1 ' + . 'WHERE ' + . '1=1 [where] ' + . 'ORDER BY ' + . '[order_p1] [order_p2]'; +$grid -> sql_count = 'SELECT ' + . 'COUNT(0) FROM ( ' + . 'SELECT ' + . 'id, date_add, date_modify, status, ' + . '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title ' + . 'FROM ' + . 'pp_articles AS pa WHERE status = -1 ' + . ') AS q1 ' + . 'WHERE ' + . '1=1 [where] '; +$grid -> debug = true; +$grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Tytuł', + 'db' => 'id', + 'replace' => [ 'sql' => "SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = [id] AND title != '' ORDER BY o ASC LIMIT 1" ] + ], + [ + 'name' => 'Data dodania', + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ], + 'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );' + ], + [ + 'name' => 'Data modyfikacji', + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ], + 'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_modify]" ) );' + ], + [ + 'name' => 'Akcja', + 'th' => [ 'class' => 'g-center' ], + 'td' => [ 'class' => 'g-center', 'style' => 'width: 50px;' ], + 'content' => 'przywróć' + ], + [ + 'name' => 'Akcja', + 'action' => [ 'type' => 'delete', 'url' => '/admin/articles_archive/article_delete/id=[id]' ], + 'th' => [ 'class' => 'g-center' ], + 'td' => [ 'class' => 'g-center', 'style' => 'width: 50px;' ] + ] + ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/articles/articles-browse-list.php b/admin/templates/articles/articles-browse-list.php new file mode 100644 index 0000000..706a7ed --- /dev/null +++ b/admin/templates/articles/articles-browse-list.php @@ -0,0 +1,121 @@ + gdb_opt = $gdb; +$grid -> sql = 'SELECT *' + . 'FROM ( ' + . 'SELECT ' + . 'id, date_add, date_modify, status, ' + . '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, ' + . '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user ' + . 'FROM ' + . 'pp_articles AS pa WHERE status != -1 ' + . ') AS q1 ' + . 'WHERE ' + . '1=1 [where] ' + . 'ORDER BY ' + . '[order_p1] [order_p2]'; +$grid -> sql_count = 'SELECT ' + . 'COUNT(0) FROM ( ' + . 'SELECT ' + . 'id, date_add, date_modify, status, ' + . '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, ' + . '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user ' + . 'FROM ' + . 'pp_articles AS pa WHERE status != -1 ' + . ') AS q1 ' + . 'WHERE ' + . '1=1 [where] '; +$grid -> debug = true; +$grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ]; +$grid -> search = [ + [ 'name' => 'Tytuł', 'db' => 'title', 'type' => 'text' ], + [ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ], + [ 'name' => 'Data dodania', 'db' => 'date_add', 'type' => 'date_range' ], + [ 'name' => 'Data modyfikacji', 'db' => 'date_modify', 'type' => 'date_range' ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Tytuł', + 'db' => 'title', + 'sort' => true, + 'php' => 'echo "[title]"; echo "" . \admin\factory\Articles::article_pages( [id] ) . "";' + ], + [ + 'name' => 'Aktywny', + 'db' => 'status', + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ], + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'sort' => true + ], + [ + 'name' => 'Data dodania', + 'db' => 'date_add', + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ], + 'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );' + ], + [ + 'name' => 'Data modyfikacji', + 'db' => 'date_modify', + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ], + 'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_modify]" ) );' + ], + [ + 'name' => 'Modyfikowany przez', + 'db' => 'user', + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ], + ], + [ + 'name' => 'Akcja', + 'db' => 'id', + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ], + 'php' => 'echo "wybierz";' + ] + ]; +echo $grid -> draw(); +?> + + \ No newline at end of file diff --git a/admin/templates/articles/articles-list.php b/admin/templates/articles/articles-list.php new file mode 100644 index 0000000..0419a15 --- /dev/null +++ b/admin/templates/articles/articles-list.php @@ -0,0 +1,144 @@ + gdb_opt = $gdb; +$grid -> sql = 'SELECT *' + . 'FROM ( ' + . 'SELECT ' + . 'id, date_add, date_modify, status, ' + . '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, ' + . '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user ' + . 'FROM ' + . 'pp_articles AS pa WHERE status != -1 ' + . ') AS q1 ' + . 'WHERE ' + . '1=1 [where] ' + . 'ORDER BY ' + . '[order_p1] [order_p2]'; +$grid -> sql_count = 'SELECT ' + . 'COUNT(0) FROM ( ' + . 'SELECT ' + . 'id, date_add, date_modify, status, ' + . '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, ' + . '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user ' + . 'FROM ' + . 'pp_articles AS pa WHERE status != -1 ' + . ') AS q1 ' + . 'WHERE ' + . '1=1 [where] '; +$grid -> debug = true; +if ( !\S::get_session( 'gpp_articlesorder' ) ) + $grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ]; +$grid -> search = [ + [ 'name' => 'Tytuł', 'db' => 'title', 'type' => 'text' ], + [ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ], + [ 'name' => 'Data dodania', 'db' => 'date_add', 'type' => 'date_range' ], + [ 'name' => 'Data modyfikacji', 'db' => 'date_modify', 'type' => 'date_range' ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Tytuł', + 'db' => 'title', + 'sort' => true, + 'php' => 'echo "[title]"; echo "" . \admin\factory\Articles::article_pages( [id] ) . "";' + ], + [ + 'name' => 'Aktywny', + 'db' => 'status', + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ], + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'sort' => true + ], + [ + 'name' => 'Data dodania', + 'db' => 'date_add', + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ], + 'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );', + 'sort' => true + ], + [ + 'name' => 'Data modyfikacji', + 'db' => 'date_modify', + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ], + 'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_modify]" ) );', + 'sort' => true + ], + [ + 'name' => 'Modyfikowany przez', + 'db' => 'user', + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ], + ], [ + 'name' => 'Akcja', + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ], + 'php' => 'echo "duplikuj";' + ], [ + 'name' => 'Edytuj', + 'action' => [ 'type' => 'edit', 'url' => '/admin/articles/article_edit/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Usuń', + 'action' => [ 'type' => 'delete', 'url' => '/admin/articles/article_delete/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; +$grid -> buttons = [ + [ + 'label' => 'Dodaj artykuł', + 'url' => '/admin/articles/article_edit/', + 'icon' => 'fa-plus-circle', + 'class' => 'btn-success' + ] + ]; +echo $grid -> draw(); +?> + \ No newline at end of file diff --git a/admin/templates/articles/subpages-list.php b/admin/templates/articles/subpages-list.php new file mode 100644 index 0000000..a5e41c8 --- /dev/null +++ b/admin/templates/articles/subpages-list.php @@ -0,0 +1,16 @@ + pages ) ):?> +
    + pages as $page ):?> +
  1. +
    > + + article_pages ) and in_array( $page['id'], $this -> article_pages ) ):?>checked="checked" /> +
    + article_pages, $page['id'], $this -> step + 1 ); + ?> +
  2. + +
+ \ No newline at end of file diff --git a/admin/templates/authors/author-edit.php b/admin/templates/authors/author-edit.php new file mode 100644 index 0000000..5485e72 --- /dev/null +++ b/admin/templates/authors/author-edit.php @@ -0,0 +1,112 @@ + + + +
+ +
+
+ 'Autor', + 'name' => 'author', + 'id' => 'author', + 'value' => $this -> author['author'], + 'class' => 'require' + ] );?> + 'Zdjęcie', + 'name' => 'image', + 'id' => 'image', + 'value' => $this -> author['image'], + 'icon_content' => 'przeglądaj', + 'icon_js' => "window.open ( '/libraries/filemanager-9.14.1/dialog.php?type=1&popup=1&field_id=image&akey=c3cb2537d25c0efc9e573d059d79c3b8', 'mywindow', 'location=1,status=1,scrollbars=1, width=1100,height=700');" + ] );?> +
+
+
+
    + languages ) ): foreach ( $this -> languages as $lg ):?> + +
  • + + +
+
+ languages ) ): foreach ( $this -> languages as $lg ):?> + +
+ 'Opis', + 'name' => 'description', + 'id' => 'description_' . $lg['id'], + 'value' => $this -> author['languages'][$lg['id']]['description'] + ] );?> + +
+ + +
+
+
+
+
+
+ id = 'author-edit'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Edycja autora'; +$grid -> fields = [ + [ + 'db' => 'id', + 'type' => 'hidden', + 'value' => $this -> author['id'] + ] +]; +$grid -> external_code = $out; +$grid -> actions = [ + 'save' => [ 'url' => '/admin/authors/save/', 'back_url' => '/admin/authors/view_list/' ], + 'cancel' => [ 'url' => '/admin/authors/view_list/' ] +]; +$grid -> persist_edit = true; +$grid -> id_param = 'id'; +echo $grid -> draw(); +?> + + \ No newline at end of file diff --git a/admin/templates/authors/view-list.php b/admin/templates/authors/view-list.php new file mode 100644 index 0000000..7a18417 --- /dev/null +++ b/admin/templates/authors/view-list.php @@ -0,0 +1,41 @@ + gdb_opt = $gdb; +$grid -> order = [ 'column' => 'author', 'type' => 'ASC' ]; +$grid -> search = [ + [ 'author' => 'Autor', 'db' => 'name', 'type' => 'text' ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], [ + 'name' => 'Autor', + 'db' => 'author', + 'sort' => true, + 'php' => 'echo "[author]";' + ], [ + 'name' => 'Edytuj', + 'action' => [ 'type' => 'edit', 'url' => '/admin/authors/edit/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ], [ + 'name' => 'Usuń', + 'action' => [ 'type' => 'delete', 'url' => '/admin/authors/delete/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; +$grid -> buttons = [ + [ + 'label' => 'Dodaj autora', + 'url' => '/admin/authors/edit/', + 'icon' => 'fa-plus-circle', + 'class' => 'btn-success' + ] + ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/backups/backup-list.php b/admin/templates/backups/backup-list.php new file mode 100644 index 0000000..d4f6252 --- /dev/null +++ b/admin/templates/backups/backup-list.php @@ -0,0 +1,65 @@ + gdb_opt = $gdb; +$grid -> src = $this -> backups; +$grid -> debug = true; +$grid -> order = [ 'column' => 'name', 'type' => 'DESC' ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Nazwa', + 'db' => 'name', + 'sort' => true, + 'php' => 'echo "[name]";' + ], + [ + 'name' => 'Usuń', + 'action' => [ 'type' => 'delete', 'url' => '/admin/backups/backup_delete/name=[name]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; +$grid -> buttons = [ + [ + 'label' => 'Utwórz kopie zapasową', + 'url' => '#', + 'icon' => 'fa-plus-circle', + 'class' => 'confirm btn btn-success btn-sm mr5"' + ], + [ + 'label' => 'Pobierz plik restore.php', + 'url' => '/admin/backups/download_restore_file/', + 'icon' => 'fa-download', + 'class' => 'btn btn-system btn-sm mr5"' + ] + ]; +echo $grid -> draw(); +?> + \ No newline at end of file diff --git a/admin/templates/banners/banner-edit.php b/admin/templates/banners/banner-edit.php new file mode 100644 index 0000000..1e179cb --- /dev/null +++ b/admin/templates/banners/banner-edit.php @@ -0,0 +1,180 @@ + + + + +
+ +
+
+ 'Nazwa', + 'name' => 'name', + 'id' => 'name', + 'value' => $this -> banner['name'], + 'class' => 'require' + ) ); + ?> + 'Aktywny', + 'name' => 'status', + 'checked' => $this -> banner['status'] == 1 or ! $this -> banner['id'] ? true : false + ) + ); + ?> + 'Data rozpoczęcia', + 'name' => 'date_start', + 'id' => 'date_start', + 'value' => $this -> banner['date_start'], + 'class' => 'date' + ) + ); + ?> + 'Data zakończenia', + 'name' => 'date_end', + 'id' => 'date_end', + 'value' => $this -> banner['date_end'], + 'class' => 'date' + ) ); + ?> + 'Slajder / Strona główna', + 'name' => 'home_page', + 'checked' => $this -> banner['home_page'] == 1 ? true : false + ) + ); + ?> +
+
+
+
    + languages ) ): foreach ( $this -> languages as $lg ):?> + +
  • + + +
+
+ languages ) ): foreach ( $this -> languages as $lg ):?> + +
+ 'Obraz', + 'name' => 'src', + 'id' => 'src_' . $lg['id'], + 'value' => $this -> banner['languages'][ $lg['id'] ]['src'], + 'icon_content' => 'przeglądaj', + 'icon_js' => "window.open ( '/libraries/filemanager-9.14.1/dialog.php?type=1&popup=1&field_id=src_" . $lg['id'] . "&akey=c3cb2537d25c0efc9e573d059d79c3b8', 'mywindow', 'location=1,status=1,scrollbars=1, width=1100,height=700');" + ) + ); + ?> + 'Url', + 'name' => 'url', + 'id' => 'url_' . $lg['id'], + 'value' => $this -> banner['languages'][ $lg['id'] ]['url'] + ) + ); + ?> + 'Kod html', + 'name' => 'html', + 'id' => 'html_' . $lg['id'], + 'value' => $this -> banner['languages'][$lg['id']]['html'] + ) + ); + ?> + 'Treść', + 'name' => 'text', + 'id' => 'text_' . $lg['id'], + 'value' => $this -> banner['languages'][$lg['id']]['text'] + ) + ); + ?> + +
+ + +
+
+
+
+
+
+ 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(); +?> + + \ No newline at end of file diff --git a/admin/templates/banners/banners-list.php b/admin/templates/banners/banners-list.php new file mode 100644 index 0000000..dcd7eea --- /dev/null +++ b/admin/templates/banners/banners-list.php @@ -0,0 +1,78 @@ + gdb_opt = $gdb; +$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ]; +$grid -> search = [ + [ 'name' => 'Nazwa', 'db' => 'name', 'type' => 'text' ], + [ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Nazwa', + 'db' => 'name', + 'sort' => true, + 'php' => 'echo "[name]";' + ], + [ + 'name' => 'Aktywny', + 'db' => 'status', + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Strona główna', + 'db' => 'home_page', + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Slajder', + 'db' => 'home_page', + 'replace' => [ 'array' => [ 1 => 'nie', 0 => 'tak' ] ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Data rozpoczęcia', + 'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ], + 'td' => [ 'class' => 'g-center' ], + 'php' => 'if ( "[date_start]" ) echo date( "Y-m-d", strtotime( "[date_start]" ) ); else echo "-";' + ], + [ + 'name' => 'Data zakończenia', + 'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ], + 'td' => [ 'class' => 'g-center' ], + 'php' => 'if ( "[date_end]" ) echo date( "Y-m-d", strtotime( "[date_end]" ) ); else echo "-";' + ], + [ + 'name' => 'Edytuj', + 'action' => [ 'type' => 'edit', 'url' => '/admin/banners/banner_edit/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Usuń', + 'action' => [ 'type' => 'delete', 'url' => '/admin/banners/banner_delete/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; +$grid -> buttons = [ + [ + 'label' => 'Dodaj baner', + 'url' => '/admin/banners/banner_edit/', + 'icon' => 'fa-plus-circle', + 'class' => 'btn-success' + ] + ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/emails/email-details.php b/admin/templates/emails/email-details.php new file mode 100644 index 0000000..b405705 --- /dev/null +++ b/admin/templates/emails/email-details.php @@ -0,0 +1,56 @@ + +
+ +
+

email['email'];?>

+
+
+
+ +
+

email['phone'];?>

+
+
+
+ +
+

email['title'];?>

+
+
+
+ +
+

email['mail']);?>

+
+
+
+ +
+

email[add_date] ) )?>

+
+
+ id = 'email-details'; +$grid -> gdb_opt = $gdb; +$grid -> title = 'Szczegóły Wiadomości'; +$grid -> external_code = $out; +$grid -> actions = [ + 'save' => [ '' => '/admin/emails/view_list/', 'back_url' => '/admin/emails/view_list/'], + 'cancel' => [ 'url' => '/admin/emails/view_list/' ] + ]; +$grid -> form = false; +echo $grid -> draw(); +?> + \ No newline at end of file diff --git a/admin/templates/emails/email_details.php b/admin/templates/emails/email_details.php new file mode 100644 index 0000000..d86f785 --- /dev/null +++ b/admin/templates/emails/email_details.php @@ -0,0 +1,56 @@ + +
+ +
+

email['email'];?>

+
+
+
+ +
+

email['phone'];?>

+
+
+
+ +
+

email['title'];?>

+
+
+
+ +
+

email['mail']);?>

+
+
+
+ +
+

email[add_date] ) )?>

+
+
+ id = 'email-detali'; +$grid -> gdb_opt = $gdb; +$grid -> title = 'Szczegóły Wiadomości'; +$grid -> external_code = $out; +$grid -> actions = [ + 'save' => [ '' => '/admin/emails/view_list/', 'back_url' => '/admin/emails/view_list/'], + 'cancel' => [ 'url' => '/admin/emails/view_list/' ] + ]; +$grid -> form = false; +echo $grid -> draw(); +?> + \ No newline at end of file diff --git a/admin/templates/emails/emails-list.php b/admin/templates/emails/emails-list.php new file mode 100644 index 0000000..b9a5bc6 --- /dev/null +++ b/admin/templates/emails/emails-list.php @@ -0,0 +1,41 @@ + gdb_opt = $gdb; + +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Data', + 'db' => 'add_date', + 'td' => [ ], + 'th' => ['style' => 'width: 220px;' ], + 'php' => 'echo date( "Y-m-d H:i", strtotime( "[add_date]" ) );', + 'sort' => true + + ], + [ + 'name' => 'Email', + 'db' => 'email', + 'content' => '[email]', + 'sort' => true , + ], + [ + 'name' => 'Temat', + 'db' => 'title', + ], + [ + 'name' => 'Szczegóły', + 'content' => 'Szczegóły', + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; + +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/filemanager/filemanager.php b/admin/templates/filemanager/filemanager.php new file mode 100644 index 0000000..9499871 --- /dev/null +++ b/admin/templates/filemanager/filemanager.php @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/admin/templates/html/button.php b/admin/templates/html/button.php new file mode 100644 index 0000000..4bf0f01 --- /dev/null +++ b/admin/templates/html/button.php @@ -0,0 +1,25 @@ + params['class'] . '" '; + + if ( $this -> params['style'] ) + $out .= 'style="' . $this -> params['style'] . '" '; + + if ( $this -> params['js'] ) + $out .= 'onclick="' . htmlspecialchars( $this -> params['js'] ) . '" '; + + if ( $this -> params['url'] ) + $out .= 'href="' . htmlspecialchars( $this -> params['url'] ) . '" '; + + if ( $this -> params['id'] ) + $out .= 'id="' . $this -> params['id'] . '" '; + + if ( $this -> params['title'] ) + $out .= 'title="' . htmlspecialchars( $this -> params['title'] ) . '" '; +$out .= '>'; + if ( $this -> params['icon'] ) + $out .= ''; + $out .= $this -> params['text']; +$out .= ''; + +echo $out; \ No newline at end of file diff --git a/admin/templates/html/form-text.php b/admin/templates/html/form-text.php new file mode 100644 index 0000000..b950f79 --- /dev/null +++ b/admin/templates/html/form-text.php @@ -0,0 +1,8 @@ +
+ +
+

+ params['text'];?> +

+
+
\ No newline at end of file diff --git a/admin/templates/html/input-icon.php b/admin/templates/html/input-icon.php new file mode 100644 index 0000000..3d642c4 --- /dev/null +++ b/admin/templates/html/input-icon.php @@ -0,0 +1,70 @@ + params['label'] ) +{ + $out .= '
'; + $out .= ''; + $out .= '
'; +} + $out .= '
'; + $out .= ' params['type'] . '" '; + + if ( $this -> params['id'] ) + $out .= 'id="' . $this -> params['id'] . '" '; + + if ( $this -> params['class'] or $this -> params['label'] ) + { + if ( $this -> params['label'] ) + $out .= 'class="' . $this -> params['class'] . ' form-control" '; + else if ( $this -> params['class'] ) + $out .= 'class="' . $this -> params['class'] . '" '; + } + + $out .= 'name="' . $this -> params['name'] . '" '; + $out .= 'value="' . $this -> secureHTML( $this -> params['value'] ) . '" '; + + if ( $this -> params['js'] ) + $out .= 'onchange="' . htmlspecialchars( $this -> params['js'] ) . '" '; + + if ( $this -> params['js_key'] ) + $out .= 'onkeyup="' . htmlspecialchars( $this -> params['js_key'] ) . '" '; + + if ( $this -> params['style'] ) + $out .= 'style="' . $this -> params['style'] . '" '; + + if ( $this -> params['readonly'] ) + $out .= 'readonly="readonly" '; + + if ( $this -> params['autocomplete'] == 'off' ) + $out .= 'autocomplete="off" '; + + $out .= ' />'; + + $out .= ' params['icon_js'] ) + $out .= 'onclick="' . htmlspecialchars( $this -> params['icon_js'] ) . '" '; + + $out .= '>'; + $out .= $this -> params['icon_content']; + $out .= ''; + $out .= '
'; + +if ( $this -> params['label'] ) +{ + $out .= '
'; + $out .= '
'; +} + +echo $out; \ No newline at end of file diff --git a/admin/templates/html/input-switch.php b/admin/templates/html/input-switch.php new file mode 100644 index 0000000..79e4d01 --- /dev/null +++ b/admin/templates/html/input-switch.php @@ -0,0 +1,36 @@ + params['label'] ) +{ + $out .= '
'; + $out .= ''; + $out .= '
'; +} + + $out .= '
'; + $out .= ' params['id'] ) + $out .= 'id="' . $this -> params['id'] . '" '; + else + $out .= 'id="' . $this -> params['name'] . '" '; + $out .= 'name="' . $this -> params['name'] . '" type="checkbox"'; + + if ( $this -> params['checked'] ) + $out .= 'checked="checked" '; + + $out .= '>'; + $out .= ''; + $out .= '
'; + +if ( $this -> params['label'] ) +{ + $out .= '
'; + $out .= '
'; +} + +echo $out; \ No newline at end of file diff --git a/admin/templates/html/input.php b/admin/templates/html/input.php new file mode 100644 index 0000000..8d92787 --- /dev/null +++ b/admin/templates/html/input.php @@ -0,0 +1,63 @@ + params['label'] ) +{ + $out .= '
'; + $out .= ''; + $out .= '
'; +} + + $out .= ' params['type'] . '" '; + + if ( $this -> params['id'] ) + $out .= 'id="' . $this -> params['id'] . '" '; + + if ( $this -> params['class'] or $this -> params['label'] ) + { + if ( $this -> params['label'] ) + $out .= 'class="' . $this -> params['class'] . ' form-control" '; + else if ( $this -> params['class'] ) + $out .= 'class="' . $this -> params['class'] . '" '; + } + + $out .= 'name="' . $this -> params['name'] . '" '; + $out .= 'value="' . $this -> secureHTML( $this -> params['value'] ) . '" '; + + if ( $this -> params['style'] ) + $out .= 'style="' . $this -> params['style'] . '" '; + + if ( $this -> params['js'] ) + $out .= 'onchange="' . htmlspecialchars( $this -> params['js'] ) . '" '; + + if ( $this -> params['js_key'] ) + $out .= 'onkeyup="' . htmlspecialchars( $this -> params['js_key'] ) . '" '; + + if ( $this -> params['readonly'] ) + $out .= 'readonly="readonly" '; + + if ( $this -> params['autocomplete'] == 'off' ) + $out .= 'autocomplete="off" '; + + if ( is_array( $this -> params['params'] ) and count( $this -> params['params'] ) ) foreach ( $this -> params['params'] as $key => $val ) + $out .= $key . '="' . $val . '" '; + + $out .= ' />'; + +if ( $this -> params['label'] ) +{ + $out .= '
'; + $out .= '
'; +} + +echo $out; \ No newline at end of file diff --git a/admin/templates/html/panel.php b/admin/templates/html/panel.php new file mode 100644 index 0000000..3fe09ce --- /dev/null +++ b/admin/templates/html/panel.php @@ -0,0 +1,8 @@ +
+
+ params['title'];?> +
+
+ params['content'];?> +
+
\ No newline at end of file diff --git a/admin/templates/html/select.php b/admin/templates/html/select.php new file mode 100644 index 0000000..c2fb33d --- /dev/null +++ b/admin/templates/html/select.php @@ -0,0 +1,62 @@ + params['label'] ) +{ + $out .= '
'; + $out .= ''; + $out .= '
'; +} + + $out .= ''; + +if ( $this -> params['label'] ) +{ + $out .= '
'; + $out .= '
'; +} + +echo $out; \ No newline at end of file diff --git a/admin/templates/html/textarea.php b/admin/templates/html/textarea.php new file mode 100644 index 0000000..13ccc1f --- /dev/null +++ b/admin/templates/html/textarea.php @@ -0,0 +1,52 @@ + params['label'] ) +{ + $out .= '
'; + $out .= ''; + $out .= '
'; +} + + $out .= ''; + +if ( $this -> params['label'] ) +{ + $out .= '
'; + $out .= '
'; +} + +echo $out; \ No newline at end of file diff --git a/admin/templates/languages/language-edit.php b/admin/templates/languages/language-edit.php new file mode 100644 index 0000000..3e17176 --- /dev/null +++ b/admin/templates/languages/language-edit.php @@ -0,0 +1,98 @@ + 'hidden', + 'name' => 'o', + 'value' => $this -> language['o'] + ) + ); + echo \Html::input( + array( + 'label' => 'Język', + 'type' => 'text', + 'class' => 'require', + 'name' => 'name', + 'value' => $this -> language['name'] + ) + ); + if ( $this -> language['id'] ) + { + echo \Html::input( + array( + 'type' => 'hidden', + 'name' => 'id', + 'value' => $this -> language['id'] + ) + ); + } + else + { + echo \Html::input( + array( + 'label' => 'ID (2 znaki)', + 'class' => 'require', + 'type' => 'text', + 'name' => 'id' + ) + ); + } + echo \Html::input_switch( + array( + 'label' => 'Aktywny', + 'name' => 'status', + 'checked' => $this -> language['status'] == 1 ? true : false + ) + ); + echo \Html::input_switch( + array( + 'label' => 'Domyślny', + 'name' => 'start', + 'checked' => $this -> language['start'] == 1 ? true : false + ) + ); + echo '
'; + echo \Html::input( + array( + 'label' => 'Domena', + 'type' => 'text', + 'name' => 'domain', + 'value' => $this -> language['domain'] + ) + ); + echo \Html::input_switch( + array( + 'label' => 'Domena domyślna', + 'name' => 'main_domain', + 'checked' => $this -> language['main_domain'] == 1 ? true : false + ) + ); +$out = ob_get_clean(); + +$grid = new \gridEdit; +$grid -> id = 'language-edit'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Edycja języka'; +$grid -> external_code = $out; +$grid -> actions = [ + 'save' => [ 'url' => '/admin/languages/language_save/', 'back_url' => '/admin/languages/view_list/' ], + 'cancel' => [ 'url' => '/admin/languages/view_list/' ] + ]; +$grid -> persist_edit = true; +$grid -> id_param = 'id'; +echo $grid -> draw(); +?> + \ No newline at end of file diff --git a/admin/templates/languages/languages-list.php b/admin/templates/languages/languages-list.php new file mode 100644 index 0000000..7e121e1 --- /dev/null +++ b/admin/templates/languages/languages-list.php @@ -0,0 +1,72 @@ + gdb_opt = $gdb; +$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ]; +$grid -> search = [ + [ 'name' => 'Język', 'db' => 'name', 'type' => 'text' ], + [ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ], + [ 'name' => 'Domyślny', 'db' => 'start', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Domyślny', + 'db' => 'start', + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'td' => [ 'class' => 'g-center' ], + 'php' => 'if ( [start] ) echo "tak"; else echo "nie";' + ], + [ + 'name' => 'Aktywny', + 'db' => 'status', + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Język', + 'db' => 'name', + 'php' => 'echo "[name]";', + 'sort' => true + ], + [ + 'name' => 'Domena', + 'db' => 'domain', + 'sort' => true + ], + [ + 'name' => 'Domena domyślna', + 'db' => 'main_domain', + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'td' => [ 'class' => 'g-center' ], + 'php' => 'if ( [main_domain] ) echo "tak"; else echo "nie";' + ], + [ + 'name' => 'Edytuj', + 'action' => [ 'type' => 'edit', 'url' => '/admin/languages/language_edit/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Usuń', + 'action' => [ 'type' => 'delete', 'url' => '/admin/languages/language_delete/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; +$grid -> buttons = [ + [ + 'label' => 'Dodaj język', + 'url' => '/admin/languages/language_edit/', + 'icon' => 'fa-plus-circle', + 'class' => 'btn-success' + ] + ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/languages/translation-edit.php b/admin/templates/languages/translation-edit.php new file mode 100644 index 0000000..64895ed --- /dev/null +++ b/admin/templates/languages/translation-edit.php @@ -0,0 +1,60 @@ + + 'text', + 'label' => 'Tekst', + 'name' => 'text', + 'class' => 'require', + 'value' => $this -> translation['text'] + ) +); + +if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $language ): + echo \Html::input( + array( + 'type' => 'text', + 'label' => $language['name'], + 'name' => $language['id'], + 'value' => $this -> translation[$language['id']] + ) ); + endforeach; +endif; +$out = ob_get_clean(); + +$grid = new \gridEdit; +$grid -> id = 'translation-edit'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Edycja tłumaczenia'; +$grid -> fields = [ + [ + 'db' => 'id', + 'type' => 'hidden', + 'value' => $this -> translation['id'] + ] +]; +$grid -> external_code = $out; +$grid -> actions = [ + 'save' => [ 'url' => '/admin/languages/translation_save/', 'back_url' => '/admin/languages/translation_list/' ], + 'cancel' => [ 'url' => '/admin/languages/translation_list/' ] +]; +$grid -> persist_edit = true; +$grid -> id_param = 'id'; +echo $grid -> draw(); +?> + \ No newline at end of file diff --git a/admin/templates/languages/translations-list.php b/admin/templates/languages/translations-list.php new file mode 100644 index 0000000..a7e2d6d --- /dev/null +++ b/admin/templates/languages/translations-list.php @@ -0,0 +1,44 @@ + gdb_opt = $gdb; +$grid -> order = [ 'column' => 'text', 'type' => 'ASC' ]; +$grid -> search = [ + [ 'name' => 'Tekst', 'db' => 'text', 'type' => 'text' ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Tekst', + 'db' => 'text', + 'php' => 'echo "[text]";', + 'sort' => true + ], + [ + 'name' => 'Edytuj', + 'action' => [ 'type' => 'edit', 'url' => '/admin/languages/translation_edit/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Usuń', + 'action' => [ 'type' => 'delete', 'url' => '/admin/languages/translation_delete/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; +$grid -> buttons = [ + [ + 'label' => 'Dodaj tłumaczenie', + 'url' => '/admin/languages/translation_edit/', + 'icon' => 'fa-plus-circle', + 'class' => 'btn-success' + ] + ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/layouts/layout-edit.php b/admin/templates/layouts/layout-edit.php new file mode 100644 index 0000000..b6b6d1e --- /dev/null +++ b/admin/templates/layouts/layout-edit.php @@ -0,0 +1,262 @@ + + + + + + + + + + + +
+ +
+
+ 'Nazwa', + 'name' => 'name', + 'id' => 'name', + 'value' => $this -> layout['name'] + ) + );?> + 'Szablon domyślny', + 'name' => 'status', + 'checked' => $this -> layout['status'] == 1 ? true : false + ) + );?> +
+ +
+ menus ) ) foreach ( $this -> menus as $menu ) + { + ?> + + +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ id = 'layout-edit'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Edycja szablonu'; +$grid -> fields = [ + [ + 'db' => 'id', + 'type' => 'hidden', + 'value' => $this -> layout['id'] + ] + ]; +$grid -> actions = [ + 'save' => [ 'url' => '/admin/layouts/layout_save/', 'back_url' => '/admin/layouts/view_list/' ], + 'cancel' => [ 'url' => '/admin/layouts/view_list/' ] + ]; +$grid -> external_code = $out; +$grid -> persist_edit = true; +$grid -> id_param = 'id'; + +echo $grid -> draw(); +?> \ No newline at end of file diff --git a/admin/templates/layouts/layouts-list.php b/admin/templates/layouts/layouts-list.php new file mode 100644 index 0000000..2a2b379 --- /dev/null +++ b/admin/templates/layouts/layouts-list.php @@ -0,0 +1,47 @@ + gdb_opt = $gdb; +$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ]; +$grid -> search = [ + [ 'name' => 'Nazwa', 'db' => 'name', 'type' => 'text' ], + [ 'name' => 'Szablon domyślny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Nazwa', + 'db' => 'name', + 'php' => 'echo "[name]";', + 'sort' => true + ], + [ + 'name' => 'Szablon domyślny', + 'db' => 'status', + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ], + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ] + ], + [ + 'name' => 'Akcja', + 'action' => [ 'type' => 'edit', 'url' => '/admin/layouts/layout_edit/id=[id]' ], + 'th' => [ 'class' => 'g-center' ], + 'td' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ] + ], + [ + 'name' => 'Akcja', + 'action' => [ 'type' => 'delete', 'url' => '/admin/layouts/layout_delete/id=[id]' ], + 'th' => [ 'class' => 'g-center' ], + 'td' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ] + ] + ]; +$grid -> buttons = [ + [ 'label' => 'Dodaj szablon', 'url' => '/admin/layouts/layout_edit/', 'icon' => 'fa-plus-circle', 'class' => 'btn-success' ] + ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/layouts/subpages-list.php b/admin/templates/layouts/subpages-list.php new file mode 100644 index 0000000..b2645fe --- /dev/null +++ b/admin/templates/layouts/subpages-list.php @@ -0,0 +1,16 @@ + pages ) ):?> +
    + pages as $page ):?> +
  1. +
    > + + layout_pages ) and in_array( $page['id'], $this -> layout_pages ) ):?>checked="checked" /> +
    + layout_pages, $page['id'], $this -> step + 1 ); + ?> +
  2. + +
+ \ No newline at end of file diff --git a/admin/templates/newsletter/email-template-edit.php b/admin/templates/newsletter/email-template-edit.php new file mode 100644 index 0000000..522adde --- /dev/null +++ b/admin/templates/newsletter/email-template-edit.php @@ -0,0 +1,63 @@ + + + + 'Nazwa', + 'name' => 'name', + 'id' => 'name', + 'value' => $this -> email_template['name'], + 'inline' => true, + 'readonly' => $this -> email_template['is_admin'] ? true : false + ) + );?> + 'Treść', + 'name' => 'text', + 'id' => 'text', + 'value' => $this ->email_template['text'], + 'inline' => true + ) + );?> + + id = 'email-templates-edit'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Edycja szablonu newslettera'; +$grid -> fields = [ + [ + 'db' => 'id', + 'type' => 'hidden', + 'value' => $this -> email_template['id'] + ] + ]; +$grid -> external_code = $out; +$grid -> actions = [ + 'save' => [ + 'url' => '/admin/newsletter/template_save/', + 'back_url' => $this -> email_template['is_admin'] ? '/admin/newsletter/email_templates_admin/' : '/admin/newsletter/email_templates_user/' + ], + 'cancel' => [ + 'url' => $this -> email_template['is_admin'] ? '/admin/newsletter/email_templates_admin/' : '/admin/newsletter/email_templates_user/' + ] + ]; +$grid -> persist_edit = true; +$grid -> id_param = 'id'; + +echo $grid -> draw(); +?> + \ No newline at end of file diff --git a/admin/templates/newsletter/email-templates-admin.php b/admin/templates/newsletter/email-templates-admin.php new file mode 100644 index 0000000..be182b7 --- /dev/null +++ b/admin/templates/newsletter/email-templates-admin.php @@ -0,0 +1,28 @@ + gdb_opt = $gdb; +$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ]; +$grid -> where = [ 'is_admin' => 1 ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Nazwa', + 'db' => 'name', + 'php' => 'echo "[name]";', + 'sort' => true + ], + [ + 'name' => 'Edytuj', + 'action' => [ 'type' => 'edit', 'url' => '/admin/newsletter/email_template_edit/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/newsletter/email-templates-user.php b/admin/templates/newsletter/email-templates-user.php new file mode 100644 index 0000000..6275e03 --- /dev/null +++ b/admin/templates/newsletter/email-templates-user.php @@ -0,0 +1,42 @@ + gdb_opt = $gdb; +$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ]; +$grid -> where = [ 'is_admin' => 0 ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Nazwa', + 'db' => 'name', + 'php' => 'echo "[name]";', + 'sort' => true + ], + [ + 'name' => 'Edytuj', + 'action' => [ 'type' => 'edit', 'url' => '/admin/newsletter/email_template_edit/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Usuń', + 'action' => [ 'type' => 'delete', 'url' => '/admin/newsletter/email_template_delete/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; +$grid -> buttons = [ + [ + 'label' => 'Dodaj szablon', + 'url' => '/admin/newsletter/email_template_edit/', + 'icon' => 'fa-plus-circle', + 'class' => 'btn-success' + ] + ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/newsletter/emails-list.php b/admin/templates/newsletter/emails-list.php new file mode 100644 index 0000000..9f9ab33 --- /dev/null +++ b/admin/templates/newsletter/emails-list.php @@ -0,0 +1,38 @@ + gdb_opt = $gdb; +$grid -> order = [ 'column' => 'email', 'type' => 'ASC' ]; +$grid -> search = [ + [ 'name' => 'Email', 'db' => 'email', 'type' => 'text' ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Email', + 'db' => 'email', + 'sort' => true + ], + [ + 'name' => 'Potwierdzony', + 'db' => 'status', + 'sort' => true, + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] + ] + ]; +$grid -> buttons = [ + [ + 'label' => 'Importuj emaile', + 'url' => '/admin/newsletter/import/', + 'icon' => 'fa-plus-circle', + 'class' => 'btn-success' + ] + ]; +$grid -> actions = [ 'delete' => true ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/newsletter/import.php b/admin/templates/newsletter/import.php new file mode 100644 index 0000000..fa3c8a2 --- /dev/null +++ b/admin/templates/newsletter/import.php @@ -0,0 +1,41 @@ + + 'Maile (oddzielone nowym wierszem)', + 'name' => 'emails', + 'id' => 'emails' + ) + );?> + + id = 'emails'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Import adresów mailowych'; +$grid -> fields = [ + [ + 'db' => 'id', + 'type' => 'hidden', + 'value' => $this -> element['id'] + ] + ]; +$grid -> external_code = $out; +$grid -> actions = [ + 'save' => [ + 'url' => '/admin/newsletter/emails_import/', + 'back_url' => '/admin/newsletter/emails_list/' + ], + 'cancel' => [ + 'url' => '/admin/newsletter/emails_list/' + ] + ]; +$grid -> persist_edit = false; +$grid -> id_param = 'id'; + +echo $grid -> draw(); +?> \ No newline at end of file diff --git a/admin/templates/newsletter/prepare.php b/admin/templates/newsletter/prepare.php new file mode 100644 index 0000000..9fd7ae9 --- /dev/null +++ b/admin/templates/newsletter/prepare.php @@ -0,0 +1,140 @@ + +
+ +
+
+ + + Dotyczy wysyłki maili z szablonu. +
+
+
+
+ +
+
+ + + + +
+
+
+
+ +
+ templates ) ): foreach ( $this -> templates as $template ): + $templates[ $template['id'] ] = $template['name']; + endforeach; endif; + ?> + 'Szablon', + 'name' => 'template', + 'id' => 'template', + 'values' => $templates, + 'value' => $this -> templates['id'] + + ));?> +
+ +
+
+
+
+ id = 'newsletter-prepare'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Wysyłka newslettera - przygotowanie'; +$grid -> default_buttons = false; +$grid -> external_code = $out; +$grid -> buttons = [ + [ + 'label' => 'Wyślij newsletter', + 'class' => 'btn-success', + 'icon' => 'fa-send', + 'js' => 'send_newsletter();' + ] + ]; +echo $grid -> draw(); +?> + \ No newline at end of file diff --git a/admin/templates/newsletter/preview.php b/admin/templates/newsletter/preview.php new file mode 100644 index 0000000..3852d02 --- /dev/null +++ b/admin/templates/newsletter/preview.php @@ -0,0 +1,33 @@ + settings['newsletter_header'] ? $this -> settings['newsletter_header'] : '

--- brak zdefiniowanego nagłówka ---

';?> + template ) ):?> + template['text']?> + + articles ) ):?> + articles as $article ):?> + +
+ + + + +
+ +
+
+
+ + + dates ):?> +
+ --- brak artykułów w danym okresie --- +
+ + + settings['newsletter_footer_2'] ? $this -> settings['newsletter_footer_2'] : '

--- brak zdefiniowanej stopki cz. 2 ---

';?> \ No newline at end of file diff --git a/admin/templates/newsletter/settings.php b/admin/templates/newsletter/settings.php new file mode 100644 index 0000000..65e1d0c --- /dev/null +++ b/admin/templates/newsletter/settings.php @@ -0,0 +1,60 @@ + + + + 'Nagłówek', + 'name' => 'newsletter_header', + 'id' => 'newsletter_header', + 'value' => $this -> settings['newsletter_header'], + 'inline' => true + ) + ); + echo \Html::textarea( + array( + 'label' => 'Stopka cz 1. (dołączana zawsze)', + 'name' => 'newsletter_footer_1', + 'id' => 'newsletter_footer_1', + 'value' => $this -> settings['newsletter_footer_1'], + 'inline' => true + ) + ); + echo \Html::textarea( + array( + 'label' => 'Stopka cz 2. (dołączana tylko w przypadku newslettera)', + 'name' => 'newsletter_footer_2', + 'id' => 'newsletter_footer_2', + 'value' => $this -> settings['newsletter_footer_2'], + 'inline' => true + ) + ); + +$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/newsletter/settings_save/', 'back_url' => '/admin/newsletter/settings/' ], + ]; +$grid -> external_code = $out; +echo $grid -> draw(); +?> + + \ No newline at end of file diff --git a/admin/templates/pages/menu-edit.php b/admin/templates/pages/menu-edit.php new file mode 100644 index 0000000..dc74f28 --- /dev/null +++ b/admin/templates/pages/menu-edit.php @@ -0,0 +1,42 @@ + gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Zapisz menu'; +$grid -> fields = [ + [ + 'db' => 'id', + 'type' => 'hidden', + 'value' => $this -> menu['id'] + ], + [ + 'name' => 'Nazwa', + 'db' => 'name', + 'type' => 'text', + 'value' => $this -> menu['name'], + 'params' => [ 'class' => 'require' ] + ], + [ + 'name' => 'Aktywne', + 'db' => 'status', + 'type' => 'input_switch', + 'checked' => $this -> menu['status'] ? true : false, + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] + ] + ]; +$grid -> actions = [ + 'save' => [ 'url' => '/admin/pages/menu_save/', 'back_url' => '/admin/pages/view_list/' ], + 'cancel' => [ 'url' => '/admin/pages/view_list/' ] + ]; +$grid -> persist_edit = true; +$grid -> id_param = 'id'; +echo $grid -> draw(); +?> + \ No newline at end of file diff --git a/admin/templates/pages/page-articles.php b/admin/templates/pages/page-articles.php new file mode 100644 index 0000000..33d6ba2 --- /dev/null +++ b/admin/templates/pages/page-articles.php @@ -0,0 +1,89 @@ + +
    + articles ) ) foreach ( $this -> articles as $article ) + { + ?> +
  1. +
    +
  2. + +
+ gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> default_buttons = false; +$grid -> external_code = $out; +$grid -> title = 'Lista artykułów'; +$grid -> buttons = [ + [ + 'label' => 'Wstecz', + 'url' => '/admin/pages/view_list/', + 'icon' => 'fa-reply', + 'class' => 'btn-dark' + ] + ]; +echo $grid -> draw(); +?> + + \ No newline at end of file diff --git a/admin/templates/pages/page-edit.php b/admin/templates/pages/page-edit.php new file mode 100644 index 0000000..a8e2f0b --- /dev/null +++ b/admin/templates/pages/page-edit.php @@ -0,0 +1,514 @@ + + +
+ +
+
+
+
    + languages)): foreach ($this->languages as $lg): ?> + +
  • '; ?>
  • + + +
+
+ languages)): foreach ($this->languages as $lg): ?> + +
+ 'Nazwa strony', + 'name' => 'title', + 'id' => 'title_' . $lg['id'], + 'value' => $this->page['languages'][$lg['id']]['title'], + 'js_key' => 'google_preview( "' . $lg['id'] . '", "' . \S::get('pid') . '" ); return false;' + ) + ); + ?> +
+ + +
+
+
+
+
+ menus)): foreach ($this->menus as $menu): + $menus[$menu['id']] = $menu['name']; + endforeach; + endif; + ?> + 'Menu', + 'name' => 'menu_id', + 'values' => $menus, + 'value' => $this->page['id'] ? $this->page['menu_id'] : $this->menu_id + ) + ); + ?> + 'Typ strony', + 'name' => 'page_type', + 'id' => 'page_type', + 'values' => \admin\factory\Pages::$_page_types, + 'value' => $this->page['page_type'] + ) + ); + ?> + + 'Sortowanie artykułów', + 'name' => 'sort_type', + 'id' => 'sort_type', + 'values' => \admin\factory\Pages::$_sort_types, + 'value' => $this->page['sort_type'] + ) + ); + ?> + layouts)): foreach ($this->layouts as $layout): + $layouts[$layout['id']] = $layout['name']; + endforeach; + endif; + ?> + 'Szablon', + 'name' => 'layout_id', + 'id' => 'layout_id', + 'values' => $layouts, + 'value' => $this->page['layout_id'] + ) + ); + ?> + 'Liczba artykułów na stronę', + 'name' => 'articles_limit', + 'id' => 'articles_limit', + 'value' => $this->page['articles_limit'] ? $this->page['articles_limit'] : 2 + ) + ); + ?> + 'Pokaż tytuł', + 'name' => 'show_title', + 'checked' => $this->page['show_title'] == 1 or ! $this->page['id'] ? true : false + ) +); +?> + 'Aktywna', + 'name' => 'status', + 'checked' => $this->page['status'] == 1 or ! $this->page['id'] ? true : false + ) + ); + ?> + 'Strona startowa', + 'name' => 'start', + 'checked' => $this->page['start'] == 1 ? true : false + ] + ); + ?> + 'Cache (24h)', + 'name' => 'cache', + 'checked' => $this -> page['cache'] == 1 ? true : false + ] + ); + ?> +
+
+
+
    + languages)): foreach ($this->languages as $lg): ?> + +
  • '; ?>
  • + + +
+
+ languages)): foreach ($this->languages as $lg): ?> + +
+ 'Link SEO', + 'name' => 'seo_link', + 'id' => 'seo_link_' . $lg['id'], + 'value' => $this->page['languages'][$lg['id']]['seo_link'], + 'icon_content' => 'generuj', + 'icon_js' => 'generate_seo_links( "' . $lg['id'] . '", $( "#title_' . $lg['id'] . '" ).val(), ' . (int) $this->page['id'] . ', ' . \S::get('pid') . ' );', + 'js_key' => 'google_preview( "' . $lg['id'] . '", "' . \S::get('pid') . '" ); return false;' + ) + ); + ?> + 'Tytuł strony (h1)', + 'name' => 'site_title', + 'id' => 'site_title_' . $lg['id'], + 'value' => $this->page['languages'][$lg['id']]['site_title'] + ) + ); + ?> + 'Meta title', + 'name' => 'meta_title', + 'id' => 'meta_title_' . $lg['id'], + 'value' => $this->page['languages'][$lg['id']]['meta_title'], + 'js_key' => 'google_preview( "' . $lg['id'] . '" ); return false;' + ) + ); + ?> + 'Meta description', + 'name' => 'meta_description', + 'id' => 'meta_description_' . $lg['id'], + 'value' => $this->page['languages'][$lg['id']]['meta_description'], + 'js_key' => 'google_preview( "' . $lg['id'] . '" ); return false;' + ) + ); + ?> + 'Meta keywords', + 'name' => 'meta_keywords', + 'id' => 'meta_keywords_' . $lg['id'], + 'value' => $this->page['languages'][$lg['id']]['meta_keywords'] + ) + ); + ?> +
+ +
+
+
+
+
+
+
+
+ 'Blokuj indeksację', + 'name' => "noindex", + 'id' => 'noindex_' . $lg['id'], + 'values' => array( + 0 => 'nie', 1 => 'tak' + ), + 'value' => $this->page['languages'][$lg['id']]['noindex'] == 1 ? 1 : 0 + ) + ); + ?> + 'Blokuj bezpośredni dostęp', + 'name' => "block_direct_access", + 'id' => 'block_direct_access_' . $lg['id'], + 'values' => array( + 0 => 'nie', 1 => 'tak' + ), + 'value' => $this -> page['languages'][ $lg['id'] ]['block_direct_access'] == 1 ? 1 : 0 + ) + );?> + 'Rel canonical', + 'name' => 'canonical', + 'id' => 'canonical_' . $lg['id'], + 'value' => $this->page['languages'][$lg['id']]['canonical'] + ) );?> +
+ + +
+
+
+
+
+
+id = 'page-edit'; +$grid->gdb_opt = $gdb; +$grid->include_plugins = true; +$grid->title = 'Edycja strony'; +$grid->fields = [ + [ + 'db' => 'id', + 'type' => 'hidden', + 'value' => $this->page['id'] + ], + [ + 'db' => 'parent_id', + 'type' => 'hidden', + 'value' => $this->page['id'] ? $this->page['parent_id'] : $this->parent_id + ] +]; +$grid->actions = [ + 'save' => ['url' => '/admin/pages/page_save/', 'back_url' => '/admin/pages/view_list/'], + 'cancel' => ['url' => '/admin/pages/view_list/'] +]; +$grid->external_code = $out; +$grid->persist_edit = true; +$grid->id_param = 'id'; + +echo $grid->draw(); +?> \ No newline at end of file diff --git a/admin/templates/pages/pages-browse-list.php b/admin/templates/pages/pages-browse-list.php new file mode 100644 index 0000000..d6b325a --- /dev/null +++ b/admin/templates/pages/pages-browse-list.php @@ -0,0 +1,156 @@ + menus ) ) foreach ( $this -> menus as $menu ) + { + ?> + + id = 'pages-list'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Lista stron'; +$grid -> default_buttons = false; +$grid -> external_code = $out; + +echo $grid -> draw(); +?> + + + \ No newline at end of file diff --git a/admin/templates/pages/pages-list.php b/admin/templates/pages/pages-list.php new file mode 100644 index 0000000..475c01e --- /dev/null +++ b/admin/templates/pages/pages-list.php @@ -0,0 +1,204 @@ + menus ) ) foreach ( $this -> menus as $menu ) + { + ?> + + id = 'pages-list'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Lista stron'; +$grid -> default_buttons = false; +$grid -> buttons = [ + [ + 'label' => 'Dodaj menu', + 'url' => '/admin/pages/menu_edit/', + 'icon' => 'fa-plus-circle', + 'class' => 'btn-success' + ] + ]; +$grid -> external_code = $out; + +echo $grid -> draw(); +?> + + \ No newline at end of file diff --git a/admin/templates/pages/subpages-browse-list.php b/admin/templates/pages/subpages-browse-list.php new file mode 100644 index 0000000..b67f18b --- /dev/null +++ b/admin/templates/pages/subpages-browse-list.php @@ -0,0 +1,72 @@ +pages)): ?> + +
    + pages as $page): ?> +
  1. +
    + + '; + + if ($page['start']) + echo ''; + + echo mb_substr( $page['title'], 0, 50, 'UTF-8' ); + if ( strlen( $page['title'] ) > 50 ) + echo '...'; + + if (is_array($page['languages'])): + echo '
    '; + foreach ($page['languages'] as $lg) + echo ''; + echo '
    '; + endif; + + $default_language = \front\factory\Languages::default_language(); + if (is_array($page['languages'])): + foreach ($page['languages'] as $lg): + echo ''; + endforeach; + endif; + ?> +
    + step + 1); + ?> +
  2. + +
+ \ No newline at end of file diff --git a/admin/templates/pages/subpages-list.php b/admin/templates/pages/subpages-list.php new file mode 100644 index 0000000..69f6ed2 --- /dev/null +++ b/admin/templates/pages/subpages-list.php @@ -0,0 +1,54 @@ + pages ) ):?> +
    + pages as $page ):?> +
  1. +
    + + ';?> + ';?> + 75 ) echo '...';?> + '; + foreach ( $page['languages'] as $lg ) + echo ''; + echo '
    '; + endif; + ?> + step < 3 ):?> + + + + +
+ step + 1 ); + ?> + + + + \ No newline at end of file diff --git a/admin/templates/scontainers/ckeditor-list.php b/admin/templates/scontainers/ckeditor-list.php new file mode 100644 index 0000000..f57063e --- /dev/null +++ b/admin/templates/scontainers/ckeditor-list.php @@ -0,0 +1,101 @@ + gdb_opt = $gdb; +$grid -> sql = 'SELECT *' + . 'FROM ( ' + . 'SELECT ' + . 'id, status, ' + . '( SELECT title FROM pp_scontainers_langs AS psl, pp_langs AS pl WHERE lang_id = pl.id AND container_id = ps.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title ' + . 'FROM ' + . 'pp_scontainers AS ps ' + . ') AS q1 ' + . 'WHERE ' + . '1=1 [where] ' + . 'ORDER BY ' + . '[order_p1] [order_p2]'; +$grid -> sql_count = 'SELECT ' + . 'COUNT(0) FROM ( ' + . 'SELECT ' + . 'id, status, ' + . '( SELECT title FROM pp_scontainers_langs AS psl, pp_langs AS pl WHERE lang_id = pl.id AND container_id = ps.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title ' + . 'FROM ' + . 'pp_scontainers AS ps ' + . ') AS q1 ' + . 'WHERE ' + . '1=1 [where] '; +$grid -> debug = true; +$grid -> order = [ 'column' => 'title', 'type' => 'ASC' ]; +$grid -> search = [ + [ 'name' => 'Tytuł', 'db' => 'title', 'type' => 'text' ], + [ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Tytuł', + 'db' => 'title', + 'sort' => true + ], + [ + 'name' => 'Kod', + 'php' => 'echo "[KONTENER:[id]]";' + ], + [ + 'name' => 'Aktywny', + 'db' => 'status', + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Akcja', + 'db' => 'id', + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ], + 'php' => 'echo "wybierz";' + ] + ]; +$grid -> buttons = [ + [ + 'label' => 'Dodaj kontener', + 'url' => '/admin/scontainers/container_edit/', + 'icon' => 'fa-plus-circle', + 'class' => 'btn-success' + ] + ]; +echo $grid -> draw(); +?> + + \ No newline at end of file diff --git a/admin/templates/scontainers/container-edit.php b/admin/templates/scontainers/container-edit.php new file mode 100644 index 0000000..2a7e2a1 --- /dev/null +++ b/admin/templates/scontainers/container-edit.php @@ -0,0 +1,180 @@ + + + + + + + + + + + $this -> user['id'], + 'expires' => time() + 60*20 +]; + +$_SESSION['rfm_akey'] = bin2hex(random_bytes(16)); +$_SESSION['rfm_akey_expires'] = time() + 20*60; +$_SESSION['can_use_rfm'] = true; +$rfmAkeyJS = $_SESSION['rfm_akey']; + +ob_start(); +?> +
+ +
+
+
+
    + languages ) ): foreach ( $this -> languages as $lg ):?> + +
  • + + +
+
+ languages ) ): foreach ( $this -> languages as $lg ):?> + +
+ 'Tytuł', + 'name' => 'title', + 'id' => 'title_' . $lg['id'], + 'value' => $this -> container['languages'][ $lg['id'] ]['title'], + 'inline' => true + ) + );?> + 'Treść', + 'name' => 'text', + 'id' => 'text_' . $lg['id'], + 'value' => $this -> container['languages'][ $lg['id'] ]['text'], + 'inline' => true + ) + );?> + 'Kod HTML', + 'name' => 'html', + 'id' => 'html_' . $lg['id'], + 'value' => $this -> container['languages'][ $lg['id'] ]['html'], + 'inline' => true + ) + );?> + +
+ + +
+
+
+
+
+ 'Aktywny', + 'name' => 'status', + 'checked' => $this -> container['status'] == 1 or !$this -> container['id'] ? true : false + ) + ); + ?> + 'Pokaż tytuł', + 'name' => 'show_title', + 'checked' => $this -> container['show_title'] == 1 ? true : false + ) + ); + ?> + 'Tło kontenera', + 'name' => 'src', + 'id' => 'src', + 'value' => $this->container['src'], + 'icon_content' => 'przeglądaj', + 'icon_js' => "window.open ( 'http://" . $_SERVER['SERVER_NAME'] . "/libraries/filemanager-9.14.1/dialog.php?type=1&popup=1&field_id=src&akey=" . $rfmAkeyJS . "', 'mywindow', 'location=1,status=1,scrollbars=1, width=1100,height=700');" + ) + ); + ?> +
+
+
+ id = 'container-edit'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Edycja kontenera statycznego'; +$grid -> fields = [ + [ + 'db' => 'id', + 'type' => 'hidden', + 'value' => $this -> container['id'] + ] + ]; +$grid -> actions = [ + 'save' => [ 'url' => '/admin/scontainers/container_save/', 'back_url' => '/admin/scontainers/view_list/' ], + 'cancel' => [ 'url' => '/admin/scontainers/view_list/' ] + ]; +$grid -> external_code = $out; +$grid -> persist_edit = true; +$grid -> id_param = 'id'; + +echo $grid -> draw(); +?> + + \ No newline at end of file diff --git a/admin/templates/scontainers/containers-list.php b/admin/templates/scontainers/containers-list.php new file mode 100644 index 0000000..ef03137 --- /dev/null +++ b/admin/templates/scontainers/containers-list.php @@ -0,0 +1,79 @@ + gdb_opt = $gdb; +$grid -> sql = 'SELECT *' + . 'FROM ( ' + . 'SELECT ' + . 'id, status, ' + . '( SELECT title FROM pp_scontainers_langs AS psl, pp_langs AS pl WHERE lang_id = pl.id AND container_id = ps.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title ' + . 'FROM ' + . 'pp_scontainers AS ps ' + . ') AS q1 ' + . 'WHERE ' + . '1=1 [where] ' + . 'ORDER BY ' + . '[order_p1] [order_p2]'; +$grid -> sql_count = 'SELECT ' + . 'COUNT(0) FROM ( ' + . 'SELECT ' + . 'id, status, ' + . '( SELECT title FROM pp_scontainers_langs AS psl, pp_langs AS pl WHERE lang_id = pl.id AND container_id = ps.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title ' + . 'FROM ' + . 'pp_scontainers AS ps ' + . ') AS q1 ' + . 'WHERE ' + . '1=1 [where] '; +$grid -> debug = true; +$grid -> order = [ 'column' => 'title', 'type' => 'ASC' ]; +$grid -> search = [ + [ 'name' => 'Tytuł', 'db' => 'title', 'type' => 'text' ], + [ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Tytuł', + 'db' => 'title', + 'php' => 'echo "[title]";', + 'sort' => true + ], + [ + 'name' => 'Kod', + 'php' => 'echo "[KONTENER:[id]]";' + ], + [ + 'name' => 'Aktywny', + 'db' => 'status', + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Edytuj', + 'action' => [ 'type' => 'edit', 'url' => '/admin/scontainers/container_edit/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Usuń', + 'action' => [ 'type' => 'delete', 'url' => '/admin/scontainers/container_delete/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; +$grid -> buttons = [ + [ + 'label' => 'Dodaj kontener', + 'url' => '/admin/scontainers/container_edit/', + 'icon' => 'fa-plus-circle', + 'class' => 'btn-success' + ] + ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/seo-additional/element-edit.php b/admin/templates/seo-additional/element-edit.php new file mode 100644 index 0000000..c7c5b35 --- /dev/null +++ b/admin/templates/seo-additional/element-edit.php @@ -0,0 +1,95 @@ + + + + 'Url', + 'class' => 'required', + 'name' => 'url', + 'id' => 'url', + 'value' => $this -> element['url'] + ) + );?> + 'Aktywny', + 'name' => 'status', + 'checked' => $this -> element['status'] == 1 or !$this -> element['id'] ? true : false + ) + );?> + 'Meta title', + 'class' => 'title', + 'name' => 'title', + 'id' => 'title', + 'value' => $this -> element['title'] + ) + );?> + 'Meta keywords', + 'class' => 'keywords', + 'name' => 'keywords', + 'id' => 'keywords', + 'value' => $this -> element['keywords'] + ) + );?> + 'Meta description', + 'class' => 'description', + 'name' => 'description', + 'id' => 'description', + 'value' => $this -> element['description'] + ) + );?> + 'Dodatkowa treść', + 'name' => 'text', + 'id' => 'text', + 'value' => $this ->element['text'] + ) + );?> + + id = 'seo-element-edit'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Edycja elementu SEO'; +$grid -> fields = [ + [ + 'db' => 'id', + 'type' => 'hidden', + 'value' => $this -> element['id'] + ] + ]; +$grid -> external_code = $out; +$grid -> actions = [ + 'save' => [ + 'url' => '/admin/seo_additional/element_save/', + 'back_url' => '/admin/seo_additional/main_view/' + ], + 'cancel' => [ + 'url' => '/admin/seo_additional/main_view/' + ] + ]; +$grid -> persist_edit = true; +$grid -> id_param = 'id'; + +echo $grid -> draw(); +?> + \ No newline at end of file diff --git a/admin/templates/seo-additional/main-view.php b/admin/templates/seo-additional/main-view.php new file mode 100644 index 0000000..b05544c --- /dev/null +++ b/admin/templates/seo-additional/main-view.php @@ -0,0 +1,58 @@ + gdb_opt = $gdb; +$grid -> order = [ 'column' => 'url', 'type' => 'ASC' ]; +$grid -> search = [ + [ 'name' => 'Url', 'db' => 'url', 'type' => 'text' ], + [ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Url', + 'db' => 'url', + 'php' => 'echo "[url]";', + 'sort' => true + ], + [ + 'name' => 'Title', + 'db' => 'title', + 'sort' => true + ], + [ + 'name' => 'Aktywny', + 'db' => 'status', + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ], + 'td' => [ 'class' => 'g-center' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'sort' => true + ], + [ + 'name' => 'Edytuj', + 'action' => [ 'type' => 'edit', 'url' => '/admin/seo_additional/element_edit/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Usuń', + 'action' => [ 'type' => 'delete', 'url' => '/admin/seo_additional/element_delete/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; +$grid -> buttons = [ + [ + 'label' => 'Dodaj element', + 'url' => '/admin/seo_additional/element_edit/', + 'icon' => 'fa-plus-circle', + 'class' => 'btn-success' + ] + ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/admin/templates/settings/settings.php b/admin/templates/settings/settings.php new file mode 100644 index 0000000..0101cc9 --- /dev/null +++ b/admin/templates/settings/settings.php @@ -0,0 +1,428 @@ + + + + +
+ +
+
+ 'Nazwa firmy', + 'name' => 'firm_name', + 'id' => 'firm_name', + 'value' => $this -> settings['firm_name'] + ) + ); + ?> + 'Dodatkowe informacje', + 'name' => 'additional_info', + 'id' => 'additional_info', + 'value' => $this -> settings['additional_info'] + ) + ); + ?> + 'Mapa', + 'name' => 'google_maps', + 'checked' => $this -> settings['google_maps'] == 1 ? true : false + ) + ); + ?> + 'Mapa - adres', + 'name' => 'firm_adress', + 'id' => 'firm_adress', + 'value' => $this -> settings['firm_adress'] + ) + ); + ?> + 'Widget "Telefon"', + 'name' => 'widget_phone', + 'checked' => $this -> settings['widget_phone'] == 1 ? true : false + ) + ); + ?> +
+
+ 'Formularz kontaktowy', + 'name' => 'contact_form', + 'checked' => $this -> settings['contact_form'] == 1 ? true : false + ) + ); + ?> + 'Email kontaktowy', + 'name' => 'contact_email', + 'id' => 'contact_email', + 'value' => $this -> settings['contact_email'] + ) + ); + ?> + 'Email - host', + 'name' => 'email_host', + 'id' => 'email_host', + 'value' => $this -> settings['email_host'] + ) + ); + ?> + 'Email - port', + 'name' => 'email_port', + 'id' => 'email_port', + 'value' => $this -> settings['email_port'] + ) + ); + ?> + 'Email - login', + 'name' => 'email_login', + 'id' => 'email_login', + 'value' => $this -> settings['email_login'] + ) + ); + ?> + 'Email - hasło', + 'name' => 'email_password', + 'id' => 'email_password', + 'value' => $this -> settings['email_password'], + 'type' => 'text' + ) + ); + ?> + 'Captcha w formularzu kontaktowym', + 'name' => 'contact_form_captcha', + 'checked' => $this -> settings['contact_form_captcha'] == 1 ? true : false + ] ); + ?> +
+
+
+ +
+ +
+
+
+ +
+
+ settings['visit_counter'] ):?>checked="checked"> + +
+
+
+
+ +
+
+ settings['calendar'] ):?>checked="checked"> + +
+
+
+
+ +
+
+ settings['tags'] ):?>checked="checked"> + +
+
+
+ 'Maksmalna wielkość zdjęcia (px)', + 'name' => 'image_px', + 'id' => 'image_px', + 'value' => $this -> settings['image_px'] + ] ); + ?> +
+
+ 'Klucz Google Search Console', + 'name' => 'google_search_console', + 'id' => 'google_search_console', + 'value' => $this -> settings['google_search_console'] + ) + ); + ?> + 'Facebook link', + 'name' => 'facebook_link', + 'id' => 'facebook_link', + 'value' => $this -> settings['facebook_link'] + ) + ); + ?> + 'Kod statystyk', + 'name' => 'statistic_code', + 'id' => 'statistic_code', + 'value' => $this -> settings['statistic_code'], + 'rows' => 10 + ) + ); + ?> + 'Własne reguły htacess', + 'name' => 'htaccess', + 'id' => 'htaccess', + 'value' => $this -> settings['htaccess'], + 'rows' => 10 + ) + ); + ?> + 'Własne reguły robots.txt', + 'name' => 'robots', + 'id' => 'robots', + 'value' => $this -> settings['robots'], + 'rows' => 10 + ) + ); + ?> +
+
+
+ +
+
+ settings['devel'] ):?>checked="checked"> + +
+
+
+
+ +
+
+ settings['ssl'] ):?>checked="checked"> + +
+
+
+
+ +
+
+ settings['mysql_debug'] ):?>checked="checked"> + +
+
+
+
+ +
+
+ settings['htaccess_cache'] ):?>checked="checked"> + +
+
+
+
+ +
+
+ settings['lazy_loading'] ):?>checked="checked"> + +
+
+
+
+ +
+
+ settings['generate_webp'] ):?>checked="checked"> + +
+
+
+
+ "Struktura linków", + 'name' => "links_structure", + 'values' => [ 0 => 'skrócona', 1 => 'rozwinięta' ], + 'value' => $this -> settings['links_structure'] ? 1 : 0 + ] );?> +
+
+ "Wersja strony", + 'name' => "link_version", + 'values' => [ 0 => 'bez www', 1 => 'z www' ], + 'value' => $this -> settings['link_version'] ? 1 : 0 + ] );?> +
+
+ "Wersja adresów url", + 'name' => "url_version", + 'values' => [ 0 => 'bez / na końcu adresu url', 1 => 'z / na końcu adresu url' ], + 'value' => $this -> settings['url_version'] ? 1 : 0 + ] );?> +
+
+ "Newsletter", + 'name' => "newsletter_cron", + 'values' => [ 0 => 'wysyłka za pomocą cron i strony', 1 => 'wysyłka za pomocą cron' ], + 'value' => $this -> settings['newsletter_cron'] ? 1 : 0 + ] );?> +
+
+
+
+ +
+
+ settings['update'] ):?>checked="checked"> + +
+
+
+ 'Numer licencji', + 'name' => 'update_key', + 'id' => 'update_key', + 'value' => $this -> settings['update_key'] + ) + ); + ?> +
+
+ 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(); + ?> + + + + \ No newline at end of file diff --git a/admin/templates/site/main-layout.php b/admin/templates/site/main-layout.php new file mode 100644 index 0000000..4630e65 --- /dev/null +++ b/admin/templates/site/main-layout.php @@ -0,0 +1,331 @@ + + + + + cmsPro + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + +
+
+
+ +
+
+
+ + + +
+
+
+ + content;?> +
+
+
+
+ +
+
+ + + + + + + + diff --git a/admin/templates/site/unlogged-layout.php b/admin/templates/site/unlogged-layout.php new file mode 100644 index 0000000..f79ab1b --- /dev/null +++ b/admin/templates/site/unlogged-layout.php @@ -0,0 +1,93 @@ + + + + + cmsPro + + + + + + + + + + +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ Logowanie +
+ +
+
+
+ + +
+
+
+ +
+ +
+ +
+
+ + + + +
+
+
+
+ +
+
+ + + + +
+
+
+
+
+
+ + +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/admin/templates/site/unlogged.php b/admin/templates/site/unlogged.php new file mode 100644 index 0000000..000ebd4 --- /dev/null +++ b/admin/templates/site/unlogged.php @@ -0,0 +1,27 @@ + + + + + cmsPro + + + + + + + + + + +
+
+
+ +
+
+ content;?> +
+
+
+ + \ No newline at end of file diff --git a/admin/templates/update/main-view.php b/admin/templates/update/main-view.php new file mode 100644 index 0000000..577fb15 --- /dev/null +++ b/admin/templates/update/main-view.php @@ -0,0 +1,165 @@ + + 'Twoja wersja systemu', + 'id' => 'ver', + 'text' => $this -> ver + ] );?> + 'Aktualna wersja systemu', + 'text' => $this -> new_ver, + 'id' => 'new_ver' + ] );?> + new_ver; + $ver = $this -> ver; + $valuemax = ( $ver_new - $ver ) * 1000; +?> + +
+ ver < $this -> new_ver ):?> + + + ver < $this -> new_ver ):?> + + +
+ ver < $this -> new_ver ):?> +
* Przed aktualizacją systemu zalecane jest wykonanie pełnej kopii zapasowej.
+
+ + id = 'update-view'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Aktualizacja systemu'; +$grid -> default_buttons = false; +$grid -> external_code = $out; +echo $grid -> draw(); +?> + id = 'changelog'; +$grid -> gdb_opt = $gdb; +$grid -> include_plugins = true; +$grid -> title = 'Changelog'; +$grid -> default_buttons = false; +$grid -> external_code = $out; +echo $grid -> draw(); +?> + \ No newline at end of file diff --git a/admin/templates/users/user-2fa.php b/admin/templates/users/user-2fa.php new file mode 100644 index 0000000..fb7f741 --- /dev/null +++ b/admin/templates/users/user-2fa.php @@ -0,0 +1,49 @@ +
+
+
+ +
+
+
+
+
+ Logowanie +
+ +
+
+
+ + +
+
+
+ +
+ +
+ +
+
+ +
+
+
+
+
+ +
+
+
+
+ + +
+
+
+
\ No newline at end of file diff --git a/admin/templates/users/user-edit.php b/admin/templates/users/user-edit.php new file mode 100644 index 0000000..6120bc2 --- /dev/null +++ b/admin/templates/users/user-edit.php @@ -0,0 +1,344 @@ +privileges; +?> +
+ +
+
+
+
+
+ > + +
+
+ +
+
+
+
+ + > + +
+
+ +
+
+
+
+
+
+ > + +
+
+ +
+
+
+
+ > + +
+
+ +
+
+
+
+
+
+ > + +
+
+ +
+
+
+
+ > + +
+
+ +
+
+
+
+
+
+ > + +
+
+ +
+
+
+
+ > + +
+
+ +
+
+
+
+
+
+ > + +
+
+ +
+
+
+
+ > + +
+
+ +
+
+
+
+
+
+ > + +
+
+ +
+
+
+
+ > + +
+
+ +
+
+
+
+
+
+ > + +
+
+ +
+
+ +
+
+
+
+user['id'] ? $password_param = 'optional' : $password_param = 'require'; +$out = ob_get_clean(); + +$grid = new \gridEdit; +$grid->gdb_opt = $gdb; +$grid->include_plugins = true; +$grid->title = 'Zapisz użytkownika'; +$grid->fields = [ + [ + 'db' => 'id', + 'type' => 'hidden', + 'value' => $this->user['id'] + ], [ + 'db' => 'admin', + 'type' => 'hidden', + 'value' => '1' + ], [ + 'name' => 'Login', + 'db' => 'login', + 'type' => 'text', + 'value' => $this->user['login'], + 'params' => ['class' => 'require', 'function' => 'check_login'] + ], [ + 'name' => 'Aktywny', + 'db' => 'status', + 'type' => 'input_switch', + 'checked' => $this->user['status'] ? true : false + ], [ + 'db' => 'twofa_enabled', + 'name' => 'Dwustopniowe uwierzytelnianie (2FA)', + 'type' => 'input_switch', + 'checked' => $this -> user['twofa_enabled'] ? true : false, + ], [ + 'db' => 'twofa_email', + 'name' => 'E-mail do 2FA', + 'type' => 'text', + 'value' => $this -> user['twofa_email'], + ], [ + 'name' => 'Aktywny do', + 'db' => 'active_to', + 'type' => 'text', + 'id' => 'active_to', + 'value' => $this->user['active_to'] == '0000-00-00' ? '' : $this->user['active_to'] + ], + [ + 'name' => 'Hasło', + 'db' => 'password', + 'type' => 'password', + 'params' => ['class' => $password_param, 'min' => 5] + ], + [ + 'name' => 'Hasło - powtórz', + 'db' => 'password_re', + 'type' => 'password', + 'params' => ['class' => $password_param, 'min' => 5, 'equal' => 'password', 'error_txt' => 'Podane hasła są różne'] + ] +]; +$grid->actions = [ + 'save' => ['url' => '/admin/users/user_save/', 'back_url' => '/admin/users/view_list/'], + 'cancel' => ['url' => '/admin/users/view_list/'] +]; +$grid->external_code = $out; +$grid->persist_edit = true; +echo $grid->draw(); +?> + + \ No newline at end of file diff --git a/admin/templates/users/users-list.php b/admin/templates/users/users-list.php new file mode 100644 index 0000000..f1623fd --- /dev/null +++ b/admin/templates/users/users-list.php @@ -0,0 +1,47 @@ + gdb_opt = $gdb; +$grid -> order = [ 'column' => 'login', 'type' => 'ASC' ]; +$grid -> where = [ 'id[!]' => 1 ]; +$grid -> search = [ + [ 'name' => 'Login', 'db' => 'login', 'type' => 'text' ], + [ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ] + ]; +$grid -> columns_view = [ + [ + 'name' => 'Lp.', + 'th' => [ 'class' => 'g-lp' ], + 'td' => [ 'class' => 'g-center' ], + 'autoincrement' => true + ], + [ + 'name' => 'Aktywny', + 'db' => 'status', + 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Login', + 'db' => 'login', + 'sort' => true + ], + [ + 'name' => 'Edytuj', + 'action' => [ 'type' => 'edit', 'url' => '/admin/users/user_edit/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 50px;' ], + 'td' => [ 'class' => 'g-center' ] + ], + [ + 'name' => 'Usuń', + 'action' => [ 'type' => 'delete', 'url' => '/admin/users/user_delete/id=[id]' ], + 'th' => [ 'class' => 'g-center', 'style' => 'width: 50px;' ], + 'td' => [ 'class' => 'g-center' ] + ] + ]; +$grid -> buttons = [ + [ 'label' => 'Dodaj użytkownika', 'url' => '/admin/users/user_edit/', 'icon' => 'fa-plus-circle', 'class' => 'btn-success' ] + ]; +echo $grid -> draw(); \ No newline at end of file diff --git a/autoload/.1645576321.suspected b/autoload/.1645576321.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645635829.suspected b/autoload/.1645635829.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645635840.suspected b/autoload/.1645635840.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645641524.suspected b/autoload/.1645641524.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645661211.suspected b/autoload/.1645661211.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645686576.suspected b/autoload/.1645686576.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645704702.suspected b/autoload/.1645704702.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645708327.suspected b/autoload/.1645708327.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645796929.suspected b/autoload/.1645796929.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645796935.suspected b/autoload/.1645796935.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645796948.suspected b/autoload/.1645796948.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/admin/.1645555001.suspected b/autoload/admin/.1645555001.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/admin/.1645576320.suspected b/autoload/admin/.1645576320.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/admin/.1645641515.suspected b/autoload/admin/.1645641515.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/admin/.1645641527.suspected b/autoload/admin/.1645641527.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/admin/class.Site.php b/autoload/admin/class.Site.php index db3c613..e44462c 100644 --- a/autoload/admin/class.Site.php +++ b/autoload/admin/class.Site.php @@ -1,71 +1,216 @@ $login , hash => $password ]; - $value = json_encode( $value ); - - setcookie( $cookie_name, $value, time() +(86400 * 14), "/", $domain ); - } - \S::set_session( 'user', \admin\factory\Users::details( \S::get( 'login' ) ) ); - } - else - { - if ( $result == -1 ) - \S::alert( 'Z powodu nieudanych 5 prób logowania Twoje konto zostało zablokowane.' ); - else - \S::alert( 'Podane hasło jest nieprawidłowe, lub brak użytkownika o podanym loginie.' ); - } - header( 'Location: /admin/articles/view_list/' ); - exit; - break; - - case 'user-logout': + $login = \S::get('login'); + $pass = \S::get('password'); - setcookie( $cookie_name, "", time() -(86400), "/", $domain ); - session_destroy(); - header( 'Location: /admin/' ); - exit; - break; + $result = \admin\factory\Users::logon($login, $pass); + + if ($result == 1) + { + $user = \admin\factory\Users::details($login); + + if ($user['twofa_enabled'] == 1) + { + \S::set_session('twofa_pending', [ + 'uid' => (int)$user['id'], + 'login' => $login, + 'remember' => (bool)\S::get('remember'), + 'started' => time(), + ]); + + if (!\admin\factory\Users::send_twofa_code((int)$user['id'])) + { + \S::alert('Nie udało się wysłać kodu 2FA. Spróbuj ponownie.'); + \S::delete_session('twofa_pending'); + header('Location: /admin/'); + exit; + } + + header('Location: /admin/user/twofa/'); + exit; + } + else + { + $user = \admin\factory\Users::details($login); + + self::finalize_admin_login( + $user, + $domain, + $cookie_name, + (bool)\S::get('remember') + ); + + header('Location: /admin/articles/view_list/'); + exit; + } + } + else + { + if ($result == -1) + { + \S::alert('Z powodu 5 nieudanych prób Twoje konto zostało zablokowane.'); + } + else + { + \S::alert('Podane hasło jest nieprawidłowe lub użytkownik nie istnieje.'); + } + header('Location: /admin/'); + exit; + } + } + break; + + case 'user-2fa-verify': + { + $pending = \S::get_session('twofa_pending'); + if (!$pending || empty($pending['uid'])) + { + \S::alert('Sesja 2FA wygasła. Zaloguj się ponownie.'); + header('Location: /admin/'); + exit; + } + + $code = trim((string)\S::get('twofa')); + if (!preg_match('/^\d{6}$/', $code)) + { + \S::alert('Nieprawidłowy format kodu.'); + header('Location: /admin/user/twofa/'); + exit; + } + + $ok = \admin\factory\Users::verify_twofa_code((int)$pending['uid'], $code); + if (!$ok) + { + \S::alert('Błędny lub wygasły kod.'); + header('Location: /admin/user/twofa/'); + exit; + } + + // 2FA OK — finalna sesja + $user = \admin\factory\Users::details($pending['login']); + \S::set_session('user', $user); + \S::delete_session('twofa_pending'); + + // Remember me – BEZPIECZNY podpis HMAC: + if (!empty($pending['remember'])) + { + $payloadArr = ['login' => $user['login'], 'ts' => time()]; + $json = json_encode($payloadArr, JSON_UNESCAPED_SLASHES); + $sig = hash_hmac('sha256', $json, APP_SECRET_KEY); + $payload = base64_encode($json . '.' . $sig); + + setcookie($cookie_name, $payload, [ + 'expires' => time() + (86400 * 14), + 'path' => '/', + 'domain' => $domain, + 'secure' => true, + 'httponly' => true, + 'samesite' => 'Lax', + ]); + } + + header('Location: /admin/articles/view_list/'); + exit; + } + break; + + case 'user-2fa-resend': + { + $pending = \S::get_session('twofa_pending'); + if (!$pending || empty($pending['uid'])) + { + \S::alert('Sesja 2FA wygasła. Zaloguj się ponownie.'); + header('Location: /admin/'); + exit; + } + + if (!\admin\factory\Users::send_twofa_code((int)$pending['uid'], true)) + { + \S::alert('Kod można wysłać ponownie po krótkiej przerwie.'); + } + else + { + \S::alert('Nowy kod został wysłany.'); + } + header('Location: /admin/user/twofa/'); + exit; + } + break; + + case 'user-logout': + { + setcookie($cookie_name, "", time() - 86400, "/", $domain); + \S::delete_session('twofa_pending'); + session_destroy(); + header('Location: /admin/'); + exit; + } + break; } } - + + public static function route() - { + { $_SESSION['admin'] = true; - + $class = '\admin\controls\\'; - - $results = explode( '_', \S::get( 'module' ) ); - if ( is_array( $results ) ) foreach ( $results as $row ) - $class .= ucfirst( $row ); - - $action = \S::get( 'action' ); - - if ( class_exists( $class ) and method_exists( new $class, $action ) ) - return call_user_func_array( array( $class, $action ), array() ); + + $results = explode('_', \S::get('module')); + if (is_array($results)) foreach ($results as $row) + $class .= ucfirst($row); + + $action = \S::get('action'); + + if (class_exists($class) and method_exists(new $class, $action)) + return call_user_func_array(array($class, $action), array()); else { - \S::alert( 'Nieprawidłowy adres url.' ); + \S::alert('Nieprawidłowy adres url.'); return false; } } + + static public function finalize_admin_login(array $user, string $domain, string $cookie_name, bool $remember = false) { + \S::set_session('user', $user); + \S::delete_session('twofa_pending'); + + if ($remember) + { + $payloadArr = [ + 'login' => $user['login'], + 'ts' => time() + ]; + + $json = json_encode($payloadArr, JSON_UNESCAPED_SLASHES); + $sig = hash_hmac('sha256', $json, self::APP_SECRET_KEY); + $payload = base64_encode($json . '.' . $sig); + + setcookie($cookie_name, $payload, [ + 'expires' => time() + (86400 * 14), + 'path' => '/', + 'domain' => $domain, + 'secure' => true, + 'httponly' => true, + 'samesite' => 'Lax', + ]); + } + } } diff --git a/autoload/admin/controls/class.Articles.php b/autoload/admin/controls/class.Articles.php index 3c29724..860eb24 100644 --- a/autoload/admin/controls/class.Articles.php +++ b/autoload/admin/controls/class.Articles.php @@ -27,6 +27,22 @@ class Articles exit; } + static public function files_order_save() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'article_administration', $user['id'] ) ) + { + echo json_encode( [ 'status' => 'error', 'msg' => 'Nie masz uprawnień' ] ); + exit; + } + + if ( \admin\factory\Articles::files_order_save( \S::get( 'article_id' ), \S::get( 'order' ) ) ) + echo json_encode( [ 'status' => 'ok', 'msg' => 'Artykuł został zapisany.' ] ); + + exit; + } + public static function gallery_order_save() { global $user; @@ -98,8 +114,8 @@ class Articles $values['params'] = $params; if ( $id = \admin\factory\Articles::article_save( - $values['id'], $values['title'], $values['main_image'], $values['entry'], $values['text'], $values['table_of_contents'], $values['status'], $values['show_title'], $values['show_date_add'], $values['date_add'], - $values['show_date_modify'], $values['seo_link'], $values['meta_title'], $values['meta_description'], $values['meta_keywords'], $values['layout_id'], + $values['id'], $values['title'], $values['main_image'], $values['entry'], $values['text'], $values['table_of_contents'], $values['status'], $values['show_title'], $values['show_table_of_contents'], $values['show_date_add'], $values['date_add'], + $values['show_date_modify'], $values['date_modify'], $values['seo_link'], $values['meta_title'], $values['meta_description'], $values['meta_keywords'], $values['layout_id'], $values['pages'], $values['noindex'], $values['repeat_entry'], $values['copy_from'], $values['social_icons'], $values['event_date'], $values['hidden-tags'], $values['block_direct_access'], $values['priority'], $values['password'], $values['pixieset'], $values['id_author'], $params ) ) @@ -115,23 +131,23 @@ class Articles { global $user; - if ( !\admin\factory\Users::check_privileges( 'article_administration', - $user['id'] ) ) + if ( !\admin\factory\Users::check_privileges( 'article_administration', $user['id'] ) ) return \S::alert( 'Nie masz uprawnień' ); \admin\factory\Articles::delete_nonassigned_images(); \admin\factory\Articles::delete_nonassigned_files(); return \admin\view\Articles::article_edit( [ - 'article' => \admin\factory\Articles::article_details( \S::get( 'id' ) ), - 'menus' => \admin\factory\Pages::menus_list(), - 'languages' => \admin\factory\Languages::languages_list(), - 'layouts' => \admin\factory\Layouts::layouts_list(), - 'additional_params_lon' => \admin\factory\Articles::additional_params( 1 ), - 'additional_params_loff' => \admin\factory\Articles::additional_params( 0 ), - 'settings' => \admin\factory\Settings::settings_details(), - 'authors' => \admin\factory\Authors::get_simple_list() - ] ); + 'article' => \admin\factory\Articles::article_details( \S::get( 'id' ) ), + 'menus' => \admin\factory\Pages::menus_list(), + 'languages' => \admin\factory\Languages::languages_list(), + 'layouts' => \admin\factory\Layouts::layouts_list(), + 'additional_params_lon' => \admin\factory\Articles::additional_params( 1 ), + 'additional_params_loff' => \admin\factory\Articles::additional_params( 0 ), + 'settings' => \admin\factory\Settings::settings_details(), + 'authors' => \admin\factory\Authors::get_simple_list(), + 'user' => $user + ] ); } public static function view_list() diff --git a/autoload/admin/controls/class.Settings.php b/autoload/admin/controls/class.Settings.php index d328bd1..ba01075 100644 --- a/autoload/admin/controls/class.Settings.php +++ b/autoload/admin/controls/class.Settings.php @@ -54,6 +54,7 @@ class Settings \admin\factory\Settings::settings_update( 'lazy_loading', $values['lazy_loading'] == 'on' ? 1 : 0 ); \admin\factory\Settings::settings_update( 'generate_webp', $values['generate_webp'] == 'on' ? 1 : 0 ); \admin\factory\Settings::settings_update( 'contact_form_captcha', $values['contact_form_captcha'] == 'on' ? 1 : 0 ); + \admin\factory\Settings::settings_update( 'url_version', $values['url_version'] ); \S::alert( 'Ustawienia zostały zapisane.' ); diff --git a/autoload/admin/controls/class.Users.php b/autoload/admin/controls/class.Users.php index 42c377a..a8e8a1c 100644 --- a/autoload/admin/controls/class.Users.php +++ b/autoload/admin/controls/class.Users.php @@ -1,59 +1,65 @@ \Tpl::view( 'users/user-2fa' ) + ] ); + } } ?> diff --git a/autoload/admin/factory/class.Articles.php b/autoload/admin/factory/class.Articles.php index 55189a2..da033a1 100644 --- a/autoload/admin/factory/class.Articles.php +++ b/autoload/admin/factory/class.Articles.php @@ -86,6 +86,24 @@ class Articles return true; } + static public function files_order_save( $article_id, $order ) + { + global $mdb; + + $order = explode( ';', $order ); + if ( is_array( $order ) and !empty( $order ) ) foreach ( $order as $file_id ) + { + $mdb -> update( 'pp_articles_files', [ + 'o' => (int)$i++ + ], [ + 'AND' => [ + 'article_id' => $article_id, + 'id' => $file_id + ] + ] ); + } + } + public static function gallery_order_save( $article_id, $order ) { global $mdb; @@ -222,7 +240,7 @@ class Articles $article['languages'][ $row['lang_id'] ] = $row; $article['images'] = $mdb -> select( 'pp_articles_images', '*', [ 'article_id' => (int)$article_id, 'ORDER' => [ 'o' => 'ASC', 'id' => 'ASC' ] ] ); - $article['files'] = $mdb -> select( 'pp_articles_files', '*', [ 'article_id' => (int)$article_id ] ); + $article['files'] = $mdb -> select( 'pp_articles_files', '*', [ 'article_id' => (int)$article_id, 'ORDER' => [ 'o' => 'ASC', 'id' => 'ASC' ] ] ); $article['pages'] = $mdb -> select( 'pp_articles_pages', 'page_id', [ 'article_id' => (int)$article_id ] ); $article['tags'] = $mdb -> select( 'pp_tags', [ '[><]pp_articles_tags' => [ 'id' => 'tag_id' ] ], 'name', [ 'article_id' => (int)$article_id ] ); $article['params'] = $mdb -> select( 'pp_articles_additional_values', [ 'param_id', 'value', 'language_id' ], [ 'article_id' => (int)$article_id ] ); @@ -238,7 +256,7 @@ class Articles } public static function article_save( - $article_id, $title, $main_image, $entry, $text, $table_of_contents, $status, $show_title, $show_date_add, $date_add, $show_date_modify, $seo_link, $meta_title, $meta_description, + $article_id, $title, $main_image, $entry, $text, $table_of_contents, $status, $show_title, $show_table_of_contents, $show_date_add, $date_add, $show_date_modify, $date_modify, $seo_link, $meta_title, $meta_description, $meta_keywords, $layout_id, $pages, $noindex, $repeat_entry, $copy_from, $social_icons, $event_date, $tags, $block_direct_access, $priority, $password, $pixieset, $id_author, $params ) { @@ -251,10 +269,11 @@ class Articles { $mdb -> insert( 'pp_articles', [ 'show_title' => $show_title == 'on' ? 1 : 0, + 'show_table_of_contents' => $show_table_of_contents == 'on' ? 1 : 0, 'show_date_add' => $show_date_add == 'on' ? 1 : 0, 'show_date_modify' => $show_date_modify == 'on' ? 1 : 0, - 'date_add' => $date_add ? $date_add : date( 'Y-m-d H:i:s' ), - 'date_modify' => $date_add ? $date_add : date( 'Y-m-d H:i:s' ), + 'date_add' => date( 'Y-m-d H:i:s' ), + 'date_modify' => date( 'Y-m-d H:i:s' ), 'modify_by' => $user['id'], 'layout_id' => $layout_id ? (int)$layout_id : null, 'status' => $status == 'on' ? 1 : 0, @@ -435,9 +454,11 @@ class Articles { $mdb -> update( 'pp_articles', [ 'show_title' => $show_title == 'on' ? 1 : 0, + 'show_table_of_contents' => $show_table_of_contents == 'on' ? 1 : 0, 'show_date_add' => $show_date_add == 'on' ? 1 : 0, + 'date_add' => $date_add, 'show_date_modify' => $show_date_modify == 'on' ? 1 : 0, - 'date_modify' => date( 'Y-m-d H:i:s' ), + 'date_modify' => $date_modify ? $date_modify : date( 'Y-m-d H:i:s' ), 'modify_by' => $user['id'], 'layout_id' => $layout_id ? (int)$layout_id : null, 'status' => $status == 'on' ? 1 : 0, diff --git a/autoload/admin/factory/class.Users.php b/autoload/admin/factory/class.Users.php index a7c68eb..8e5f105 100644 --- a/autoload/admin/factory/class.Users.php +++ b/autoload/admin/factory/class.Users.php @@ -1,185 +1,306 @@ delete( 'pp_users', [ 'id' => (int)$user_id ] ); - + return $mdb->delete('pp_users', ['id' => (int)$user_id]); } - - public static function user_details( $user_id ) + + public static function user_details($user_id) { global $mdb; - return $mdb -> get( 'pp_users', '*', [ 'id' => (int)$user_id ] ); + return $mdb->get('pp_users', '*', ['id' => (int)$user_id]); } - - public static function user_privileges( $user_id ) + + public static function user_privileges($user_id) { global $mdb; - return $mdb -> select( 'pp_users_privileges', '*', ['id_user' => (int)$user_id]); + return $mdb->select('pp_users_privileges', '*', ['id_user' => (int)$user_id]); } - - public static function user_save( $user_id, $login, $status, $active_to, $password, $password_re, $admin, $privileges ) + + public static function user_save($user_id, $login, $status, $active_to, $password, $password_re, $admin, $privileges, $twofa_enabled = 0, $twofa_email = '' ) { global $mdb, $lang; - $mdb -> delete( 'pp_users_privileges', [ 'id_user' => (int) $user_id ] ); + $mdb->delete('pp_users_privileges', ['id_user' => (int) $user_id]); - if ( !$user_id ) + if (!$user_id) { - if ( strlen( $password ) < 5 ) - return $response = [ 'status' => 'error', 'msg' => 'Podane hasło jest zbyt krótkie.' ]; + if (strlen($password) < 5) + return $response = ['status' => 'error', 'msg' => 'Podane hasło jest zbyt krótkie.']; - if ( $password != $password_re ) - return $response = [ 'status' => 'error', 'msg' => 'Podane hasła są różne' ]; + if ($password != $password_re) + return $response = ['status' => 'error', 'msg' => 'Podane hasła są różne']; - if ( $mdb -> insert( 'pp_users', - [ - 'login' => $login, - 'status' => $status == 'on' ? 1 : 0, - 'active_to' => $active_to == '' ? NULL : $active_to, - 'admin' => $admin, - 'password' => md5( $password ), - ] ) ) - $id_user = $mdb -> get( 'pp_users', 'id', [ 'ORDER' => [ 'id' => 'DESC' ] ] ); + if ($mdb->insert( + 'pp_users', + [ + 'login' => $login, + 'status' => $status == 'on' ? 1 : 0, + 'active_to' => $active_to == '' ? NULL : $active_to, + 'admin' => $admin, + 'password' => md5($password), + 'twofa_enabled' => $twofa_enabled == 'on' ? 1 : 0, + 'twofa_email' => $twofa_email + ] + )) + $id_user = $mdb->get('pp_users', 'id', ['ORDER' => ['id' => 'DESC']]); - if ( is_array( $privileges ) ) + if (is_array($privileges)) { - foreach ( $privileges as $pri ) + foreach ($privileges as $pri) { - $mdb -> insert( 'pp_users_privileges', - [ - 'name' => $pri, - 'id_user' => $id_user - ] ); + $mdb->insert( + 'pp_users_privileges', + [ + 'name' => $pri, + 'id_user' => $id_user + ] + ); } } else { - $mdb -> insert( 'pp_users_privileges', - [ - 'name' => $privileges, - 'id_user' => $id_user - ] ); + $mdb->insert( + 'pp_users_privileges', + [ + 'name' => $privileges, + 'id_user' => $id_user + ] + ); } - return $response = [ 'status' => 'ok', 'msg' => 'Użytkownik został zapisany.' ]; + return $response = ['status' => 'ok', 'msg' => 'Użytkownik został zapisany.']; } else { - if ( $password and strlen( $password ) < 5 ) - return $response = [ 'status' => 'error', 'msg' => 'Podane hasło jest zbyt krótkie.' ]; + if ($password and strlen($password) < 5) + return $response = ['status' => 'error', 'msg' => 'Podane hasło jest zbyt krótkie.']; - if ( $password and $password != $password_re ) - return $response = [ 'status' => 'error', 'msg' => 'Podane hasła są różne' ]; + if ($password and $password != $password_re) + return $response = ['status' => 'error', 'msg' => 'Podane hasła są różne']; - if ( $password ) - $mdb -> update( 'pp_users', [ - 'password' => md5( $password ) - ], [ - 'id' => (int) $user_id - ] ); + if ($password) + $mdb->update('pp_users', [ + 'password' => md5($password) + ], [ + 'id' => (int) $user_id + ]); - $mdb -> update( 'pp_users', [ - 'login' => $login, - 'admin' => $admin, - 'status' => $status == 'on' ? 1 : 0, - 'active_to' => $active_to == '' ? NULL : $active_to, - 'error_logged_count' => 0 - ], [ - 'id' => (int) $user_id - ] ); + $mdb->update('pp_users', [ + 'login' => $login, + 'admin' => $admin, + 'status' => $status == 'on' ? 1 : 0, + 'active_to' => $active_to == '' ? NULL : $active_to, + 'error_logged_count' => 0, + 'twofa_enabled' => $twofa_enabled == 'on' ? 1 : 0, + 'twofa_email' => $twofa_email + ], [ + 'id' => (int) $user_id + ]); - if ( is_array( $privileges ) ) + if (is_array($privileges)) { - foreach ( $privileges as $pri ) + foreach ($privileges as $pri) { - $mdb -> insert( 'pp_users_privileges', [ - 'name' => $pri, - 'id_user' => $user_id - ] ); + $mdb->insert('pp_users_privileges', [ + 'name' => $pri, + 'id_user' => $user_id + ]); } } else { - $mdb -> insert( 'pp_users_privileges', [ - 'name' => $privileges, - 'id_user' => $user_id - ] ); + $mdb->insert('pp_users_privileges', [ + 'name' => $privileges, + 'id_user' => $user_id + ]); } - return $response = [ 'status' => 'ok', 'msg' => 'Uzytkownik został zapisany.' ]; + return $response = ['status' => 'ok', 'msg' => 'Uzytkownik został zapisany.']; } \S::delete_cache(); } - public static function check_login( $login, $user_id ) + public static function check_login($login, $user_id) { global $mdb; - - if ( $mdb -> get( 'pp_users', 'login', [ 'AND' => [ 'login' => $login, 'id[!]' => (int)$user_id ] ] ) ) - return $response = [ 'status' => 'error', 'msg' => 'Podany login jest już zajęty.' ]; - - return $response = [ 'status' => 'ok' ]; + + if ($mdb->get('pp_users', 'login', ['AND' => ['login' => $login, 'id[!]' => (int)$user_id]])) + return $response = ['status' => 'error', 'msg' => 'Podany login jest już zajęty.']; + + return $response = ['status' => 'ok']; } - - public static function logon( $login, $password ) + + public static function logon($login, $password) { global $mdb; - - if ( !$mdb -> get( 'pp_users', '*', [ 'login' => $login ] ) ) + + if (!$mdb->get('pp_users', '*', ['login' => $login])) return 0; - - if ( !$mdb -> get( 'pp_users', '*', [ 'AND' => [ 'login' => $login, 'status' => 1, 'error_logged_count[<]' => 5 ] ] ) ) - return -1; - - if ( $mdb -> get( 'pp_users', '*', [ - 'AND' => [ - 'login' => $login, 'status' => 1, 'password' => md5( $password ), - 'OR' => [ 'active_to[>=]' => date('Y-m-d'), 'active_to' => null ] - ] - ] ) ) + + if (!$mdb->get('pp_users', '*', ['AND' => ['login' => $login, 'status' => 1, 'error_logged_count[<]' => 5]])) + return -1; + + if ($mdb->get('pp_users', '*', [ + 'AND' => [ + 'login' => $login, + 'status' => 1, + 'password' => md5($password), + 'OR' => ['active_to[>=]' => date('Y-m-d'), 'active_to' => null] + ] + ])) { - $mdb -> update( 'pp_users', [ 'last_logged' => date( 'Y-m-d H:i:s' ), 'error_logged_count' => 0 ], [ 'login' => $login ] ); + $mdb->update('pp_users', ['last_logged' => date('Y-m-d H:i:s'), 'error_logged_count' => 0], ['login' => $login]); return 1; } else { - $mdb -> update( 'pp_users', [ 'last_error_logged' => date( 'Y-m-d H:i:s' ), 'error_logged_count[+]' => 1 ], [ 'login' => $login ] ); - if ( $mdb -> get( 'pp_users', 'error_logged_count', [ 'login' => $login ] ) >= 5 ) + $mdb->update('pp_users', ['last_error_logged' => date('Y-m-d H:i:s'), 'error_logged_count[+]' => 1], ['login' => $login]); + if ($mdb->get('pp_users', 'error_logged_count', ['login' => $login]) >= 5) { - $mdb -> update( 'pp_users', [ 'status' => 0 ], [ 'login' => $login ] ); + $mdb->update('pp_users', ['status' => 0], ['login' => $login]); return -1; } } return 0; } - - public static function details( $login ) + + public static function details($login) { global $mdb; - return $mdb -> get( 'pp_users', '*', [ 'login' => $login ] ); + return $mdb->get('pp_users', '*', ['login' => $login]); } - - public static function check_privileges( $name, $user_id ) + + public static function check_privileges($name, $user_id) { global $mdb; - - if ( $user_id == 1 ) + + if ($user_id == 1) return true; else { - if ( !$privilages = \Cache::fetch( "check_privileges:$user_id:$name-tmp" ) ) - { - $privilages = $mdb -> count( 'pp_users_privileges', [ 'AND' => ['name' => $name, 'id_user' => (int)$user_id ]]); - \Cache::store( "check_privileges:$user_id:$name", $privilages ); - } - return $privilages; - } + if (!$privilages = \Cache::fetch("check_privileges:$user_id:$name-tmp")) + { + $privilages = $mdb->count('pp_users_privileges', ['AND' => ['name' => $name, 'id_user' => (int)$user_id]]); + \Cache::store("check_privileges:$user_id:$name", $privilages); + } + return $privilages; + } + } + + static public function get_by_id(int $userId): ?array + { + + global $mdb; + return $mdb->get('pp_users', '*', ['id' => $userId]) ?: null; + } + + static public function send_twofa_code(int $userId, bool $resend = false): bool + { + + $user = self::get_by_id($userId); + if (!$user) + return false; + + if ((int)$user['twofa_enabled'] !== 1) + { + return false; + } + + $to = $user['twofa_email'] ?: $user['login']; + if (!filter_var($to, FILTER_VALIDATE_EMAIL)) + { + return false; + } + + if ($resend && !empty($user['twofa_sent_at'])) + { + $last = strtotime($user['twofa_sent_at']); + if ($last && (time() - $last) < 30) + { + return false; + } + } + + $code = random_int(100000, 999999); + $hash = password_hash((string)$code, PASSWORD_DEFAULT); + + self::update_by_id($userId, [ + 'twofa_code_hash' => $hash, + 'twofa_expires_at' => date('Y-m-d H:i:s', time() + 10 * 60), // 10 minut + 'twofa_sent_at' => date('Y-m-d H:i:s'), + 'twofa_failed_attempts' => 0, + ]); + + $subject = 'Twój kod logowania 2FA'; + $body = "Twój kod logowania do panelu administratora: {$code}. Kod jest ważny przez 10 minut. Jeśli to nie Ty inicjowałeś logowanie – zignoruj tę wiadomość i poinformuj administratora."; + + $sent = \S::send_email($to, $subject, $body); + + if (!$sent) { + $headers = "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/plain; charset=UTF-8\r\n"; + $headers .= "From: no-reply@" . ($_SERVER['HTTP_HOST'] ?? 'localhost') . "\r\n"; + $encodedSubject = mb_encode_mimeheader($subject, 'UTF-8'); + + $sent = mail($to, $encodedSubject, $body, $headers); + } + + return $sent; + } + + static public function update_by_id(int $userId, array $data): bool + { + global $mdb; + return (bool)$mdb->update('pp_users', $data, ['id' => $userId]); + } + + static public function verify_twofa_code(int $userId, string $code): bool + { + $user = self::get_by_id( $userId ); + if (!$user) return false; + + if ((int)$user['twofa_failed_attempts'] >= 5) + { + return false; // zbyt wiele prób + } + + // sprawdź ważność + if (empty($user['twofa_expires_at']) || time() > strtotime($user['twofa_expires_at'])) + { + // wyczyść po wygaśnięciu + self::update_by_id($userId, [ + 'twofa_code_hash' => null, + 'twofa_expires_at' => null, + ]); + return false; + } + + $ok = (!empty($user['twofa_code_hash']) && password_verify($code, $user['twofa_code_hash'])); + if ($ok) + { + // sukces: czyścimy wszystko + self::update_by_id($userId, [ + 'twofa_code_hash' => null, + 'twofa_expires_at' => null, + 'twofa_sent_at' => null, + 'twofa_failed_attempts' => 0, + 'last_logged' => date('Y-m-d H:i:s'), + ]); + return true; + } + + // zła próba — inkrementacja + self::update_by_id($userId, [ + 'twofa_failed_attempts' => (int)$user['twofa_failed_attempts'] + 1, + 'last_error_logged' => date('Y-m-d H:i:s'), + ]); + return false; } } -?> diff --git a/autoload/admin/view/class.Page.php b/autoload/admin/view/class.Page.php index 23bcbce..c96583a 100644 --- a/autoload/admin/view/class.Page.php +++ b/autoload/admin/view/class.Page.php @@ -7,9 +7,13 @@ class Page { { global $user; + if ( $_GET['module'] == 'user' && $_GET['action'] == 'twofa' ) { + return \admin\controls\Users::twofa(); + } + if ( !$user || !$user['admin'] ) return \admin\view\Users::login_form(); - + $tpl = new \Tpl; $tpl -> content = \admin\Site::route(); return $tpl -> render( 'site/main-layout' ); diff --git a/autoload/class.Html.php b/autoload/class.Html.php index ca9fb1a..d2500c9 100644 --- a/autoload/class.Html.php +++ b/autoload/class.Html.php @@ -1,5 +1,4 @@ -' . PHP_EOL; -$site_map[$domain['domain']] .= '' . PHP_EOL; - $site_map[$domain['domain']] .= '' . PHP_EOL; - $site_map[$domain['domain']] .= '' . $domain_prefix . '://' . $www . $domain['domain'] . '' . PHP_EOL; - $site_map[$domain['domain']] .= '' . date('Y-m-d') . '' . PHP_EOL; - $site_map[$domain['domain']] .= 'daily' . PHP_EOL; - $site_map[$domain['domain']] .= '1' . PHP_EOL; - $site_map[$domain['domain']] .= '' . PHP_EOL; - } - } - else - { - $site_map[$url] = '' . PHP_EOL; - $site_map[$url] .= '' . PHP_EOL; - $site_map[$url] .= '' . PHP_EOL; - $site_map[$url] .= '' . $domain_prefix . '://' . $www . $url . '' . PHP_EOL; - $site_map[$url] .= '' . date('Y-m-d') . '' . PHP_EOL; - $site_map[$url] .= 'daily' . PHP_EOL; - $site_map[$url] .= '1' . PHP_EOL; - $site_map[$url] .= '' . PHP_EOL; - } + $site_map[$domain['domain']] .= '' . PHP_EOL; + $site_map[$domain['domain']] .= '' . PHP_EOL; + $site_map[$domain['domain']] .= '' . $domain_prefix . '://' . $www . $domain['domain'] . '' . PHP_EOL; + $site_map[$domain['domain']] .= '' . date('Y-m-d') . '' . PHP_EOL; + $site_map[$domain['domain']] .= 'daily' . PHP_EOL; + $site_map[$domain['domain']] .= '1' . PHP_EOL; + $site_map[$domain['domain']] .= '' . PHP_EOL; + } + } + else + { + $site_map[$url] = '' . PHP_EOL; + $site_map[$url] .= '' . PHP_EOL; + $site_map[$url] .= '' . PHP_EOL; + $site_map[$url] .= '' . $domain_prefix . '://' . $www . $url . '' . PHP_EOL; + $site_map[$url] .= '' . date('Y-m-d') . '' . PHP_EOL; + $site_map[$url] .= 'daily' . PHP_EOL; + $site_map[$url] .= '1' . PHP_EOL; + $site_map[$url] .= '' . PHP_EOL; + } $htaccess_data = file_get_contents($dir . 'libraries/htaccess.conf'); /* cache */ if ($settings['htaccess_cache']) { - $htaccess_data = str_replace( - '{HTACCESS_CACHE}', - '' . PHP_EOL - . 'AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript' . PHP_EOL - . '' . PHP_EOL - . '' . PHP_EOL - . 'ExpiresActive on' . PHP_EOL - . 'ExpiresDefault "access plus 1 year"' . PHP_EOL - . 'ExpiresByType text/css "access plus 1 year"' . PHP_EOL - . 'ExpiresByType application/json "access plus 0 seconds"' . PHP_EOL - . 'ExpiresByType application/xml "access plus 0 seconds"' . PHP_EOL - . 'ExpiresByType text/xml "access plus 0 seconds"' . PHP_EOL - . 'ExpiresByType image/x-icon "access plus 1 week"' . PHP_EOL - . 'ExpiresByType text/x-component "access plus 1 year"' . PHP_EOL - . 'ExpiresByType text/html "access plus 0 seconds"' . PHP_EOL - . 'ExpiresByType application/javascript "access plus 1 year"' . PHP_EOL - . 'ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"' . PHP_EOL - . 'ExpiresByType text/cache-manifest "access plus 0 seconds"' . PHP_EOL - . 'ExpiresByType audio/ogg "access plus 1 year"' . PHP_EOL - . 'ExpiresByType image/gif "access plus 1 year"' . PHP_EOL - . 'ExpiresByType image/jpeg "access plus 1 year"' . PHP_EOL - . 'ExpiresByType image/webp "access plus 1 year"' . PHP_EOL - . 'ExpiresByType image/png "access plus 1 year"' . PHP_EOL - . 'ExpiresByType video/mp4 "access plus 1 year"' . PHP_EOL - . 'ExpiresByType video/ogg "access plus 1 year"' . PHP_EOL - . 'ExpiresByType video/webm "access plus 1 year"' . PHP_EOL - . 'ExpiresByType application/atom+xml "access plus 1 hour"' . PHP_EOL - . 'ExpiresByType application/rss+xml "access plus 1 hour"' . PHP_EOL - . 'ExpiresByType application/font-woff "access plus 1 year"' . PHP_EOL - . 'ExpiresByType application/vnd.ms-fontobject "access plus 1 year"' . PHP_EOL - . 'ExpiresByType application/x-font-ttf "access plus 1 year"' . PHP_EOL - . 'ExpiresByType font/opentype "access plus 1 year"' . PHP_EOL - . 'ExpiresByType image/svg+xml "access plus 1 year"' . PHP_EOL - . '', - $htaccess_data - ); + $htaccess_data = str_replace( + '{HTACCESS_CACHE}', + '' . PHP_EOL + . 'AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript' . PHP_EOL + . '' . PHP_EOL + . '' . PHP_EOL + . 'ExpiresActive on' . PHP_EOL + . 'ExpiresDefault "access plus 1 year"' . PHP_EOL + . 'ExpiresByType text/css "access plus 1 year"' . PHP_EOL + . 'ExpiresByType application/json "access plus 0 seconds"' . PHP_EOL + . 'ExpiresByType application/xml "access plus 0 seconds"' . PHP_EOL + . 'ExpiresByType text/xml "access plus 0 seconds"' . PHP_EOL + . 'ExpiresByType image/x-icon "access plus 1 week"' . PHP_EOL + . 'ExpiresByType text/x-component "access plus 1 year"' . PHP_EOL + . 'ExpiresByType text/html "access plus 0 seconds"' . PHP_EOL + . 'ExpiresByType application/javascript "access plus 1 year"' . PHP_EOL + . 'ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"' . PHP_EOL + . 'ExpiresByType text/cache-manifest "access plus 0 seconds"' . PHP_EOL + . 'ExpiresByType audio/ogg "access plus 1 year"' . PHP_EOL + . 'ExpiresByType image/gif "access plus 1 year"' . PHP_EOL + . 'ExpiresByType image/jpeg "access plus 1 year"' . PHP_EOL + . 'ExpiresByType image/webp "access plus 1 year"' . PHP_EOL + . 'ExpiresByType image/png "access plus 1 year"' . PHP_EOL + . 'ExpiresByType video/mp4 "access plus 1 year"' . PHP_EOL + . 'ExpiresByType video/ogg "access plus 1 year"' . PHP_EOL + . 'ExpiresByType video/webm "access plus 1 year"' . PHP_EOL + . 'ExpiresByType application/atom+xml "access plus 1 hour"' . PHP_EOL + . 'ExpiresByType application/rss+xml "access plus 1 hour"' . PHP_EOL + . 'ExpiresByType application/font-woff "access plus 1 year"' . PHP_EOL + . 'ExpiresByType application/vnd.ms-fontobject "access plus 1 year"' . PHP_EOL + . 'ExpiresByType application/x-font-ttf "access plus 1 year"' . PHP_EOL + . 'ExpiresByType font/opentype "access plus 1 year"' . PHP_EOL + . 'ExpiresByType image/svg+xml "access plus 1 year"' . PHP_EOL + . '', + $htaccess_data + ); } else { - $htaccess_data = str_replace( - '{HTACCESS_CACHE}', - '' . PHP_EOL - . 'Header set Cache-Control "no-cache, no-store, must-revalidate"' . PHP_EOL - . 'Header set Pragma "no-cache"' . PHP_EOL - . 'Header set Expires 0' . PHP_EOL - . '', - $htaccess_data - ); + $htaccess_data = str_replace( + '{HTACCESS_CACHE}', + '' . PHP_EOL + . 'Header set Cache-Control "no-cache, no-store, must-revalidate"' . PHP_EOL + . 'Header set Pragma "no-cache"' . PHP_EOL + . 'Header set Expires 0' . PHP_EOL + . '', + $htaccess_data + ); } /* języki w domenie głównej */ $results = $mdb->select('pp_langs', ['id'], ['AND' => ['status' => 1, 'domain' => null], 'ORDER' => ['o' => 'ASC']]); if (is_array($results)) foreach ($results as $row) { - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $row['id'] . '/$ index.php?a=change_language&id=' . $row['id'] . ' [L]'; + $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $row['id'] . '/$ index.php?a=change_language&id=' . $row['id'] . ' [L]'; } $htaccess_data .= PHP_EOL; @@ -682,215 +705,174 @@ $site_map[$domain['domain']] .= '' . PHP_EOL; - } - - $site_map[$url_tmp] .= '' . date('Y-m-d') . '' . PHP_EOL; - $site_map[$url_tmp] .= 'daily' . PHP_EOL; - - $row['start'] ? $priority = 1 : $priority = 0.8; - - $site_map[$url_tmp] .= '' . $priority . '' . PHP_EOL; - $site_map[$url_tmp] .= '' . PHP_EOL; - } - - /* robotx.txt */ - if ($row2['noindex'] and $row2['page_type'] != 3) - { - $robots .= 'User-agent: GoogleBot' . PHP_EOL; - - if ($row2['seo_link']) - { - if ($settings['links_structure']) - $seo = \admin\factory\Pages::google_url_preview($row2['page_id'], $row2['title'], $row[id], 0, 0, $row2['seo_link'], $language_link); - else - $seo = $language_link . \S::seo($row2['seo_link']); - - $robots .= 'Disallow: /' . $seo . '$' . PHP_EOL; - $robots .= 'Disallow: /' . $seo . '-s-*' . PHP_EOL; - } - else - { - if ($settings['links_structure']) - $seo = \admin\factory\Pages::google_url_preview($row2['page_id'], $row2['title'], $row['id'], 0, 0, $row2['seo_link'], $language_link); - else - $seo = $language_link . 's-' . $row2['page_id'] . '-' . \S::seo($row2['title']); - - $robots .= 'Disallow: /' . $seo . '$' . PHP_EOL; - $robots .= 'Disallow: /' . $seo . '-s-*$' . PHP_EOL; - } - } - - /* htaccess */ - if ($row2['page_type'] != 3) - { - if ($row['start'] and $row2['start']) - { - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid|hash)=[^&]+(&.*)?'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . '&%{QUERY_STRING} [L]' . PHP_EOL; - - if ($row2['seo_link']) - { - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{REQUEST_URI} ^/' . \S::seo($row2['seo_link']) . '$'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^(.*)$ ' . $domain_prefix . '://' . $www . $url_tmp . '/' . $language_link . ' [R=301,L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{REQUEST_URI} ^/' . \S::seo($row2['seo_link']) . '-s-1$'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^(.*)$ ' . $domain_prefix . '://' . $www . $url_tmp . '/' . $language_link . ' [R=301,L]'; - } - else - { - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{REQUEST_URI} ^/s-' . $row2['page_id'] . '-' . \S::seo($row2['title']) . '$'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^(.*)$ ' . $domain_prefix . '://' . $www . $url_tmp . '/' . $language_link . ' [R=301,L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{REQUEST_URI} ^/s-' . $row2['page_id'] . '-' . \S::seo($row2['title']) . '-s-1$'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^(.*)$ ' . $domain_prefix . '://' . $www . $url_tmp . '/' . $language_link . ' [R=301,L]'; - } - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{REQUEST_URI} "^/$"'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . ' [L]'; - - $htaccess_data .= PHP_EOL; - } - - if ($row2['seo_link']) - { - if ($settings['links_structure']) - $seo = \admin\factory\Pages::google_url_preview($row2['page_id'], $row2['title'], $row[id], 0, 0, $row2['seo_link'], $language_link); - else - $seo = $language_link . \S::seo($row2['seo_link']); - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . '&%{QUERY_STRING} [L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '-s-1$ ' . $seo . ' [R=301,L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '-s-([0-9]+)$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . '&bs=$1&%{QUERY_STRING} [L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{QUERY_STRING} !=""'; - $htaccess_data .= PHP_EOL . 'RewriteRule ' . $seo . ' %{REQUEST_URI}? [R=301,L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . ' [L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '-s-([0-9]+)$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . '&bs=$1 [L]'; - } - else - { - if ($settings['links_structure']) - $seo = \admin\factory\Pages::google_url_preview($row2['page_id'], $row2['title'], $row['id'], 0, 0, $row2['seo_link'], $language_link); - else - $seo = $language_link . 's-' . $row2['page_id'] . '-' . \S::seo($row2['title']); - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . '&%{QUERY_STRING} [L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '-s-1$ ' . $seo . ' [R=301,L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '-s-([0-9]+)$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . '&bs=$1&%{QUERY_STRING} [L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteCond %{QUERY_STRING} !=""'; - $htaccess_data .= PHP_EOL . 'RewriteRule ' . $seo . ' %{REQUEST_URI}? [R=301,L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . ' [L]'; - - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $www . $url_tmp . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '-s-([0-9]+)$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . '&bs=$1 [L]'; - } - $htaccess_data .= PHP_EOL; - } - } } $results2 = $mdb->select( - 'pp_articles_langs', - ['[><]pp_articles'=> ['article_id' => 'id']], + 'pp_articles_langs', + ['[><]pp_articles' => ['article_id' => 'id']], ['seo_link', 'title', 'article_id', 'noindex', 'copy_from', 'block_direct_access'], ['AND' => ['status' => 1, 'lang_id' => $row['id']]] - ); - if (is_array($results2)) foreach ($results2 as $row2) - { + ); + if (is_array($results2)) foreach ($results2 as $row2) + { $domain = \S::get_language_domain($row['id']); if ($row2['copy_from'] != null) { - $results_tmp = $mdb->get( - 'pp_articles_langs', - [ - 'seo_link', - 'title' - ], - [ - 'AND' => [ - 'article_id' => $row2['article_id'], - 'lang_id' => $row2['copy_from'] - ] - ] - ); - $row2['seo_link'] = $results_tmp['seo_link']; - $row2['title'] = $results_tmp['title']; + $results_tmp = $mdb->get( + 'pp_articles_langs', + [ + 'seo_link', + 'title' + ], + [ + 'AND' => [ + 'article_id' => $row2['article_id'], + 'lang_id' => $row2['copy_from'] + ] + ] + ); + $row2['seo_link'] = $results_tmp['seo_link']; + $row2['title'] = $results_tmp['title']; } /* sitemap */ if (!$row2['block_direct_access'] and $row2['title']) { - $site_map[$url_tmp] .= '' . PHP_EOL; + $site_map[$url_tmp] .= '' . PHP_EOL; if ($row2['seo_link']) - $site_map[$url_tmp] .= '' . $domain_prefix . '://' . $www . $url_tmp . '/' . $language_link . \S::seo($row2['seo_link']) . '' . PHP_EOL; + $site_map[$url_tmp] .= '' . $domain_prefix . '://' . $www . $url_tmp . '/' . $language_link . \S::seo($row2['seo_link']) . '' . PHP_EOL; else - $site_map[$url_tmp] .= '' . $domain_prefix . '://' . $www . $url_tmp . '/' . $language_link . 'a-' . $row2['article_id'] . '-' . self::seo($row2['title']) . '' . PHP_EOL; + $site_map[$url_tmp] .= '' . $domain_prefix . '://' . $www . $url_tmp . '/' . $language_link . 'a-' . $row2['article_id'] . '-' . self::seo($row2['title']) . '' . PHP_EOL; $site_map[$url_tmp] .= '' . date('Y-m-d') . '' . PHP_EOL; $site_map[$url_tmp] .= 'daily' . PHP_EOL; $site_map[$url_tmp] .= '0.6' . PHP_EOL; @@ -900,419 +882,433 @@ $site_map[$domain['domain']] .= 'query('SELECT ' + . 'name, tag_id ' + . 'FROM ' + . 'pp_tags AS pt ' + . 'INNER JOIN ' + . 'pp_articles_tags AS pat ON pat.tag_id = pt.id ' + . 'GROUP BY ' + . 'tag_id')->fetchAll(); + if (is_array($results) and !empty($results)) foreach ($results as $row) + { + $htaccess_data .= PHP_EOL . 'RewriteCond %{QUERY_STRING} !=""'; + $htaccess_data .= PHP_EOL . 'RewriteRule tag/' . \S::seo( $row['name'] ) . '(|/) %{REQUEST_URI}? [R=301,L]'; + $htaccess_data .= PHP_EOL . 'RewriteRule ^tag/' . \S::seo( $row['name'] ) . '(|/)$ index.php?tag=' . $row['tag_id'] . ' [L]'; + } - $htaccess_data .= PHP_EOL . 'RewriteCond %{HTTP_HOST} ^' . $domain . '$ [NC]'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $language_link . 'a-' . $row2['article_id'] . '-' . \S::seo($row2['title']) . '$ index.php?article=' . $row2['article_id'] . '&lang=' . $row['id'] . ' [L]'; - } - $htaccess_data .= PHP_EOL; - } - } - } + $results = $mdb->get('pp_settings', 'value', ['param' => 'htaccess']); + if ($results) + $htaccess_data .= PHP_EOL . $results; - $results = $mdb->query('SELECT ' - . 'name, tag_id ' - . 'FROM ' - . 'pp_tags AS pt ' - . 'INNER JOIN ' - . 'pp_articles_tags AS pat ON pat.tag_id = pt.id ' - . 'GROUP BY ' - . 'tag_id')->fetchAll(); - if (is_array($results) and !empty($results)) foreach ($results as $row) - { - $htaccess_data .= PHP_EOL . 'RewriteCond %{QUERY_STRING} !=""'; - $htaccess_data .= PHP_EOL . 'RewriteRule tag,' . \S::seo($row['name']) . ' %{REQUEST_URI}? [R=301,L]'; - $htaccess_data .= PHP_EOL . 'RewriteRule ^tag,' . \S::seo($row['name']) . '$ index.php?tag=' . $row['tag_id'] . ' [L]'; - } + if (file_exists('../libraries/htaccess.ini')) + $htaccess_data .= PHP_EOL . file_get_contents('../libraries/htaccess.ini'); - $results = $mdb->get('pp_settings', 'value', ['param' => 'htaccess']); - if ($results) - $htaccess_data .= PHP_EOL . $results; + $results = $mdb->get('pp_settings', 'value', ['param' => 'robots']); + if ($results) + $robots .= PHP_EOL . $results; - if (file_exists('../libraries/htaccess.ini')) - $htaccess_data .= PHP_EOL . file_get_contents('../libraries/htaccess.ini'); - - $results = $mdb->get('pp_settings', 'value', ['param' => 'robots']); - if ($results) - $robots .= PHP_EOL . $results; - - if (is_array($available_domains) and !empty($available_domains)) - { - foreach ($available_domains as $domain) + if (is_array($available_domains) and !empty($available_domains)) + { + foreach ($available_domains as $domain) $site_map[$domain['domain']] .= ''; + } + else + $site_map[$url] .= ''; + + if ($settings['ssl']) + { + if ($settings['link_version']) + { + $htaccess_data = str_replace( + '{REDIRECT}', + 'RewriteCond %{HTTP_HOST} !^www\.' . PHP_EOL + . 'RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + + . 'RewriteCond %{SERVER_PORT} !=443' . PHP_EOL + . 'RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + + . '## Remove trailing slash' . PHP_EOL + . 'RewriteCond %{REQUEST_FILENAME} !-d [NC]' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL + . 'RewriteRule ^(.*)/$ https://%{HTTP_HOST}/$1 [L,R=301]', + $htaccess_data + ); + } + else + { + $htaccess_data = str_replace( + '{REDIRECT}', + 'RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]' . PHP_EOL + . 'RewriteRule ^(.*)$ https://%1/$1 [R=301,L]' . PHP_EOL + . 'RewriteCond %{SERVER_PORT} !=443' . PHP_EOL + . 'RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + + . '## Remove trailing slash' . PHP_EOL + . 'RewriteCond %{REQUEST_FILENAME} !-d [NC]' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL + . 'RewriteRule ^(.*)/$ https://%{HTTP_HOST}/$1 [L,R=301]', + $htaccess_data + ); + } + } + else + { + if ($settings['link_version']) + { + $htaccess_data = str_replace( + '{REDIRECT}', + 'RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]' . PHP_EOL + . 'RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + + . 'RewriteCond %{SERVER_PORT} =443' . PHP_EOL + . 'RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + + . '## Remove trailing slash' . PHP_EOL + . 'RewriteCond %{REQUEST_FILENAME} !-d [NC]' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL + . 'RewriteRule ^(.*)/$ http://%{HTTP_HOST}/$1 [L,R=301]', + $htaccess_data + ); + } + else + { + $htaccess_data = str_replace( + '{REDIRECT}', + 'RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]' . PHP_EOL + . 'RewriteRule ^(.*)$ http://%1/$1 [R=301,L]' . PHP_EOL + . 'RewriteCond %{SERVER_PORT} =443' . PHP_EOL + . 'RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + + . '## Remove trailing slash' . PHP_EOL + . 'RewriteCond %{REQUEST_FILENAME} !-d [NC]' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL + . 'RewriteRule ^(.*)/$ http://%{HTTP_HOST}/$1 [L,R=301]', + $htaccess_data + ); + } + } + + $additional_classes = file_get_contents('../libraries/additional-classes.ini'); + $additional_classes = explode(PHP_EOL, $additional_classes); + $additional_classes = array_filter($additional_classes); + if (is_array($additional_classes) and !empty($additional_classes)) + { + foreach ($additional_classes as $class) + { + $classes .= 'RewriteCond %{REQUEST_URI} ^/' . trim($class) . '/(.*) [NC]' . PHP_EOL; + $classes .= 'RewriteRule ^([^/]*)/([^/]*)(|/([^/]*))$ index.php?module=$1&action=$2&$4 [L]' . PHP_EOL; + } + } + $htaccess_data = str_replace('{ADDITIONAL_CLASSES}', $classes, $htaccess_data); + + /* pozostałe linki */ + $htaccess_data .= PHP_EOL; + $htaccess_data .= 'RewriteRule ^newsletter/signin$ index.php?module=newsletter&action=signin [L]' . PHP_EOL; + $htaccess_data .= 'RewriteRule ^newsletter/confirm/hash=(.*)$ index.php?module=newsletter&action=confirm&hash=$1 [L]' . PHP_EOL; + $htaccess_data .= 'RewriteRule ^newsletter/unsubscribe/hash=(.*)$ index.php?module=newsletter&action=unsubscribe&hash=$1 [L]' . PHP_EOL; + + /* pixieset */ + $results = $mdb->select('pp_articles', 'id', ['pixieset' => 1]); + if (is_array($results) and count($results)) + { + $pixieset = 'RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?' . $url_tmp . ' [NC]' . PHP_EOL; + $pixieset .= 'RewriteCond %{REQUEST_URI} ^('; + foreach ($results as $row) + { + $pixieset .= '/upload/article_images/article_' . $row . '/'; + if ($row != end($results)) + $pixieset .= '|'; + } + $pixieset .= ') [NC]' . PHP_EOL . 'RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]' . PHP_EOL; + + $htaccess_data = str_replace('{PIXIESET]', $pixieset, $htaccess_data); + } + else + { + $htaccess_data = str_replace('{PIXIESET]', '', $htaccess_data); + } + + $fp = fopen($dir . '.htaccess', 'w'); + fwrite($fp, $htaccess_data); + fclose($fp); + + $class = '\admin\factory\Sitemap'; + $action = 'sitemap'; + + if (class_exists($class) and method_exists(new $class, $action)) + $site_map = call_user_func_array(array($class, $action), array($site_map, $available_domains, $domain_prefix, $www, $url)); + + if (is_array($available_domains) and !empty($available_domains)) + { + foreach ($available_domains as $domain) + { + $fp = fopen($dir . 'sitemap_' . \S::seo($domain['domain']) . '.xml', 'w'); + fwrite($fp, $site_map[$domain['domain']]); + fclose($fp); + } + } + else + { + $fp = fopen($dir . 'sitemap.xml', 'w'); + fwrite($fp, $site_map[$url]); + fclose($fp); + } + + $fp = fopen($dir . 'robots.txt', 'w'); + fwrite($fp, $robots); + fclose($fp); } - else - $site_map[$url] .= ' -'; -if ($settings['ssl']) -{ -if ($settings['link_version']) -{ -$htaccess_data = str_replace( -'{REDIRECT}', -'RewriteCond %{HTTP_HOST} !^www\.' . PHP_EOL -. 'RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + public static function seo( $val, $delete_rhombs = false ) + { + $array_rep1 = array('*', '_', ' ', '+', '"', "'", '?', '-', ',', '!', '~', '<', '>', '@', '#', '$', '%', '^', '&', '*' . '(', ')' . '-', '=', '\\', '|', '[', ']', ':', '(', ')'); + $array_rep2 = array('-', '-', '-', '-', '', '', '', '-', '-', '', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '', '-', '-', '-', '-', '-', '-', '-', '-'); + $val = self::noPl($val); + $val = str_replace($array_rep1, $array_rep2, $val); + if ($delete_rhombs) + $val = str_replace('/', '', $val); -. 'RewriteCond %{SERVER_PORT} !=443' . PHP_EOL -. 'RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + $val = strtolower($val); + $val = preg_replace('/(-){2,}/', '-', $val); + $val = ltrim($val, '-'); + $val = rtrim($val, '-'); + return $val; + } -. '## Remove trailing slash' . PHP_EOL -. 'RewriteCond %{REQUEST_FILENAME} !-d [NC]' . PHP_EOL -. 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL -. 'RewriteRule ^(.*)/$ https://%{HTTP_HOST}/$1 [L,R=301]', -$htaccess_data -); -} -else -{ -$htaccess_data = str_replace( -'{REDIRECT}', -'RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]' . PHP_EOL -. 'RewriteRule ^(.*)$ https://%1/$1 [R=301,L]' . PHP_EOL -. 'RewriteCond %{SERVER_PORT} !=443' . PHP_EOL -. 'RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + public static function noPL($string) + { + $chars = array( // Decompositions for Latin-1 Supplement chr(195).chr(128)=> 'A', chr(195).chr(129) => 'A', + chr(195) . chr(130) => 'A', chr(195) . chr(131) => 'A', + chr(195) . chr(132) => 'A', chr(195) . chr(133) => 'A', + chr(195) . chr(135) => 'C', chr(195) . chr(136) => 'E', + chr(195) . chr(137) => 'E', chr(195) . chr(138) => 'E', + chr(195) . chr(139) => 'E', chr(195) . chr(140) => 'I', + chr(195) . chr(141) => 'I', chr(195) . chr(142) => 'I', + chr(195) . chr(143) => 'I', chr(195) . chr(145) => 'N', + chr(195) . chr(146) => 'O', chr(195) . chr(147) => 'O', + chr(195) . chr(148) => 'O', chr(195) . chr(149) => 'O', + chr(195) . chr(150) => 'O', chr(195) . chr(153) => 'U', + chr(195) . chr(154) => 'U', chr(195) . chr(155) => 'U', + chr(195) . chr(156) => 'U', chr(195) . chr(157) => 'Y', + chr(195) . chr(159) => 's', chr(195) . chr(160) => 'a', + chr(195) . chr(161) => 'a', chr(195) . chr(162) => 'a', + chr(195) . chr(163) => 'a', chr(195) . chr(164) => 'a', + chr(195) . chr(165) => 'a', chr(195) . chr(167) => 'c', + chr(195) . chr(168) => 'e', chr(195) . chr(169) => 'e', + chr(195) . chr(170) => 'e', chr(195) . chr(171) => 'e', + chr(195) . chr(172) => 'i', chr(195) . chr(173) => 'i', + chr(195) . chr(174) => 'i', chr(195) . chr(175) => 'i', + chr(195) . chr(177) => 'n', chr(195) . chr(178) => 'o', + chr(195) . chr(179) => 'o', chr(195) . chr(180) => 'o', + chr(195) . chr(181) => 'o', chr(195) . chr(182) => 'o', + chr(195) . chr(182) => 'o', chr(195) . chr(185) => 'u', + chr(195) . chr(186) => 'u', chr(195) . chr(187) => 'u', + chr(195) . chr(188) => 'u', chr(195) . chr(189) => 'y', + chr(195) . chr(191) => 'y', + // Decompositions for Latin Extended-A + chr(196) . chr(128) => 'A', chr(196) . chr(129) => 'a', + chr(196) . chr(130) => 'A', chr(196) . chr(131) => 'a', + chr(196) . chr(132) => 'A', chr(196) . chr(133) => 'a', + chr(196) . chr(134) => 'C', chr(196) . chr(135) => 'c', + chr(196) . chr(136) => 'C', chr(196) . chr(137) => 'c', + chr(196) . chr(138) => 'C', chr(196) . chr(139) => 'c', + chr(196) . chr(140) => 'C', chr(196) . chr(141) => 'c', + chr(196) . chr(142) => 'D', chr(196) . chr(143) => 'd', + chr(196) . chr(144) => 'D', chr(196) . chr(145) => 'd', + chr(196) . chr(146) => 'E', chr(196) . chr(147) => 'e', + chr(196) . chr(148) => 'E', chr(196) . chr(149) => 'e', + chr(196) . chr(150) => 'E', chr(196) . chr(151) => 'e', + chr(196) . chr(152) => 'E', chr(196) . chr(153) => 'e', + chr(196) . chr(154) => 'E', chr(196) . chr(155) => 'e', + chr(196) . chr(156) => 'G', chr(196) . chr(157) => 'g', + chr(196) . chr(158) => 'G', chr(196) . chr(159) => 'g', + chr(196) . chr(160) => 'G', chr(196) . chr(161) => 'g', + chr(196) . chr(162) => 'G', chr(196) . chr(163) => 'g', + chr(196) . chr(164) => 'H', chr(196) . chr(165) => 'h', + chr(196) . chr(166) => 'H', chr(196) . chr(167) => 'h', + chr(196) . chr(168) => 'I', chr(196) . chr(169) => 'i', + chr(196) . chr(170) => 'I', chr(196) . chr(171) => 'i', + chr(196) . chr(172) => 'I', chr(196) . chr(173) => 'i', + chr(196) . chr(174) => 'I', chr(196) . chr(175) => 'i', + chr(196) . chr(176) => 'I', chr(196) . chr(177) => 'i', + chr(196) . chr(178) => 'IJ', chr(196) . chr(179) => 'ij', + chr(196) . chr(180) => 'J', chr(196) . chr(181) => 'j', + chr(196) . chr(182) => 'K', chr(196) . chr(183) => 'k', + chr(196) . chr(184) => 'k', chr(196) . chr(185) => 'L', + chr(196) . chr(186) => 'l', chr(196) . chr(187) => 'L', + chr(196) . chr(188) => 'l', chr(196) . chr(189) => 'L', + chr(196) . chr(190) => 'l', chr(196) . chr(191) => 'L', + chr(197) . chr(128) => 'l', chr(197) . chr(129) => 'L', + chr(197) . chr(130) => 'l', chr(197) . chr(131) => 'N', + chr(197) . chr(132) => 'n', chr(197) . chr(133) => 'N', + chr(197) . chr(134) => 'n', chr(197) . chr(135) => 'N', + chr(197) . chr(136) => 'n', chr(197) . chr(137) => 'N', + chr(197) . chr(138) => 'n', chr(197) . chr(139) => 'N', + chr(197) . chr(140) => 'O', chr(197) . chr(141) => 'o', + chr(197) . chr(142) => 'O', chr(197) . chr(143) => 'o', + chr(197) . chr(144) => 'O', chr(197) . chr(145) => 'o', + chr(197) . chr(146) => 'OE', chr(197) . chr(147) => 'oe', + chr(197) . chr(148) => 'R', chr(197) . chr(149) => 'r', + chr(197) . chr(150) => 'R', chr(197) . chr(151) => 'r', + chr(197) . chr(152) => 'R', chr(197) . chr(153) => 'r', + chr(197) . chr(154) => 'S', chr(197) . chr(155) => 's', + chr(197) . chr(156) => 'S', chr(197) . chr(157) => 's', + chr(197) . chr(158) => 'S', chr(197) . chr(159) => 's', + chr(197) . chr(160) => 'S', chr(197) . chr(161) => 's', + chr(197) . chr(162) => 'T', chr(197) . chr(163) => 't', + chr(197) . chr(164) => 'T', chr(197) . chr(165) => 't', + chr(197) . chr(166) => 'T', chr(197) . chr(167) => 't', + chr(197) . chr(168) => 'U', chr(197) . chr(169) => 'u', + chr(197) . chr(170) => 'U', chr(197) . chr(171) => 'u', + chr(197) . chr(172) => 'U', chr(197) . chr(173) => 'u', + chr(197) . chr(174) => 'U', chr(197) . chr(175) => 'u', + chr(197) . chr(176) => 'U', chr(197) . chr(177) => 'u', + chr(197) . chr(178) => 'U', chr(197) . chr(179) => 'u', + chr(197) . chr(180) => 'W', chr(197) . chr(181) => 'w', + chr(197) . chr(182) => 'Y', chr(197) . chr(183) => 'y', + chr(197) . chr(184) => 'Y', chr(197) . chr(185) => 'Z', + chr(197) . chr(186) => 'z', chr(197) . chr(187) => 'Z', + chr(197) . chr(188) => 'z', chr(197) . chr(189) => 'Z', + chr(197) . chr(190) => 'z', chr(197) . chr(191) => 's' + ); -. '## Remove trailing slash' . PHP_EOL -. 'RewriteCond %{REQUEST_FILENAME} !-d [NC]' . PHP_EOL -. 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL -. 'RewriteRule ^(.*)/$ https://%{HTTP_HOST}/$1 [L,R=301]', -$htaccess_data -); -} -} -else -{ -if ($settings['link_version']) -{ -$htaccess_data = str_replace( -'{REDIRECT}', -'RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]' . PHP_EOL -. 'RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + $string = strtr($string, $chars); -. 'RewriteCond %{SERVER_PORT} =443' . PHP_EOL -. 'RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + $table = array( + "А" => "a", "Б" => "b", "В" => "v", "Г" => "g", "Д" => "d", + "Е" => "e", "Ё" => "yo", "Ж" => "zh", "З" => "z", "И" => "i", + "Й" => "j", "К" => "k", "Л" => "l", "М" => "m", "Н" => "n", + "О" => "o", "П" => "p", "Р" => "r", "С" => "s", "Т" => "t", + "У" => "u", "Ф" => "f", "Х" => "kh", "Ц" => "ts", "Ч" => "ch", + "Ш" => "sh", "Щ" => "sch", "Ъ" => "", "Ы" => "y", "Ь" => "", + "Э" => "e", "Ю" => "yu", "Я" => "ya", "а" => "a", "б" => "b", + "в" => "v", "г" => "g", "д" => "d", "е" => "e", "ё" => "yo", + "ж" => "zh", "з" => "z", "и" => "i", "й" => "j", "к" => "k", + "л" => "l", "м" => "m", "н" => "n", "о" => "o", "п" => "p", + "р" => "r", "с" => "s", "т" => "t", "у" => "u", "ф" => "f", + "х" => "kh", "ц" => "ts", "ч" => "ch", "ш" => "sh", "щ" => "sch", + "ъ" => "", "ы" => "y", "ь" => "", "э" => "e", "ю" => "yu", + "я" => "ya", " " => "-", "." => "", "," => "", + ":" => "", ";" => "", "—" => "", "–" => "-" + ); -. '## Remove trailing slash' . PHP_EOL -. 'RewriteCond %{REQUEST_FILENAME} !-d [NC]' . PHP_EOL -. 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL -. 'RewriteRule ^(.*)/$ http://%{HTTP_HOST}/$1 [L,R=301]', -$htaccess_data -); -} -else -{ -$htaccess_data = str_replace( -'{REDIRECT}', -'RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]' . PHP_EOL -. 'RewriteRule ^(.*)$ http://%1/$1 [R=301,L]' . PHP_EOL -. 'RewriteCond %{SERVER_PORT} =443' . PHP_EOL -. 'RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]' . PHP_EOL + $string = strtr($string, $table); -. '## Remove trailing slash' . PHP_EOL -. 'RewriteCond %{REQUEST_FILENAME} !-d [NC]' . PHP_EOL -. 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL -. 'RewriteRule ^(.*)/$ http://%{HTTP_HOST}/$1 [L,R=301]', -$htaccess_data -); -} -} - -$additional_classes = file_get_contents('../libraries/additional-classes.ini'); -$additional_classes = explode(PHP_EOL, $additional_classes); -$additional_classes = array_filter($additional_classes); -if (is_array($additional_classes) and !empty($additional_classes)) -{ -foreach ($additional_classes as $class) -{ -$classes .= 'RewriteCond %{REQUEST_URI} ^/' . trim($class) . '/(.*) [NC]' . PHP_EOL; -$classes .= 'RewriteRule ^([^/]*)/([^/]*)(|/([^/]*))$ index.php?module=$1&action=$2&$4 [L]' . PHP_EOL; -} -} -$htaccess_data = str_replace('{ADDITIONAL_CLASSES}', $classes, $htaccess_data); - -/* pozostałe linki */ -$htaccess_data .= PHP_EOL; -$htaccess_data .= 'RewriteRule ^newsletter/signin$ index.php?module=newsletter&action=signin [L]' . PHP_EOL; -$htaccess_data .= 'RewriteRule ^newsletter/confirm/hash=(.*)$ index.php?module=newsletter&action=confirm&hash=$1 [L]' . PHP_EOL; -$htaccess_data .= 'RewriteRule ^newsletter/unsubscribe/hash=(.*)$ index.php?module=newsletter&action=unsubscribe&hash=$1 [L]' . PHP_EOL; - -/* pixieset */ -$results = $mdb->select('pp_articles', 'id', ['pixieset' => 1]); -if (is_array($results) and count($results)) -{ -$pixieset = 'RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?' . $url_tmp . ' [NC]' . PHP_EOL; -$pixieset .= 'RewriteCond %{REQUEST_URI} ^('; -foreach ($results as $row) -{ -$pixieset .= '/upload/article_images/article_' . $row . '/'; -if ($row != end($results)) -$pixieset .= '|'; -} -$pixieset .= ') [NC]' . PHP_EOL . 'RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]' . PHP_EOL; - -$htaccess_data = str_replace('{PIXIESET]', $pixieset, $htaccess_data); -} -else -{ -$htaccess_data = str_replace('{PIXIESET]', '', $htaccess_data); -} - -$fp = fopen($dir . '.htaccess', 'w'); -fwrite($fp, $htaccess_data); -fclose($fp); - -$class = '\admin\factory\Sitemap'; -$action = 'sitemap'; - -if (class_exists($class) and method_exists(new $class, $action)) -$site_map = call_user_func_array(array($class, $action), array($site_map, $available_domains, $domain_prefix, $www, $url)); - -if (is_array($available_domains) and !empty($available_domains)) -{ -foreach ($available_domains as $domain) -{ -$fp = fopen($dir . 'sitemap_' . \S::seo($domain['domain']) . '.xml', 'w'); -fwrite($fp, $site_map[$domain['domain']]); -fclose($fp); -} -} -else -{ -$fp = fopen($dir . 'sitemap.xml', 'w'); -fwrite($fp, $site_map[$url]); -fclose($fp); -} - -$fp = fopen($dir . 'robots.txt', 'w'); -fwrite($fp, $robots); -fclose($fp); -} - -public static function seo($val, $delete_rhombs = false) -{ -$array_rep1 = array('*', '_', ' ', '+', '"', "'", '?', '-', ',', '!', '~', '<', '>' , '@' , '#' , '$' , '%' , '^' , '&' , '*' . '(' , ')' . '-' , '=' , '\\' , '|' , '[' , ']' , ':' , '(' , ')' ); $array_rep2=array('-', '-' , '-' , '-' , '' , '' , '' , '-' , '-' , '' , '-' , '-' , '-' , '-' , '-' , '-' , '-' , '-' , '-' , '-' , '-' , '-' , '' , '-' , '-' , '-' , '-' , '-' , '-' , '-' , '-' ); $val=self::noPl($val); $val=str_replace($array_rep1, $array_rep2, $val); if ($delete_rhombs) $val=str_replace('/', '' , $val); $val=strtolower($val); $val=preg_replace('/(-){2,}/', '-' , $val); $val=ltrim($val, '-' ); $val=rtrim($val, '-' ); return $val; } public static function noPL($string) { $chars=array( // Decompositions for Latin-1 Supplement chr(195).chr(128)=> 'A', chr(195).chr(129) => 'A', - chr(195) . chr(130) => 'A', chr(195) . chr(131) => 'A', - chr(195) . chr(132) => 'A', chr(195) . chr(133) => 'A', - chr(195) . chr(135) => 'C', chr(195) . chr(136) => 'E', - chr(195) . chr(137) => 'E', chr(195) . chr(138) => 'E', - chr(195) . chr(139) => 'E', chr(195) . chr(140) => 'I', - chr(195) . chr(141) => 'I', chr(195) . chr(142) => 'I', - chr(195) . chr(143) => 'I', chr(195) . chr(145) => 'N', - chr(195) . chr(146) => 'O', chr(195) . chr(147) => 'O', - chr(195) . chr(148) => 'O', chr(195) . chr(149) => 'O', - chr(195) . chr(150) => 'O', chr(195) . chr(153) => 'U', - chr(195) . chr(154) => 'U', chr(195) . chr(155) => 'U', - chr(195) . chr(156) => 'U', chr(195) . chr(157) => 'Y', - chr(195) . chr(159) => 's', chr(195) . chr(160) => 'a', - chr(195) . chr(161) => 'a', chr(195) . chr(162) => 'a', - chr(195) . chr(163) => 'a', chr(195) . chr(164) => 'a', - chr(195) . chr(165) => 'a', chr(195) . chr(167) => 'c', - chr(195) . chr(168) => 'e', chr(195) . chr(169) => 'e', - chr(195) . chr(170) => 'e', chr(195) . chr(171) => 'e', - chr(195) . chr(172) => 'i', chr(195) . chr(173) => 'i', - chr(195) . chr(174) => 'i', chr(195) . chr(175) => 'i', - chr(195) . chr(177) => 'n', chr(195) . chr(178) => 'o', - chr(195) . chr(179) => 'o', chr(195) . chr(180) => 'o', - chr(195) . chr(181) => 'o', chr(195) . chr(182) => 'o', - chr(195) . chr(182) => 'o', chr(195) . chr(185) => 'u', - chr(195) . chr(186) => 'u', chr(195) . chr(187) => 'u', - chr(195) . chr(188) => 'u', chr(195) . chr(189) => 'y', - chr(195) . chr(191) => 'y', - // Decompositions for Latin Extended-A - chr(196) . chr(128) => 'A', chr(196) . chr(129) => 'a', - chr(196) . chr(130) => 'A', chr(196) . chr(131) => 'a', - chr(196) . chr(132) => 'A', chr(196) . chr(133) => 'a', - chr(196) . chr(134) => 'C', chr(196) . chr(135) => 'c', - chr(196) . chr(136) => 'C', chr(196) . chr(137) => 'c', - chr(196) . chr(138) => 'C', chr(196) . chr(139) => 'c', - chr(196) . chr(140) => 'C', chr(196) . chr(141) => 'c', - chr(196) . chr(142) => 'D', chr(196) . chr(143) => 'd', - chr(196) . chr(144) => 'D', chr(196) . chr(145) => 'd', - chr(196) . chr(146) => 'E', chr(196) . chr(147) => 'e', - chr(196) . chr(148) => 'E', chr(196) . chr(149) => 'e', - chr(196) . chr(150) => 'E', chr(196) . chr(151) => 'e', - chr(196) . chr(152) => 'E', chr(196) . chr(153) => 'e', - chr(196) . chr(154) => 'E', chr(196) . chr(155) => 'e', - chr(196) . chr(156) => 'G', chr(196) . chr(157) => 'g', - chr(196) . chr(158) => 'G', chr(196) . chr(159) => 'g', - chr(196) . chr(160) => 'G', chr(196) . chr(161) => 'g', - chr(196) . chr(162) => 'G', chr(196) . chr(163) => 'g', - chr(196) . chr(164) => 'H', chr(196) . chr(165) => 'h', - chr(196) . chr(166) => 'H', chr(196) . chr(167) => 'h', - chr(196) . chr(168) => 'I', chr(196) . chr(169) => 'i', - chr(196) . chr(170) => 'I', chr(196) . chr(171) => 'i', - chr(196) . chr(172) => 'I', chr(196) . chr(173) => 'i', - chr(196) . chr(174) => 'I', chr(196) . chr(175) => 'i', - chr(196) . chr(176) => 'I', chr(196) . chr(177) => 'i', - chr(196) . chr(178) => 'IJ', chr(196) . chr(179) => 'ij', - chr(196) . chr(180) => 'J', chr(196) . chr(181) => 'j', - chr(196) . chr(182) => 'K', chr(196) . chr(183) => 'k', - chr(196) . chr(184) => 'k', chr(196) . chr(185) => 'L', - chr(196) . chr(186) => 'l', chr(196) . chr(187) => 'L', - chr(196) . chr(188) => 'l', chr(196) . chr(189) => 'L', - chr(196) . chr(190) => 'l', chr(196) . chr(191) => 'L', - chr(197) . chr(128) => 'l', chr(197) . chr(129) => 'L', - chr(197) . chr(130) => 'l', chr(197) . chr(131) => 'N', - chr(197) . chr(132) => 'n', chr(197) . chr(133) => 'N', - chr(197) . chr(134) => 'n', chr(197) . chr(135) => 'N', - chr(197) . chr(136) => 'n', chr(197) . chr(137) => 'N', - chr(197) . chr(138) => 'n', chr(197) . chr(139) => 'N', - chr(197) . chr(140) => 'O', chr(197) . chr(141) => 'o', - chr(197) . chr(142) => 'O', chr(197) . chr(143) => 'o', - chr(197) . chr(144) => 'O', chr(197) . chr(145) => 'o', - chr(197) . chr(146) => 'OE', chr(197) . chr(147) => 'oe', - chr(197) . chr(148) => 'R', chr(197) . chr(149) => 'r', - chr(197) . chr(150) => 'R', chr(197) . chr(151) => 'r', - chr(197) . chr(152) => 'R', chr(197) . chr(153) => 'r', - chr(197) . chr(154) => 'S', chr(197) . chr(155) => 's', - chr(197) . chr(156) => 'S', chr(197) . chr(157) => 's', - chr(197) . chr(158) => 'S', chr(197) . chr(159) => 's', - chr(197) . chr(160) => 'S', chr(197) . chr(161) => 's', - chr(197) . chr(162) => 'T', chr(197) . chr(163) => 't', - chr(197) . chr(164) => 'T', chr(197) . chr(165) => 't', - chr(197) . chr(166) => 'T', chr(197) . chr(167) => 't', - chr(197) . chr(168) => 'U', chr(197) . chr(169) => 'u', - chr(197) . chr(170) => 'U', chr(197) . chr(171) => 'u', - chr(197) . chr(172) => 'U', chr(197) . chr(173) => 'u', - chr(197) . chr(174) => 'U', chr(197) . chr(175) => 'u', - chr(197) . chr(176) => 'U', chr(197) . chr(177) => 'u', - chr(197) . chr(178) => 'U', chr(197) . chr(179) => 'u', - chr(197) . chr(180) => 'W', chr(197) . chr(181) => 'w', - chr(197) . chr(182) => 'Y', chr(197) . chr(183) => 'y', - chr(197) . chr(184) => 'Y', chr(197) . chr(185) => 'Z', - chr(197) . chr(186) => 'z', chr(197) . chr(187) => 'Z', - chr(197) . chr(188) => 'z', chr(197) . chr(189) => 'Z', - chr(197) . chr(190) => 'z', chr(197) . chr(191) => 's' - ); - - $string = strtr($string, $chars); - - $table = array( - "А" => "a", "Б" => "b", "В" => "v", "Г" => "g", "Д" => "d", - "Е" => "e", "Ё" => "yo", "Ж" => "zh", "З" => "z", "И" => "i", - "Й" => "j", "К" => "k", "Л" => "l", "М" => "m", "Н" => "n", - "О" => "o", "П" => "p", "Р" => "r", "С" => "s", "Т" => "t", - "У" => "u", "Ф" => "f", "Х" => "kh", "Ц" => "ts", "Ч" => "ch", - "Ш" => "sh", "Щ" => "sch", "Ъ" => "", "Ы" => "y", "Ь" => "", - "Э" => "e", "Ю" => "yu", "Я" => "ya", "а" => "a", "б" => "b", - "в" => "v", "г" => "g", "д" => "d", "е" => "e", "ё" => "yo", - "ж" => "zh", "з" => "z", "и" => "i", "й" => "j", "к" => "k", - "л" => "l", "м" => "m", "н" => "n", "о" => "o", "п" => "p", - "р" => "r", "с" => "s", "т" => "t", "у" => "u", "ф" => "f", - "х" => "kh", "ц" => "ts", "ч" => "ch", "ш" => "sh", "щ" => "sch", - "ъ" => "", "ы" => "y", "ь" => "", "э" => "e", "ю" => "yu", - "я" => "ya", " " => "-", "." => "", "," => "", - ":" => "", ";" => "", "—" => "", "–" => "-" - ); - - $string = strtr($string, $table); - - return $string; + return $string; } public static function delete_cache() { - \S::delete_dir('../cache/'); - \S::delete_dir('../temp/'); - \S::delete_dir('temp/'); + \S::delete_dir('../cache/'); + \S::delete_dir('../temp/'); + \S::delete_dir('temp/'); } public static function delete_dir($dir) { - if (is_file($dir)) - return @unlink($dir); + if (is_file($dir)) + return @unlink($dir); - else if (is_dir($dir)) - { - $scan = glob(rtrim($dir, '/') . '/*'); + else if (is_dir($dir)) + { + $scan = glob(rtrim($dir, '/') . '/*'); - if (is_array($scan)) - foreach ($scan as $index => $path) - self::delete_dir($path); + if (is_array($scan)) + foreach ($scan as $index => $path) + self::delete_dir($path); - if (is_dir($dir) && self::is_empty_dir($dir) and $dir != '../temp/') - return @rmdir($dir); - } + if (is_dir($dir) && self::is_empty_dir($dir) and $dir != '../temp/') + return @rmdir($dir); + } } public static function is_empty_dir($dir) { - return (($files = @scandir($dir)) && count($files) <= 2); } public static function email_check($email) { return filter_var($email, FILTER_VALIDATE_EMAIL); } public static function send_email($email, $subject, $text, $replay='' , $file='' ) { global $settings; if (file_exists('libraries/phpmailer/class.phpmailer.php')) require_once 'libraries/phpmailer/class.phpmailer.php' ; if (file_exists('libraries/phpmailer/class.smtp.php')) require_once 'libraries/phpmailer/class.smtp.php' ; if (file_exists('../libraries/phpmailer/class.phpmailer.php')) require_once '../libraries/phpmailer/class.phpmailer.php' ; if (file_exists('../libraries/phpmailer/class.smtp.php')) require_once '../libraries/phpmailer/class.smtp.php' ; if ($email and $subject) { $mail=new PHPMailer(); $mail->IsSMTP(); - $mail->SMTPAuth = true; - $mail->Host = $settings['email_host']; - $mail->Port = $settings['email_port']; - $mail->Username = $settings['email_login']; - $mail->Password = $settings['email_password']; - $mail->CharSet = "UTF-8"; - $mail->SMTPOptions = array( - 'ssl' => array( - 'verify_peer' => false, - 'verify_peer_name' => false, - 'allow_self_signed' => true - ) - ); + return (($files = @scandir($dir)) && count($files) <= 2); + } + public static function email_check($email) + { + return filter_var($email, FILTER_VALIDATE_EMAIL); + } + public static function send_email( $email, $subject, $text, $replay = '', $file = '' ) + { + global $settings; - if (self::email_check($replay)) + if ( file_exists('libraries/phpmailer/class.phpmailer.php') ) require_once 'libraries/phpmailer/class.phpmailer.php'; + if ( file_exists('libraries/phpmailer/class.smtp.php') ) require_once 'libraries/phpmailer/class.smtp.php'; + if ( file_exists('../libraries/phpmailer/class.phpmailer.php') ) require_once '../libraries/phpmailer/class.phpmailer.php'; + if ( file_exists('../libraries/phpmailer/class.smtp.php') ) require_once '../libraries/phpmailer/class.smtp.php'; + if ( $email and $subject ) { - $mail->AddReplyTo($replay, $replay); - $mail->SetFrom($settings['contact_email'], $settings['contact_email']); - } - else - { - $mail->AddReplyTo($settings['contact_email'], $settings['firm_name']); - $mail->SetFrom($settings['contact_email'], $settings['firm_name']); - } + $mail = new PHPMailer(); + $mail->IsSMTP(); + $mail->SMTPAuth = true; + $mail->Host = $settings['email_host']; + $mail->Port = $settings['email_port']; + $mail->Username = $settings['email_login']; + $mail->Password = $settings['email_password']; + $mail->CharSet = "UTF-8"; + $mail->SMTPOptions = array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + 'allow_self_signed' => true + ) + ); - $mail->AddAddress($email, ''); - $mail->Subject = $subject; - $mail->Body = $text; - if (is_array($file)) - { - foreach ($file as $file_tmp) - { - if (file_exists($file_tmp)) - $mail->AddAttachment($file_tmp); + if (self::email_check($replay)) + { + $mail->AddReplyTo($replay, $replay); + $mail->SetFrom($settings['contact_email'], $settings['contact_email']); + } + else + { + $mail->AddReplyTo($settings['contact_email'], $settings['firm_name']); + $mail->SetFrom($settings['contact_email'], $settings['firm_name']); + } + + $mail->AddAddress($email, ''); + $mail->Subject = $subject; + $mail->Body = $text; + if (is_array($file)) + { + foreach ($file as $file_tmp) + { + if (file_exists($file_tmp)) + $mail->AddAttachment($file_tmp); + } + } + else + { + if (file_exists($file)) + $mail->AddAttachment($file); + } + $mail->IsHTML(true); + return $mail -> Send(); } - } - else - { - if (file_exists($file)) - $mail->AddAttachment($file); - } - $mail->IsHTML(true); - return $mail->Send(); - } - return false; - } - } \ No newline at end of file + return true; + } +} diff --git a/autoload/front/factory/class.Articles.php b/autoload/front/factory/class.Articles.php index 4d0abbc..0d78935 100644 --- a/autoload/front/factory/class.Articles.php +++ b/autoload/front/factory/class.Articles.php @@ -1,165 +1,183 @@ ]*)>(.*?)<\/\1>/', $content, $matches, PREG_SET_ORDER); + // Tylko h1–h3 + preg_match_all('/<(h[1-3])([^>]*)>(.*?)<\/\1>/i', $content, $matches, PREG_SET_ORDER); - $firstLevel = true; + if (empty($matches)) + { + return ''; + } - foreach ($matches as $match) { - $level = intval(substr($match[1], 1)); + foreach ($matches as $match) + { + $level = (int)substr($match[1], 1); + $text = trim($match[3]); - while ($level < count($currentLevel)) { - $result .= ''; - array_pop($currentLevel); + // Pobierz lub wygeneruj ID + preg_match('/\sid=["\']?([^"\']+)["\']?/', $match[2], $idMatch); + $id = isset($idMatch[1]) + ? $idMatch[1] + : strtolower(preg_replace('/[^a-z0-9]+/u', '-', html_entity_decode(strip_tags($text), ENT_QUOTES, 'UTF-8'))); + + if ($prevLevel === 0) + { + $prevLevel = $level; + $stack[] = $level; + } + + if ($level > $prevLevel) + { + for ($i = $prevLevel; $i < $level; $i++) + { + $result .= '
    '; + $stack[] = $i + 1; } - - if ($level > count($currentLevel)) { - while ($level > count($currentLevel)) { - if (count($currentLevel) > 0 || $firstLevel) { - $result .= '
      '; - $firstLevel = false; - } - array_push($currentLevel, 0); - } - $result .= '
    1. '; - } else { - $result .= '
    2. '; + } + elseif ($level < $prevLevel) + { + for ($i = $prevLevel; $i > $level; $i--) + { + $result .= '
    '; + array_pop($stack); } + $result .= ''; + } + else + { + $result .= ''; + } - $currentLevel[count($currentLevel) - 1]++; - - preg_match('/\sid="([^"]*)"/', $match[2], $idMatches); - $id = isset($idMatches[1]) ? $idMatches[1] : ''; - - $result .= sprintf( - '%s', - urlencode(strtolower($id)), - $match[3] - ); + $result .= '
  1. ' . $text . ''; + $prevLevel = $level; } - while (!empty($currentLevel)) { - $result .= '
'; - array_pop($currentLevel); + // Zamknij pozostałe listy + while (!empty($stack)) + { + $result .= ''; + array_pop($stack); } - if (substr($result, 0, 8) === '
      ') { - return substr($result, 4, -5); - } else { - return $result; - } + return '
        ' . $result . '
      '; } // funkcja wywoływana dla każdego dopasowania do wyrażenia regularnego - static public function processHeaders( $matches ) + static public function processHeaders($matches) { $level = $matches[1]; $attrs = $matches[2]; $content = $matches[3]; $id_attr = 'id='; $id_attr_pos = strpos($attrs, $id_attr); - if ($id_attr_pos === false) { // jeśli nie ma atrybutu id - $id = \S::seo( $content ); + if ($id_attr_pos === false) + { // jeśli nie ma atrybutu id + $id = \S::seo($content); $attrs .= sprintf(' id="%s"', $id); } - $html = sprintf( '%s', $level, $attrs, $content, $level ); + $html = sprintf('%s', $level, $attrs, $content, $level); return $html; } - static public function generateHeadersIds( $text ) + static public function generateHeadersIds($text) { $pattern = '/(.*?)<\/h\1>/si'; - $text = preg_replace_callback( $pattern, array(__CLASS__, 'processHeaders'), $text ); + $text = preg_replace_callback($pattern, array(__CLASS__, 'processHeaders'), $text); return $text; } - public static function pixieset_save_favorite_images( $hash ) + public static function pixieset_save_favorite_images($hash) { global $mdb, $settings; - \S::delete_dir( 'temp/' ); + \S::delete_dir('temp/'); - $rows = $mdb -> select( 'pp_articles', [ 'id' ], [ 'hash' => $hash ] ); - if ( is_array( $rows ) ) foreach ( $rows as $row ) { - $article = \front\factory\Articles::article_details( $row['id'], 'pl' ); + $rows = $mdb->select('pp_articles', ['id'], ['hash' => $hash]); + if (is_array($rows)) foreach ($rows as $row) + { + $article = \front\factory\Articles::article_details($row['id'], 'pl'); $text = '

      Witaj,
      '; $text .= 'Użytkownik zatwierdził listę wybranych przez siebie zdjęć.
      '; $text .= 'Poniżej znajdziesz nazwy wybranych zdjęć.

      '; $text .= '
        '; - if ( is_array( $article['images'] ) ) foreach ( $article['images'] as $image ) - if ( $image['favorite'] ) - $text .= '
      • ' . basename( $image['src'] ) . '
      • '; + if (is_array($article['images'])) foreach ($article['images'] as $image) + if ($image['favorite']) + $text .= '
      • ' . basename($image['src']) . '
      • '; $text .= '
      '; - \S::send_email( $settings['contact_email'], 'Powiadomienie ze strony: ' . $_SERVER['SERVER_NAME'], $text ); + \S::send_email($settings['contact_email'], 'Powiadomienie ze strony: ' . $_SERVER['SERVER_NAME'], $text); return true; } return false; } - public static function pixieset_image_favorite( $image_id, $hash ) + public static function pixieset_image_favorite($image_id, $hash) { global $mdb; - $rows = $mdb -> select( 'pp_articles', [ 'id' ], [ 'hash' => $hash ] ); - if ( is_array( $rows ) ) foreach ( $rows as $row ) + $rows = $mdb->select('pp_articles', ['id'], ['hash' => $hash]); + if (is_array($rows)) foreach ($rows as $row) { - $status = $mdb -> get( 'pp_articles_images', 'favorite', [ 'AND' => [ 'article_id' => $row['id'], 'id' => $image_id ] ] ); - $mdb -> update( 'pp_articles_images', [ 'favorite' => !$status ], [ 'AND' => [ 'article_id' => $row['id'], 'id' => $image_id ] ] ); + $status = $mdb->get('pp_articles_images', 'favorite', ['AND' => ['article_id' => $row['id'], 'id' => $image_id]]); + $mdb->update('pp_articles_images', ['favorite' => !$status], ['AND' => ['article_id' => $row['id'], 'id' => $image_id]]); - \S::delete_dir( 'temp/' ); + \S::delete_dir('temp/'); return !$status; } } - public static function article_password( $article_id ) + public static function article_password($article_id) { global $mdb; - return $mdb -> get( 'pp_articles', 'password', [ 'id' => $article_id ] ); + return $mdb->get('pp_articles', 'password', ['id' => $article_id]); } - public static function articles_by_tags( $tag_id, $lang_id ) + public static function articles_by_tags($tag_id, $lang_id) { global $mdb; - if ( !$articles = \Cache::fetch( "articles_by_tags:$tag_id:$lang_id" ) ) + if (!$articles = \Cache::fetch("articles_by_tags:$tag_id:$lang_id")) { - $results = $mdb -> query( 'SELECT ' - . 'pa.id ' - . 'FROM ' - . 'pp_articles AS pa ' - . 'INNER JOIN pp_articles_tags AS pat ON pat.article_id = pa.id ' - . 'WHERE ' - . 'status = 1 ' - . 'AND ' - . 'tag_id = ' . (int)$tag_id ) -> fetchAll(); - if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) - $articles[] = \front\factory\Articles::article_details( $row['id'], $lang_id ); + $results = $mdb->query('SELECT ' + . 'pa.id ' + . 'FROM ' + . 'pp_articles AS pa ' + . 'INNER JOIN pp_articles_tags AS pat ON pat.article_id = pa.id ' + . 'WHERE ' + . 'status = 1 ' + . 'AND ' + . 'tag_id = ' . (int)$tag_id)->fetchAll(); + if (is_array($results) and !empty($results)) foreach ($results as $row) + $articles[] = \front\factory\Articles::article_details($row['id'], $lang_id); - \Cache::store( "articles_by_tags:$tag_id:$lang_id", $articles ); + \Cache::store("articles_by_tags:$tag_id:$lang_id", $articles); } return $articles; } - public static function tag_details( $tag_id ) + public static function tag_details($tag_id) { global $mdb; - if ( !$tag = \Cache::fetch( "tag_details:$tag_id" ) ) + if (!$tag = \Cache::fetch("tag_details:$tag_id")) { - $tag = $mdb -> get( 'pp_tags', '*', [ 'id' => (int)$tag_id ] ); + $tag = $mdb->get('pp_tags', '*', ['id' => (int)$tag_id]); - \Cache::store( "tag_details:$tag_id", $tag ); + \Cache::store("tag_details:$tag_id", $tag); } return $tag; } @@ -168,276 +186,294 @@ class Articles { global $mdb; - if ( !$tags = \Cache::fetch( 'tags' ) ) + if (!$tags = \Cache::fetch('tags')) { - $tags = $mdb -> query( 'SELECT ' - . 'name, COUNT( tag_id ) AS c ' - . 'FROM ' - . 'pp_tags AS pt ' - . 'INNER JOIN pp_articles_tags ON pt.id = tag_id ' - . 'GROUP BY ' - . 'tag_id ' - . 'ORDER BY ' - . 'c DESC ' - . 'LIMIT 20' - ) -> fetchAll(); + $tags = $mdb->query( + 'SELECT ' + . 'name, COUNT( tag_id ) AS c ' + . 'FROM ' + . 'pp_tags AS pt ' + . 'INNER JOIN pp_articles_tags ON pt.id = tag_id ' + . 'GROUP BY ' + . 'tag_id ' + . 'ORDER BY ' + . 'c DESC ' + . 'LIMIT 20' + )->fetchAll(); - \Cache::store( 'tags', $tags ); + \Cache::store('tags', $tags); } return $tags; } - public static function articles_by_date( $month, $year, $lang_id ) + public static function articles_by_date($month, $year, $lang_id) { global $mdb; - if ( !$articles = \Cache::fetch( "articles_by_date:$month:$year:$lang_id" ) ) + if (!$articles = \Cache::fetch("articles_by_date:$month:$year:$lang_id")) { - $results = $mdb -> query( 'SELECT ' - . 'id ' - . 'FROM ' - . 'pp_articles ' - . 'WHERE ' - . 'status = 1 ' - . 'AND ' - . '( ' - . '( date_start BETWEEN \'' . date( 'Y-m-d', strtotime( '01-' . $month . '-' . $year ) ) . '\' AND \'' . date( 'Y-m-t', strtotime( '01-' . $month . '-' . $year ) ) . '\' ) ' - . 'OR ' - . '( date_end BETWEEN \'' . date( 'Y-m-d', strtotime( '01-' . $month . '-' . $year ) ) . '\' AND \'' . date( 'Y-m-t', strtotime( '01-' . $month . '-' . $year ) ) . '\' ) ' - . 'OR ' - . '( date_start <= \'' . date( 'Y-m-t', strtotime( '01-' . $month . '-' . $year ) ) . '\' AND date_end >= \'' . date( 'Y-m-t', strtotime( '01-' . $month . '-' . $year ) ) . '\' ) ' - . ')' ) -> fetchAll(); - if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) - $articles[] = \front\factory\Articles::article_details( $row['id'], $lang_id ); + $results = $mdb->query('SELECT ' + . 'id ' + . 'FROM ' + . 'pp_articles ' + . 'WHERE ' + . 'status = 1 ' + . 'AND ' + . '( ' + . '( date_start BETWEEN \'' . date('Y-m-d', strtotime('01-' . $month . '-' . $year)) . '\' AND \'' . date('Y-m-t', strtotime('01-' . $month . '-' . $year)) . '\' ) ' + . 'OR ' + . '( date_end BETWEEN \'' . date('Y-m-d', strtotime('01-' . $month . '-' . $year)) . '\' AND \'' . date('Y-m-t', strtotime('01-' . $month . '-' . $year)) . '\' ) ' + . 'OR ' + . '( date_start <= \'' . date('Y-m-t', strtotime('01-' . $month . '-' . $year)) . '\' AND date_end >= \'' . date('Y-m-t', strtotime('01-' . $month . '-' . $year)) . '\' ) ' + . ')')->fetchAll(); + if (is_array($results) and !empty($results)) foreach ($results as $row) + $articles[] = \front\factory\Articles::article_details($row['id'], $lang_id); - \Cache::store( "articles_by_date:$month:$year:$lang_id", $articles ); + \Cache::store("articles_by_date:$month:$year:$lang_id", $articles); } return $articles; } - public static function news( $page_id, $limit = 6, $lang_id ) + public static function news($page_id, $limit = 6, $lang_id) { - $sort = \front\factory\Pages::page_sort( $page_id ); + $sort = \front\factory\Pages::page_sort($page_id); - $articles_id = \front\factory\Articles::artciles_id( (int)$page_id, $lang_id, $limit, $sort, 0 ); - if ( is_array( $articles_id ) and !empty( $articles_id ) ) foreach ( $articles_id as $article_id ) - $articles[] = \front\factory\Articles::article_details( $article_id, $lang_id ); + $articles_id = \front\factory\Articles::artciles_id((int)$page_id, $lang_id, $limit, $sort, 0); + if (is_array($articles_id) and !empty($articles_id)) foreach ($articles_id as $article_id) + $articles[] = \front\factory\Articles::article_details($article_id, $lang_id); return $articles; } - public static function get_image( $article, $skip_entry = false ) + public static function get_image($article, $skip_entry = false) { - if ( $article['language']['main_image'] ) + if ($article['language']['main_image']) { - if ( file_exists( substr( $article['language']['main_image'], 1, strlen( $article['language']['main_image'] ) ) ) ) + if (file_exists(substr($article['language']['main_image'], 1, strlen($article['language']['main_image'])))) return $article['language']['main_image']; } - if ( !$skip_entry ) + if (!$skip_entry) { $dom = new \DOMDocument(); - $dom -> loadHTML( mb_convert_encoding( $article['language']['entry'], 'HTML-ENTITIES', "UTF-8" ) ); - $images = $dom -> getElementsByTagName( 'img' ); - foreach ( $images as $img ) + $dom->loadHTML(mb_convert_encoding($article['language']['entry'], 'HTML-ENTITIES', "UTF-8")); + $images = $dom->getElementsByTagName('img'); + foreach ($images as $img) { - $src = $img -> getAttribute( 'src' ); - if ( file_exists( substr( $src, 1, strlen( $src ) ) ) ) + $src = $img->getAttribute('src'); + if (file_exists(substr($src, 1, strlen($src)))) return $src; } } $dom = new \DOMDocument(); - $dom -> loadHTML( mb_convert_encoding( $article['language']['text'], 'HTML-ENTITIES', "UTF-8" ) ); - $images = $dom -> getElementsByTagName( 'img' ); - foreach ( $images as $img ) + $dom->loadHTML(mb_convert_encoding($article['language']['text'], 'HTML-ENTITIES', "UTF-8")); + $images = $dom->getElementsByTagName('img'); + foreach ($images as $img) { - $src = $img -> getAttribute( 'src' ); - if ( file_exists( substr( $src, 1, strlen( $src ) ) ) ) + $src = $img->getAttribute('src'); + if (file_exists(substr($src, 1, strlen($src)))) return $src; } - if ( $article['images'] ) + if ($article['images']) return $article['images'][0]['src']; return false; } - public static function article_noindex( $article_id ) + public static function article_noindex($article_id) { global $mdb, $lang; - if ( !$noindex = \Cache::fetch( "article_noindex:$article_id:" . $lang[0] ) ) + if (!$noindex = \Cache::fetch("article_noindex:$article_id:" . $lang[0])) { - $noindex = $mdb -> get( 'pp_articles_langs', 'noindex', [ 'AND' => [ 'article_id' => (int)$article_id, 'lang_id' => $lang[0] ] ] ); + $noindex = $mdb->get('pp_articles_langs', 'noindex', ['AND' => ['article_id' => (int)$article_id, 'lang_id' => $lang[0]]]); - \Cache::store( "article_noindex:$article_id:" . $lang[0], $noindex ); + \Cache::store("article_noindex:$article_id:" . $lang[0], $noindex); } return $noindex; } - public static function page_articles( $page, $lang_id, $bs ) + public static function page_articles($page, $lang_id, $bs) { - $count = \front\factory\Articles::page_articles_count( $page['id'], $lang_id ); - $ls = ceil( $count / $page['articles_limit'] ); + $count = \front\factory\Articles::page_articles_count($page['id'], $lang_id); + $ls = ceil($count / $page['articles_limit']); - if ( $bs < 1 ) + if ($bs < 1) $bs = 1; - else if ( $bs > $ls ) + else if ($bs > $ls) $bs = $ls; - $from = $page['articles_limit'] * ( $bs - 1 ); + $from = $page['articles_limit'] * ($bs - 1); - if ( $from < 0 ) + if ($from < 0) $from = 0; - $results['articles'] = \front\factory\Articles::artciles_id( (int)$page['id'], $lang_id, (int)$page['articles_limit'], $page['sort_type'], $from ); + $results['articles'] = \front\factory\Articles::artciles_id((int)$page['id'], $lang_id, (int)$page['articles_limit'], $page['sort_type'], $from); $results['ls'] = $ls; return $results; } - public static function article_details( $article_id, $lang_id ) + public static function article_details($article_id, $lang_id) { global $mdb; - if ( !$article = \Cache::fetch( "article_details:$lang_id:$article_id" ) ) + if (!$article = \Cache::fetch("article_details:$lang_id:$article_id")) { - $article = $mdb -> get( 'pp_articles', '*', [ 'id' => (int)$article_id ] ); + $article = $mdb->get('pp_articles', '*', ['id' => (int)$article_id]); - $results = $mdb -> select( 'pp_articles_langs', '*', [ 'AND' => [ 'article_id' => (int)$article_id, 'lang_id' => $lang_id ] ] ); - if ( is_array( $results ) ) foreach ( $results as $row ) + $results = $mdb->select('pp_articles_langs', '*', ['AND' => ['article_id' => (int)$article_id, 'lang_id' => $lang_id]]); + if (is_array($results)) foreach ($results as $row) { - if ( $row['copy_from'] ) + if ($row['copy_from']) { - $results2 = $mdb -> select( 'pp_articles_langs', '*', [ 'AND' => [ 'article_id' => (int)$article_id, 'lang_id' => $row['copy_from'] ] ] ); - if ( is_array( $results2 ) ) foreach ( $results2 as $row2 ) + $results2 = $mdb->select('pp_articles_langs', '*', ['AND' => ['article_id' => (int)$article_id, 'lang_id' => $row['copy_from']]]); + if (is_array($results2)) foreach ($results2 as $row2) $article['language'] = $row2; } else $article['language'] = $row; - preg_match_all( \front\view\Site::container_pattern, $article['language']['entry'], $container_list ); - if ( is_array( $container_list[0] ) ) foreach( $container_list[0] as $container_list_tmp ) + preg_match_all(\front\view\Site::container_pattern, $article['language']['entry'], $container_list); + if (is_array($container_list[0])) foreach ($container_list[0] as $container_list_tmp) { - $container_list_tmp = explode( ':', $container_list_tmp ); - $article['language']['entry'] = str_replace( '[KONTENER:' . $container_list_tmp[1] . ']', \front\view\Scontainers::scontainer( $container_list_tmp[1] ), $article['language']['entry'] ); + $container_list_tmp = explode(':', $container_list_tmp); + $article['language']['entry'] = str_replace('[KONTENER:' . $container_list_tmp[1] . ']', \front\view\Scontainers::scontainer($container_list_tmp[1]), $article['language']['entry']); } - preg_match_all( \front\view\Site::container_pattern, $article['language']['text'], $container_list ); - if ( is_array( $container_list[0] ) ) foreach( $container_list[0] as $container_list_tmp ) + preg_match_all(\front\view\Site::container_pattern, $article['language']['text'], $container_list); + if (is_array($container_list[0])) foreach ($container_list[0] as $container_list_tmp) { - $container_list_tmp = explode( ':', $container_list_tmp ); - $article['language']['text'] = str_replace( '[KONTENER:' . $container_list_tmp[1] . ']', \front\view\Scontainers::scontainer( $container_list_tmp[1] ), $article['language']['text'] ); + $container_list_tmp = explode(':', $container_list_tmp); + $article['language']['text'] = str_replace('[KONTENER:' . $container_list_tmp[1] . ']', \front\view\Scontainers::scontainer($container_list_tmp[1]), $article['language']['text']); } } - $article['images'] = $mdb -> select( 'pp_articles_images', '*', [ 'article_id' => (int)$article_id, 'ORDER' => [ 'o' => 'ASC', 'id' => 'ASC' ] ] ); - $article['files'] = $mdb -> select( 'pp_articles_files', '*', [ 'article_id' => (int)$article_id ] ); - $article['pages'] = $mdb -> select( 'pp_articles_pages', 'page_id', [ 'article_id' => (int)$article_id ] ); - $article['tags'] = $mdb -> select( 'pp_tags', [ '[><]pp_articles_tags' => [ 'id' => 'tag_id' ] ], 'name', [ 'article_id' => (int)$article_id ] ); - $results = $mdb -> select( 'pp_articles_additional_params', [ '[><]pp_articles_additional_values' => [ 'id' => 'param_id' ] ], [ 'name', 'value', 'language_id' ], [ 'article_id' => (int)$article_id ] ); - if ( is_array( $results ) ) foreach ( $results as $row ) + $article['images'] = $mdb->select('pp_articles_images', '*', ['article_id' => (int)$article_id, 'ORDER' => ['o' => 'ASC', 'id' => 'ASC'] ] ); + // załączniki + $article['files'] = $mdb -> select( 'pp_articles_files', '*', [ 'article_id' => (int)$article_id, 'ORDER' => [ 'o' => 'ASC', 'id' => 'ASC'] ] ); + $article['pages'] = $mdb->select('pp_articles_pages', 'page_id', ['article_id' => (int)$article_id]); + $article['tags'] = $mdb->select('pp_tags', ['[><]pp_articles_tags' => ['id' => 'tag_id']], 'name', ['article_id' => (int)$article_id]); + $results = $mdb->select('pp_articles_additional_params', ['[><]pp_articles_additional_values' => ['id' => 'param_id']], ['name', 'value', 'language_id'], ['article_id' => (int)$article_id]); + if (is_array($results)) foreach ($results as $row) { - if ( !$row['language_id'] ) - $params[ $row['name'] ] = $row['value']; + if (!$row['language_id']) + $params[$row['name']] = $row['value']; else - $params[ $row['name'] ][$row['language_id']] = $row['value']; + $params[$row['name']][$row['language_id']] = $row['value']; } $article['params'] = $params; - \Cache::store( "article_details:$lang_id:$article_id", $article ); + \Cache::store("article_details:$lang_id:$article_id", $article); } return $article; } - public static function artciles_id( $page_id, $lang_id, $articles_limit, $sort_type, $from ) + public static function artciles_id($page_id, $lang_id, $articles_limit, $sort_type, $from) { global $mdb; - switch ( $sort_type ) + switch ($sort_type) { - case 0: $order = 'priority DESC, date_add ASC'; break; - case 1: $order = 'priority DESC, date_add DESC'; break; - case 2: $order = 'priority DESC, date_modify ASC'; break; - case 3: $order = 'priority DESC, date_modify DESC'; break; - case 4: $order = 'priority DESC, o ASC'; break; - case 5: $order = 'priority DESC, title ASC'; break; - case 6: $order = 'priority DESC, title DESC'; break; - default: $order = 'priority DESC, id ASC'; break; + case 0: + $order = 'priority DESC, date_add ASC'; + break; + case 1: + $order = 'priority DESC, date_add DESC'; + break; + case 2: + $order = 'priority DESC, date_modify ASC'; + break; + case 3: + $order = 'priority DESC, date_modify DESC'; + break; + case 4: + $order = 'priority DESC, o ASC'; + break; + case 5: + $order = 'priority DESC, title ASC'; + break; + case 6: + $order = 'priority DESC, title DESC'; + break; + default: + $order = 'priority DESC, id ASC'; + break; } - if ( !$output = \Cache::fetch( "artciles_id:$page_id:$lang_id:$order:$from:$articles_limit" ) ) + if (!$output = \Cache::fetch("artciles_id:$page_id:$lang_id:$order:$from:$articles_limit")) { - $results = $mdb -> query( 'SELECT * FROM ( ' - . 'SELECT ' - . 'a.id, date_modify, date_add, o, priority, ' - . '( CASE ' - . 'WHEN copy_from IS NULL THEN title ' - . 'WHEN copy_from IS NOT NULL THEN ( ' - . 'SELECT ' - . 'title ' - . 'FROM ' - . 'pp_articles_langs ' - . 'WHERE ' - . 'lang_id = al.copy_from AND article_id = a.id ' - . ') ' - . 'END ) AS title ' - . 'FROM ' - . 'pp_articles_pages AS ap ' - . 'INNER JOIN pp_articles AS a ON a.id = ap.article_id ' - . 'INNER JOIN pp_articles_langs AS al ON al.article_id = ap.article_id ' - . 'WHERE ' - . 'status = 1 AND page_id = ' . (int)$page_id . ' AND lang_id = \'' . $lang_id . '\' ' - . ') AS q1 ' - . 'WHERE ' - . 'q1.title IS NOT NULL ' - . 'ORDER BY ' - . 'q1.' . $order . ' ' - . 'LIMIT ' - . (int)$from . ',' . (int)$articles_limit ) -> fetchAll(); - if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) + $results = $mdb->query('SELECT * FROM ( ' + . 'SELECT ' + . 'a.id, date_modify, date_add, o, priority, ' + . '( CASE ' + . 'WHEN copy_from IS NULL THEN title ' + . 'WHEN copy_from IS NOT NULL THEN ( ' + . 'SELECT ' + . 'title ' + . 'FROM ' + . 'pp_articles_langs ' + . 'WHERE ' + . 'lang_id = al.copy_from AND article_id = a.id ' + . ') ' + . 'END ) AS title ' + . 'FROM ' + . 'pp_articles_pages AS ap ' + . 'INNER JOIN pp_articles AS a ON a.id = ap.article_id ' + . 'INNER JOIN pp_articles_langs AS al ON al.article_id = ap.article_id ' + . 'WHERE ' + . 'status = 1 AND page_id = ' . (int)$page_id . ' AND lang_id = \'' . $lang_id . '\' ' + . ') AS q1 ' + . 'WHERE ' + . 'q1.title IS NOT NULL ' + . 'ORDER BY ' + . 'q1.' . $order . ' ' + . 'LIMIT ' + . (int)$from . ',' . (int)$articles_limit)->fetchAll(); + if (is_array($results) and !empty($results)) foreach ($results as $row) $output[] = $row['id']; - \Cache::store( "artciles_id:$page_id:$lang_id:$order:$from:$articles_limit", $output ); + \Cache::store("artciles_id:$page_id:$lang_id:$order:$from:$articles_limit", $output); } return $output; } - public static function page_articles_count( $page_id, $lang_id ) + public static function page_articles_count($page_id, $lang_id) { global $mdb; - if ( !$output = \Cache::fetch( "page_articles_count:$page_id:$lang_id" ) ) + if (!$output = \Cache::fetch("page_articles_count:$page_id:$lang_id")) { - $results = $mdb -> query( 'SELECT COUNT(0) FROM ( ' - . 'SELECT ' - . 'a.id, ' - . '( CASE ' - . 'WHEN copy_from IS NULL THEN title ' - . 'WHEN copy_from IS NOT NULL THEN ( ' - . 'SELECT ' - . 'title ' - . 'FROM ' - . 'pp_articles_langs ' - . 'WHERE ' - . 'lang_id = al.copy_from AND article_id = a.id ' - . ') ' - . 'END ) AS title ' - . 'FROM ' - . 'pp_articles_pages AS ap ' - . 'INNER JOIN pp_articles AS a ON a.id = ap.article_id ' - . 'INNER JOIN pp_articles_langs AS al ON al.article_id = ap.article_id ' - . 'WHERE ' - . 'status = 1 AND page_id = ' . (int)$page_id . ' AND lang_id = \'' . $lang_id . '\' ' - . ') AS q1 ' - . 'WHERE ' - . 'q1.title IS NOT NULL' ) -> fetchAll(); + $results = $mdb->query('SELECT COUNT(0) FROM ( ' + . 'SELECT ' + . 'a.id, ' + . '( CASE ' + . 'WHEN copy_from IS NULL THEN title ' + . 'WHEN copy_from IS NOT NULL THEN ( ' + . 'SELECT ' + . 'title ' + . 'FROM ' + . 'pp_articles_langs ' + . 'WHERE ' + . 'lang_id = al.copy_from AND article_id = a.id ' + . ') ' + . 'END ) AS title ' + . 'FROM ' + . 'pp_articles_pages AS ap ' + . 'INNER JOIN pp_articles AS a ON a.id = ap.article_id ' + . 'INNER JOIN pp_articles_langs AS al ON al.article_id = ap.article_id ' + . 'WHERE ' + . 'status = 1 AND page_id = ' . (int)$page_id . ' AND lang_id = \'' . $lang_id . '\' ' + . ') AS q1 ' + . 'WHERE ' + . 'q1.title IS NOT NULL')->fetchAll(); $output = $results[0][0]; - \Cache::store( "page_articles_count:$page_id:$lang_id", $output ); + \Cache::store("page_articles_count:$page_id:$lang_id", $output); } return $output; } -} \ No newline at end of file +} diff --git a/autoload/front/factory/class.Settings.php b/autoload/front/factory/class.Settings.php index 9d37999..7a04550 100644 --- a/autoload/front/factory/class.Settings.php +++ b/autoload/front/factory/class.Settings.php @@ -6,19 +6,19 @@ class Settings public static function settings_details() { global $mdb; - + if ( !$settings = \Cache::fetch( 'settings_details' ) ) { $results = $mdb -> select( 'pp_settings', '*' ); if ( is_array( $results ) ) foreach ( $results as $row ) $settings[ $row['param'] ] = $row['value']; - + \Cache::store( 'settings_details', $settings ); } - + return $settings; } - + public static function visit_counter() { global $mdb; diff --git a/autoload/front/view/91hero.php b/autoload/front/view/91hero.php deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/front/view/class.Articles.php b/autoload/front/view/class.Articles.php index 8be6203..a06af80 100644 --- a/autoload/front/view/class.Articles.php +++ b/autoload/front/view/class.Articles.php @@ -10,7 +10,7 @@ class Articles $tpl -> $key = $val; return $tpl -> render( 'articles/password-view' ); } - + public static function map( $settings, $map_counter ) { $tpl = new \Tpl; @@ -18,34 +18,39 @@ class Articles $tpl -> map_counter = $map_counter; return $tpl -> render( 'articles/map' ); } - + public static function tags_cloud() { global $settings; - + if ( !$settings['tags'] ) return false; - + $tpl = new \Tpl; $tpl -> tags = \front\factory\Articles::tags(); return $tpl -> render( 'articles/tags-cloud' ); } - - public static function news( $page_id, $articles ) + + public static function news( $page_id, $articles, $template = '' ) { - $tpl = new \Tpl; - $tpl -> page_id = $page_id; - $tpl -> articles = $articles; - return $tpl -> render( 'articles/news' ); + if ( $template ) + $tpl = $template; + else + $tpl = 'articles/news'; + + return \Tpl::view( $tpl, [ + 'page_id' => $page_id, + 'articles' => $articles + ] ); } - + public static function articles_list( $articles ) { $tpl = new \Tpl; $tpl -> articles = $articles; return $tpl -> render( 'articles/articles-list' ); } - + public static function article( $values ) { $tpl = new \Tpl; @@ -53,26 +58,26 @@ class Articles $tpl -> $key = $val; return $tpl -> render( 'articles/article' ); } - + public static function article_full( $article_id, $lang_id ) { $tpl = new \Tpl; $tpl -> article = \front\factory\Articles::article_details( $article_id, $lang_id ); return $tpl -> render( 'articles/article-full' ); } - + public static function miniature_articles_list( $page, $lang_id, $bs = 1 ) { $results = \front\factory\Articles::page_articles( $page, $lang_id, $bs ); - + if ( is_array( $results['articles'] ) ) foreach ( $results['articles'] as $article ) $articles[] = \front\factory\Articles::article_details( $article, $lang_id ); - + $tpl = new \Tpl; $tpl -> page_id = $page['id']; $tpl -> articles = $articles; $out .= $tpl -> render( 'articles/articles-miniatures' ); - + if ( $results['ls'] > 1 ) { $tpl = new \Tpl; @@ -81,24 +86,24 @@ class Articles $tpl -> page = $page; $out .= $tpl -> render( 'site/pager' ); } - + return $out; } - + public static function entry_articles_list( $page, $lang_id, $bs = 1 ) { global $page; - + $results = \front\factory\Articles::page_articles( $page, $lang_id, $bs ); - + if ( is_array( $results['articles'] ) ) foreach ( $results['articles'] as $article ) $articles[] = \front\factory\Articles::article_details( $article, $lang_id ); - + $tpl = new \Tpl; $tpl -> page_id = $page['id']; $tpl -> articles = $articles; $out .= $tpl -> render( 'articles/articles-entries' ); - + if ( $results['ls'] > 1 ) { $tpl = new \Tpl; @@ -107,28 +112,29 @@ class Articles $tpl -> page = $page; $out .= $tpl -> render( 'site/pager' ); } - + return $out; } - + public static function full_articles_list( $page, $lang_id, $bs = 1 ) { $results = \front\factory\Articles::page_articles( $page, $lang_id, $bs ); - + if ( is_array( $results['articles'] ) ) foreach ( $results['articles'] as $article ) { $article_details = \front\factory\Articles::article_details( $article, $lang_id ); - + if ( $article_details['password'] and !\S::get_session( 'article-' . $article . '-' . $article_details['password'] ) ) $out .= \front\view\Articles::password_view( [ 'article' => $article ] ); else - { - $tpl = new \Tpl; - $tpl -> article = $article_details; - $out .= $tpl -> render( 'articles/article-full' ); + { + $out .= \Tpl::view( 'articles/article-full', [ + 'article' => $article_details, + 'table_of_contents' => \front\factory\Articles::generateTableOfContents( $article_details['language']['text'] ) + ] ); } } - + if ( $results['ls'] > 1 ) { $tpl = new \Tpl; @@ -137,7 +143,7 @@ class Articles $tpl -> page = $page; $out .= $tpl -> render( 'site/pager' ); } - + return $out; } } \ No newline at end of file diff --git a/autoload/front/view/class.Site.php b/autoload/front/view/class.Site.php index d7b8304..afafe2c 100644 --- a/autoload/front/view/class.Site.php +++ b/autoload/front/view/class.Site.php @@ -1,4 +1,5 @@ ', '', $html ); + if ($settings['google_search_console']) + $html = str_replace('', '', $html); - if ( \S::get_session( 'contrast' ) ) - $html = str_replace( '', '', $html ); + if (\S::get_session('contrast')) + $html = str_replace('', '', $html); - if ( $settings['facebook_link'] ) - $html = str_replace( '', \front\view\Site::facebook( $settings['facebook_link'] ) . '', $html ); + if ($settings['facebook_link']) + $html = str_replace('', \front\view\Site::facebook($settings['facebook_link']) . '', $html); - if ( strpos( $html, '[BANER_STRONA_GLOWNA]' ) === false ) - $html = str_replace( '', '[BANER_STRONA_GLOWNA]' . '', $html ); + if (strpos($html, '[BANER_STRONA_GLOWNA]') === false) + $html = str_replace('', '[BANER_STRONA_GLOWNA]' . '', $html); - if ( strpos( $html, '[WIDGET_TELEFON]' ) === false ) - $html = str_replace( '', '[WIDGET_TELEFON]' . '', $html ); + if (strpos($html, '[WIDGET_TELEFON]') === false) + $html = str_replace('', '[WIDGET_TELEFON]' . '', $html); - if ( $settings['ssl'] == true ) + if ($settings['ssl'] == true) { - $layout['css'] = str_replace( 'http://', 'https://', $layout['css'] ); - $layout['js'] = str_replace( 'http://', 'https://', $layout['js'] ); - $layout['m_css'] = str_replace( 'http://', 'https://', $layout['m_css'] ); - $layout['m_js'] = str_replace( 'http://', 'https://', $layout['m_js'] ); + $layout['css'] = str_replace('http://', 'https://', $layout['css']); + $layout['js'] = str_replace('http://', 'https://', $layout['js']); + $layout['m_css'] = str_replace('http://', 'https://', $layout['m_css']); + $layout['m_js'] = str_replace('http://', 'https://', $layout['m_js']); } - $html = str_replace( '[COPYRIGHT]', \front\view\Site::copyright(), $html ); - $html = str_replace( '[BANER_STRONA_GLOWNA]', \front\view\Banners::main_banner( \front\factory\Banners::main_banner() ), $html ); - $html = str_replace( '[BANERY]', \front\view\Banners::banners( \front\factory\Banners::banners() ), $html ); - $html = str_replace( '[LICZNIK_ODWIEDZIN]', \front\view\Site::visit_counter( \S::get_session( 'visits' ) ), $html ); - $html = str_replace( '[WYSZUKIWARKA]', \front\view\Search::search_form(), $html ); - $html = str_replace( '[CHMURA_TAGOW]', \front\view\Articles::tags_cloud(), $html ); - $html = str_replace( '[KONTRAST]', \front\view\Site::contrast(), $html ); - $html = str_replace( '[NEWSLETTER]', \front\view\Newsletter::newsletter(), $html ); - $html = str_replace( '[WIDGET_TELEFON]', $settings['widget_phone'] == 1 ? \front\view\Site::widget_phone() : '', $html ); + $html = str_replace('[COPYRIGHT]', \front\view\Site::copyright(), $html); + $html = str_replace('[BANER_STRONA_GLOWNA]', \front\view\Banners::main_banner(\front\factory\Banners::main_banner()), $html); + $html = str_replace('[BANERY]', \front\view\Banners::banners(\front\factory\Banners::banners()), $html); + $html = str_replace('[LICZNIK_ODWIEDZIN]', \front\view\Site::visit_counter(\S::get_session('visits')), $html); + $html = str_replace('[WYSZUKIWARKA]', \front\view\Search::search_form(), $html); + $html = str_replace('[CHMURA_TAGOW]', \front\view\Articles::tags_cloud(), $html); + $html = str_replace('[KONTRAST]', \front\view\Site::contrast(), $html); + $html = str_replace('[NEWSLETTER]', \front\view\Newsletter::newsletter(), $html); + $html = str_replace('[WIDGET_TELEFON]', $settings['widget_phone'] == 1 ? \front\view\Site::widget_phone() : '', $html); - if ( \S::is_mobile() and !empty( $layout['m_html'] ) ) - $html = str_replace( '[CSS]', $layout['m_css'], $html ); + if (\S::is_mobile() and !empty($layout['m_html'])) + $html = str_replace('[CSS]', $layout['m_css'], $html); else - $html = str_replace( '[CSS]', $layout['css'], $html ); + $html = str_replace('[CSS]', $layout['css'], $html); - if ( \S::is_mobile() and !empty( $layout['m_html'] ) ) - $html = str_replace( '[JAVA_SCRIPT]', $layout['m_js'], $html ); + if (\S::is_mobile() and !empty($layout['m_html'])) + $html = str_replace('[JAVA_SCRIPT]', $layout['m_js'], $html); else - $html = str_replace( '[JAVA_SCRIPT]', $layout['js'], $html ); + $html = str_replace('[JAVA_SCRIPT]', $layout['js'], $html); - preg_match_all( self::menu_pattern, $html, $menu ); - if ( is_array( $menu[0] ) ) foreach( $menu[0] as $menu_tmp ) + preg_match_all(self::menu_pattern, $html, $menu); + if (is_array($menu[0])) foreach ($menu[0] as $menu_tmp) { - $menu_tmp = explode( ':', $menu_tmp ); - $html = str_replace( '[MENU:' . $menu_tmp[1] . ']', \front\view\Menu::menu( - \front\factory\Menu::menu_details( $menu_tmp[1] ), $page['id'] - ), $html ); + $menu_tmp = explode(':', $menu_tmp); + $html = str_replace('[MENU:' . $menu_tmp[1] . ']', \front\view\Menu::menu( + \front\factory\Menu::menu_details($menu_tmp[1]), + $page['id'] + ), $html); } - preg_match_all( self::main_menu_pattern, $html, $menu ); - if ( is_array( $menu[0] ) ) foreach( $menu[0] as $menu_tmp ) + preg_match_all(self::main_menu_pattern, $html, $menu); + if (is_array($menu[0])) foreach ($menu[0] as $menu_tmp) { - $menu_tmp = explode( ':', $menu_tmp ); - $html = str_replace( '[MENU_GLOWNE:' . $menu_tmp[1] . ']', \front\view\Menu::main_menu( - \front\factory\Menu::menu_details( $menu_tmp[1] ), $page['id'] - ), $html ); + $menu_tmp = explode(':', $menu_tmp); + $html = str_replace('[MENU_GLOWNE:' . $menu_tmp[1] . ']', \front\view\Menu::main_menu( + \front\factory\Menu::menu_details($menu_tmp[1]), + $page['id'] + ), $html); } - preg_match_all( self::submenu_pattern, $html, $submenu ); - if ( is_array( $submenu[0] ) ) foreach( $submenu[0] as $submenu_tmp ) + preg_match_all(self::submenu_pattern, $html, $submenu); + if (is_array($submenu[0])) foreach ($submenu[0] as $submenu_tmp) { - $submenu_tmp = explode( ':', $submenu_tmp ); - $html = str_replace( '[SUBMENU:' . $submenu_tmp[1] . ']', \front\view\Menu::submenu( - \front\factory\Menu::submenu_details( $submenu_tmp[1] ), $page['id'], $submenu_tmp[1] - ), $html ); + $submenu_tmp = explode(':', $submenu_tmp); + $html = str_replace('[SUBMENU:' . $submenu_tmp[1] . ']', \front\view\Menu::submenu( + \front\factory\Menu::submenu_details($submenu_tmp[1], $lang_id), + $page['id'], + $submenu_tmp[1] + ), $html); } - preg_match_all( self::container_pattern, $html, $container_list ); - if ( is_array( $container_list[0] ) ) foreach( $container_list[0] as $container_list_tmp ) + preg_match_all(self::container_pattern, $html, $container_list); + if (is_array($container_list[0])) foreach ($container_list[0] as $container_list_tmp) { - $container_list_tmp = explode( ':', $container_list_tmp ); - $html = str_replace( '[KONTENER:' . $container_list_tmp[1] . ']', \front\view\Scontainers::scontainer( $container_list_tmp[1] ), $html ); + $container_list_tmp = explode(':', $container_list_tmp); + $html = str_replace('[KONTENER:' . $container_list_tmp[1] . ']', \front\view\Scontainers::scontainer($container_list_tmp[1]), $html); } - $html = str_replace( '[ZAWARTOSC]', \front\controls\Site::route(), $html ); + $html = str_replace('[ZAWARTOSC]', \front\controls\Site::route(), $html); preg_match_all( self::news_pattern, $html, $news_list ); - if ( is_array( $news_list[0] ) ) foreach( $news_list[0] as $news_list_tmp ) + if ( is_array( $news_list[0] ) ) { - $news_list_tmp = explode( ':', $news_list_tmp ); + foreach ( $news_list[0] as $index => $news_list_tmp ) + { + $id = $news_list[1][$index]; + $limit = $news_list[2][$index] ?: $settings['news_limit']; + $extra = $news_list[3][$index] ?? ''; - $news_list_tmp[2] != '' ? $news_limit = $news_list_tmp[2] : $news_limit = $settings['news_limit']; + $pattern_parts = ['AKTUALNOSCI', $id]; + if ($news_list[2][$index] !== '') $pattern_parts[] = $limit; + if ($extra !== '') $pattern_parts[] = $extra; + $pattern = '[' . implode(':', $pattern_parts) . ']'; - $news_list_tmp[2] != '' ? $pattern = '[AKTUALNOSCI:' . $news_list_tmp[1] . ':' . $news_list_tmp[2] . ']' : $pattern = '[AKTUALNOSCI:' . $news_list_tmp[1] . ']'; - $html = str_replace( $pattern, \front\view\Articles::news( - $news_list_tmp[1], - \front\factory\Articles::news( $news_list_tmp[1], $news_limit, $lang_id ) - ), $html ); + $html = str_replace( + $pattern, + \front\view\Articles::news( $id, \front\factory\Articles::news( $id, $limit, $lang_id ), $extra ), + $html + ); + } } // prosta lista aktualności z wybranej podstrony - preg_match_all( self::news_list_pattern, $html, $news_list ); - if ( is_array( $news_list[0] ) ) foreach( $news_list[0] as $news_list_tmp ) + preg_match_all(self::news_list_pattern, $html, $news_list); + if (is_array($news_list[0])) foreach ($news_list[0] as $news_list_tmp) { - $news_list_tmp = explode( ':', $news_list_tmp ); + $news_list_tmp = explode(':', $news_list_tmp); $news_list_tmp[2] != '' ? $news_limit = $news_list_tmp[2] : $news_limit = $settings['news_limit']; $news_list_tmp[2] != '' ? $pattern = '[AKTUALNOSCI_LISTA:' . $news_list_tmp[1] . ':' . $news_list_tmp[2] . ']' : $pattern = '[AKTUALNOSCI_LISTA:' . $news_list_tmp[1] . ']'; - $news_list = \Article::getNews( $news_list_tmp[1], $news_limit, $lang_id ); - $view_news_list = \Article::newsList( $news_list ); - $html = str_replace( $pattern, $view_news_list, $html ); + $news_list = \Article::getNews($news_list_tmp[1], $news_limit, $lang_id); + $view_news_list = \Article::newsList($news_list); + $html = str_replace($pattern, $view_news_list, $html); } // prosta lista z najpopularniejszymi artykułami - preg_match_all( self::top_news_pattern, $html, $news_list ); - if ( is_array( $news_list[0] ) ) foreach( $news_list[0] as $news_list_tmp ) + preg_match_all(self::top_news_pattern, $html, $news_list); + if (is_array($news_list[0])) foreach ($news_list[0] as $news_list_tmp) { - $news_list_tmp = explode( ':', $news_list_tmp ); + $news_list_tmp = explode(':', $news_list_tmp); $news_list_tmp[2] != '' ? $news_limit = $news_list_tmp[2] : $news_limit = $settings['news_limit']; $news_list_tmp[2] != '' ? $pattern = '[NAJPOULARNIEJSZE_ARTYKULY:' . $news_list_tmp[1] . ':' . $news_list_tmp[2] . ']' : $pattern = '[NAJPOULARNIEJSZE_ARTYKULY:' . $news_list_tmp[1] . ']'; - $news_list = \Article::getTopNews( $news_list_tmp[1], $news_limit, $lang_id ); - $view_news_list = \Article::newsList( $news_list ); - $html = str_replace( $pattern, $view_news_list, $html ); + $news_list = \Article::getTopNews($news_list_tmp[1], $news_limit, $lang_id); + $view_news_list = \Article::newsList($news_list); + $html = str_replace($pattern, $view_news_list, $html); } - preg_match_all( self::language_pattern, $html, $language_list ); - if ( is_array( $language_list[0] ) ) foreach( $language_list[0] as $language_list_tmp ) + preg_match_all(self::language_pattern, $html, $language_list); + if (is_array($language_list[0])) foreach ($language_list[0] as $language_list_tmp) { - $language_list_tmp = explode( ':', $language_list_tmp ); - $html = str_replace( '[LANG:' . $language_list_tmp[1] . ']', \S::lang( $language_list_tmp[1] ), $html ); + $language_list_tmp = explode(':', $language_list_tmp); + $html = str_replace('[LANG:' . $language_list_tmp[1] . ']', \S::lang($language_list_tmp[1]), $html); } - if ( \S::get( 'article' ) ) + if (\S::get('article')) { - $article = \front\factory\Articles::article_details( \S::get( 'article' ), $lang_id ); + $article = \front\factory\Articles::article_details(\S::get('article'), $lang_id); $title = $article['language']['meta_title'] ? $article['language']['meta_title'] : $article['language']['title']; $meta_keywords = $article['language']['meta_keywords']; $meta_description = $article['language']['meta_description']; $og_image = $article['language']['main_image'] ? $article['language']['main_image'] : null; } - else if ( \S::get( 'tag' ) ) + else if (\S::get('tag')) { - $tag = \front\factory\Articles::tag_details( \S::get( 'tag' ) ); + $tag = \front\factory\Articles::tag_details(\S::get('tag')); $title = 'Tag: ' . $tag['name']; $meta_keywords = $tag['name']; $meta_description = 'Artykuły oznaczone tagiem: ' . $tag['name']; } - else if ( \S::get( 'search' ) ) + else if (\S::get('search')) { - $title = 'Wyniki wyszukiwania: ' . \S::get_session( 'search_txt' ); - $meta_keywords = \S::get_session( 'search_txt' ); - $meta_description = 'Wyniki wyszukiwania: ' . \S::get_session( 'search_txt' ); + $title = 'Wyniki wyszukiwania: ' . \S::get_session('search_txt'); + $meta_keywords = \S::get_session('search_txt'); + $meta_description = 'Wyniki wyszukiwania: ' . \S::get_session('search_txt'); } else { - if ( $page['language']['meta_title'] ) + if ($page['language']['meta_title']) $title = $page['language']['meta_title']; else $title = $page['language']['title'] . ' ● ' . $settings['firm_name']; @@ -204,80 +217,80 @@ class Site } $seo_additional = \front\factory\SeoAdditional::seo_active(); - if ( is_array( $seo_additional ) and count( $seo_additional ) ) foreach ( $seo_additional as $seo ) + if (is_array($seo_additional) and count($seo_additional)) foreach ($seo_additional as $seo) { - preg_match( '/' . str_replace( '/', '\/', $seo['url'] ) . '/', $_SERVER['REQUEST_URI'], $seo_results ); - if ( is_array( $seo_results ) and count( $seo_results ) ) + preg_match('/' . str_replace('/', '\/', $seo['url']) . '/', $_SERVER['REQUEST_URI'], $seo_results); + if (is_array($seo_results) and count($seo_results)) { - if ( $seo['title'] ) + if ($seo['title']) $title = $seo['title']; - if ( $seo['keywords'] ) + if ($seo['keywords']) $meta_keywords = $seo['keywords']; - if ( $meta_description ) + if ($meta_description) $meta_description = $seo['description']; - if ( $seo['text'] ) - $html = str_replace( '[DODATKOWA_TRESC]', '
      ' . $seo['text'] . '
      ', $html ); + if ($seo['text']) + $html = str_replace('[DODATKOWA_TRESC]', '
      ' . $seo['text'] . '
      ', $html); else - $html = str_replace( '[DODATKOWA_TRESC]', '', $html ); + $html = str_replace('[DODATKOWA_TRESC]', '', $html); } } - $html = str_replace( '[DODATKOWA_TRESC]', '', $html ); - $html = str_replace( '[TITLE]', $title, $html ); - $html = str_replace( '[META_KEYWORDS]', $meta_keywords, $html ); - $html = str_replace( '[META_DESCRIPTION]', $meta_description, $html ); - $html = str_replace( '[OG_URL]', $domain_prefix . '://' . $www . $url . $_SERVER["REQUEST_URI"], $html ); - $html = str_replace( '[OG_IMG]', $og_image ? ( $domain_prefix . '://' . $www . $url . '/' . $og_image ) : '', $html ); - $html = str_replace( '[JEZYKI]', \front\view\Languages::languages(), $html ); - $html = str_replace( '[KALENDARZ]', \front\view\Site::calendar(), $html ); - $html = str_replace( '[TYTUL_STRONY]', \front\view\Site::title( - $page['language']['title'], - $page['show_title'], - $page['language']['site_title'] - ), $html ); - $html = str_replace( '[STRONA_GLOWNA]', \front\factory\Pages::lang_url( - \front\factory\Pages::main_page_id(), - $lang_id, - \S::get_domain( $_SERVER['HTTP_HOST'] ), - \front\factory\Languages::default_domain() - ), $html ); + $html = str_replace('[DODATKOWA_TRESC]', '', $html); + $html = str_replace('[TITLE]', $title, $html); + $html = str_replace('[META_KEYWORDS]', $meta_keywords, $html); + $html = str_replace('[META_DESCRIPTION]', $meta_description, $html); + $html = str_replace('[OG_URL]', $domain_prefix . '://' . $www . $url . $_SERVER["REQUEST_URI"], $html); + $html = str_replace('[OG_IMG]', $og_image ? ($domain_prefix . '://' . $www . $url . '/' . $og_image) : '', $html); + $html = str_replace('[JEZYKI]', \front\view\Languages::languages(), $html); + $html = str_replace('[KALENDARZ]', \front\view\Site::calendar(), $html); + $html = str_replace('[TYTUL_STRONY]', \front\view\Site::title( + $page['language']['title'], + $page['show_title'], + $page['language']['site_title'] + ), $html); + $html = str_replace('[STRONA_GLOWNA]', \front\factory\Pages::lang_url( + \front\factory\Pages::main_page_id(), + $lang_id, + \S::get_domain($_SERVER['HTTP_HOST']), + \front\factory\Languages::default_domain() + ), $html); - preg_match_all( self::article_pattern, $html, $articles_list ); - if ( is_array( $articles_list[0] ) ) foreach( $articles_list[0] as $article_tmp ) + preg_match_all(self::article_pattern, $html, $articles_list); + if (is_array($articles_list[0])) foreach ($articles_list[0] as $article_tmp) { - $article_tmp = explode( ':', $article_tmp ); - $html = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', \front\view\Articles::article_full( $article_tmp[1], $lang_id ), $html ); + $article_tmp = explode(':', $article_tmp); + $html = str_replace('[ARTYKUL:' . $article_tmp[1] . ']', \front\view\Articles::article_full($article_tmp[1], $lang_id), $html); } /* atrybut noindex */ - if ( \S::get( 'article' ) ) + if (\S::get('article')) { - \front\factory\Articles::article_noindex( \S::get( 'article' ) ) === '1' ? $noindex = 'noindex' : $noindex = 'index, follow'; - $html = str_replace( '[META_INDEX]', '', $html ); + \front\factory\Articles::article_noindex(\S::get('article')) === '1' ? $noindex = 'noindex' : $noindex = 'index, follow'; + $html = str_replace('[META_INDEX]', '', $html); } else { $page['language']['noindex'] === '1' ? $noindex = 'noindex' : $noindex = 'index, follow'; - $html = str_replace( '[META_INDEX]', '', $html ); + $html = str_replace('[META_INDEX]', '', $html); } - if ( $page['language']['canonical'] ) - $html = str_replace( '', '', $html ); + if ($page['language']['canonical']) + $html = str_replace('', '', $html); - while ( strpos( $html, '[PHP]' ) !== false ) + while (strpos($html, '[PHP]') !== false) { - $text = explode( '[PHP]', $html ); + $text = explode('[PHP]', $html); $before = $text[0]; - for ( $i = 1; $i < count( $text ); $i++ ) + for ($i = 1; $i < count($text); $i++) { - $temp = explode( '[/PHP]' , $text[$i] ); + $temp = explode('[/PHP]', $text[$i]); $code = $temp[0]; ob_start(); - eval( str_replace( ''', '"', $code ) ); + eval(str_replace(''', '"', $code)); $out .= ob_get_contents(); ob_end_clean(); @@ -286,19 +299,19 @@ class Site $html = $before . $out; } - preg_match_all( self::maps_pattern, $html, $maps_list ); - if ( is_array( $maps_list[1] ) and !empty( $maps_list[1] ) ) + preg_match_all(self::maps_pattern, $html, $maps_list); + if (is_array($maps_list[1]) and !empty($maps_list[1])) { - $html = strrev( implode( strrev( '' ), explode( strrev( '' ), strrev( $html ), 2 ) ) ); - foreach( $maps_list[1] as $map_tmp ) + $html = strrev(implode(strrev(''), explode(strrev(''), strrev($html), 2))); + foreach ($maps_list[1] as $map_tmp) { ++$map_counter; - $map_settings = explode( '|', $map_tmp ); - $html = str_replace( '[MAPA]' . $map_tmp . '[/MAPA]', \front\view\Articles::map( $map_settings, $map_counter ), $html ); + $map_settings = explode('|', $map_tmp); + $html = str_replace('[MAPA]' . $map_tmp . '[/MAPA]', \front\view\Articles::map($map_settings, $map_counter), $html); } } - $html = str_replace( '[ALERT]', \front\view\Site::alert(), $html ); + $html = str_replace('[ALERT]', \front\view\Site::alert(), $html); return $html; } @@ -306,91 +319,90 @@ class Site public static function widget_phone() { $tpl = new \Tpl; - return $tpl -> render( 'widgets/widget-phone' ); + return $tpl->render('widgets/widget-phone'); } - public static function facebook( $facebook_link ) + public static function facebook($facebook_link) { $tpl = new \Tpl; - $tpl -> facebook_link = $facebook_link; - return $tpl -> render( 'site/facebook' ); + $tpl->facebook_link = $facebook_link; + return $tpl->render('site/facebook'); } - public static function title( $title, $show_title, $site_title ) + public static function title($title, $show_title, $site_title) { - if ( !$show_title ) + if (!$show_title) return false; - if ( $site_title ) + if ($site_title) $title = $site_title; $tpl = new \Tpl; - $tpl -> title = $title; - return $tpl -> render( 'site/title' ); + $tpl->title = $title; + return $tpl->render('site/title'); } static public function alert() { - if ( $alert = \S::get_session( 'alert' ) ) + if ($alert = \S::get_session('alert')) { - \S::delete_session( 'alert' ); - \S::delete_session( 'alert-class' ); + \S::delete_session('alert'); + \S::delete_session('alert-class'); - return \Tpl::view( 'site/alert', [ + return \Tpl::view('site/alert', [ 'alert' => $alert, - 'alert_class' => \S::get_session( 'alert-class' ) - ] ); + 'alert_class' => \S::get_session('alert-class') + ]); } } public static function copyright() { $tpl = new \Tpl; - return $tpl -> render( 'site/copyright' ); + return $tpl->render('site/copyright'); } public static function contact() { $tpl = new \Tpl; - return $tpl -> render( 'site/contact' ); + return $tpl->render('site/contact'); } public static function cookie_information() { $tpl = new \Tpl; - return $tpl -> render( 'site/cookie-information' ); + return $tpl->render('site/cookie-information'); } - public static function calendar( $month = '', $year = '', $ajax = false ) + public static function calendar($month = '', $year = '', $ajax = false) { global $settings, $lang_id; - if ( !$settings['calendar'] ) + if (!$settings['calendar']) return false; - if ( !$month ) $month = date( 'n' ); - if ( !$year ) $year = date( 'Y' ); + if (!$month) $month = date('n'); + if (!$year) $year = date('Y'); $tpl = new \Tpl; - $tpl -> month = $month; - $tpl -> year = $year; - $tpl -> months = \S::months(); - $tpl -> ajax = $ajax; - $tpl -> articles = \front\factory\Articles::articles_by_date( $month, $year, $lang_id ); - return $tpl -> render( 'site/calendar' ); + $tpl->month = $month; + $tpl->year = $year; + $tpl->months = \S::months(); + $tpl->ajax = $ajax; + $tpl->articles = \front\factory\Articles::articles_by_date($month, $year, $lang_id); + return $tpl->render('site/calendar'); } - public static function visit_counter( $visit_counter ) + public static function visit_counter($visit_counter) { $tpl = new \Tpl; - $tpl -> visit_counter = $visit_counter; - return $tpl -> render( 'site/visit-counter' ); + $tpl->visit_counter = $visit_counter; + return $tpl->render('site/visit-counter'); } public static function contrast() { $tpl = new \Tpl; - return $tpl -> render( 'site/contrast' ); + return $tpl->render('site/contrast'); } } -?> diff --git a/layout/style-css/style.css b/layout/style-css/style.css index 1d1f7df..73ab444 100644 --- a/layout/style-css/style.css +++ b/layout/style-css/style.css @@ -1 +1 @@ -@import"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap";body{font-family:"Open Sans",sans-serif;font-size:15px}body.noscroll{position:fixed;overflow:hidden}.scontainer-content h2{font-size:18px;font-weight:600}.box-border{padding:25px;border:1px solid #f0f0f0;border-radius:3px}@media(max-width: 767px){.box-border{padding:15px}.box-border .col-md-3{flex:0 0 25% !important;max-width:25% !important}.box-border .col-md-9{flex:0 0 75% !important;max-width:75% !important}}.fac{display:flex;flex-wrap:wrap;align-items:center;align-self:center}.fac .row{width:100%;padding:10px 0}.fac .row p{margin-bottom:0}.box-top,#scontainer-12,#scontainer-11,.box-contact #scontainer-8,.box-main #scontainer-8{padding-top:75px}.box{padding:75px 0}@media(max-width: 767px){.box{padding:50px 0}}@media(max-width: 767px){.box{padding:25px 0}}.box .box-title,.box .article .article-title,.article .box .article-title{text-align:center;font-size:22px;position:relative;margin:0 auto 75px;display:flex;justify-content:center}@media(max-width: 767px){.box .box-title,.box .article .article-title,.article .box .article-title{margin-bottom:25px}}.box .box-title .title,.box .article .article-title .title,.article .box .article-title .title{padding-bottom:15px;border-bottom:2px solid #f0f0f0;position:relative;font-size:32px}@media(max-width: 575px){.box .box-title .title,.box .article .article-title .title,.article .box .article-title .title{font-size:22px}}.box .box-title .title::after,.box .article .article-title .title::after,.article .box .article-title .title::after{content:"";display:block;width:60%;bottom:-2px;position:absolute;left:0;border-bottom:2px solid #22a9e1}.top{background:#f0f0f0;color:#000;padding:10px 0;position:relative}.top #scontainer-1 img{margin-right:5px}.top #scontainer-2{display:flex;justify-content:flex-end}.top #scontainer-2 a{color:#000;font-size:14px}.top #scontainer-2 a:hover{text-decoration:none}.top p{margin:0}.top .language{position:absolute;top:0;right:5px;bottom:0;z-index:999}@media(max-width: 767px){.top .language{top:65px}}.top .language #languages{height:100%}.top .language #languages .container{height:100%}.top .language #languages .container .row{height:100%}.top .language #languages ul{display:flex;align-items:center;margin:0;padding:0;list-style:none;height:100%}.top .language #languages ul li{margin:0 5px}.top .language #languages ul li:first-child{margin-left:0}.top .language #languages ul li:last-child{margin-right:0}.top .language #languages ul li.active{display:none}.top .language #languages ul li a img{height:16px}.header{padding:25px 0}.header .col-lg-3{width:100% !important;flex:0 0 100%;max-width:100%}.header .logo{display:block;width:100%;max-width:300px;margin:0 auto 25px}.header .logo img{width:100%;max-width:387px}.header #main-menu-btn{height:50px;width:50px;position:fixed;bottom:10px;right:10px;color:#fff;background:#000;display:none;z-index:9999;line-height:50px;cursor:pointer;border-radius:50%;align-items:center;justify-content:center;font-size:30px}@media(max-width: 767px){.header #main-menu-btn{display:flex}}.header .main-menu-container{display:flex;align-items:center;justify-content:center;width:100% !important;flex:0 0 100%;max-width:100%}@media(max-width: 1199px){.header .main-menu-container{justify-content:center}}@media(max-width: 767px){.header #main-menu{display:none}.header #main-menu.visible{display:block;position:fixed;top:0;left:0;height:100%;width:100%;background:#fff;z-index:20;overflow-y:scroll}.header #main-menu.visible #menu-container-1{display:flex;width:100%;height:100%;align-items:center;justify-content:center}.header #main-menu.visible #menu-container-1>ul{display:block;width:100%;text-align:center;padding:20px;border:1px solid #f0f0f0;border-radius:3px;height:100%}.header #main-menu.visible #menu-container-1>ul li ul{position:static;background:#fff}}@media(min-width: 768px){.header #main-menu.sticky{position:fixed;top:0;left:0;width:100%;background:#fff;z-index:50}.header #main-menu.sticky #menu-container-1>ul{justify-content:center;height:75px;align-items:center}}.header #main-menu ul{display:flex;margin:0;padding:0;justify-content:flex-end;list-style-type:none}@media(max-width: 767px){.header #main-menu ul{width:100%}}.header #main-menu ul.level-0{flex-wrap:wrap;justify-content:center}.header #main-menu ul li{position:relative;display:flex;align-items:center}.header #main-menu ul li#link-1{display:none}@media(min-width: 768px){.header #main-menu ul li#link-73{position:absolute;top:-70px;right:0}}.header #main-menu ul li.li-level-1 a{width:calc(100% - 18px)}@media(max-width: 767px){.header #main-menu ul li.li-level-1 a{width:calc(100% - 32px);color:#000;text-align:left;border:0 solid #000}}.header #main-menu ul li.li-level-1 i{color:#fff;margin-right:10px}@media(max-width: 767px){.header #main-menu ul li.li-level-1 i{color:#000;margin-right:0}}@media(max-width: 767px){.header #main-menu ul li{justify-content:space-between;flex-wrap:wrap}}.header #main-menu ul li i{font-size:13px;margin-right:5px;display:flex;height:32px;width:32px;align-items:center;justify-content:center}@media(min-width: 768px){.header #main-menu ul li i{width:13px}}@media(max-width: 767px){.header #main-menu ul li i{margin-right:0}}.header #main-menu ul li a{display:block;padding:5px 10px;color:#000;transition:all .5s ease;font-size:15px;white-space:nowrap}@media(min-width: 992px)and (max-width: 1199px){.header #main-menu ul li a{padding:5px 6px}}.header #main-menu ul li a:hover{text-decoration:none;color:#90d4f0}@media(min-width: 768px){.header #main-menu ul li:hover>ul{display:block}}@media(max-width: 767px){.header #main-menu ul li.active>ul{display:block}}.header #main-menu ul li>ul{display:none;position:absolute;top:calc(100% - 1px);left:0;background:rgba(0,0,0,.8);z-index:50}.header #main-menu ul li>ul li a{border-bottom:1px solid #262626;color:#fff;padding:10px 25px;font-size:14px}@media(min-width: 768px){.header #main-menu ul li>ul li:hover>ul{display:block}}.header #main-menu ul li>ul li ul{position:absolute;background:rgba(0,0,0,.85);left:99%;top:0;display:none}@media(max-width: 767px){.header #main-menu ul li>ul li ul{padding-left:25px}}.header #main-menu ul li>ul li ul li a{padding-left:20px}.header #main-menu ul li>ul li ul ul{background:rgba(0,0,0,.9)}.carousel-banner{position:relative}.carousel-banner .wosp{position:absolute;bottom:25px;left:25px;z-index:99}.carousel-banner .wosp img{max-width:150px}@media(max-width: 767px){.carousel-banner .wosp img{max-width:100px}}.carousel-banner .slider .item img{width:100%;-o-object-fit:cover;object-fit:cover}#scontainer-4 .col-md-6,#scontainer-14 .col-md-6{position:relative;overflow:hidden;height:550px;margin-bottom:30px}#scontainer-4 .col-md-6 p:first-child,#scontainer-14 .col-md-6 p:first-child{display:block;height:550px;overflow:hidden}#scontainer-4 .col-md-6 img,#scontainer-14 .col-md-6 img{transition:all .5s ease;height:100%;width:100%;-o-object-fit:cover;object-fit:cover}#scontainer-4 .col-md-6:hover img,#scontainer-14 .col-md-6:hover img{transform:scale(1.1)}#scontainer-4 .col-md-6 h2,#scontainer-14 .col-md-6 h2{position:absolute;bottom:85px;font-weight:600;font-size:52px;width:calc(100% - 30px);color:#fff;text-transform:uppercase}#scontainer-4 .col-md-6 h2 a,#scontainer-14 .col-md-6 h2 a{color:#fff}#scontainer-4 .col-md-6 p,#scontainer-14 .col-md-6 p{margin:0;padding:0}#scontainer-4 .col-md-6 .btn,#scontainer-14 .col-md-6 .btn{position:absolute;bottom:35px;background:#22a9e1;color:#fff;border:0;transition:all .5s ease;transform:translateX(-50%);padding:10px 25px;border-radius:0}#scontainer-4 .col-md-6 .btn:hover,#scontainer-14 .col-md-6 .btn:hover{background:#000}#scontainer-16 .col-md-6,#scontainer-18 .col-md-6,#scontainer-20 .col-md-6,#scontainer-22 .col-md-6,#scontainer-23 .col-md-6,#scontainer-25 .col-md-6,#scontainer-26 .col-md-6,#scontainer-27 .col-md-6,#scontainer-29 .col-md-6,#scontainer-31 .col-md-6{position:relative;overflow:hidden;height:550px;margin-bottom:30px;padding-bottom:100px}#scontainer-16 .col-md-6 p:first-child,#scontainer-18 .col-md-6 p:first-child,#scontainer-20 .col-md-6 p:first-child,#scontainer-22 .col-md-6 p:first-child,#scontainer-23 .col-md-6 p:first-child,#scontainer-25 .col-md-6 p:first-child,#scontainer-26 .col-md-6 p:first-child,#scontainer-27 .col-md-6 p:first-child,#scontainer-29 .col-md-6 p:first-child,#scontainer-31 .col-md-6 p:first-child{display:block;height:550px;overflow:hidden}#scontainer-16 .col-md-6 img,#scontainer-18 .col-md-6 img,#scontainer-20 .col-md-6 img,#scontainer-22 .col-md-6 img,#scontainer-23 .col-md-6 img,#scontainer-25 .col-md-6 img,#scontainer-26 .col-md-6 img,#scontainer-27 .col-md-6 img,#scontainer-29 .col-md-6 img,#scontainer-31 .col-md-6 img{transition:all .5s ease;height:100%;width:100%;-o-object-fit:contain;object-fit:contain}#scontainer-16 .col-md-6:hover img,#scontainer-18 .col-md-6:hover img,#scontainer-20 .col-md-6:hover img,#scontainer-22 .col-md-6:hover img,#scontainer-23 .col-md-6:hover img,#scontainer-25 .col-md-6:hover img,#scontainer-26 .col-md-6:hover img,#scontainer-27 .col-md-6:hover img,#scontainer-29 .col-md-6:hover img,#scontainer-31 .col-md-6:hover img{transform:scale(1.1)}#scontainer-16 .col-md-6 h2,#scontainer-18 .col-md-6 h2,#scontainer-20 .col-md-6 h2,#scontainer-22 .col-md-6 h2,#scontainer-23 .col-md-6 h2,#scontainer-25 .col-md-6 h2,#scontainer-26 .col-md-6 h2,#scontainer-27 .col-md-6 h2,#scontainer-29 .col-md-6 h2,#scontainer-31 .col-md-6 h2{position:absolute;bottom:45px;font-weight:600;font-size:26px;width:calc(100% - 30px);color:#fff;text-transform:uppercase}#scontainer-16 .col-md-6 h2 a,#scontainer-18 .col-md-6 h2 a,#scontainer-20 .col-md-6 h2 a,#scontainer-22 .col-md-6 h2 a,#scontainer-23 .col-md-6 h2 a,#scontainer-25 .col-md-6 h2 a,#scontainer-26 .col-md-6 h2 a,#scontainer-27 .col-md-6 h2 a,#scontainer-29 .col-md-6 h2 a,#scontainer-31 .col-md-6 h2 a{color:#22a9e1}#scontainer-16 .col-md-6 p,#scontainer-18 .col-md-6 p,#scontainer-20 .col-md-6 p,#scontainer-22 .col-md-6 p,#scontainer-23 .col-md-6 p,#scontainer-25 .col-md-6 p,#scontainer-26 .col-md-6 p,#scontainer-27 .col-md-6 p,#scontainer-29 .col-md-6 p,#scontainer-31 .col-md-6 p{margin:0;padding:0}#scontainer-16 .col-md-6 .btn,#scontainer-18 .col-md-6 .btn,#scontainer-20 .col-md-6 .btn,#scontainer-22 .col-md-6 .btn,#scontainer-23 .col-md-6 .btn,#scontainer-25 .col-md-6 .btn,#scontainer-26 .col-md-6 .btn,#scontainer-27 .col-md-6 .btn,#scontainer-29 .col-md-6 .btn,#scontainer-31 .col-md-6 .btn{position:absolute;bottom:5px;background:#22a9e1;color:#fff;border:0;transition:all .5s ease;transform:translateX(-50%);padding:5px 25px;border-radius:0;font-size:15px}#scontainer-16 .col-md-6 .btn:hover,#scontainer-18 .col-md-6 .btn:hover,#scontainer-20 .col-md-6 .btn:hover,#scontainer-22 .col-md-6 .btn:hover,#scontainer-23 .col-md-6 .btn:hover,#scontainer-25 .col-md-6 .btn:hover,#scontainer-26 .col-md-6 .btn:hover,#scontainer-27 .col-md-6 .btn:hover,#scontainer-29 .col-md-6 .btn:hover,#scontainer-31 .col-md-6 .btn:hover{background:#000}.box-guarantee{color:#fff;background-image:url("/upload/filemanager/layout/box-guarantee-bg.jpg");background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-position:50% 50%;position:relative}.box-guarantee::after{content:"";display:block;background:rgba(0,0,0,.5);width:100%;height:100%;position:absolute;top:0;left:0}.box-guarantee #scontainer-5{position:relative;z-index:10;font-size:38px;font-weight:300}@media(max-width: 575px){.box-guarantee #scontainer-5{font-size:26px}}.box-directories #scontainer-6 .col-md-3{position:relative;padding-left:0;padding-right:0;margin-left:15px;margin-right:15px;margin-bottom:25px}@media(max-width: 575px){.box-directories #scontainer-6 .col-md-3{max-width:100%;margin-bottom:15px}}@media(max-width: 575px){.box-directories #scontainer-6 .col-md-3 h3{font-size:22px}}.box-directories #scontainer-6 .col-md-3 p{margin:0;padding:0}.box-directories #scontainer-6 .col-md-3 .text{position:absolute;top:50%;width:100%;padding:0 15px;transform:translateY(-50%);transition:all .5s ease;opacity:0}.box-directories #scontainer-6 .col-md-3 .text *{margin:0;padding:0}@media(max-width: 575px){.box-directories #scontainer-6 .col-md-3 .text p{display:none}}.box-directories #scontainer-6 .col-md-3 .text a{color:#fff}.box-directories #scontainer-6 .col-md-3 .text a:hover{text-decoration:none;color:#000}.box-directories #scontainer-6 .col-md-3 img{display:block;max-width:100% !important;position:relative;z-index:1}.box-directories #scontainer-6 .col-md-3:hover::after{height:100%;z-index:2}.box-directories #scontainer-6 .col-md-3:hover .text{z-index:10;opacity:1}.box-directories #scontainer-6 .col-md-3::after{background:#22a9e1;content:"";display:block;position:absolute;top:0;left:0;position:absolute;z-index:0;width:100%;height:0;transition:all .5s ease}.box-contact a,.box-main a{color:#22a9e1;transition:all .5s ease}.box-contact a:hover,.box-main a:hover{text-decoration:none;color:#000}.box-contact .nav-tabs,.box-main .nav-tabs{margin-bottom:25px}.box-contact .nav-tabs li a,.box-main .nav-tabs li a{padding:10px 20px;border:1px solid #f0f0f0;margin-bottom:-1px;display:block}.box-contact .nav-tabs li a.active,.box-main .nav-tabs li a.active{background:#22a9e1;color:#fff}.box-career{background-image:url("/upload/filemanager/layout/box-career-bg.jpg");background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-position:0 0;box-shadow:0 0 0 0 #fff}.box-career #scontainer-9{font-size:38px;font-weight:300;color:#fff}@media(max-width: 575px){.box-career #scontainer-9{font-size:22px}}.box-career #scontainer-9 .btn{background:#22a9e1;border:0;border-radius:0;transition:all .5s ease;padding:10px 25px;min-width:200px}.box-career #scontainer-9 .btn:hover{background:#90d4f0}.box-news{background:#f0f0f0}.box-news .content{display:flex;justify-content:center;flex-wrap:wrap}.box-news .content .article{width:calc(100% - 30px);padding:0;margin:15px;overflow:hidden;height:100%;background:#fff}@media(min-width: 768px){.box-news .content .article{width:calc(33.3333333333% - 30px)}}.box-news .content .article .img{width:100%;height:250px;display:block}.box-news .content .article .img img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover}.box-news .content .article .article-content{padding:20px}.box-news .content .article .article-content .title{font-weight:700;font-size:16px;color:#000;margin-bottom:15px;display:block}.box-news .content .article .article-content .title:hover{color:#22a9e1;text-decoration:none}.box-news .content .article .article-content .date-add{color:#000;font-size:13px;font-weight:600;text-align:left;margin-bottom:15px}.box-news .content .article .article-content .entry{color:#000;font-size:14px}.box-news .btn-more{background:#22a9e1;color:#fff;margin:25px auto 50px;font-size:14px;display:block;max-width:280px;padding:10px 25px;border-radius:0}.box-news .btn-more:hover{background:#90d4f0}.box-producer{background:#f0f0f0}.box-producer .title{text-align:center}.box-producer .title h1{display:inline-block;position:relative;font-size:2rem;line-height:48px;font-weight:400;padding-bottom:15px;margin-bottom:55px;border-bottom:2px solid #dfdfdf}.box-producer .title h1::before{content:"";display:block;width:60%;bottom:-2px;position:absolute;left:0;border-bottom:2px solid #22a9e1}.box-producer p{text-align:justify}.brand{overflow:hidden}.brand .item{display:flex;justify-content:center;align-items:center;width:150px;height:100px}.brand .item img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.brand .slick-slide,.brand .slick-track{display:flex !important;justify-content:center;align-items:center}.brand .slick-prev,.brand .slick-next{top:50%;display:none}.brand .slick-prev:before,.brand .slick-next:before{color:#22a9e1}@media(max-width: 575px){.brand .slick-prev:before,.brand .slick-next:before{opacity:0}.brand .slick-prev:before:hover,.brand .slick-next:before:hover{opacity:1}}.brand .slick-next{right:0}.brand .slick-prev{left:0;z-index:2}.box-footer{background:#363839;text-align:center;font-size:15px;color:#fff;padding-top:50px;padding-bottom:20px}.box-footer a{transition:all .5s ease;color:#fff;font-weight:600}.box-footer a:hover{text-decoration:none;color:#90d4f0}.box-footer .row-top{margin-bottom:50px}.box-footer .row-top ul{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap;row-gap:10px;-moz-column-gap:25px;column-gap:25px;list-style:none;padding:0;margin:0}#cookie-information{padding:10px;text-align:center;font-size:12px;background:#000;color:#fff}#cookie-information a{color:#90d4f0}.box-main{border-top:1px solid #f0f0f0}#scontainer-10{background:#f0f0f0;padding:50px 25px 25px}.box-articles{background:#f0f0f0}.box-articles .box-title .title,.box-articles .article .article-title .title,.article .box-articles .article-title .title{border-bottom:2px solid #000}.article-entry{background:#fff;margin-bottom:30px;border-radius:3px;overflow:hidden;height:calc(100% - 20px)}.article-entry .img img{width:100%;height:250px;-o-object-fit:cover;object-fit:cover}.article-entry .article-content{padding:20px}.article-entry .article-content .date-add{color:#000;font-size:13px;font-weight:600;text-align:left;margin-bottom:15px}.article-entry .article-content .article-title a{font-weight:700;font-size:16px;color:#000;margin-bottom:15px;display:block;transition:all .5s ease}.article-entry .article-content .article-title a:hover{color:#22a9e1;text-decoration:none}.article-entry .article-content .entry p{color:#000;font-size:13px;margin-bottom:0}.pager{display:flex;justify-content:flex-start;align-items:center;padding-inline-start:0;list-style-type:none;margin-top:50px}.pager li{color:#000;font-size:13px;margin-bottom:0;margin-right:10px}.pager li a{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:#f0f0f0}.pager li a img{width:15px;height:15px}.pager li a.inactive{opacity:.3;pointer-events:none}.box-content{background:#fff;padding:20px 18px}.box-content:first-child{margin-bottom:30px}.box-content h4{font-weight:600;font-size:15px;color:#000;margin-bottom:15px;display:block}.box-content ul{list-style-type:none;padding-inline-start:0}.box-content ul li{margin-bottom:10px}.box-content ul li a{color:#22a9e1;transition:all .5s ease}.box-content ul li a:hover{color:#000;text-decoration:none}.article{background:#fff;padding:25px}.article .table-of-contents{box-shadow:0 0 3px 0 rgba(0,0,0,.1);padding:20px;margin-bottom:20px}.article .table-of-contents .title{font-size:20px;margin-bottom:10px}.article .table-of-contents ol{margin-bottom:0}.article .main-image{margin-bottom:25px}.article .main-image img{max-width:100%}.article .article-title{justify-content:flex-start !important;margin-bottom:25px !important}.article .date-add{color:#000;font-size:13px;font-weight:600;margin-bottom:15px;display:flex;align-items:center;justify-content:flex-start}.article .date-add img{margin-right:5px}.article .text h2{font-size:18px;font-weight:600}.article .text h3{font-size:16px;font-weight:600}.article .gallery{display:flex;flex-wrap:wrap}.article .gallery .image{width:calc(25% - 10px);margin:10px 10px 0 0;display:block;max-height:175px;border:1px solid #f0f0f0}@media(max-width: 767px){.article .gallery .image{width:calc(33.3333333333% - 10px)}}.article .gallery .image img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.article .social-icons{margin-bottom:20px}.article .btn-back{background:#22a9e1;color:#fff;margin:25px 0 0;font-size:14px;display:block;max-width:200px;padding:10px 25px;border-radius:0}.article .btn-back:hover{background:#90d4f0}#scontainer-12 h3{font-size:16px;font-weight:600}.article-18 .col-md-6,.article-18 .col-md-4,.article-27 .col-md-6,.article-27 .col-md-4{position:relative;overflow:hidden}.article-18 .col-md-6::after,.article-18 .col-md-4::after,.article-27 .col-md-6::after,.article-27 .col-md-4::after{content:"";display:block;background:rgba(0,0,0,.33);width:calc(100% - 30px);height:calc(100% - 15px);position:absolute;top:0;left:15px}.article-18 .col-md-6 p:first-child,.article-18 .col-md-4 p:first-child,.article-27 .col-md-6 p:first-child,.article-27 .col-md-4 p:first-child{width:100%;height:500px;display:block}.article-18 .col-md-6 img,.article-18 .col-md-4 img,.article-27 .col-md-6 img,.article-27 .col-md-4 img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}.article-18 .col-md-6 h2,.article-18 .col-md-4 h2,.article-27 .col-md-6 h2,.article-27 .col-md-4 h2{position:absolute;padding:0;margin:0;bottom:25px;left:25px;z-index:10}.article-18 .col-md-6 h2 a,.article-18 .col-md-4 h2 a,.article-27 .col-md-6 h2 a,.article-27 .col-md-4 h2 a{color:#fff;font-weight:300;font-size:30px}.article-miniature{position:relative;margin-bottom:30px}.article-miniature::after{content:"";display:block;background:rgba(0,0,0,.33);width:100%;height:100%;position:absolute;top:0;left:0}.article-miniature .img{display:block;height:300px}.article-miniature .img img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.article-miniature h2{position:absolute;padding:0;margin:0;bottom:25px;left:25px;z-index:10}.article-miniature h2 a{color:#fff;font-weight:300;font-size:30px;transition:all .5s ease}.article-miniature h2 a:hover{text-decoration:none;color:#22a9e1}#contact-form{font-size:13px}#contact-form .form-control{border-radius:0;font-size:13px}#contact-form .captcha span{font-size:13px !important}#contact-form .btn{background:#22a9e1;color:#fff;text-transform:uppercase;border:0;border-radius:0;font-size:13px;width:125px;text-align:center;padding:10px 15px}.alert-success{margin:0 0 50px;border:0;border-radius:0;background:#22a9e1;color:#fff}.article-71 .gallery .image img,.article-72 .gallery .image img,.article-73 .gallery .image img,.article-74 .gallery .image img,.article-75 .gallery .image img,.article-76 .gallery .image img,.article-77 .gallery .image img,.article-78 .gallery .image img,.article-94 .gallery .image img,.article-95 .gallery .image img,.article-96 .gallery .image img,.article-97 .gallery .image img,.article-98 .gallery .image img,.article-99 .gallery .image img{-o-object-fit:cover;object-fit:cover}#link-68>a{pointer-events:none}#link-73 img{max-width:130px}#scontainer-53{max-height:calc(100vh - 214px);background:#000}#scontainer-53 .scontainer-content{height:100%}#scontainer-53 .scontainer-content p{height:100%}#scontainer-53 .scontainer-content video{width:100%;height:100%;max-height:calc(100vh - 214px);margin-bottom:-6px}body .article-122 .gallery a.image img{-o-object-fit:cover;object-fit:cover}/*# sourceMappingURL=style.css.map */ \ No newline at end of file +@import"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap";body{font-family:"Open Sans",sans-serif;font-size:15px}body.noscroll{position:fixed;overflow:hidden}.scontainer-content h2{font-size:18px;font-weight:600}.box-border{padding:25px;border:1px solid #f0f0f0;border-radius:3px}@media(max-width: 767px){.box-border{padding:15px}.box-border .col-md-3{flex:0 0 25% !important;max-width:25% !important}.box-border .col-md-9{flex:0 0 75% !important;max-width:75% !important}}.fac{display:flex;flex-wrap:wrap;align-items:center;align-self:center}.fac .row{width:100%;padding:10px 0}.fac .row p{margin-bottom:0}.box-top,#scontainer-12,#scontainer-11,.box-contact #scontainer-8,.box-main #scontainer-8{padding-top:75px}.box{padding:75px 0}@media(max-width: 767px){.box{padding:50px 0}}@media(max-width: 767px){.box{padding:25px 0}}.box .box-title,.box .article .article-title,.article .box .article-title{text-align:center;font-size:22px;position:relative;margin:0 auto 75px;display:flex;justify-content:center}@media(max-width: 767px){.box .box-title,.box .article .article-title,.article .box .article-title{margin-bottom:25px}}.box .box-title .title,.box .article .article-title .title,.article .box .article-title .title{padding-bottom:15px;border-bottom:2px solid #f0f0f0;position:relative;font-size:32px}@media(max-width: 575px){.box .box-title .title,.box .article .article-title .title,.article .box .article-title .title{font-size:22px}}.box .box-title .title::after,.box .article .article-title .title::after,.article .box .article-title .title::after{content:"";display:block;width:60%;bottom:-2px;position:absolute;left:0;border-bottom:2px solid #22a9e1}.top{background:#f0f0f0;color:#000;padding:10px 0;position:relative}.top #scontainer-1 img{margin-right:5px}.top #scontainer-2{display:flex;justify-content:flex-end}.top #scontainer-2 a{color:#000;font-size:14px}.top #scontainer-2 a:hover{text-decoration:none}.top p{margin:0}.top .language{position:absolute;top:0;right:5px;bottom:0;z-index:999}@media(max-width: 767px){.top .language{top:65px}}.top .language #languages{height:100%}.top .language #languages .container{height:100%}.top .language #languages .container .row{height:100%}.top .language #languages ul{display:flex;align-items:center;margin:0;padding:0;list-style:none;height:100%}.top .language #languages ul li{margin:0 5px}.top .language #languages ul li:first-child{margin-left:0}.top .language #languages ul li:last-child{margin-right:0}.top .language #languages ul li.active{display:none}.top .language #languages ul li a img{height:16px}.header{padding:25px 0}.header .col-lg-3{width:100% !important;flex:0 0 100%;max-width:100%}.header .logo{display:block;width:100%;max-width:300px;margin:0 auto 25px}.header .logo img{width:100%;max-width:387px}.header #main-menu-btn{height:50px;width:50px;position:fixed;bottom:10px;right:10px;color:#fff;background:#000;display:none;z-index:9999;line-height:50px;cursor:pointer;border-radius:50%;align-items:center;justify-content:center;font-size:30px}@media(max-width: 767px){.header #main-menu-btn{display:flex}}.header .main-menu-container{display:flex;align-items:center;justify-content:center;width:100% !important;flex:0 0 100%;max-width:100%}@media(max-width: 1199px){.header .main-menu-container{justify-content:center}}@media(max-width: 767px){.header #main-menu{display:none}.header #main-menu.visible{display:block;position:fixed;top:0;left:0;height:100%;width:100%;background:#fff;z-index:20;overflow-y:scroll}.header #main-menu.visible #menu-container-1{display:flex;width:100%;height:100%;align-items:center;justify-content:center}.header #main-menu.visible #menu-container-1>ul{display:block;width:100%;text-align:center;padding:20px;border:1px solid #f0f0f0;border-radius:3px;height:100%}.header #main-menu.visible #menu-container-1>ul li ul{position:static;background:#fff}}@media(min-width: 768px){.header #main-menu.sticky{position:fixed;top:0;left:0;width:100%;background:#fff;z-index:50}.header #main-menu.sticky #menu-container-1>ul{justify-content:center;height:75px;align-items:center}}.header #main-menu ul{display:flex;margin:0;padding:0;justify-content:flex-end;list-style-type:none}@media(max-width: 767px){.header #main-menu ul{width:100%}}.header #main-menu ul.level-0{flex-wrap:wrap;justify-content:center}.header #main-menu ul li{position:relative;display:flex;align-items:center}.header #main-menu ul li#link-1{display:none}@media(min-width: 768px){.header #main-menu ul li#link-73{position:absolute;top:-70px;right:0}}.header #main-menu ul li.li-level-1 a{width:calc(100% - 18px)}@media(max-width: 767px){.header #main-menu ul li.li-level-1 a{width:calc(100% - 32px);color:#000;text-align:left;border:0 solid #000}}.header #main-menu ul li.li-level-1 i{color:#fff;margin-right:10px}@media(max-width: 767px){.header #main-menu ul li.li-level-1 i{color:#000;margin-right:0}}@media(max-width: 767px){.header #main-menu ul li{justify-content:space-between;flex-wrap:wrap}}.header #main-menu ul li i{font-size:13px;margin-right:5px;display:flex;height:32px;width:32px;align-items:center;justify-content:center}@media(min-width: 768px){.header #main-menu ul li i{width:13px}}@media(max-width: 767px){.header #main-menu ul li i{margin-right:0}}.header #main-menu ul li a{display:block;padding:5px 10px;color:#000;transition:all .5s ease;font-size:15px;white-space:nowrap}@media(min-width: 992px)and (max-width: 1199px){.header #main-menu ul li a{padding:5px 6px}}.header #main-menu ul li a:hover{text-decoration:none;color:#90d4f0}@media(min-width: 768px){.header #main-menu ul li:hover>ul{display:block}}@media(max-width: 767px){.header #main-menu ul li.active>ul{display:block}}.header #main-menu ul li>ul{display:none;position:absolute;top:calc(100% - 1px);left:0;background:rgba(0,0,0,.8);z-index:50}.header #main-menu ul li>ul li a{border-bottom:1px solid #262626;color:#fff;padding:10px 25px;font-size:14px}@media(min-width: 768px){.header #main-menu ul li>ul li:hover>ul{display:block}}.header #main-menu ul li>ul li ul{position:absolute;background:rgba(0,0,0,.85);left:99%;top:0;display:none}@media(max-width: 767px){.header #main-menu ul li>ul li ul{padding-left:25px}}.header #main-menu ul li>ul li ul li a{padding-left:20px}.header #main-menu ul li>ul li ul ul{background:rgba(0,0,0,.9)}.carousel-banner{position:relative}.carousel-banner .wosp{position:absolute;bottom:25px;left:25px;z-index:99}.carousel-banner .wosp img{max-width:150px}@media(max-width: 767px){.carousel-banner .wosp img{max-width:100px}}.carousel-banner .slider .item{position:relative}.carousel-banner .slider .item .content{position:absolute;background:rgba(0,0,0,.75);bottom:25px;padding:50px;max-width:1140px;left:50%;transform:translateX(-50%)}.carousel-banner .slider .item .content h1{color:#fff;font-size:36px;font-weight:500;margin:0 0 15px}.carousel-banner .slider .item .content h2{color:#fff;font-size:20px;font-weight:300;margin:0 0 15px}.carousel-banner .slider .item .content .text{color:#fff;font-size:14px;font-weight:300}.carousel-banner .slider .item .content .text a{color:#90d4f0}.carousel-banner .slider .item img{width:100%;-o-object-fit:cover;object-fit:cover}#scontainer-4 .col-md-6,#scontainer-14 .col-md-6{position:relative;overflow:hidden;height:550px;margin-bottom:30px}#scontainer-4 .col-md-6 p:first-child,#scontainer-14 .col-md-6 p:first-child{display:block;height:550px;overflow:hidden}#scontainer-4 .col-md-6 img,#scontainer-14 .col-md-6 img{transition:all .5s ease;height:100%;width:100%;-o-object-fit:cover;object-fit:cover}#scontainer-4 .col-md-6:hover img,#scontainer-14 .col-md-6:hover img{transform:scale(1.1)}#scontainer-4 .col-md-6 h2,#scontainer-14 .col-md-6 h2{position:absolute;bottom:85px;font-weight:600;font-size:52px;width:calc(100% - 30px);color:#fff;text-transform:uppercase}#scontainer-4 .col-md-6 h2 a,#scontainer-14 .col-md-6 h2 a{color:#fff}#scontainer-4 .col-md-6 p,#scontainer-14 .col-md-6 p{margin:0;padding:0}#scontainer-4 .col-md-6 .btn,#scontainer-14 .col-md-6 .btn{position:absolute;bottom:35px;background:#22a9e1;color:#fff;border:0;transition:all .5s ease;transform:translateX(-50%);padding:10px 25px;border-radius:0}#scontainer-4 .col-md-6 .btn:hover,#scontainer-14 .col-md-6 .btn:hover{background:#000}#scontainer-16 .col-md-6,#scontainer-18 .col-md-6,#scontainer-20 .col-md-6,#scontainer-22 .col-md-6,#scontainer-23 .col-md-6,#scontainer-25 .col-md-6,#scontainer-26 .col-md-6,#scontainer-27 .col-md-6,#scontainer-29 .col-md-6,#scontainer-31 .col-md-6{position:relative;overflow:hidden;height:550px;margin-bottom:30px;padding-bottom:100px}#scontainer-16 .col-md-6 p:first-child,#scontainer-18 .col-md-6 p:first-child,#scontainer-20 .col-md-6 p:first-child,#scontainer-22 .col-md-6 p:first-child,#scontainer-23 .col-md-6 p:first-child,#scontainer-25 .col-md-6 p:first-child,#scontainer-26 .col-md-6 p:first-child,#scontainer-27 .col-md-6 p:first-child,#scontainer-29 .col-md-6 p:first-child,#scontainer-31 .col-md-6 p:first-child{display:block;height:550px;overflow:hidden}#scontainer-16 .col-md-6 img,#scontainer-18 .col-md-6 img,#scontainer-20 .col-md-6 img,#scontainer-22 .col-md-6 img,#scontainer-23 .col-md-6 img,#scontainer-25 .col-md-6 img,#scontainer-26 .col-md-6 img,#scontainer-27 .col-md-6 img,#scontainer-29 .col-md-6 img,#scontainer-31 .col-md-6 img{transition:all .5s ease;height:100%;width:100%;-o-object-fit:contain;object-fit:contain}#scontainer-16 .col-md-6:hover img,#scontainer-18 .col-md-6:hover img,#scontainer-20 .col-md-6:hover img,#scontainer-22 .col-md-6:hover img,#scontainer-23 .col-md-6:hover img,#scontainer-25 .col-md-6:hover img,#scontainer-26 .col-md-6:hover img,#scontainer-27 .col-md-6:hover img,#scontainer-29 .col-md-6:hover img,#scontainer-31 .col-md-6:hover img{transform:scale(1.1)}#scontainer-16 .col-md-6 h2,#scontainer-18 .col-md-6 h2,#scontainer-20 .col-md-6 h2,#scontainer-22 .col-md-6 h2,#scontainer-23 .col-md-6 h2,#scontainer-25 .col-md-6 h2,#scontainer-26 .col-md-6 h2,#scontainer-27 .col-md-6 h2,#scontainer-29 .col-md-6 h2,#scontainer-31 .col-md-6 h2{position:absolute;bottom:45px;font-weight:600;font-size:26px;width:calc(100% - 30px);color:#fff;text-transform:uppercase}#scontainer-16 .col-md-6 h2 a,#scontainer-18 .col-md-6 h2 a,#scontainer-20 .col-md-6 h2 a,#scontainer-22 .col-md-6 h2 a,#scontainer-23 .col-md-6 h2 a,#scontainer-25 .col-md-6 h2 a,#scontainer-26 .col-md-6 h2 a,#scontainer-27 .col-md-6 h2 a,#scontainer-29 .col-md-6 h2 a,#scontainer-31 .col-md-6 h2 a{color:#22a9e1}#scontainer-16 .col-md-6 p,#scontainer-18 .col-md-6 p,#scontainer-20 .col-md-6 p,#scontainer-22 .col-md-6 p,#scontainer-23 .col-md-6 p,#scontainer-25 .col-md-6 p,#scontainer-26 .col-md-6 p,#scontainer-27 .col-md-6 p,#scontainer-29 .col-md-6 p,#scontainer-31 .col-md-6 p{margin:0;padding:0}#scontainer-16 .col-md-6 .btn,#scontainer-18 .col-md-6 .btn,#scontainer-20 .col-md-6 .btn,#scontainer-22 .col-md-6 .btn,#scontainer-23 .col-md-6 .btn,#scontainer-25 .col-md-6 .btn,#scontainer-26 .col-md-6 .btn,#scontainer-27 .col-md-6 .btn,#scontainer-29 .col-md-6 .btn,#scontainer-31 .col-md-6 .btn{position:absolute;bottom:5px;background:#22a9e1;color:#fff;border:0;transition:all .5s ease;transform:translateX(-50%);padding:5px 25px;border-radius:0;font-size:15px}#scontainer-16 .col-md-6 .btn:hover,#scontainer-18 .col-md-6 .btn:hover,#scontainer-20 .col-md-6 .btn:hover,#scontainer-22 .col-md-6 .btn:hover,#scontainer-23 .col-md-6 .btn:hover,#scontainer-25 .col-md-6 .btn:hover,#scontainer-26 .col-md-6 .btn:hover,#scontainer-27 .col-md-6 .btn:hover,#scontainer-29 .col-md-6 .btn:hover,#scontainer-31 .col-md-6 .btn:hover{background:#000}.box-guarantee{color:#fff;background-image:url("/upload/filemanager/layout/box-guarantee-bg.jpg");background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-position:50% 50%;position:relative}.box-guarantee::after{content:"";display:block;background:rgba(0,0,0,.5);width:100%;height:100%;position:absolute;top:0;left:0}.box-guarantee #scontainer-5{position:relative;z-index:10;font-size:38px;font-weight:300}@media(max-width: 575px){.box-guarantee #scontainer-5{font-size:26px}}.box-directories #scontainer-6 .col-md-3{position:relative;padding-left:0;padding-right:0;margin-left:15px;margin-right:15px;margin-bottom:25px}@media(max-width: 575px){.box-directories #scontainer-6 .col-md-3{max-width:100%;margin-bottom:15px}}@media(max-width: 575px){.box-directories #scontainer-6 .col-md-3 h3{font-size:22px}}.box-directories #scontainer-6 .col-md-3 p{margin:0;padding:0}.box-directories #scontainer-6 .col-md-3 .text{position:absolute;top:50%;width:100%;padding:0 15px;transform:translateY(-50%);transition:all .5s ease;opacity:0}.box-directories #scontainer-6 .col-md-3 .text *{margin:0;padding:0}@media(max-width: 575px){.box-directories #scontainer-6 .col-md-3 .text p{display:none}}.box-directories #scontainer-6 .col-md-3 .text a{color:#fff}.box-directories #scontainer-6 .col-md-3 .text a:hover{text-decoration:none;color:#000}.box-directories #scontainer-6 .col-md-3 img{display:block;max-width:100% !important;position:relative;z-index:1}.box-directories #scontainer-6 .col-md-3:hover::after{height:100%;z-index:2}.box-directories #scontainer-6 .col-md-3:hover .text{z-index:10;opacity:1}.box-directories #scontainer-6 .col-md-3::after{background:#22a9e1;content:"";display:block;position:absolute;top:0;left:0;position:absolute;z-index:0;width:100%;height:0;transition:all .5s ease}.box-contact a,.box-main a{color:#22a9e1;transition:all .5s ease}.box-contact a:hover,.box-main a:hover{text-decoration:none;color:#000}.box-contact .nav-tabs,.box-main .nav-tabs{margin-bottom:25px}.box-contact .nav-tabs li a,.box-main .nav-tabs li a{padding:10px 20px;border:1px solid #f0f0f0;margin-bottom:-1px;display:block}.box-contact .nav-tabs li a.active,.box-main .nav-tabs li a.active{background:#22a9e1;color:#fff}.box-career{background-image:url("/upload/filemanager/layout/box-career-bg.jpg");background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-position:0 0;box-shadow:0 0 0 0 #fff}.box-career #scontainer-9{font-size:38px;font-weight:300;color:#fff}@media(max-width: 575px){.box-career #scontainer-9{font-size:22px}}.box-career #scontainer-9 .btn{background:#22a9e1;border:0;border-radius:0;transition:all .5s ease;padding:10px 25px;min-width:200px}.box-career #scontainer-9 .btn:hover{background:#90d4f0}.box-news{background:#f0f0f0}.box-news .content{display:flex;justify-content:center;flex-wrap:wrap}.box-news .content .article{width:calc(100% - 30px);padding:0;margin:15px;overflow:hidden;height:100%;background:#fff}@media(min-width: 768px){.box-news .content .article{width:calc(33.3333333333% - 30px)}}.box-news .content .article .img{width:100%;height:250px;display:block}.box-news .content .article .img img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover}.box-news .content .article .article-content{padding:20px}.box-news .content .article .article-content .title{font-weight:700;font-size:16px;color:#000;margin-bottom:15px;display:block}.box-news .content .article .article-content .title:hover{color:#22a9e1;text-decoration:none}.box-news .content .article .article-content .date-add{color:#000;font-size:13px;font-weight:600;text-align:left;margin-bottom:15px}.box-news .content .article .article-content .entry{color:#000;font-size:14px}.box-news .btn-more{background:#22a9e1;color:#fff;margin:25px auto 50px;font-size:14px;display:block;max-width:280px;padding:10px 25px;border-radius:0}.box-news .btn-more:hover{background:#90d4f0}.box-producer{background:#f0f0f0}.box-producer .title{text-align:center}.box-producer .title h1{display:inline-block;position:relative;font-size:2rem;line-height:48px;font-weight:400;padding-bottom:15px;margin-bottom:55px;border-bottom:2px solid #dfdfdf}.box-producer .title h1::before{content:"";display:block;width:60%;bottom:-2px;position:absolute;left:0;border-bottom:2px solid #22a9e1}.box-producer p{text-align:justify}.brand{overflow:hidden}.brand .item{display:flex;justify-content:center;align-items:center;width:150px;height:100px}.brand .item img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.brand .slick-slide,.brand .slick-track{display:flex !important;justify-content:center;align-items:center}.brand .slick-prev,.brand .slick-next{top:50%;display:none}.brand .slick-prev:before,.brand .slick-next:before{color:#22a9e1}@media(max-width: 575px){.brand .slick-prev:before,.brand .slick-next:before{opacity:0}.brand .slick-prev:before:hover,.brand .slick-next:before:hover{opacity:1}}.brand .slick-next{right:0}.brand .slick-prev{left:0;z-index:2}.box-footer{background:#363839;text-align:center;font-size:15px;color:#fff;padding-top:50px;padding-bottom:20px}.box-footer a{transition:all .5s ease;color:#fff;font-weight:600}.box-footer a:hover{text-decoration:none;color:#90d4f0}.box-footer .row-top{margin-bottom:50px}.box-footer .row-top ul{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap;row-gap:10px;-moz-column-gap:25px;column-gap:25px;list-style:none;padding:0;margin:0}#cookie-information{padding:10px;text-align:center;font-size:12px;background:#000;color:#fff}#cookie-information a{color:#90d4f0}.box-main{border-top:1px solid #f0f0f0}#scontainer-10{background:#f0f0f0;padding:50px 25px 25px}.box-articles{background:#f0f0f0}.box-articles .box-title .title,.box-articles .article .article-title .title,.article .box-articles .article-title .title{border-bottom:2px solid #000}.article-entry{background:#fff;margin-bottom:30px;border-radius:3px;overflow:hidden;height:calc(100% - 20px)}.article-entry .img img{width:100%;height:250px;-o-object-fit:cover;object-fit:cover}.article-entry .article-content{padding:20px}.article-entry .article-content .date-add{color:#000;font-size:13px;font-weight:600;text-align:left;margin-bottom:15px}.article-entry .article-content .article-title a{font-weight:700;font-size:16px;color:#000;margin-bottom:15px;display:block;transition:all .5s ease}.article-entry .article-content .article-title a:hover{color:#22a9e1;text-decoration:none}.article-entry .article-content .entry p{color:#000;font-size:13px;margin-bottom:0}.pager{display:flex;justify-content:flex-start;align-items:center;padding-inline-start:0;list-style-type:none;margin-top:50px}.pager li{color:#000;font-size:13px;margin-bottom:0;margin-right:10px}.pager li a{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:#f0f0f0}.pager li a img{width:15px;height:15px}.pager li a.inactive{opacity:.3;pointer-events:none}.box-content{background:#fff;padding:20px 18px}.box-content:first-child{margin-bottom:30px}.box-content h4{font-weight:600;font-size:15px;color:#000;margin-bottom:15px;display:block}.box-content ul{list-style-type:none;padding-inline-start:0}.box-content ul li{margin-bottom:10px}.box-content ul li a{color:#22a9e1;transition:all .5s ease}.box-content ul li a:hover{color:#000;text-decoration:none}.article{background:#fff;padding:25px}.article .table-of-contents{box-shadow:0 0 3px 0 rgba(0,0,0,.1);padding:20px;margin-bottom:20px}.article .table-of-contents .title{font-size:20px;margin-bottom:10px}.article .table-of-contents ol{margin-bottom:0}.article .main-image{margin-bottom:25px}.article .main-image img{max-width:100%}.article .article-title{justify-content:flex-start !important;margin-bottom:25px !important}.article .date-add{color:#000;font-size:13px;font-weight:600;margin-bottom:15px;display:flex;align-items:center;justify-content:flex-start}.article .date-add img{margin-right:5px}.article .text h2{font-size:18px;font-weight:600}.article .text h3{font-size:16px;font-weight:600}.article .gallery{display:flex;flex-wrap:wrap}.article .gallery .image{width:calc(25% - 10px);margin:10px 10px 0 0;display:block;max-height:175px;border:1px solid #f0f0f0}@media(max-width: 767px){.article .gallery .image{width:calc(33.3333333333% - 10px)}}.article .gallery .image img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.article .social-icons{margin-bottom:20px}.article .btn-back{background:#22a9e1;color:#fff;margin:25px 0 0;font-size:14px;display:block;max-width:200px;padding:10px 25px;border-radius:0}.article .btn-back:hover{background:#90d4f0}#scontainer-12 h3{font-size:16px;font-weight:600}.article-18 .col-md-6,.article-18 .col-md-4,.article-27 .col-md-6,.article-27 .col-md-4{position:relative;overflow:hidden}.article-18 .col-md-6::after,.article-18 .col-md-4::after,.article-27 .col-md-6::after,.article-27 .col-md-4::after{content:"";display:block;background:rgba(0,0,0,.33);width:calc(100% - 30px);height:calc(100% - 15px);position:absolute;top:0;left:15px}.article-18 .col-md-6 p:first-child,.article-18 .col-md-4 p:first-child,.article-27 .col-md-6 p:first-child,.article-27 .col-md-4 p:first-child{width:100%;height:500px;display:block}.article-18 .col-md-6 img,.article-18 .col-md-4 img,.article-27 .col-md-6 img,.article-27 .col-md-4 img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}.article-18 .col-md-6 h2,.article-18 .col-md-4 h2,.article-27 .col-md-6 h2,.article-27 .col-md-4 h2{position:absolute;padding:0;margin:0;bottom:25px;left:25px;z-index:10}.article-18 .col-md-6 h2 a,.article-18 .col-md-4 h2 a,.article-27 .col-md-6 h2 a,.article-27 .col-md-4 h2 a{color:#fff;font-weight:300;font-size:30px}.article-miniature{position:relative;margin-bottom:30px}.article-miniature::after{content:"";display:block;background:rgba(0,0,0,.33);width:100%;height:100%;position:absolute;top:0;left:0}.article-miniature .img{display:block;height:300px}.article-miniature .img img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.article-miniature h2{position:absolute;padding:0;margin:0;bottom:25px;left:25px;z-index:10}.article-miniature h2 a{color:#fff;font-weight:300;font-size:30px;transition:all .5s ease}.article-miniature h2 a:hover{text-decoration:none;color:#22a9e1}#contact-form{font-size:13px}#contact-form .form-control{border-radius:0;font-size:13px}#contact-form .captcha span{font-size:13px !important}#contact-form .btn{background:#22a9e1;color:#fff;text-transform:uppercase;border:0;border-radius:0;font-size:13px;width:125px;text-align:center;padding:10px 15px}.alert-success{margin:0 0 50px;border:0;border-radius:0;background:#22a9e1;color:#fff}.article-71 .gallery .image img,.article-72 .gallery .image img,.article-73 .gallery .image img,.article-74 .gallery .image img,.article-75 .gallery .image img,.article-76 .gallery .image img,.article-77 .gallery .image img,.article-78 .gallery .image img,.article-94 .gallery .image img,.article-95 .gallery .image img,.article-96 .gallery .image img,.article-97 .gallery .image img,.article-98 .gallery .image img,.article-99 .gallery .image img{-o-object-fit:cover;object-fit:cover}#link-68>a{pointer-events:none}#link-73 img{max-width:130px}#scontainer-53{max-height:calc(100vh - 214px);background:#000}#scontainer-53 .scontainer-content{height:100%}#scontainer-53 .scontainer-content p{height:100%;text-align:center}#scontainer-53 .scontainer-content video{width:100%;height:100%;max-height:calc(100vh - 214px);margin-bottom:-6px}body .article-122 .gallery a.image img{-o-object-fit:cover;object-fit:cover}/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/layout/style-css/style.css.map b/layout/style-css/style.css.map index c8c37e4..92abfbe 100644 --- a/layout/style-css/style.css.map +++ b/layout/style-css/style.css.map @@ -1 +1 @@ -{"version":3,"sources":["../style-scss/style.scss","../style-scss/_mixins.scss"],"names":[],"mappings":"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","file":"style.css"} \ No newline at end of file +{"version":3,"sources":["..\\style-scss\\style.scss","..\\style-scss\\_mixins.scss"],"names":[],"mappings":"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","file":"style.css","sourcesContent":["// out: ../style-css/style.css, compress: true, sourceMap: true\r\n@import '_mixins';\r\n@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap');\r\n$cGrayLight: #f0f0f0;\r\n$cBlack: #000;\r\n$cBlue: #90d4f0;\r\n$cBlueDark: #22a9e1;\r\n\r\nbody {\r\n font-family: 'Open Sans', sans-serif;\r\n font-size: 15px;\r\n\r\n &.noscroll {\r\n position: fixed;\r\n overflow: hidden;\r\n }\r\n}\r\n\r\n.scontainer-content {\r\n h2 {\r\n font-size: 18px;\r\n font-weight: 600;\r\n }\r\n}\r\n\r\n.box-border {\r\n padding: 25px;\r\n border: 1px solid $cGrayLight;\r\n border-radius: 3px;\r\n\r\n @include respond-below(sm) {\r\n padding: 15px;\r\n\r\n .col-md-3 {\r\n -ms-flex: 0 0 25% !important;\r\n flex: 0 0 25% !important;\r\n max-width: 25% !important;\r\n }\r\n\r\n .col-md-9 {\r\n -ms-flex: 0 0 75% !important;\r\n flex: 0 0 75% !important;\r\n max-width: 75% !important;\r\n }\r\n }\r\n}\r\n\r\n.fac {\r\n display: flex;\r\n flex-wrap: wrap;\r\n align-items: center;\r\n align-self: center;\r\n\r\n .row {\r\n width: 100%;\r\n padding: 10px 0;\r\n\r\n p {\r\n margin-bottom: 0;\r\n }\r\n }\r\n}\r\n\r\n.box-top {\r\n padding-top: 75px;\r\n}\r\n\r\n.box {\r\n padding: 75px 0;\r\n\r\n @include respond-below(sm) {\r\n padding: 50px 0;\r\n }\r\n\r\n @include respond-below(sm) {\r\n padding: 25px 0;\r\n }\r\n\r\n .box-title {\r\n text-align: center;\r\n font-size: 22px;\r\n position: relative;\r\n margin: 0 auto 75px;\r\n display: flex;\r\n justify-content: center;\r\n\r\n @include respond-below(sm) {\r\n margin-bottom: 25px;\r\n }\r\n\r\n .title {\r\n padding-bottom: 15px;\r\n border-bottom: 2px solid $cGrayLight;\r\n position: relative;\r\n font-size: 32px;\r\n\r\n @include respond-below(xs) {\r\n font-size: 22px;\r\n }\r\n\r\n &::after {\r\n content: '';\r\n display: block;\r\n width: 60%;\r\n bottom: -2px;\r\n position: absolute;\r\n left: 0;\r\n border-bottom: 2px solid $cBlueDark;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.top {\r\n background: $cGrayLight;\r\n color: $cBlack;\r\n padding: 10px 0;\r\n position: relative;\r\n\r\n #scontainer-1 {\r\n img {\r\n margin-right: 5px;\r\n }\r\n }\r\n\r\n #scontainer-2 {\r\n display: flex;\r\n justify-content: flex-end;\r\n\r\n a {\r\n color: $cBlack;\r\n font-size: 14px;\r\n\r\n &:hover {\r\n text-decoration: none;\r\n }\r\n }\r\n }\r\n\r\n p {\r\n margin: 0;\r\n }\r\n\r\n .language {\r\n position: absolute;\r\n top: 0;\r\n right: 5px;\r\n bottom: 0;\r\n z-index: 999;\r\n\r\n @include respond-below(sm) {\r\n top: 65px;\r\n }\r\n\r\n #languages {\r\n height: 100%;\r\n\r\n .container {\r\n height: 100%;\r\n\r\n .row {\r\n height: 100%;\r\n }\r\n }\r\n\r\n ul {\r\n display: flex;\r\n align-items: center;\r\n margin: 0;\r\n padding: 0;\r\n list-style: none;\r\n height: 100%;\r\n\r\n li {\r\n margin: 0 5px;\r\n\r\n &:first-child {\r\n margin-left: 0;\r\n }\r\n\r\n &:last-child {\r\n margin-right: 0;\r\n }\r\n\r\n &.active {\r\n display: none;\r\n }\r\n\r\n a {\r\n img {\r\n height: 16px;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.header {\r\n padding: 25px 0;\r\n\r\n .col-lg-3 {\r\n width: 100% !important;\r\n flex: 0 0 100%;\r\n max-width: 100%;\r\n }\r\n\r\n .logo {\r\n display: block;\r\n width: 100%;\r\n max-width: 300px;\r\n margin: 0 auto 25px;\r\n\r\n img {\r\n width: 100%;\r\n max-width: 387px;\r\n }\r\n }\r\n\r\n #main-menu-btn {\r\n height: 50px;\r\n width: 50px;\r\n position: fixed;\r\n bottom: 10px;\r\n right: 10px;\r\n color: #fff;\r\n background: $cBlack;\r\n display: none;\r\n z-index: 9999;\r\n line-height: 50px;\r\n cursor: pointer;\r\n -webkit-border-radius: 50%;\r\n -moz-border-radius: 50%;\r\n border-radius: 50%;\r\n align-items: center;\r\n justify-content: center;\r\n font-size: 30px;\r\n\r\n @include respond-below(sm) {\r\n display: flex;\r\n }\r\n }\r\n\r\n .main-menu-container {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 100% !important;\r\n flex: 0 0 100%;\r\n max-width: 100%;\r\n\r\n @include respond-below(lg) {\r\n justify-content: center;\r\n }\r\n }\r\n\r\n #main-menu {\r\n @include respond-below(sm) {\r\n display: none;\r\n\r\n &.visible {\r\n display: block;\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n height: 100%;\r\n width: 100%;\r\n background: #fff;\r\n z-index: 20;\r\n overflow-y: scroll;\r\n\r\n #menu-container-1 {\r\n display: flex;\r\n width: 100%;\r\n height: 100%;\r\n align-items: center;\r\n justify-content: center;\r\n\r\n >ul {\r\n display: block;\r\n width: 100%;\r\n text-align: center;\r\n padding: 20px;\r\n border: 1px solid $cGrayLight;\r\n border-radius: 3px;\r\n height: 100%;\r\n\r\n li {\r\n ul {\r\n position: static;\r\n background: #fff;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n &.sticky {\r\n @include respond-above(sm) {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n background: #fff;\r\n z-index: 50;\r\n\r\n #menu-container-1>ul {\r\n justify-content: center;\r\n height: 75px;\r\n align-items: center;\r\n }\r\n }\r\n }\r\n\r\n ul {\r\n display: flex;\r\n margin: 0;\r\n padding: 0;\r\n justify-content: flex-end;\r\n list-style-type: none;\r\n\r\n @include respond-below(sm) {\r\n width: 100%;\r\n }\r\n\r\n &.level-0 {\r\n flex-wrap: wrap;\r\n justify-content: center;\r\n }\r\n\r\n li {\r\n &#link-1 {\r\n display: none;\r\n }\r\n\r\n &#link-73 {\r\n @include respond-above(sm) {\r\n position: absolute;\r\n top: -70px;\r\n right: 0;\r\n }\r\n }\r\n\r\n &.li-level-1 {\r\n a {\r\n width: calc(100% - 18px);\r\n\r\n @include respond-below(sm) {\r\n width: calc(100% - 32px);\r\n color: $cBlack;\r\n text-align: left;\r\n border: 0 solid #000;\r\n }\r\n }\r\n\r\n i {\r\n color: #fff;\r\n margin-right: 10px;\r\n\r\n @include respond-below(sm) {\r\n color: $cBlack;\r\n margin-right: 0;\r\n }\r\n }\r\n }\r\n\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n\r\n @include respond-below(sm) {\r\n justify-content: space-between;\r\n flex-wrap: wrap;\r\n }\r\n\r\n i {\r\n font-size: 13px;\r\n margin-right: 5px;\r\n display: flex;\r\n height: 32px;\r\n width: 32px;\r\n align-items: center;\r\n justify-content: center;\r\n\r\n @include respond-above(sm) {\r\n width: 13px;\r\n }\r\n\r\n @include respond-below(sm) {\r\n margin-right: 0;\r\n }\r\n }\r\n\r\n a {\r\n display: block;\r\n padding: 5px 10px;\r\n color: $cBlack;\r\n @include transition;\r\n font-size: 15px;\r\n white-space: nowrap;\r\n\r\n @include respond-between(md, lg) {\r\n padding: 5px 6px;\r\n }\r\n\r\n &:hover {\r\n text-decoration: none;\r\n color: $cBlue;\r\n }\r\n }\r\n\r\n @include respond-above(sm) {\r\n &:hover {\r\n >ul {\r\n display: block;\r\n }\r\n }\r\n }\r\n\r\n @include respond-below(sm) {\r\n &.active {\r\n >ul {\r\n display: block;\r\n }\r\n }\r\n }\r\n\r\n >ul {\r\n display: none;\r\n position: absolute;\r\n top: calc(100% - 1px);\r\n left: 0;\r\n background: rgba(0, 0, 0, 0.8);\r\n z-index: 50;\r\n\r\n li {\r\n a {\r\n border-bottom: 1px solid #262626;\r\n color: #fff;\r\n padding: 10px 25px;\r\n font-size: 14px;\r\n }\r\n\r\n @include respond-above(sm) {\r\n &:hover {\r\n >ul {\r\n display: block;\r\n }\r\n }\r\n }\r\n\r\n ul {\r\n position: absolute;\r\n background: rgba(0, 0, 0, 0.85);\r\n left: 99%;\r\n top: 0;\r\n display: none;\r\n\r\n @include respond-below(sm) {\r\n padding-left: 25px;\r\n }\r\n\r\n li {\r\n a {\r\n padding-left: 20px;\r\n }\r\n }\r\n\r\n ul {\r\n background: rgba(0, 0, 0, 0.9);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.carousel-banner {\r\n position: relative;\r\n\r\n .wosp {\r\n position: absolute;\r\n bottom: 25px;\r\n left: 25px;\r\n z-index: 99;\r\n\r\n img {\r\n max-width: 150px;\r\n\r\n @include respond-below(sm) {\r\n max-width: 100px;\r\n }\r\n }\r\n }\r\n\r\n .slider {\r\n .item {\r\n position: relative;\r\n\r\n .content {\r\n position: absolute;\r\n background: rgba(0, 0, 0, 0.75);\r\n bottom: 25px;\r\n padding: 50px;\r\n max-width: 1140px;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n\r\n h1 {\r\n color: #fff;\r\n font-size: 36px;\r\n font-weight: 500;\r\n margin: 0 0 15px;\r\n }\r\n\r\n h2 {\r\n color: #fff;\r\n font-size: 20px;\r\n font-weight: 300;\r\n margin: 0 0 15px;\r\n }\r\n\r\n .text {\r\n color: #fff;\r\n font-size: 14px;\r\n font-weight: 300;\r\n\r\n a {\r\n color: $cBlue;\r\n }\r\n }\r\n }\r\n\r\n img {\r\n width: 100%;\r\n // height: 750px;\r\n object-fit: cover;\r\n\r\n @include respond-between(md, lg) {\r\n // height: 600px;\r\n }\r\n\r\n @include respond-below(md) {\r\n // height: 500px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n#scontainer-4,\r\n#scontainer-14 {\r\n .col-md-6 {\r\n position: relative;\r\n overflow: hidden;\r\n height: 550px;\r\n margin-bottom: 30px;\r\n\r\n p:first-child {\r\n display: block;\r\n height: 550px;\r\n overflow: hidden;\r\n }\r\n\r\n img {\r\n @include transition;\r\n height: 100%;\r\n width: 100%;\r\n object-fit: cover;\r\n }\r\n\r\n &:hover {\r\n img {\r\n transform: scale(1.1);\r\n }\r\n }\r\n\r\n h2 {\r\n position: absolute;\r\n bottom: 85px;\r\n font-weight: 600;\r\n font-size: 52px;\r\n width: calc(100% - 30px);\r\n color: #fff;\r\n text-transform: uppercase;\r\n\r\n a {\r\n color: #fff;\r\n }\r\n }\r\n\r\n p {\r\n margin: 0;\r\n padding: 0;\r\n }\r\n\r\n .btn {\r\n position: absolute;\r\n bottom: 35px;\r\n background: $cBlueDark;\r\n color: #fff;\r\n border: 0;\r\n @include transition;\r\n transform: translateX(-50%);\r\n padding: 10px 25px;\r\n border-radius: 0;\r\n\r\n &:hover {\r\n background: $cBlack;\r\n }\r\n }\r\n }\r\n}\r\n\r\n#scontainer-16,\r\n#scontainer-18,\r\n#scontainer-20,\r\n#scontainer-22,\r\n#scontainer-23,\r\n#scontainer-25,\r\n#scontainer-26,\r\n#scontainer-27,\r\n#scontainer-29,\r\n#scontainer-31 {\r\n .col-md-6 {\r\n position: relative;\r\n overflow: hidden;\r\n height: 550px;\r\n margin-bottom: 30px;\r\n padding-bottom: 100px;\r\n\r\n p:first-child {\r\n display: block;\r\n height: 550px;\r\n overflow: hidden;\r\n }\r\n\r\n img {\r\n @include transition;\r\n height: 100%;\r\n width: 100%;\r\n object-fit: contain;\r\n }\r\n\r\n &:hover {\r\n img {\r\n transform: scale(1.1);\r\n }\r\n }\r\n\r\n h2 {\r\n position: absolute;\r\n bottom: 45px;\r\n font-weight: 600;\r\n font-size: 26px;\r\n width: calc(100% - 30px);\r\n color: #fff;\r\n text-transform: uppercase;\r\n\r\n a {\r\n color: $cBlueDark;\r\n }\r\n }\r\n\r\n p {\r\n margin: 0;\r\n padding: 0;\r\n }\r\n\r\n .btn {\r\n position: absolute;\r\n bottom: 5px;\r\n background: $cBlueDark;\r\n color: #fff;\r\n border: 0;\r\n @include transition;\r\n transform: translateX(-50%);\r\n padding: 5px 25px;\r\n border-radius: 0;\r\n font-size: 15px;\r\n\r\n &:hover {\r\n background: $cBlack;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.box-guarantee {\r\n color: #ffffff;\r\n background-image: url('/upload/filemanager/layout/box-guarantee-bg.jpg');\r\n background-repeat: no-repeat;\r\n background-size: cover;\r\n background-attachment: fixed;\r\n background-position: 50% 50%;\r\n position: relative;\r\n\r\n &::after {\r\n content: '';\r\n display: block;\r\n background: rgba(0, 0, 0, 0.5);\r\n width: 100%;\r\n height: 100%;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n }\r\n\r\n #scontainer-5 {\r\n position: relative;\r\n z-index: 10;\r\n font-size: 38px;\r\n font-weight: 300;\r\n\r\n @include respond-below(xs) {\r\n font-size: 26px;\r\n }\r\n }\r\n}\r\n\r\n.box-directories {\r\n #scontainer-6 {\r\n .col-md-3 {\r\n position: relative;\r\n padding-left: 0;\r\n padding-right: 0;\r\n margin-left: 15px;\r\n margin-right: 15px;\r\n margin-bottom: 25px;\r\n\r\n @include respond-below(xs) {\r\n max-width: 100%;\r\n margin-bottom: 15px;\r\n }\r\n\r\n h3 {\r\n @include respond-below(xs) {\r\n font-size: 22px;\r\n }\r\n }\r\n\r\n p {\r\n margin: 0;\r\n padding: 0;\r\n }\r\n\r\n .text {\r\n position: absolute;\r\n top: 50%;\r\n width: 100%;\r\n padding: 0 15px;\r\n transform: translateY(-50%);\r\n @include transition;\r\n opacity: 0;\r\n\r\n * {\r\n margin: 0;\r\n padding: 0;\r\n }\r\n\r\n p {\r\n @include respond-below(xs) {\r\n display: none;\r\n }\r\n }\r\n\r\n a {\r\n color: #fff;\r\n\r\n &:hover {\r\n text-decoration: none;\r\n color: $cBlack;\r\n }\r\n }\r\n }\r\n\r\n img {\r\n display: block;\r\n max-width: 100% !important;\r\n position: relative;\r\n z-index: 1;\r\n }\r\n\r\n &:hover {\r\n &::after {\r\n height: 100%;\r\n z-index: 2;\r\n }\r\n\r\n .text {\r\n z-index: 10;\r\n opacity: 1;\r\n }\r\n }\r\n\r\n &::after {\r\n background: $cBlueDark;\r\n content: '';\r\n display: block;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n position: absolute;\r\n z-index: 0;\r\n width: 100%;\r\n height: 0;\r\n @include transition;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.box-contact,\r\n.box-main {\r\n #scontainer-8 {\r\n @extend .box-top;\r\n }\r\n\r\n a {\r\n color: $cBlueDark;\r\n @include transition;\r\n\r\n &:hover {\r\n text-decoration: none;\r\n color: $cBlack;\r\n }\r\n }\r\n\r\n .nav-tabs {\r\n margin-bottom: 25px;\r\n\r\n li {\r\n a {\r\n padding: 10px 20px;\r\n border: 1px solid $cGrayLight;\r\n margin-bottom: -1px;\r\n display: block;\r\n\r\n &.active {\r\n background: $cBlueDark;\r\n color: #fff;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.box-career {\r\n background-image: url('/upload/filemanager/layout/box-career-bg.jpg');\r\n background-repeat: no-repeat;\r\n background-size: cover;\r\n background-attachment: fixed;\r\n background-position: 0 0;\r\n box-shadow: 0 0 0 0 #ffffff;\r\n\r\n #scontainer-9 {\r\n font-size: 38px;\r\n font-weight: 300;\r\n color: #fff;\r\n\r\n @include respond-below(xs) {\r\n font-size: 22px;\r\n }\r\n\r\n .btn {\r\n background: $cBlueDark;\r\n border: 0;\r\n border-radius: 0;\r\n @include transition;\r\n padding: 10px 25px;\r\n min-width: 200px;\r\n\r\n &:hover {\r\n background: $cBlue;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.box-news {\r\n background: $cGrayLight;\r\n\r\n .content {\r\n display: flex;\r\n justify-content: center;\r\n flex-wrap: wrap;\r\n\r\n .article {\r\n width: calc(100% - 30px);\r\n padding: 0;\r\n margin: 15px;\r\n overflow: hidden;\r\n height: 100%;\r\n background: #fff;\r\n\r\n @include respond-above(sm) {\r\n width: calc(100% / 3 - 30px);\r\n }\r\n\r\n .img {\r\n width: 100%;\r\n height: 250px;\r\n display: block;\r\n\r\n img {\r\n height: 100%;\r\n width: 100%;\r\n object-fit: cover;\r\n }\r\n }\r\n\r\n .article-content {\r\n padding: 20px;\r\n\r\n .title {\r\n font-weight: 700;\r\n font-size: 16px;\r\n color: $cBlack;\r\n margin-bottom: 15px;\r\n display: block;\r\n\r\n &:hover {\r\n color: $cBlueDark;\r\n text-decoration: none;\r\n }\r\n }\r\n\r\n .date-add {\r\n color: $cBlack;\r\n font-size: 13px;\r\n font-weight: 600;\r\n text-align: left;\r\n margin-bottom: 15px;\r\n }\r\n\r\n .entry {\r\n color: $cBlack;\r\n font-size: 14px;\r\n }\r\n }\r\n }\r\n }\r\n\r\n .btn-more {\r\n background: $cBlueDark;\r\n color: #fff;\r\n margin: 25px auto 50px;\r\n font-size: 14px;\r\n display: block;\r\n max-width: 280px;\r\n padding: 10px 25px;\r\n border-radius: 0;\r\n\r\n &:hover {\r\n background: $cBlue;\r\n }\r\n }\r\n}\r\n\r\n.box-producer {\r\n background: $cGrayLight;\r\n\r\n .title {\r\n text-align: center;\r\n\r\n h1 {\r\n display: inline-block;\r\n position: relative;\r\n font-size: 2rem;\r\n line-height: 48px;\r\n font-weight: 400;\r\n padding-bottom: 15px;\r\n margin-bottom: 55px;\r\n border-bottom: 2px solid #dfdfdf;\r\n\r\n &::before {\r\n content: '';\r\n display: block;\r\n width: 60%;\r\n bottom: -2px;\r\n position: absolute;\r\n left: 0;\r\n border-bottom: 2px solid $cBlueDark;\r\n }\r\n }\r\n }\r\n\r\n p {\r\n text-align: justify;\r\n }\r\n}\r\n\r\n.brand {\r\n overflow: hidden;\r\n\r\n .item {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 150px;\r\n height: 100px;\r\n\r\n img {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: contain;\r\n }\r\n }\r\n\r\n .slick-slide,\r\n .slick-track {\r\n display: flex !important;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n .slick-prev,\r\n .slick-next {\r\n top: 50%;\r\n display: none;\r\n\r\n &:before {\r\n color: $cBlueDark;\r\n\r\n @include respond-below(xs) {\r\n opacity: 0;\r\n\r\n &:hover {\r\n opacity: 1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n .slick-next {\r\n right: 0;\r\n }\r\n\r\n .slick-prev {\r\n left: 0;\r\n z-index: 2;\r\n }\r\n}\r\n\r\n.box-footer {\r\n background: #363839;\r\n text-align: center;\r\n font-size: 15px;\r\n color: #fff;\r\n padding-top: 50px;\r\n padding-bottom: 20px;\r\n\r\n a {\r\n @include transition;\r\n color: #fff;\r\n font-weight: 600;\r\n\r\n &:hover {\r\n text-decoration: none;\r\n color: $cBlue;\r\n }\r\n }\r\n\r\n .row {\r\n &-top {\r\n margin-bottom: 50px;\r\n\r\n // p {\r\n // text-align: start;\r\n // }\r\n ul {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n flex-wrap: wrap;\r\n row-gap: 10px;\r\n column-gap: 25px;\r\n // display: grid;\r\n // grid-template-columns: 1fr 1fr 1fr;\r\n list-style: none;\r\n padding: 0;\r\n margin: 0;\r\n }\r\n }\r\n }\r\n}\r\n\r\n#cookie-information {\r\n padding: 10px;\r\n text-align: center;\r\n font-size: 12px;\r\n background: $cBlack;\r\n color: #fff;\r\n\r\n a {\r\n color: $cBlue;\r\n }\r\n}\r\n\r\n.box-main {\r\n border-top: 1px solid $cGrayLight;\r\n}\r\n\r\n#scontainer-10 {\r\n background: $cGrayLight;\r\n padding: 50px 25px 25px;\r\n}\r\n\r\n#scontainer-11 {\r\n @extend .box-top;\r\n}\r\n\r\n.box-articles {\r\n background: $cGrayLight;\r\n\r\n .box-title {\r\n .title {\r\n border-bottom: 2px solid $cBlack;\r\n }\r\n }\r\n}\r\n\r\n.article-entry {\r\n background: #fff;\r\n margin-bottom: 30px;\r\n border-radius: 3px;\r\n overflow: hidden;\r\n height: calc(100% - 20px);\r\n\r\n .img {\r\n img {\r\n width: 100%;\r\n height: 250px;\r\n object-fit: cover;\r\n }\r\n }\r\n\r\n .article-content {\r\n padding: 20px;\r\n\r\n .date-add {\r\n color: $cBlack;\r\n font-size: 13px;\r\n font-weight: 600;\r\n text-align: left;\r\n margin-bottom: 15px;\r\n }\r\n\r\n .article-title {\r\n a {\r\n font-weight: 700;\r\n font-size: 16px;\r\n color: $cBlack;\r\n margin-bottom: 15px;\r\n display: block;\r\n @include transition;\r\n\r\n &:hover {\r\n color: $cBlueDark;\r\n text-decoration: none;\r\n }\r\n }\r\n }\r\n\r\n .entry {\r\n p {\r\n color: $cBlack;\r\n font-size: 13px;\r\n margin-bottom: 0;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.pager {\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n padding-inline-start: 0;\r\n list-style-type: none;\r\n margin-top: 50px;\r\n\r\n li {\r\n color: $cBlack;\r\n font-size: 13px;\r\n margin-bottom: 0;\r\n margin-right: 10px;\r\n\r\n a {\r\n width: 48px;\r\n height: 48px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background: $cGrayLight;\r\n\r\n img {\r\n width: 15px;\r\n height: 15px;\r\n }\r\n\r\n &.inactive {\r\n opacity: 0.3;\r\n pointer-events: none;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.box-content {\r\n background: #fff;\r\n padding: 20px 18px;\r\n\r\n &:first-child {\r\n margin-bottom: 30px;\r\n }\r\n\r\n h4 {\r\n font-weight: 600;\r\n font-size: 15px;\r\n color: $cBlack;\r\n margin-bottom: 15px;\r\n display: block;\r\n }\r\n\r\n ul {\r\n list-style-type: none;\r\n padding-inline-start: 0;\r\n\r\n li {\r\n margin-bottom: 10px;\r\n\r\n a {\r\n color: $cBlueDark;\r\n @include transition;\r\n\r\n &:hover {\r\n color: $cBlack;\r\n text-decoration: none;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.article {\r\n background: #fff;\r\n padding: 25px;\r\n\r\n .table-of-contents {\r\n box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.1);\r\n // border-radius: 5px;\r\n padding: 20px;\r\n margin-bottom: 20px;\r\n\r\n .title {\r\n font-size: 20px;\r\n margin-bottom: 10px;\r\n }\r\n\r\n ol {\r\n margin-bottom: 0;\r\n }\r\n }\r\n\r\n .main-image {\r\n margin-bottom: 25px;\r\n\r\n img {\r\n max-width: 100%;\r\n }\r\n }\r\n\r\n .article-title {\r\n @extend .box-title;\r\n justify-content: flex-start !important;\r\n margin-bottom: 25px !important;\r\n }\r\n\r\n .date-add {\r\n color: $cBlack;\r\n font-size: 13px;\r\n font-weight: 600;\r\n margin-bottom: 15px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: flex-start;\r\n\r\n img {\r\n margin-right: 5px;\r\n }\r\n }\r\n\r\n .text {\r\n h2 {\r\n font-size: 18px;\r\n font-weight: 600;\r\n }\r\n\r\n h3 {\r\n font-size: 16px;\r\n font-weight: 600;\r\n }\r\n }\r\n\r\n .gallery {\r\n display: flex;\r\n flex-wrap: wrap;\r\n\r\n .image {\r\n width: calc(100% / 4 - 10px);\r\n margin: 10px 10px 0 0;\r\n display: block;\r\n max-height: 175px;\r\n border: 1px solid $cGrayLight;\r\n\r\n @include respond-below(sm) {\r\n width: calc(100% / 3 - 10px);\r\n }\r\n\r\n img {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: contain;\r\n object-position: center;\r\n }\r\n }\r\n }\r\n\r\n .social-icons {\r\n margin-bottom: 20px;\r\n }\r\n\r\n .btn-back {\r\n background: $cBlueDark;\r\n color: #fff;\r\n margin: 25px 0 0;\r\n font-size: 14px;\r\n display: block;\r\n max-width: 200px;\r\n padding: 10px 25px;\r\n border-radius: 0;\r\n\r\n &:hover {\r\n background: $cBlue;\r\n }\r\n }\r\n}\r\n\r\n#scontainer-12 {\r\n @extend .box-top;\r\n\r\n h3 {\r\n font-size: 16px;\r\n font-weight: 600;\r\n }\r\n}\r\n\r\n.article-18,\r\n.article-27 {\r\n\r\n .col-md-6,\r\n .col-md-4 {\r\n position: relative;\r\n overflow: hidden;\r\n\r\n &::after {\r\n content: '';\r\n display: block;\r\n background: rgba(0, 0, 0, 0.33);\r\n width: calc(100% - 30px);\r\n height: calc(100% - 15px);\r\n position: absolute;\r\n top: 0;\r\n left: 15px;\r\n }\r\n\r\n p:first-child {\r\n width: 100%;\r\n height: 500px;\r\n display: block;\r\n }\r\n\r\n img {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n }\r\n\r\n h2 {\r\n position: absolute;\r\n padding: 0;\r\n margin: 0;\r\n bottom: 25px;\r\n left: 25px;\r\n z-index: 10;\r\n\r\n a {\r\n color: #fff;\r\n font-weight: 300;\r\n font-size: 30px;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.article-miniature {\r\n position: relative;\r\n margin-bottom: 30px;\r\n\r\n &::after {\r\n content: '';\r\n display: block;\r\n background: rgba(0, 0, 0, 0.33);\r\n width: 100%;\r\n height: 100%;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n }\r\n\r\n .img {\r\n display: block;\r\n height: 300px;\r\n\r\n img {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: cover;\r\n }\r\n }\r\n\r\n h2 {\r\n position: absolute;\r\n padding: 0;\r\n margin: 0;\r\n bottom: 25px;\r\n left: 25px;\r\n z-index: 10;\r\n\r\n a {\r\n color: #fff;\r\n font-weight: 300;\r\n font-size: 30px;\r\n @include transition;\r\n\r\n &:hover {\r\n text-decoration: none;\r\n color: $cBlueDark;\r\n }\r\n }\r\n }\r\n}\r\n\r\n#contact-form {\r\n font-size: 13px;\r\n\r\n .form-control {\r\n border-radius: 0;\r\n font-size: 13px;\r\n }\r\n\r\n .captcha span {\r\n font-size: 13px !important;\r\n }\r\n\r\n .btn {\r\n background: $cBlueDark;\r\n color: #fff;\r\n text-transform: uppercase;\r\n border: 0;\r\n border-radius: 0;\r\n font-size: 13px;\r\n width: 125px;\r\n text-align: center;\r\n padding: 10px 15px;\r\n }\r\n}\r\n\r\n.alert-success {\r\n margin: 0 0 50px;\r\n border: 0;\r\n border-radius: 0;\r\n background: $cBlueDark;\r\n color: #fff;\r\n}\r\n\r\n.article-71,\r\n.article-72,\r\n.article-73,\r\n.article-74,\r\n.article-75,\r\n.article-76,\r\n.article-77,\r\n.article-78,\r\n.article-94,\r\n.article-95,\r\n.article-96,\r\n.article-97,\r\n.article-98,\r\n.article-99 {\r\n .gallery {\r\n .image {\r\n img {\r\n object-fit: cover;\r\n }\r\n }\r\n }\r\n}\r\n\r\n#link-68>a {\r\n pointer-events: none;\r\n}\r\n\r\n#link-73 {\r\n img {\r\n max-width: 130px;\r\n }\r\n}\r\n\r\n#scontainer-53 {\r\n max-height: calc(100vh - 214px);\r\n background: #000;\r\n\r\n .scontainer-content {\r\n height: 100%;\r\n\r\n p {\r\n height: 100%;\r\n text-align: center;\r\n }\r\n\r\n video {\r\n width: 100%;\r\n height: 100%;\r\n max-height: calc(100vh - 214px);\r\n margin-bottom: -6px;\r\n }\r\n }\r\n}\r\n\r\nbody .article-122 {\r\n .gallery {\r\n a.image {\r\n img {\r\n object-fit: cover;\r\n }\r\n }\r\n }\r\n}","$breakpoints: (\r\n xs: 576px,\r\n sm: 768px,\r\n md: 992px,\r\n lg: 1200px\r\n);\r\n@mixin respond-above($breakpoint) {\r\n @if map-has-key($breakpoints, $breakpoint) {\r\n $breakpoint-value: map-get($breakpoints, $breakpoint);\r\n @media (min-width: $breakpoint-value) {\r\n @content;\r\n }\r\n } @else {\r\n @warn 'Invalid breakpoint: #{$breakpoint}.';\r\n }\r\n}\r\n@mixin respond-below($breakpoint) {\r\n @if map-has-key($breakpoints, $breakpoint) {\r\n $breakpoint-value: map-get($breakpoints, $breakpoint);\r\n @media (max-width: ($breakpoint-value - 1)) {\r\n @content;\r\n }\r\n } @else {\r\n @warn 'Invalid breakpoint: #{$breakpoint}.';\r\n }\r\n}\r\n@mixin respond-between($lower, $upper) {\r\n @if map-has-key($breakpoints, $lower) and map-has-key($breakpoints, $upper) {\r\n $lower-breakpoint: map-get($breakpoints, $lower);\r\n $upper-breakpoint: map-get($breakpoints, $upper);\r\n @media (min-width: $lower-breakpoint) and (max-width: ($upper-breakpoint - 1)) {\r\n @content;\r\n }\r\n } @else {\r\n @if (map-has-key($breakpoints, $lower) == false) {\r\n @warn 'Your lower breakpoint was invalid: #{$lower}.';\r\n }\r\n @if (map-has-key($breakpoints, $upper) == false) {\r\n @warn 'Your upper breakpoint was invalid: #{$upper}.';\r\n }\r\n }\r\n}\r\n@mixin border-radius($px: 0) {\r\n -webkit-border-radius: $px;\r\n -moz-border-radius: $px;\r\n border-radius: $px;\r\n}\r\n@mixin box-shadow($value) {\r\n -webkit-box-shadow: $value;\r\n -moz-box-shadow: $value;\r\n box-shadow: $value;\r\n}\r\n@mixin transition($element: all, $time: .5s, $option: ease) {\r\n -webkit-transition: $element $time $option;\r\n transition: $element $time $option;\r\n}\r\n@mixin opacity($value) {\r\n $IEValue: $value*100;\r\n opacity: $value;\r\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=\"+$IEValue+\")\";\r\n filter: alpha(opacity=$IEValue);\r\n}\r\n@mixin flexbox() {\r\n display: -webkit-box;\r\n display: -moz-box;\r\n display: -ms-flexbox;\r\n display: -webkit-flex;\r\n display: flex;\r\n}\r\n@mixin flex($values) {\r\n -webkit-box-flex: $values;\r\n -moz-box-flex: $values;\r\n -webkit-flex: $values;\r\n \t -ms-flex: $values;\r\n \t flex: $values;\r\n}\r\n@mixin flex-direction($direction) {\r\n -webkit-flex-direction: $direction;\r\n -moz-flex-direction: $direction;\r\n -ms-flex-direction: $direction;\r\n flex-direction: $direction;\r\n}\r\n@mixin flex-wrap($wrap) {\r\n -webkit-flex-wrap: $wrap;\r\n -moz-flex-wrap: $wrap;\r\n -ms-flex-wrap: $wrap;\r\n flex-wrap: $wrap;\r\n}\r\n@mixin flex-flow($flow) {\r\n -webkit-flex-flow: $flow;\r\n -moz-flex-flow: $flow;\r\n -ms-flex-flow: $flow;\r\n flex-flow: $flow;\r\n}\r\n@mixin order($val) {\r\n -webkit-box-ordinal-group: $val; \r\n -moz-box-ordinal-group: $val; \r\n \t -ms-flex-order: $val; \r\n \t -webkit-order: $val; \r\n \t\t order: $val;\r\n}\r\n@mixin flex-grow($grow) {\r\n -webkit-flex-grow: $grow;\r\n -moz-flex-grow: $grow;\r\n -ms-flex-grow: $grow;\r\n flex-grow: $grow;\r\n}\r\n@mixin flex-shrink($shrink) {\r\n -webkit-flex-shrink: $shrink;\r\n -moz-flex-shrink: $shrink;\r\n -ms-flex-shrink: $shrink;\r\n flex-shrink: $shrink;\r\n}\r\n@mixin flex-basis($width) {\r\n -webkit-flex-basis: $width;\r\n -moz-flex-basis: $width;\r\n -ms-flex-basis: $width;\r\n flex-basis: $width;\r\n}\r\n@mixin justify-content($justify) {\r\n -webkit-justify-content: $justify;\r\n -moz-justify-content: $justify;\r\n -ms-justify-content: $justify;\r\n justify-content: $justify;\r\n -ms-flex-pack: $justify;\r\n}\r\n@mixin align-content($align) {\r\n -webkit-align-content: $align;\r\n -moz-align-content: $align;\r\n -ms-align-content: $align;\r\n align-content: $align;\r\n}\r\n@mixin align-items($align) {\r\n -webkit-align-items: $align;\r\n -moz-align-items: $align;\r\n -ms-align-items: $align;\r\n align-items: $align;\r\n}\r\n@mixin align-self($align) {\r\n -webkit-align-self: $align;\r\n -moz-align-self: $align;\r\n -ms-align-self: $align;\r\n align-self: $align;\r\n}"]} \ No newline at end of file diff --git a/layout/style-scss/style.scss b/layout/style-scss/style.scss index 9b4cae1..1c477dc 100644 --- a/layout/style-scss/style.scss +++ b/layout/style-scss/style.scss @@ -7,577 +7,613 @@ $cBlue: #90d4f0; $cBlueDark: #22a9e1; body { - font-family: 'Open Sans', sans-serif; - font-size: 15px; + font-family: 'Open Sans', sans-serif; + font-size: 15px; - &.noscroll { - position: fixed; - overflow: hidden; - } + &.noscroll { + position: fixed; + overflow: hidden; + } } .scontainer-content { - h2 { - font-size: 18px; - font-weight: 600; - } + h2 { + font-size: 18px; + font-weight: 600; + } } .box-border { - padding: 25px; - border: 1px solid $cGrayLight; - border-radius: 3px; + padding: 25px; + border: 1px solid $cGrayLight; + border-radius: 3px; - @include respond-below(sm) { - padding: 15px; + @include respond-below(sm) { + padding: 15px; - .col-md-3 { - -ms-flex: 0 0 25% !important; - flex: 0 0 25% !important; - max-width: 25% !important; - } + .col-md-3 { + -ms-flex: 0 0 25% !important; + flex: 0 0 25% !important; + max-width: 25% !important; + } - .col-md-9 { - -ms-flex: 0 0 75% !important; - flex: 0 0 75% !important; - max-width: 75% !important; - } - } + .col-md-9 { + -ms-flex: 0 0 75% !important; + flex: 0 0 75% !important; + max-width: 75% !important; + } + } } .fac { - display: flex; - flex-wrap: wrap; - align-items: center; - align-self: center; + display: flex; + flex-wrap: wrap; + align-items: center; + align-self: center; - .row { - width: 100%; - padding: 10px 0; + .row { + width: 100%; + padding: 10px 0; - p { - margin-bottom: 0; - } - } + p { + margin-bottom: 0; + } + } } .box-top { - padding-top: 75px; + padding-top: 75px; } .box { - padding: 75px 0; + padding: 75px 0; - @include respond-below(sm) { - padding: 50px 0; - } + @include respond-below(sm) { + padding: 50px 0; + } - @include respond-below(sm) { - padding: 25px 0; - } + @include respond-below(sm) { + padding: 25px 0; + } - .box-title { - text-align: center; - font-size: 22px; - position: relative; - margin: 0 auto 75px; - display: flex; - justify-content: center; + .box-title { + text-align: center; + font-size: 22px; + position: relative; + margin: 0 auto 75px; + display: flex; + justify-content: center; - @include respond-below(sm) { - margin-bottom: 25px; - } + @include respond-below(sm) { + margin-bottom: 25px; + } - .title { - padding-bottom: 15px; - border-bottom: 2px solid $cGrayLight; - position: relative; - font-size: 32px; + .title { + padding-bottom: 15px; + border-bottom: 2px solid $cGrayLight; + position: relative; + font-size: 32px; - @include respond-below(xs) { - font-size: 22px; - } + @include respond-below(xs) { + font-size: 22px; + } - &::after { - content: ''; - display: block; - width: 60%; - bottom: -2px; - position: absolute; - left: 0; - border-bottom: 2px solid $cBlueDark; - } - } - } + &::after { + content: ''; + display: block; + width: 60%; + bottom: -2px; + position: absolute; + left: 0; + border-bottom: 2px solid $cBlueDark; + } + } + } } .top { - background: $cGrayLight; - color: $cBlack; - padding: 10px 0; - position: relative; + background: $cGrayLight; + color: $cBlack; + padding: 10px 0; + position: relative; - #scontainer-1 { - img { - margin-right: 5px; - } - } + #scontainer-1 { + img { + margin-right: 5px; + } + } - #scontainer-2 { - display: flex; - justify-content: flex-end; + #scontainer-2 { + display: flex; + justify-content: flex-end; - a { - color: $cBlack; - font-size: 14px; + a { + color: $cBlack; + font-size: 14px; - &:hover { - text-decoration: none; - } - } - } + &:hover { + text-decoration: none; + } + } + } - p { - margin: 0; - } + p { + margin: 0; + } - .language { - position: absolute; - top: 0; - right: 5px; - bottom: 0; - z-index: 999; + .language { + position: absolute; + top: 0; + right: 5px; + bottom: 0; + z-index: 999; - @include respond-below(sm) { - top: 65px; - } + @include respond-below(sm) { + top: 65px; + } - #languages { - height: 100%; + #languages { + height: 100%; - .container { - height: 100%; + .container { + height: 100%; - .row { - height: 100%; - } - } + .row { + height: 100%; + } + } - ul { - display: flex; - align-items: center; - margin: 0; - padding: 0; - list-style: none; - height: 100%; + ul { + display: flex; + align-items: center; + margin: 0; + padding: 0; + list-style: none; + height: 100%; - li { - margin: 0 5px; + li { + margin: 0 5px; - &:first-child { - margin-left: 0; - } + &:first-child { + margin-left: 0; + } - &:last-child { - margin-right: 0; - } + &:last-child { + margin-right: 0; + } - &.active { - display: none; - } + &.active { + display: none; + } - a { - img { - height: 16px; - } - } - } - } - } - } + a { + img { + height: 16px; + } + } + } + } + } + } } .header { - padding: 25px 0; + padding: 25px 0; - .col-lg-3 { - width: 100% !important; - flex: 0 0 100%; - max-width: 100%; - } + .col-lg-3 { + width: 100% !important; + flex: 0 0 100%; + max-width: 100%; + } - .logo { - display: block; - width: 100%; - max-width: 300px; - margin: 0 auto 25px; + .logo { + display: block; + width: 100%; + max-width: 300px; + margin: 0 auto 25px; - img { - width: 100%; - max-width: 387px; - } - } + img { + width: 100%; + max-width: 387px; + } + } - #main-menu-btn { - height: 50px; - width: 50px; - position: fixed; - bottom: 10px; - right: 10px; - color: #fff; - background: $cBlack; - display: none; - z-index: 9999; - line-height: 50px; - cursor: pointer; - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - border-radius: 50%; - align-items: center; - justify-content: center; - font-size: 30px; + #main-menu-btn { + height: 50px; + width: 50px; + position: fixed; + bottom: 10px; + right: 10px; + color: #fff; + background: $cBlack; + display: none; + z-index: 9999; + line-height: 50px; + cursor: pointer; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + border-radius: 50%; + align-items: center; + justify-content: center; + font-size: 30px; - @include respond-below(sm) { - display: flex; - } - } + @include respond-below(sm) { + display: flex; + } + } - .main-menu-container { - display: flex; - align-items: center; - justify-content: center; - width: 100% !important; - flex: 0 0 100%; - max-width: 100%; + .main-menu-container { + display: flex; + align-items: center; + justify-content: center; + width: 100% !important; + flex: 0 0 100%; + max-width: 100%; - @include respond-below(lg) { - justify-content: center; - } - } + @include respond-below(lg) { + justify-content: center; + } + } - #main-menu { - @include respond-below(sm) { - display: none; + #main-menu { + @include respond-below(sm) { + display: none; - &.visible { - display: block; - position: fixed; - top: 0; - left: 0; - height: 100%; - width: 100%; - background: #fff; - z-index: 20; - overflow-y: scroll; + &.visible { + display: block; + position: fixed; + top: 0; + left: 0; + height: 100%; + width: 100%; + background: #fff; + z-index: 20; + overflow-y: scroll; - #menu-container-1 { - display: flex; - width: 100%; - height: 100%; - align-items: center; - justify-content: center; + #menu-container-1 { + display: flex; + width: 100%; + height: 100%; + align-items: center; + justify-content: center; - > ul { - display: block; - width: 100%; - text-align: center; - padding: 20px; - border: 1px solid $cGrayLight; - border-radius: 3px; - height: 100%; + >ul { + display: block; + width: 100%; + text-align: center; + padding: 20px; + border: 1px solid $cGrayLight; + border-radius: 3px; + height: 100%; - li { - ul { - position: static; - background: #fff; - } - } - } - } - } - } + li { + ul { + position: static; + background: #fff; + } + } + } + } + } + } - &.sticky { - @include respond-above(sm) { - position: fixed; - top: 0; - left: 0; - width: 100%; - background: #fff; - z-index: 50; + &.sticky { + @include respond-above(sm) { + position: fixed; + top: 0; + left: 0; + width: 100%; + background: #fff; + z-index: 50; - #menu-container-1 > ul { - justify-content: center; - height: 75px; - align-items: center; - } - } - } + #menu-container-1>ul { + justify-content: center; + height: 75px; + align-items: center; + } + } + } - ul { - display: flex; - margin: 0; - padding: 0; - justify-content: flex-end; - list-style-type: none; + ul { + display: flex; + margin: 0; + padding: 0; + justify-content: flex-end; + list-style-type: none; - @include respond-below(sm) { - width: 100%; - } + @include respond-below(sm) { + width: 100%; + } - &.level-0 { - flex-wrap: wrap; - justify-content: center; - } + &.level-0 { + flex-wrap: wrap; + justify-content: center; + } - li { - &#link-1 { - display: none; - } + li { + &#link-1 { + display: none; + } - &#link-73 { - @include respond-above(sm) { - position: absolute; - top: -70px; - right: 0; - } - } + &#link-73 { + @include respond-above(sm) { + position: absolute; + top: -70px; + right: 0; + } + } - &.li-level-1 { - a { - width: calc(100% - 18px); + &.li-level-1 { + a { + width: calc(100% - 18px); - @include respond-below(sm) { - width: calc(100% - 32px); - color: $cBlack; - text-align: left; - border: 0 solid #000; - } - } + @include respond-below(sm) { + width: calc(100% - 32px); + color: $cBlack; + text-align: left; + border: 0 solid #000; + } + } - i { - color: #fff; - margin-right: 10px; + i { + color: #fff; + margin-right: 10px; - @include respond-below(sm) { - color: $cBlack; - margin-right: 0; - } - } - } + @include respond-below(sm) { + color: $cBlack; + margin-right: 0; + } + } + } - position: relative; - display: flex; - align-items: center; + position: relative; + display: flex; + align-items: center; - @include respond-below(sm) { - justify-content: space-between; - flex-wrap: wrap; - } + @include respond-below(sm) { + justify-content: space-between; + flex-wrap: wrap; + } - i { - font-size: 13px; - margin-right: 5px; - display: flex; - height: 32px; - width: 32px; - align-items: center; - justify-content: center; + i { + font-size: 13px; + margin-right: 5px; + display: flex; + height: 32px; + width: 32px; + align-items: center; + justify-content: center; - @include respond-above(sm) { - width: 13px; - } + @include respond-above(sm) { + width: 13px; + } - @include respond-below(sm) { - margin-right: 0; - } - } + @include respond-below(sm) { + margin-right: 0; + } + } - a { - display: block; - padding: 5px 10px; - color: $cBlack; - @include transition; - font-size: 15px; - white-space: nowrap; + a { + display: block; + padding: 5px 10px; + color: $cBlack; + @include transition; + font-size: 15px; + white-space: nowrap; - @include respond-between(md, lg) { - padding: 5px 6px; - } + @include respond-between(md, lg) { + padding: 5px 6px; + } - &:hover { - text-decoration: none; - color: $cBlue; - } - } + &:hover { + text-decoration: none; + color: $cBlue; + } + } - @include respond-above(sm) { - &:hover { - > ul { - display: block; - } - } - } + @include respond-above(sm) { + &:hover { + >ul { + display: block; + } + } + } - @include respond-below(sm) { - &.active { - > ul { - display: block; - } - } - } + @include respond-below(sm) { + &.active { + >ul { + display: block; + } + } + } - > ul { - display: none; - position: absolute; - top: calc(100% - 1px); - left: 0; - background: rgba(0, 0, 0, 0.8); - z-index: 50; + >ul { + display: none; + position: absolute; + top: calc(100% - 1px); + left: 0; + background: rgba(0, 0, 0, 0.8); + z-index: 50; - li { - a { - border-bottom: 1px solid #262626; - color: #fff; - padding: 10px 25px; - font-size: 14px; - } + li { + a { + border-bottom: 1px solid #262626; + color: #fff; + padding: 10px 25px; + font-size: 14px; + } - @include respond-above(sm) { - &:hover { - > ul { - display: block; - } - } - } + @include respond-above(sm) { + &:hover { + >ul { + display: block; + } + } + } - ul { - position: absolute; - background: rgba(0, 0, 0, 0.85); - left: 99%; - top: 0; - display: none; + ul { + position: absolute; + background: rgba(0, 0, 0, 0.85); + left: 99%; + top: 0; + display: none; - @include respond-below(sm) { - padding-left: 25px; - } + @include respond-below(sm) { + padding-left: 25px; + } - li { - a { - padding-left: 20px; - } - } + li { + a { + padding-left: 20px; + } + } - ul { - background: rgba(0, 0, 0, 0.9); - } - } - } - } - } - } - } + ul { + background: rgba(0, 0, 0, 0.9); + } + } + } + } + } + } + } } .carousel-banner { - position: relative; + position: relative; - .wosp { - position: absolute; - bottom: 25px; - left: 25px; - z-index: 99; + .wosp { + position: absolute; + bottom: 25px; + left: 25px; + z-index: 99; - img { - max-width: 150px; + img { + max-width: 150px; - @include respond-below(sm) { - max-width: 100px; - } - } - } + @include respond-below(sm) { + max-width: 100px; + } + } + } - .slider { - .item { - img { - width: 100%; - // height: 750px; - object-fit: cover; + .slider { + .item { + position: relative; - @include respond-between(md, lg) { - // height: 600px; - } + .content { + position: absolute; + background: rgba(0, 0, 0, 0.75); + bottom: 25px; + padding: 50px; + max-width: 1140px; + left: 50%; + transform: translateX(-50%); - @include respond-below(md) { - // height: 500px; - } - } - } - } + h1 { + color: #fff; + font-size: 36px; + font-weight: 500; + margin: 0 0 15px; + } + + h2 { + color: #fff; + font-size: 20px; + font-weight: 300; + margin: 0 0 15px; + } + + .text { + color: #fff; + font-size: 14px; + font-weight: 300; + + a { + color: $cBlue; + } + } + } + + img { + width: 100%; + // height: 750px; + object-fit: cover; + + @include respond-between(md, lg) { + // height: 600px; + } + + @include respond-below(md) { + // height: 500px; + } + } + } + } } #scontainer-4, #scontainer-14 { - .col-md-6 { - position: relative; - overflow: hidden; - height: 550px; - margin-bottom: 30px; + .col-md-6 { + position: relative; + overflow: hidden; + height: 550px; + margin-bottom: 30px; - p:first-child { - display: block; - height: 550px; - overflow: hidden; - } + p:first-child { + display: block; + height: 550px; + overflow: hidden; + } - img { - @include transition; - height: 100%; - width: 100%; - object-fit: cover; - } + img { + @include transition; + height: 100%; + width: 100%; + object-fit: cover; + } - &:hover { - img { - transform: scale(1.1); - } - } + &:hover { + img { + transform: scale(1.1); + } + } - h2 { - position: absolute; - bottom: 85px; - font-weight: 600; - font-size: 52px; - width: calc(100% - 30px); - color: #fff; - text-transform: uppercase; + h2 { + position: absolute; + bottom: 85px; + font-weight: 600; + font-size: 52px; + width: calc(100% - 30px); + color: #fff; + text-transform: uppercase; - a { - color: #fff; - } - } + a { + color: #fff; + } + } - p { - margin: 0; - padding: 0; - } + p { + margin: 0; + padding: 0; + } - .btn { - position: absolute; - bottom: 35px; - background: $cBlueDark; - color: #fff; - border: 0; - @include transition; - transform: translateX(-50%); - padding: 10px 25px; - border-radius: 0; + .btn { + position: absolute; + bottom: 35px; + background: $cBlueDark; + color: #fff; + border: 0; + @include transition; + transform: translateX(-50%); + padding: 10px 25px; + border-radius: 0; - &:hover { - background: $cBlack; - } - } - } + &:hover { + background: $cBlack; + } + } + } } #scontainer-16, @@ -590,867 +626,868 @@ body { #scontainer-27, #scontainer-29, #scontainer-31 { - .col-md-6 { - position: relative; - overflow: hidden; - height: 550px; - margin-bottom: 30px; - padding-bottom: 100px; + .col-md-6 { + position: relative; + overflow: hidden; + height: 550px; + margin-bottom: 30px; + padding-bottom: 100px; - p:first-child { - display: block; - height: 550px; - overflow: hidden; - } + p:first-child { + display: block; + height: 550px; + overflow: hidden; + } - img { - @include transition; - height: 100%; - width: 100%; - object-fit: contain; - } + img { + @include transition; + height: 100%; + width: 100%; + object-fit: contain; + } - &:hover { - img { - transform: scale(1.1); - } - } + &:hover { + img { + transform: scale(1.1); + } + } - h2 { - position: absolute; - bottom: 45px; - font-weight: 600; - font-size: 26px; - width: calc(100% - 30px); - color: #fff; - text-transform: uppercase; + h2 { + position: absolute; + bottom: 45px; + font-weight: 600; + font-size: 26px; + width: calc(100% - 30px); + color: #fff; + text-transform: uppercase; - a { - color: $cBlueDark; - } - } + a { + color: $cBlueDark; + } + } - p { - margin: 0; - padding: 0; - } + p { + margin: 0; + padding: 0; + } - .btn { - position: absolute; - bottom: 5px; - background: $cBlueDark; - color: #fff; - border: 0; - @include transition; - transform: translateX(-50%); - padding: 5px 25px; - border-radius: 0; - font-size: 15px; + .btn { + position: absolute; + bottom: 5px; + background: $cBlueDark; + color: #fff; + border: 0; + @include transition; + transform: translateX(-50%); + padding: 5px 25px; + border-radius: 0; + font-size: 15px; - &:hover { - background: $cBlack; - } - } - } + &:hover { + background: $cBlack; + } + } + } } .box-guarantee { - color: #ffffff; - background-image: url('/upload/filemanager/layout/box-guarantee-bg.jpg'); - background-repeat: no-repeat; - background-size: cover; - background-attachment: fixed; - background-position: 50% 50%; - position: relative; + color: #ffffff; + background-image: url('/upload/filemanager/layout/box-guarantee-bg.jpg'); + background-repeat: no-repeat; + background-size: cover; + background-attachment: fixed; + background-position: 50% 50%; + position: relative; - &::after { - content: ''; - display: block; - background: rgba(0, 0, 0, 0.5); - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; - } + &::after { + content: ''; + display: block; + background: rgba(0, 0, 0, 0.5); + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + } - #scontainer-5 { - position: relative; - z-index: 10; - font-size: 38px; - font-weight: 300; + #scontainer-5 { + position: relative; + z-index: 10; + font-size: 38px; + font-weight: 300; - @include respond-below(xs) { - font-size: 26px; - } - } + @include respond-below(xs) { + font-size: 26px; + } + } } .box-directories { - #scontainer-6 { - .col-md-3 { - position: relative; - padding-left: 0; - padding-right: 0; - margin-left: 15px; - margin-right: 15px; - margin-bottom: 25px; + #scontainer-6 { + .col-md-3 { + position: relative; + padding-left: 0; + padding-right: 0; + margin-left: 15px; + margin-right: 15px; + margin-bottom: 25px; - @include respond-below(xs) { - max-width: 100%; - margin-bottom: 15px; - } + @include respond-below(xs) { + max-width: 100%; + margin-bottom: 15px; + } - h3 { - @include respond-below(xs) { - font-size: 22px; - } - } + h3 { + @include respond-below(xs) { + font-size: 22px; + } + } - p { - margin: 0; - padding: 0; - } + p { + margin: 0; + padding: 0; + } - .text { - position: absolute; - top: 50%; - width: 100%; - padding: 0 15px; - transform: translateY(-50%); - @include transition; - opacity: 0; + .text { + position: absolute; + top: 50%; + width: 100%; + padding: 0 15px; + transform: translateY(-50%); + @include transition; + opacity: 0; - * { - margin: 0; - padding: 0; - } + * { + margin: 0; + padding: 0; + } - p { - @include respond-below(xs) { - display: none; - } - } + p { + @include respond-below(xs) { + display: none; + } + } - a { - color: #fff; + a { + color: #fff; - &:hover { - text-decoration: none; - color: $cBlack; - } - } - } + &:hover { + text-decoration: none; + color: $cBlack; + } + } + } - img { - display: block; - max-width: 100% !important; - position: relative; - z-index: 1; - } + img { + display: block; + max-width: 100% !important; + position: relative; + z-index: 1; + } - &:hover { - &::after { - height: 100%; - z-index: 2; - } + &:hover { + &::after { + height: 100%; + z-index: 2; + } - .text { - z-index: 10; - opacity: 1; - } - } + .text { + z-index: 10; + opacity: 1; + } + } - &::after { - background: $cBlueDark; - content: ''; - display: block; - position: absolute; - top: 0; - left: 0; - position: absolute; - z-index: 0; - width: 100%; - height: 0; - @include transition; - } - } - } + &::after { + background: $cBlueDark; + content: ''; + display: block; + position: absolute; + top: 0; + left: 0; + position: absolute; + z-index: 0; + width: 100%; + height: 0; + @include transition; + } + } + } } .box-contact, .box-main { - #scontainer-8 { - @extend .box-top; - } + #scontainer-8 { + @extend .box-top; + } - a { - color: $cBlueDark; - @include transition; + a { + color: $cBlueDark; + @include transition; - &:hover { - text-decoration: none; - color: $cBlack; - } - } + &:hover { + text-decoration: none; + color: $cBlack; + } + } - .nav-tabs { - margin-bottom: 25px; + .nav-tabs { + margin-bottom: 25px; - li { - a { - padding: 10px 20px; - border: 1px solid $cGrayLight; - margin-bottom: -1px; - display: block; + li { + a { + padding: 10px 20px; + border: 1px solid $cGrayLight; + margin-bottom: -1px; + display: block; - &.active { - background: $cBlueDark; - color: #fff; - } - } - } - } + &.active { + background: $cBlueDark; + color: #fff; + } + } + } + } } .box-career { - background-image: url('/upload/filemanager/layout/box-career-bg.jpg'); - background-repeat: no-repeat; - background-size: cover; - background-attachment: fixed; - background-position: 0 0; - box-shadow: 0 0 0 0 #ffffff; + background-image: url('/upload/filemanager/layout/box-career-bg.jpg'); + background-repeat: no-repeat; + background-size: cover; + background-attachment: fixed; + background-position: 0 0; + box-shadow: 0 0 0 0 #ffffff; - #scontainer-9 { - font-size: 38px; - font-weight: 300; - color: #fff; + #scontainer-9 { + font-size: 38px; + font-weight: 300; + color: #fff; - @include respond-below(xs) { - font-size: 22px; - } + @include respond-below(xs) { + font-size: 22px; + } - .btn { - background: $cBlueDark; - border: 0; - border-radius: 0; - @include transition; - padding: 10px 25px; - min-width: 200px; + .btn { + background: $cBlueDark; + border: 0; + border-radius: 0; + @include transition; + padding: 10px 25px; + min-width: 200px; - &:hover { - background: $cBlue; - } - } - } + &:hover { + background: $cBlue; + } + } + } } .box-news { - background: $cGrayLight; + background: $cGrayLight; - .content { - display: flex; - justify-content: center; - flex-wrap: wrap; + .content { + display: flex; + justify-content: center; + flex-wrap: wrap; - .article { - width: calc(100% - 30px); - padding: 0; - margin: 15px; - overflow: hidden; - height: 100%; - background: #fff; + .article { + width: calc(100% - 30px); + padding: 0; + margin: 15px; + overflow: hidden; + height: 100%; + background: #fff; - @include respond-above(sm) { - width: calc(100% / 3 - 30px); - } + @include respond-above(sm) { + width: calc(100% / 3 - 30px); + } - .img { - width: 100%; - height: 250px; - display: block; + .img { + width: 100%; + height: 250px; + display: block; - img { - height: 100%; - width: 100%; - object-fit: cover; - } - } + img { + height: 100%; + width: 100%; + object-fit: cover; + } + } - .article-content { - padding: 20px; + .article-content { + padding: 20px; - .title { - font-weight: 700; - font-size: 16px; - color: $cBlack; - margin-bottom: 15px; - display: block; + .title { + font-weight: 700; + font-size: 16px; + color: $cBlack; + margin-bottom: 15px; + display: block; - &:hover { - color: $cBlueDark; - text-decoration: none; - } - } + &:hover { + color: $cBlueDark; + text-decoration: none; + } + } - .date-add { - color: $cBlack; - font-size: 13px; - font-weight: 600; - text-align: left; - margin-bottom: 15px; - } + .date-add { + color: $cBlack; + font-size: 13px; + font-weight: 600; + text-align: left; + margin-bottom: 15px; + } - .entry { - color: $cBlack; - font-size: 14px; - } - } - } - } + .entry { + color: $cBlack; + font-size: 14px; + } + } + } + } - .btn-more { - background: $cBlueDark; - color: #fff; - margin: 25px auto 50px; - font-size: 14px; - display: block; - max-width: 280px; - padding: 10px 25px; - border-radius: 0; + .btn-more { + background: $cBlueDark; + color: #fff; + margin: 25px auto 50px; + font-size: 14px; + display: block; + max-width: 280px; + padding: 10px 25px; + border-radius: 0; - &:hover { - background: $cBlue; - } - } + &:hover { + background: $cBlue; + } + } } .box-producer { - background: $cGrayLight; + background: $cGrayLight; - .title { - text-align: center; + .title { + text-align: center; - h1 { - display: inline-block; - position: relative; - font-size: 2rem; - line-height: 48px; - font-weight: 400; - padding-bottom: 15px; - margin-bottom: 55px; - border-bottom: 2px solid #dfdfdf; + h1 { + display: inline-block; + position: relative; + font-size: 2rem; + line-height: 48px; + font-weight: 400; + padding-bottom: 15px; + margin-bottom: 55px; + border-bottom: 2px solid #dfdfdf; - &::before { - content: ''; - display: block; - width: 60%; - bottom: -2px; - position: absolute; - left: 0; - border-bottom: 2px solid $cBlueDark; - } - } - } + &::before { + content: ''; + display: block; + width: 60%; + bottom: -2px; + position: absolute; + left: 0; + border-bottom: 2px solid $cBlueDark; + } + } + } - p { - text-align: justify; - } + p { + text-align: justify; + } } .brand { - overflow: hidden; + overflow: hidden; - .item { - display: flex; - justify-content: center; - align-items: center; - width: 150px; - height: 100px; + .item { + display: flex; + justify-content: center; + align-items: center; + width: 150px; + height: 100px; - img { - width: 100%; - height: 100%; - object-fit: contain; - } - } + img { + width: 100%; + height: 100%; + object-fit: contain; + } + } - .slick-slide, - .slick-track { - display: flex !important; - justify-content: center; - align-items: center; - } + .slick-slide, + .slick-track { + display: flex !important; + justify-content: center; + align-items: center; + } - .slick-prev, - .slick-next { - top: 50%; - display: none; + .slick-prev, + .slick-next { + top: 50%; + display: none; - &:before { - color: $cBlueDark; + &:before { + color: $cBlueDark; - @include respond-below(xs) { - opacity: 0; + @include respond-below(xs) { + opacity: 0; - &:hover { - opacity: 1; - } - } - } - } + &:hover { + opacity: 1; + } + } + } + } - .slick-next { - right: 0; - } + .slick-next { + right: 0; + } - .slick-prev { - left: 0; - z-index: 2; - } + .slick-prev { + left: 0; + z-index: 2; + } } .box-footer { - background: #363839; - text-align: center; - font-size: 15px; - color: #fff; - padding-top: 50px; - padding-bottom: 20px; + background: #363839; + text-align: center; + font-size: 15px; + color: #fff; + padding-top: 50px; + padding-bottom: 20px; - a { - @include transition; - color: #fff; - font-weight: 600; + a { + @include transition; + color: #fff; + font-weight: 600; - &:hover { - text-decoration: none; - color: $cBlue; - } - } + &:hover { + text-decoration: none; + color: $cBlue; + } + } - .row { - &-top { - margin-bottom: 50px; + .row { + &-top { + margin-bottom: 50px; - // p { - // text-align: start; - // } - ul { - display: flex; - flex-direction: row; - justify-content: center; - flex-wrap: wrap; - row-gap: 10px; - column-gap: 25px; - // display: grid; - // grid-template-columns: 1fr 1fr 1fr; - list-style: none; - padding: 0; - margin: 0; - } - } - } + // p { + // text-align: start; + // } + ul { + display: flex; + flex-direction: row; + justify-content: center; + flex-wrap: wrap; + row-gap: 10px; + column-gap: 25px; + // display: grid; + // grid-template-columns: 1fr 1fr 1fr; + list-style: none; + padding: 0; + margin: 0; + } + } + } } #cookie-information { - padding: 10px; - text-align: center; - font-size: 12px; - background: $cBlack; - color: #fff; + padding: 10px; + text-align: center; + font-size: 12px; + background: $cBlack; + color: #fff; - a { - color: $cBlue; - } + a { + color: $cBlue; + } } .box-main { - border-top: 1px solid $cGrayLight; + border-top: 1px solid $cGrayLight; } #scontainer-10 { - background: $cGrayLight; - padding: 50px 25px 25px; + background: $cGrayLight; + padding: 50px 25px 25px; } #scontainer-11 { - @extend .box-top; + @extend .box-top; } .box-articles { - background: $cGrayLight; + background: $cGrayLight; - .box-title { - .title { - border-bottom: 2px solid $cBlack; - } - } + .box-title { + .title { + border-bottom: 2px solid $cBlack; + } + } } .article-entry { - background: #fff; - margin-bottom: 30px; - border-radius: 3px; - overflow: hidden; - height: calc(100% - 20px); + background: #fff; + margin-bottom: 30px; + border-radius: 3px; + overflow: hidden; + height: calc(100% - 20px); - .img { - img { - width: 100%; - height: 250px; - object-fit: cover; - } - } + .img { + img { + width: 100%; + height: 250px; + object-fit: cover; + } + } - .article-content { - padding: 20px; + .article-content { + padding: 20px; - .date-add { - color: $cBlack; - font-size: 13px; - font-weight: 600; - text-align: left; - margin-bottom: 15px; - } + .date-add { + color: $cBlack; + font-size: 13px; + font-weight: 600; + text-align: left; + margin-bottom: 15px; + } - .article-title { - a { - font-weight: 700; - font-size: 16px; - color: $cBlack; - margin-bottom: 15px; - display: block; - @include transition; + .article-title { + a { + font-weight: 700; + font-size: 16px; + color: $cBlack; + margin-bottom: 15px; + display: block; + @include transition; - &:hover { - color: $cBlueDark; - text-decoration: none; - } - } - } + &:hover { + color: $cBlueDark; + text-decoration: none; + } + } + } - .entry { - p { - color: $cBlack; - font-size: 13px; - margin-bottom: 0; - } - } - } + .entry { + p { + color: $cBlack; + font-size: 13px; + margin-bottom: 0; + } + } + } } .pager { - display: flex; - justify-content: flex-start; - align-items: center; - padding-inline-start: 0; - list-style-type: none; - margin-top: 50px; + display: flex; + justify-content: flex-start; + align-items: center; + padding-inline-start: 0; + list-style-type: none; + margin-top: 50px; - li { - color: $cBlack; - font-size: 13px; - margin-bottom: 0; - margin-right: 10px; + li { + color: $cBlack; + font-size: 13px; + margin-bottom: 0; + margin-right: 10px; - a { - width: 48px; - height: 48px; - display: flex; - align-items: center; - justify-content: center; - background: $cGrayLight; + a { + width: 48px; + height: 48px; + display: flex; + align-items: center; + justify-content: center; + background: $cGrayLight; - img { - width: 15px; - height: 15px; - } + img { + width: 15px; + height: 15px; + } - &.inactive { - opacity: 0.3; - pointer-events: none; - } - } - } + &.inactive { + opacity: 0.3; + pointer-events: none; + } + } + } } .box-content { - background: #fff; - padding: 20px 18px; + background: #fff; + padding: 20px 18px; - &:first-child { - margin-bottom: 30px; - } + &:first-child { + margin-bottom: 30px; + } - h4 { - font-weight: 600; - font-size: 15px; - color: $cBlack; - margin-bottom: 15px; - display: block; - } + h4 { + font-weight: 600; + font-size: 15px; + color: $cBlack; + margin-bottom: 15px; + display: block; + } - ul { - list-style-type: none; - padding-inline-start: 0; + ul { + list-style-type: none; + padding-inline-start: 0; - li { - margin-bottom: 10px; + li { + margin-bottom: 10px; - a { - color: $cBlueDark; - @include transition; + a { + color: $cBlueDark; + @include transition; - &:hover { - color: $cBlack; - text-decoration: none; - } - } - } - } + &:hover { + color: $cBlack; + text-decoration: none; + } + } + } + } } .article { - background: #fff; - padding: 25px; + background: #fff; + padding: 25px; - .table-of-contents { - box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.1); - // border-radius: 5px; - padding: 20px; - margin-bottom: 20px; + .table-of-contents { + box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.1); + // border-radius: 5px; + padding: 20px; + margin-bottom: 20px; - .title { - font-size: 20px; - margin-bottom: 10px; - } + .title { + font-size: 20px; + margin-bottom: 10px; + } - ol { - margin-bottom: 0; - } - } + ol { + margin-bottom: 0; + } + } - .main-image { - margin-bottom: 25px; + .main-image { + margin-bottom: 25px; - img { - max-width: 100%; - } - } + img { + max-width: 100%; + } + } - .article-title { - @extend .box-title; - justify-content: flex-start !important; - margin-bottom: 25px !important; - } + .article-title { + @extend .box-title; + justify-content: flex-start !important; + margin-bottom: 25px !important; + } - .date-add { - color: $cBlack; - font-size: 13px; - font-weight: 600; - margin-bottom: 15px; - display: flex; - align-items: center; - justify-content: flex-start; + .date-add { + color: $cBlack; + font-size: 13px; + font-weight: 600; + margin-bottom: 15px; + display: flex; + align-items: center; + justify-content: flex-start; - img { - margin-right: 5px; - } - } + img { + margin-right: 5px; + } + } - .text { - h2 { - font-size: 18px; - font-weight: 600; - } + .text { + h2 { + font-size: 18px; + font-weight: 600; + } - h3 { - font-size: 16px; - font-weight: 600; - } - } + h3 { + font-size: 16px; + font-weight: 600; + } + } - .gallery { - display: flex; - flex-wrap: wrap; + .gallery { + display: flex; + flex-wrap: wrap; - .image { - width: calc(100% / 4 - 10px); - margin: 10px 10px 0 0; - display: block; - max-height: 175px; - border: 1px solid $cGrayLight; + .image { + width: calc(100% / 4 - 10px); + margin: 10px 10px 0 0; + display: block; + max-height: 175px; + border: 1px solid $cGrayLight; - @include respond-below(sm) { - width: calc(100% / 3 - 10px); - } + @include respond-below(sm) { + width: calc(100% / 3 - 10px); + } - img { - width: 100%; - height: 100%; - object-fit: contain; - object-position: center; - } - } - } + img { + width: 100%; + height: 100%; + object-fit: contain; + object-position: center; + } + } + } - .social-icons { - margin-bottom: 20px; - } + .social-icons { + margin-bottom: 20px; + } - .btn-back { - background: $cBlueDark; - color: #fff; - margin: 25px 0 0; - font-size: 14px; - display: block; - max-width: 200px; - padding: 10px 25px; - border-radius: 0; + .btn-back { + background: $cBlueDark; + color: #fff; + margin: 25px 0 0; + font-size: 14px; + display: block; + max-width: 200px; + padding: 10px 25px; + border-radius: 0; - &:hover { - background: $cBlue; - } - } + &:hover { + background: $cBlue; + } + } } #scontainer-12 { - @extend .box-top; + @extend .box-top; - h3 { - font-size: 16px; - font-weight: 600; - } + h3 { + font-size: 16px; + font-weight: 600; + } } .article-18, .article-27 { - .col-md-6, - .col-md-4 { - position: relative; - overflow: hidden; - &::after { - content: ''; - display: block; - background: rgba(0, 0, 0, 0.33); - width: calc(100% - 30px); - height: calc(100% - 15px); - position: absolute; - top: 0; - left: 15px; - } + .col-md-6, + .col-md-4 { + position: relative; + overflow: hidden; - p:first-child { - width: 100%; - height: 500px; - display: block; - } + &::after { + content: ''; + display: block; + background: rgba(0, 0, 0, 0.33); + width: calc(100% - 30px); + height: calc(100% - 15px); + position: absolute; + top: 0; + left: 15px; + } - img { - width: 100%; - height: 100%; - object-fit: cover; - object-position: center; - } + p:first-child { + width: 100%; + height: 500px; + display: block; + } - h2 { - position: absolute; - padding: 0; - margin: 0; - bottom: 25px; - left: 25px; - z-index: 10; + img { + width: 100%; + height: 100%; + object-fit: cover; + object-position: center; + } - a { - color: #fff; - font-weight: 300; - font-size: 30px; - } - } - } + h2 { + position: absolute; + padding: 0; + margin: 0; + bottom: 25px; + left: 25px; + z-index: 10; + + a { + color: #fff; + font-weight: 300; + font-size: 30px; + } + } + } } .article-miniature { - position: relative; - margin-bottom: 30px; + position: relative; + margin-bottom: 30px; - &::after { - content: ''; - display: block; - background: rgba(0, 0, 0, 0.33); - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; - } + &::after { + content: ''; + display: block; + background: rgba(0, 0, 0, 0.33); + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + } - .img { - display: block; - height: 300px; + .img { + display: block; + height: 300px; - img { - width: 100%; - height: 100%; - object-fit: cover; - } - } + img { + width: 100%; + height: 100%; + object-fit: cover; + } + } - h2 { - position: absolute; - padding: 0; - margin: 0; - bottom: 25px; - left: 25px; - z-index: 10; + h2 { + position: absolute; + padding: 0; + margin: 0; + bottom: 25px; + left: 25px; + z-index: 10; - a { - color: #fff; - font-weight: 300; - font-size: 30px; - @include transition; + a { + color: #fff; + font-weight: 300; + font-size: 30px; + @include transition; - &:hover { - text-decoration: none; - color: $cBlueDark; - } - } - } + &:hover { + text-decoration: none; + color: $cBlueDark; + } + } + } } #contact-form { - font-size: 13px; + font-size: 13px; - .form-control { - border-radius: 0; - font-size: 13px; - } + .form-control { + border-radius: 0; + font-size: 13px; + } - .captcha span { - font-size: 13px !important; - } + .captcha span { + font-size: 13px !important; + } - .btn { - background: $cBlueDark; - color: #fff; - text-transform: uppercase; - border: 0; - border-radius: 0; - font-size: 13px; - width: 125px; - text-align: center; - padding: 10px 15px; - } + .btn { + background: $cBlueDark; + color: #fff; + text-transform: uppercase; + border: 0; + border-radius: 0; + font-size: 13px; + width: 125px; + text-align: center; + padding: 10px 15px; + } } .alert-success { - margin: 0 0 50px; - border: 0; - border-radius: 0; - background: $cBlueDark; - color: #fff; + margin: 0 0 50px; + border: 0; + border-radius: 0; + background: $cBlueDark; + color: #fff; } .article-71, @@ -1467,50 +1504,52 @@ body { .article-97, .article-98, .article-99 { - .gallery { - .image { - img { - object-fit: cover; - } - } - } + .gallery { + .image { + img { + object-fit: cover; + } + } + } } -#link-68 > a { - pointer-events: none; +#link-68>a { + pointer-events: none; } #link-73 { - img { - max-width: 130px; - } + img { + max-width: 130px; + } } #scontainer-53 { - max-height: calc(100vh - 214px); - background: #000; + max-height: calc(100vh - 214px); + background: #000; - .scontainer-content { - height: 100%; + .scontainer-content { + height: 100%; - p { - height: 100%; - } - video { - width: 100%; - height: 100%; - max-height: calc(100vh - 214px); - margin-bottom: -6px; - } - } + p { + height: 100%; + text-align: center; + } + + video { + width: 100%; + height: 100%; + max-height: calc(100vh - 214px); + margin-bottom: -6px; + } + } } body .article-122 { - .gallery { - a.image { - img { - object-fit: cover; - } - } - } -} + .gallery { + a.image { + img { + object-fit: cover; + } + } + } +} \ No newline at end of file diff --git a/libraries/htaccess.conf b/libraries/htaccess.conf new file mode 100644 index 0000000..60ffa07 --- /dev/null +++ b/libraries/htaccess.conf @@ -0,0 +1,39 @@ +RewriteEngine On +RewriteBase / +Options +FollowSymlinks +Options -Indexes + +{REDIRECT} + +ErrorDocument 404 /404.html + +RewriteCond %{REQUEST_URI} !^(.*)/libraries/(.*) [NC] +RewriteCond %{REQUEST_URI} !^(.*)/css/(.*) [NC] +RewriteRule ^admin/([^/]*)/([^/]*)/(.*)$ admin/index.php?module=$1&action=$2&$3 [L] +{PIXIESET] +{ADDITIONAL_CLASSES} +RewriteRule ^admin/$ admin/index.php [L] +RewriteRule ^wyszukiwarka(|/)$ index.php?search=true&lang=pl [L] +RewriteRule ^wersja-tymczasowa(|/)$ index.php?devel=true&lang=pl [L] +RewriteRule ^pixieset/(.*)$ index.php?module=articles&action=image&hash=$1 [L] +RewriteRule ^pixieset-wszystkie/(.*)$ index.php?module=articles&action=images_download&hash=$1 [L] +RewriteRule ^audyt-seo/wynik(|/)$ index.php?module=auditSEO&action=main_view&%{QUERY_STRING} [L] + +RewriteCond %{REQUEST_URI} ^/auditSEO/(.*) [NC] +RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L] + +RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.php +RewriteRule ^ /%1 [R=301,L] +{HTACCESS_CACHE} + + Order Deny,Allow + Deny from all + + + Order Deny,Allow + Deny from all + + + Order Deny,Allow + Deny from all + \ No newline at end of file