commit 78fe46c8a75b13471a0e23586dd4e0970417be20 Author: Jacek Pyziak Date: Thu Nov 21 14:26:28 2024 +0100 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..78f0cfc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.vscode/ftp-kr.sync.cache.json +upload/filemanager/landing/movie.mov \ No newline at end of file diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..b389db4 --- /dev/null +++ b/.htaccess @@ -0,0 +1,1943 @@ +RewriteEngine On +RewriteBase / +Options +FollowSymlinks +Options -Indexes + +RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] +RewriteRule ^(.*)$ https://%1/$1 [R=301,L] +RewriteCond %{SERVER_PORT} !=443 +RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent] +## Add trailing slash +RewriteCond %{REQUEST_URI} !(/$|\.) +RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC] +RewriteRule (.*) %{REQUEST_URI}/ [R=301,L] + +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] + + +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] + +AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript + + +ExpiresActive on +ExpiresDefault "access plus 1 year" +ExpiresByType text/css "access plus 1 year" +ExpiresByType application/json "access plus 0 seconds" +ExpiresByType application/xml "access plus 0 seconds" +ExpiresByType text/xml "access plus 0 seconds" +ExpiresByType image/x-icon "access plus 1 week" +ExpiresByType text/x-component "access plus 1 year" +ExpiresByType text/html "access plus 0 seconds" +ExpiresByType application/javascript "access plus 1 year" +ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" +ExpiresByType text/cache-manifest "access plus 0 seconds" +ExpiresByType audio/ogg "access plus 1 year" +ExpiresByType image/gif "access plus 1 year" +ExpiresByType image/jpeg "access plus 1 year" +ExpiresByType image/webp "access plus 1 year" +ExpiresByType image/png "access plus 1 year" +ExpiresByType video/mp4 "access plus 1 year" +ExpiresByType video/ogg "access plus 1 year" +ExpiresByType video/webm "access plus 1 year" +ExpiresByType application/atom+xml "access plus 1 hour" +ExpiresByType application/rss+xml "access plus 1 hour" +ExpiresByType application/font-woff "access plus 1 year" +ExpiresByType application/vnd.ms-fontobject "access plus 1 year" +ExpiresByType application/x-font-ttf "access plus 1 year" +ExpiresByType font/opentype "access plus 1 year" +ExpiresByType image/svg+xml "access plus 1 year" + + + Order Deny,Allow + Deny from all + + + Order Deny,Allow + Deny from all + + + Order Deny,Allow + Deny from all + +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$ +RewriteRule ^(.*)$ https://vidok.com/ [R=301,L] +RewriteCond %{REQUEST_URI} ^/home/s/1$ +RewriteRule ^(.*)$ https://vidok.com/ [R=301,L] +RewriteCond %{REQUEST_URI} "^/$" +RewriteRule ^$ index.php?a=page&id=1&lang=pl [L] + +RewriteRule ^home(|/)$ index.php?a=page&id=1&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^home/s/1(|/)$ home [R=301,L] +RewriteRule ^home/s/([0-9]+)(|/)$ index.php?a=page&id=1&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^montaz(|/)$ index.php?a=page&id=25&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^montaz/s/1(|/)$ montaz [R=301,L] +RewriteRule ^montaz/s/([0-9]+)(|/)$ index.php?a=page&id=25&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^blog(|/)$ index.php?a=page&id=24&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^blog/s/1(|/)$ blog [R=301,L] +RewriteRule ^blog/s/([0-9]+)(|/)$ index.php?a=page&id=24&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^produkty(|/)$ index.php?a=page&id=2&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^produkty/s/1(|/)$ produkty [R=301,L] +RewriteRule ^produkty/s/([0-9]+)(|/)$ index.php?a=page&id=2&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^cennik/gwarancja(|/)$ index.php?a=page&id=26&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^cennik/gwarancja/s/1(|/)$ cennik/gwarancja [R=301,L] +RewriteRule ^cennik/gwarancja/s/([0-9]+)(|/)$ index.php?a=page&id=26&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna-drewniane(|/)$ index.php?a=page&id=32&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna-drewniane/s/1(|/)$ okna-drewniane [R=301,L] +RewriteRule ^okna-drewniane/s/([0-9]+)(|/)$ index.php?a=page&id=32&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^dlaczego-my(|/)$ index.php?a=page&id=27&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^dlaczego-my/s/1(|/)$ dlaczego-my [R=301,L] +RewriteRule ^dlaczego-my/s/([0-9]+)(|/)$ index.php?a=page&id=27&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna-drewniano-aluminiowe(|/)$ index.php?a=page&id=33&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna-drewniano-aluminiowe/s/1(|/)$ okna-drewniano-aluminiowe [R=301,L] +RewriteRule ^okna-drewniano-aluminiowe/s/([0-9]+)(|/)$ index.php?a=page&id=33&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna(|/)$ index.php?a=page&id=9&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/s/1(|/)$ okna [R=301,L] +RewriteRule ^okna/s/([0-9]+)(|/)$ index.php?a=page&id=9&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^drzwi(|/)$ index.php?a=page&id=10&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^drzwi/s/1(|/)$ drzwi [R=301,L] +RewriteRule ^drzwi/s/([0-9]+)(|/)$ index.php?a=page&id=10&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^deklaracje-wlasciwosci-uzytkowych(|/)$ index.php?a=page&id=47&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^deklaracje-wlasciwosci-uzytkowych/s/1(|/)$ deklaracje-wlasciwosci-uzytkowych [R=301,L] +RewriteRule ^deklaracje-wlasciwosci-uzytkowych/s/([0-9]+)(|/)$ index.php?a=page&id=47&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna/okna-pvc(|/)$ index.php?a=page&id=34&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/okna-pvc/s/1(|/)$ okna/okna-pvc [R=301,L] +RewriteRule ^okna/okna-pvc/s/([0-9]+)(|/)$ index.php?a=page&id=34&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^rolety(|/)$ index.php?a=page&id=11&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^rolety/s/1(|/)$ rolety [R=301,L] +RewriteRule ^rolety/s/([0-9]+)(|/)$ index.php?a=page&id=11&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna/okna-aluminiowe/(|/)$ index.php?a=page&id=35&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/okna-aluminiowe//s/1(|/)$ okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna/okna-aluminiowe//s/([0-9]+)(|/)$ index.php?a=page&id=35&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^bramy(|/)$ index.php?a=page&id=12&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^bramy/s/1(|/)$ bramy [R=301,L] +RewriteRule ^bramy/s/([0-9]+)(|/)$ index.php?a=page&id=12&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^nota-prawna(|/)$ index.php?a=page&id=28&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^nota-prawna/s/1(|/)$ nota-prawna [R=301,L] +RewriteRule ^nota-prawna/s/([0-9]+)(|/)$ index.php?a=page&id=28&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna/okna-pvc/okna-pvc-70/(|/)$ index.php?a=page&id=36&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/okna-pvc/okna-pvc-70//s/1(|/)$ okna/okna-pvc/okna-pvc-70/ [R=301,L] +RewriteRule ^okna/okna-pvc/okna-pvc-70//s/([0-9]+)(|/)$ index.php?a=page&id=36&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^dodatki-do-okien(|/)$ index.php?a=page&id=13&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^dodatki-do-okien/s/1(|/)$ dodatki-do-okien [R=301,L] +RewriteRule ^dodatki-do-okien/s/([0-9]+)(|/)$ index.php?a=page&id=13&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^polityka-cookies(|/)$ index.php?a=page&id=29&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^polityka-cookies/s/1(|/)$ polityka-cookies [R=301,L] +RewriteRule ^polityka-cookies/s/([0-9]+)(|/)$ index.php?a=page&id=29&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna/okna-pvc/okna-pvc-74/(|/)$ index.php?a=page&id=37&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/okna-pvc/okna-pvc-74//s/1(|/)$ okna/okna-pvc/okna-pvc-74/ [R=301,L] +RewriteRule ^okna/okna-pvc/okna-pvc-74//s/([0-9]+)(|/)$ index.php?a=page&id=37&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^smart-vidok(|/)$ index.php?a=page&id=14&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^smart-vidok/s/1(|/)$ smart-vidok [R=301,L] +RewriteRule ^smart-vidok/s/([0-9]+)(|/)$ index.php?a=page&id=14&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^polityka-jakosci(|/)$ index.php?a=page&id=30&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^polityka-jakosci/s/1(|/)$ polityka-jakosci [R=301,L] +RewriteRule ^polityka-jakosci/s/([0-9]+)(|/)$ index.php?a=page&id=30&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna/okna-pvc/okna-pvc-83-extreme(|/)$ index.php?a=page&id=38&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/okna-pvc/okna-pvc-83-extreme/s/1(|/)$ okna/okna-pvc/okna-pvc-83-extreme [R=301,L] +RewriteRule ^okna/okna-pvc/okna-pvc-83-extreme/s/([0-9]+)(|/)$ index.php?a=page&id=38&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^polityka-prywatnosci(|/)$ index.php?a=page&id=31&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=31&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna/okna-pvc/okna-pvc-94/(|/)$ index.php?a=page&id=39&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/okna-pvc/okna-pvc-94//s/1(|/)$ okna/okna-pvc/okna-pvc-94/ [R=301,L] +RewriteRule ^okna/okna-pvc/okna-pvc-94//s/([0-9]+)(|/)$ index.php?a=page&id=39&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^linia-aqustic(|/)$ index.php?a=page&id=15&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^linia-aqustic/s/1(|/)$ linia-aqustic [R=301,L] +RewriteRule ^linia-aqustic/s/([0-9]+)(|/)$ index.php?a=page&id=15&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna/kolorystyka-okien/(|/)$ index.php?a=page&id=40&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/kolorystyka-okien//s/1(|/)$ okna/kolorystyka-okien/ [R=301,L] +RewriteRule ^okna/kolorystyka-okien//s/([0-9]+)(|/)$ index.php?a=page&id=40&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna/okna-pvc/linia-gold-energy(|/)$ index.php?a=page&id=16&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/okna-pvc/linia-gold-energy/s/1(|/)$ okna/okna-pvc/linia-gold-energy [R=301,L] +RewriteRule ^okna/okna-pvc/linia-gold-energy/s/([0-9]+)(|/)$ index.php?a=page&id=16&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^dokumenty(|/)$ index.php?a=page&id=75&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^dokumenty/s/1(|/)$ dokumenty [R=301,L] +RewriteRule ^dokumenty/s/([0-9]+)(|/)$ index.php?a=page&id=75&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^drzwi-wejsciowe-4(|/)$ index.php?a=page&id=41&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^drzwi-wejsciowe-4/s/1(|/)$ drzwi-wejsciowe-4 [R=301,L] +RewriteRule ^drzwi-wejsciowe-4/s/([0-9]+)(|/)$ index.php?a=page&id=41&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^silver-line-pvc(|/)$ index.php?a=page&id=73&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^silver-line-pvc/s/1(|/)$ silver-line-pvc [R=301,L] +RewriteRule ^silver-line-pvc/s/([0-9]+)(|/)$ index.php?a=page&id=73&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^drzwi-tarasowe(|/)$ index.php?a=page&id=42&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^drzwi-tarasowe/s/1(|/)$ drzwi-tarasowe [R=301,L] +RewriteRule ^drzwi-tarasowe/s/([0-9]+)(|/)$ index.php?a=page&id=42&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna/okna-pvc/okna-pvc-83-extreme(|/)$ index.php?a=page&id=17&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/okna-pvc/okna-pvc-83-extreme/s/1(|/)$ okna/okna-pvc/okna-pvc-83-extreme [R=301,L] +RewriteRule ^okna/okna-pvc/okna-pvc-83-extreme/s/([0-9]+)(|/)$ index.php?a=page&id=17&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^rolety-zewnetrzne(|/)$ index.php?a=page&id=43&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^rolety-zewnetrzne/s/1(|/)$ rolety-zewnetrzne [R=301,L] +RewriteRule ^rolety-zewnetrzne/s/([0-9]+)(|/)$ index.php?a=page&id=43&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna/okna-pvc/linia-okien-vaccum(|/)$ index.php?a=page&id=83&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/okna-pvc/linia-okien-vaccum/s/1(|/)$ okna/okna-pvc/linia-okien-vaccum [R=301,L] +RewriteRule ^okna/okna-pvc/linia-okien-vaccum/s/([0-9]+)(|/)$ index.php?a=page&id=83&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna/okna-pvc/platinum-design(|/)$ index.php?a=page&id=82&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna/okna-pvc/platinum-design/s/1(|/)$ okna/okna-pvc/platinum-design [R=301,L] +RewriteRule ^okna/okna-pvc/platinum-design/s/([0-9]+)(|/)$ index.php?a=page&id=82&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^rolety-screen(|/)$ index.php?a=page&id=44&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^rolety-screen/s/1(|/)$ rolety-screen [R=301,L] +RewriteRule ^rolety-screen/s/([0-9]+)(|/)$ index.php?a=page&id=44&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^o-nas(|/)$ index.php?a=page&id=4&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^o-nas/s/1(|/)$ o-nas [R=301,L] +RewriteRule ^o-nas/s/([0-9]+)(|/)$ index.php?a=page&id=4&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^zaluzje-fasadowe(|/)$ index.php?a=page&id=45&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^zaluzje-fasadowe/s/1(|/)$ zaluzje-fasadowe [R=301,L] +RewriteRule ^zaluzje-fasadowe/s/([0-9]+)(|/)$ index.php?a=page&id=45&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^firma(|/)$ index.php?a=page&id=18&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^firma/s/1(|/)$ firma [R=301,L] +RewriteRule ^firma/s/([0-9]+)(|/)$ index.php?a=page&id=18&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^kontakt-nowy(|/)$ index.php?a=page&id=48&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^kontakt-nowy/s/1(|/)$ kontakt-nowy [R=301,L] +RewriteRule ^kontakt-nowy/s/([0-9]+)(|/)$ index.php?a=page&id=48&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^lider-od-1993(|/)$ index.php?a=page&id=19&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^lider-od-1993/s/1(|/)$ lider-od-1993 [R=301,L] +RewriteRule ^lider-od-1993/s/([0-9]+)(|/)$ index.php?a=page&id=19&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^dodatki(|/)$ index.php?a=page&id=49&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^dodatki/s/1(|/)$ dodatki [R=301,L] +RewriteRule ^dodatki/s/([0-9]+)(|/)$ index.php?a=page&id=49&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^portfolio(|/)$ index.php?a=page&id=20&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^portfolio/s/1(|/)$ portfolio [R=301,L] +RewriteRule ^portfolio/s/([0-9]+)(|/)$ index.php?a=page&id=20&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okucia(|/)$ index.php?a=page&id=50&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okucia/s/1(|/)$ okucia [R=301,L] +RewriteRule ^okucia/s/([0-9]+)(|/)$ index.php?a=page&id=50&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^promocje(|/)$ index.php?a=page&id=88&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^promocje/s/1(|/)$ promocje [R=301,L] +RewriteRule ^promocje/s/([0-9]+)(|/)$ index.php?a=page&id=88&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^szklenie(|/)$ index.php?a=page&id=51&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^szklenie/s/1(|/)$ szklenie [R=301,L] +RewriteRule ^szklenie/s/([0-9]+)(|/)$ index.php?a=page&id=51&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^klamki(|/)$ index.php?a=page&id=52&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^klamki/s/1(|/)$ klamki [R=301,L] +RewriteRule ^klamki/s/([0-9]+)(|/)$ index.php?a=page&id=52&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^materialy-do-pobrania(|/)$ index.php?a=page&id=5&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^materialy-do-pobrania/s/1(|/)$ materialy-do-pobrania [R=301,L] +RewriteRule ^materialy-do-pobrania/s/([0-9]+)(|/)$ index.php?a=page&id=5&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^poradnik(|/)$ index.php?a=page&id=6&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^poradnik/s/1(|/)$ poradnik [R=301,L] +RewriteRule ^poradnik/s/([0-9]+)(|/)$ index.php?a=page&id=6&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^stolarka-p-poz(|/)$ index.php?a=page&id=53&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^stolarka-p-poz/s/1(|/)$ stolarka-p-poz [R=301,L] +RewriteRule ^stolarka-p-poz/s/([0-9]+)(|/)$ index.php?a=page&id=53&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^parapety(|/)$ index.php?a=page&id=54&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^parapety/s/1(|/)$ parapety [R=301,L] +RewriteRule ^parapety/s/([0-9]+)(|/)$ index.php?a=page&id=54&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^projekty-ue(|/)$ index.php?a=page&id=7&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^projekty-ue/s/1(|/)$ projekty-ue [R=301,L] +RewriteRule ^projekty-ue/s/([0-9]+)(|/)$ index.php?a=page&id=7&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^moskitiery(|/)$ index.php?a=page&id=55&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^moskitiery/s/1(|/)$ moskitiery [R=301,L] +RewriteRule ^moskitiery/s/([0-9]+)(|/)$ index.php?a=page&id=55&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^kontakt(|/)$ index.php?a=page&id=72&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^kontakt/s/1(|/)$ kontakt [R=301,L] +RewriteRule ^kontakt/s/([0-9]+)(|/)$ index.php?a=page&id=72&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^okna-dachowe-2(|/)$ index.php?a=page&id=56&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^okna-dachowe-2/s/1(|/)$ okna-dachowe-2 [R=301,L] +RewriteRule ^okna-dachowe-2/s/([0-9]+)(|/)$ index.php?a=page&id=56&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^szprosy-1(|/)$ index.php?a=page&id=57&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^szprosy-1/s/1(|/)$ szprosy-1 [R=301,L] +RewriteRule ^szprosy-1/s/([0-9]+)(|/)$ index.php?a=page&id=57&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^znajdz-salon(|/)$ index.php?a=page&id=21&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^znajdz-salon/s/1(|/)$ znajdz-salon [R=301,L] +RewriteRule ^znajdz-salon/s/([0-9]+)(|/)$ index.php?a=page&id=21&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-nowy-sacz(|/)$ index.php?a=page&id=58&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-nowy-sacz/s/1(|/)$ salon-nowy-sacz [R=301,L] +RewriteRule ^salon-nowy-sacz/s/([0-9]+)(|/)$ index.php?a=page&id=58&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^kariera(|/)$ index.php?a=page&id=22&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^kariera/s/1(|/)$ kariera [R=301,L] +RewriteRule ^kariera/s/([0-9]+)(|/)$ index.php?a=page&id=22&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^rzeszow-salon(|/)$ index.php?a=page&id=59&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^rzeszow-salon/s/1(|/)$ rzeszow-salon [R=301,L] +RewriteRule ^rzeszow-salon/s/([0-9]+)(|/)$ index.php?a=page&id=59&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^wspolpraca(|/)$ index.php?a=page&id=23&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^wspolpraca/s/1(|/)$ wspolpraca [R=301,L] +RewriteRule ^wspolpraca/s/([0-9]+)(|/)$ index.php?a=page&id=23&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-krosno(|/)$ index.php?a=page&id=60&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-krosno/s/1(|/)$ salon-krosno [R=301,L] +RewriteRule ^salon-krosno/s/([0-9]+)(|/)$ index.php?a=page&id=60&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-lancut(|/)$ index.php?a=page&id=61&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-lancut/s/1(|/)$ salon-lancut [R=301,L] +RewriteRule ^salon-lancut/s/([0-9]+)(|/)$ index.php?a=page&id=61&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-przemysl(|/)$ index.php?a=page&id=62&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-przemysl/s/1(|/)$ salon-przemysl [R=301,L] +RewriteRule ^salon-przemysl/s/([0-9]+)(|/)$ index.php?a=page&id=62&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-sanok(|/)$ index.php?a=page&id=63&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-sanok/s/1(|/)$ salon-sanok [R=301,L] +RewriteRule ^salon-sanok/s/([0-9]+)(|/)$ index.php?a=page&id=63&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-tarnobrzeg(|/)$ index.php?a=page&id=66&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-tarnobrzeg/s/1(|/)$ salon-tarnobrzeg [R=301,L] +RewriteRule ^salon-tarnobrzeg/s/([0-9]+)(|/)$ index.php?a=page&id=66&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^mielec(|/)$ index.php?a=page&id=67&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^mielec/s/1(|/)$ mielec [R=301,L] +RewriteRule ^mielec/s/([0-9]+)(|/)$ index.php?a=page&id=67&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-krakow(|/)$ index.php?a=page&id=68&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-krakow/s/1(|/)$ salon-krakow [R=301,L] +RewriteRule ^salon-krakow/s/([0-9]+)(|/)$ index.php?a=page&id=68&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-zakopane(|/)$ index.php?a=page&id=69&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-zakopane/s/1(|/)$ salon-zakopane [R=301,L] +RewriteRule ^salon-zakopane/s/([0-9]+)(|/)$ index.php?a=page&id=69&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-gorlice(|/)$ index.php?a=page&id=70&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-gorlice/s/1(|/)$ salon-gorlice [R=301,L] +RewriteRule ^salon-gorlice/s/([0-9]+)(|/)$ index.php?a=page&id=70&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-nowy-targ(|/)$ index.php?a=page&id=71&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-nowy-targ/s/1(|/)$ salon-nowy-targ [R=301,L] +RewriteRule ^salon-nowy-targ/s/([0-9]+)(|/)$ index.php?a=page&id=71&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^lezajsk(|/)$ index.php?a=page&id=76&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^lezajsk/s/1(|/)$ lezajsk [R=301,L] +RewriteRule ^lezajsk/s/([0-9]+)(|/)$ index.php?a=page&id=76&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-trader(|/)$ index.php?a=page&id=77&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-trader/s/1(|/)$ salon-trader [R=301,L] +RewriteRule ^salon-trader/s/([0-9]+)(|/)$ index.php?a=page&id=77&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^salon-solaris(|/)$ index.php?a=page&id=78&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^salon-solaris/s/1(|/)$ salon-solaris [R=301,L] +RewriteRule ^salon-solaris/s/([0-9]+)(|/)$ index.php?a=page&id=78&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^lp(|/)$ index.php?a=page&id=79&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^lp/s/1(|/)$ lp [R=301,L] +RewriteRule ^lp/s/([0-9]+)(|/)$ index.php?a=page&id=79&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^kontakt-nowy-wyglad(|/)$ index.php?a=page&id=80&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^kontakt-nowy-wyglad/s/1(|/)$ kontakt-nowy-wyglad [R=301,L] +RewriteRule ^kontakt-nowy-wyglad/s/([0-9]+)(|/)$ index.php?a=page&id=80&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^znajdz-salon-nowy-wyglad(|/)$ index.php?a=page&id=81&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^znajdz-salon-nowy-wyglad/s/1(|/)$ znajdz-salon-nowy-wyglad [R=301,L] +RewriteRule ^znajdz-salon-nowy-wyglad/s/([0-9]+)(|/)$ index.php?a=page&id=81&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^drzwi-inova-smoove(|/)$ index.php?a=page&id=84&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^drzwi-inova-smoove/s/1(|/)$ drzwi-inova-smoove [R=301,L] +RewriteRule ^drzwi-inova-smoove/s/([0-9]+)(|/)$ index.php?a=page&id=84&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^promocja-na-wybrane-powloki-acrylcolor-dla-okien-vidok(|/)$ index.php?a=page&id=85&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^promocja-na-wybrane-powloki-acrylcolor-dla-okien-vidok/s/1(|/)$ promocja-na-wybrane-powloki-acrylcolor-dla-okien-vidok [R=301,L] +RewriteRule ^promocja-na-wybrane-powloki-acrylcolor-dla-okien-vidok/s/([0-9]+)(|/)$ index.php?a=page&id=85&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^gealan-acrylcolor(|/)$ index.php?a=page&id=86&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^gealan-acrylcolor/s/1(|/)$ gealan-acrylcolor [R=301,L] +RewriteRule ^gealan-acrylcolor/s/([0-9]+)(|/)$ index.php?a=page&id=86&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^vekamotion-82(|/)$ index.php?a=page&id=89&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^vekamotion-82/s/1(|/)$ vekamotion-82 [R=301,L] +RewriteRule ^vekamotion-82/s/([0-9]+)(|/)$ index.php?a=page&id=89&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^drzwi-wejsciowe/kolorystyka/(|/)$ index.php?a=page&id=90&lang=pl&%{QUERY_STRING} [L] +RewriteRule ^drzwi-wejsciowe/kolorystyka//s/1(|/)$ drzwi-wejsciowe/kolorystyka/ [R=301,L] +RewriteRule ^drzwi-wejsciowe/kolorystyka//s/([0-9]+)(|/)$ index.php?a=page&id=90&lang=pl&bs=$1&%{QUERY_STRING} [L] + +RewriteRule ^jesienne-dekoracje-okien-i-drzwi(|/)$ index.php?article=2&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-1(|/)$ index.php?article=5&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-6-drzwi(|/)$ index.php?article=6&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-7-rolety(|/)$ index.php?article=7&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^portfolio-1(|/)$ index.php?article=8&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^strefa-partnera-1(|/)$ index.php?article=9&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^linia-extreme-pvc-1(|/)$ index.php?article=10&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-11-kariera(|/)$ index.php?article=11&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-13-projekty-ue(|/)$ index.php?article=13&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^dodatki-1(|/)$ index.php?article=14&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-15-okna-pvc-70(|/)$ index.php?article=15&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-16-okna-vp-74(|/)$ index.php?article=16&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-17-okno-pvc-83(|/)$ index.php?article=17&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-18-pvc-87(|/)$ index.php?article=18&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-19-kolorystyka(|/)$ index.php?article=19&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-20-drzwi-wejsciowe(|/)$ index.php?article=20&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-21-drzwi-tarasowe(|/)$ index.php?article=21&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-22-rolety-zewnetrzne(|/)$ index.php?article=22&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-23-rolety-screen(|/)$ index.php?article=23&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-24-zaluzje-fasadowe(|/)$ index.php?article=24&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-25-montaz(|/)$ index.php?article=25&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-26-gwarancja(|/)$ index.php?article=26&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-27-dlaczego-my(|/)$ index.php?article=27&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-28-nota-prawna(|/)$ index.php?article=28&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-29-polityka-cookies(|/)$ index.php?article=29&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-30-polityka-jakosci(|/)$ index.php?article=30&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-31-polityka-prywatnosci(|/)$ index.php?article=31&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-32-lider-od-93r(|/)$ index.php?article=32&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-zbudowac-wlasna-werande(|/)$ index.php?article=33&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-kolorze-antracytu-jak-wybrac(|/)$ index.php?article=34&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-do-stylu-eklektycznego(|/)$ index.php?article=35&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^regulacja-okien-przed-zima-o-czym-pamietac(|/)$ index.php?article=36&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^czym-kierowac-sie-przy-wyborze-drzwi-wejsciowych(|/)$ index.php?article=37&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^termomodernizacja-domu-jednorodzinnego-wymiana-okien-drzwi(|/)$ index.php?article=38&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-wykonac-regulacje-okien-rozwieralno-uchylnych(|/)$ index.php?article=39&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-pasujace-do-stylu-retro(|/)$ index.php?article=40&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-wyglada-ulga-termomodernizacyjna-w-2021-roku(|/)$ index.php?article=41&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-wybrac-brame-garazowa(|/)$ index.php?article=42&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-dobrac-okna-i-drzwi-do-stylu-vintage(|/)$ index.php?article=43&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^dlaczego-warto-postawic-na-okna-dzwiekoszczelne(|/)$ index.php?article=44&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^w-jaki-sposob-okna-vidok-moga-ochronic-was-przed-upalem-jak-mozeciezadbac-o-komfortowa-temperature-w-swoich-domach-przez-cale-lato(|/)$ index.php?article=45&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^dlaczego-dogrzewanie-pomieszczen-za-pomoca-energii-slonecznej-i-duzych-okien-to-szkodliwy-mit-w-jaki-sposob-nowoczesne-okna-i-drzwi-tarasowe-powinny-reagowac-na-slonce(|/)$ index.php?article=46&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-najmodniejszych-stylach-wnetrzarskich-jak-dobrac-okna-i-drzwi-pasujace-do-stylu-glamour(|/)$ index.php?article=47&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^sposoby-na-piekny-i-funkcjonalny-taras-czego-bedziecie-potrzebowac-do-stworzenia-oazy-spokoju-i-relaksu-przy-swoim-domu(|/)$ index.php?article=48&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jakie-zjawiska-odpowiadaja-za-utrate-ciepla-mimo-zamknietych-okien-w-jaki-sposob-nowoczesne-szyby-zespolone-ograniczaja-straty-energii-cieplnej(|/)$ index.php?article=49&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jakosc-szyby-ma-znaczenie-w-jaki-sposob-wlasciwosci-szkla-przekladaja-sie-na-komfort-zapewniany-przez-okna(|/)$ index.php?article=50&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-najmodniejszych-stylach-wnetrzarskich-jak-dobrac-okna-i-drzwi-pasujace-do-stylu-prowansalskiego(|/)$ index.php?article=51&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^przed-czym-ochronia-was-okna-vidok-a-z-czym-inne-okna-moga-sobie-zwyczajnie-nie-poradzic(|/)$ index.php?article=52&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^aranzacja-przestrzeni-z-oknem-w-roli-glownej-jak-zaprojektowac-piekny-widok-z-okna-bez-wzgledu-na-warunki-i-otoczenie(|/)$ index.php?article=53&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-i-drzwi-z-drewna-meranti-dzieki-czemu-to-egzotyczne-drewno-zyskalo-tak-duze-uznanie-wsrod-producentow-i-uzytkownikow-stolarki-okiennej(|/)$ index.php?article=54&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-i-drzwi-z-drewna-modrzewiowego-dlaczego-modrzew-uznawany-jest-w-polsce-za-tak-wartosciowy-gatunek(|/)$ index.php?article=55&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-i-drzwi-z-drewna-debowego-jak-sprawdzi-sie-w-waszym-domu-to-szlachetne-drzewo(|/)$ index.php?article=56&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-i-drzwi-z-drewna-sosnowego-czy-warto-nasza-swojska-sosne-zaprosic-do-swojego-domu(|/)$ index.php?article=57&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^drewniane-okna-i-drzwi-jak-nalezy-z-nimi-postepowac-jak-o-nie-dbac-i-co-zrobic-aby-sluzyly-przez-dlugie-lata(|/)$ index.php?article=58&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^wielkanocne-dekoracje-okien-i-drzwi-jak-przyozdobic-dom-lub-mieszkanie-na-ten-niezwykly-wiosenny-czas(|/)$ index.php?article=59&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-trzyszybowe-w-waszym-domu-lub-mieszkaniu-w-czym-sa-lepsze-od-okien-dwuszybowych(|/)$ index.php?article=60&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-najmodniejszych-stylach-wnetrzarskich-jak-dobrac-okna-i-drzwi-pasujace-do-stylu-industrialnego(|/)$ index.php?article=61&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^barwy-sa-po-to-aby-z-nich-korzystac-w-jakim-kolorze-powinny-byc-wasze-wymarzone-okna(|/)$ index.php?article=62&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-najmodniejszych-stylach-wnetrzarskich-jak-dobrac-okna-i-drzwi-pasujace-do-stylu-boho(|/)$ index.php?article=63&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^abc-wymiany-okien-co-warto-przemyslec-przed-udaniem-sie-do-salonu-po-nowe-okna(|/)$ index.php?article=64&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-wietrzyc-zima-dom-lub-mieszkanie-w-jaki-sposob-zapewnic-prawidlowa-wymiane-powietrza-przy-uzyciu-okien(|/)$ index.php?article=65&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-dzwiekoszczelne-vidok-jak-dzialaja-i-czym-nalezy-sie-kierowac-przy-ich-wyborze(|/)$ index.php?article=66&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^czym-kierowac-sie-przy-wyborze-parapetu-jak-dopasowac-parapet-do-konkretnego-rodzaju-okna(|/)$ index.php?article=67&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^projektowanie-i-konstrukcja-ogrodow-zimowych-jakiego-typu-drzwi-tarasowych-oraz-przeszklen-warto-uzyc-do-ich-budowy(|/)$ index.php?article=68&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-beda-wygladaly-okna-przyszlosci-czego-mozemy-sie-spodziewac-juz-w-2021-roku(|/)$ index.php?article=69&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-dachowe-zima-jak-nalezy-o-nie-dbac-w-tym-trudnym-dla-nich-okresie(|/)$ index.php?article=70&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^swiateczne-dekoracje-okien-i-drzwi-nasze-pomysly-na-bozonarodzeniowy-nastroj-w-kazdym-domu(|/)$ index.php?article=71&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^proste-sposoby-na-zamarzajace-okna-czemu-szyby-zamarzaja-i-jak-mozecie-sobie-z-tym-poradzic(|/)$ index.php?article=72&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-najmodniejszych-stylach-wnetrzarskich-jak-dobrac-okna-i-drzwi-pasujace-do-stylu-klasycznego(|/)$ index.php?article=73&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jakie-rozmiary-powinno-miec-okno-lazienkowe-na-co-nalezy-zwrocic-uwage-podczas-wyboru-takiego-okna(|/)$ index.php?article=74&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^szprosy-w-jakiego-rodzaju-oknach-warto-je-stosowac-do-jakich-domow-i-mieszkan-pasuja-najbardziej(|/)$ index.php?article=75&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^czy-rozmieszczenie-okien-wzgledem-stron-swiata-ma-znaczenie-w-ktora-strone-powinny-byc-zwrocone-okna-w-sypialni-kuchni-czy-salonie(|/)$ index.php?article=76&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^cztery-pory-roku-z-roletami-zewnetrznymi-w-jaki-sposob-to-proste-rozwiazanie-potwierdza-swoja-przydatnosc-przez-caly-rok(|/)$ index.php?article=77&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-prawidlowo-zabezpieczyc-okna-i-drzwi-przed-nadchodzaca-zima-5-krokow-do-doskonalej-ochrony-stolarki-okiennej-w-kazdym-domu(|/)$ index.php?article=78&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-najmodniejszych-stylach-wnetrzarskich-jak-dobrac-okna-i-drzwi-pasujace-do-stylu-skandynawskiego(|/)$ index.php?article=79&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^vidok-na-piekny-jesienny-ogrod-co-maja-wspolnego-okna-i-drzwi-tarasowe-z-jesiennymi-porzadkami-w-ogrodzie(|/)$ index.php?article=80&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^drzwi-balkonowe-przesuwne-porownanie-klasycznych-drzwi-psk-i-hst-z-innowacyjnym-systemem-vidok-inova-smoove(|/)$ index.php?article=81&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^trendy-wnetrzarskie-sezonu-2020-2021-i-kolejnych-ktore-okna-najlepiej-wpisuja-sie-w-nowe-wytyczne-dla-architektow-i-dekoratorow-wnetrz(|/)$ index.php?article=82&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^czy-zmiany-klimatyczne-moga-miec-wplyw-na-wybor-okien-na-jakie-okna-warto-sie-obecnie-decydowac(|/)$ index.php?article=83&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^dlaczego-w-kazdej-lazience-warto-jest-miec-przynajmniej-jedno-okno-w-czym-tkwi-sekret-funkcjonalnosci-i-estetyki-okien-lazienkowych(|/)$ index.php?article=84&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jesienne-aranzacje-balkonow-i-tarasow-jak-ozdobic-te-przestrzen-na-nadchodzace-miesiace-jak-wykorzystac-do-tego-okna-i-drzwi-balkonowe(|/)$ index.php?article=85&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-najmodniejszych-stylach-wnetrzarskich-jak-dobrac-okna-i-drzwi-pasujace-do-stylu-nowoczesnego(|/)$ index.php?article=86&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^vidok-golf-cup-podziekowania(|/)$ index.php?article=87&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-vidok-z-szybami-pilkington-suncool-takiego-polaczenia-energooszczednosci-i-komfortu-bez-zadnych-doplat-w-ofercie-vidok-jeszcze-nie-bylo(|/)$ index.php?article=88&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^turniej-vidok-golf-cup(|/)$ index.php?article=89&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^standard-wt-2021-co-oznacza-dla-inwestorow-w-jaki-sposob-nowe-wymagania-przeloza-sie-na-wybor-okien-i-drzwi(|/)$ index.php?article=90&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jakie-drzwi-najlepiej-sprawdza-sie-w-waszym-domu-porownanie-drzwi-drewnianych-aluminiowych-i-pcv(|/)$ index.php?article=91&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^cieply-montaz-okien-czym-jest-na-czym-polega-i-w-jaki-sposob-mozna-dzieki-niemu-zdobyc-rzadowe-dofinansowanie-2(|/)$ index.php?article=92&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^drzwi-tarasowe-rozwierno-przesuwne-czy-harmonijkowe-ktore-rozwiazanie-lepiej-sprawdzi-sie-w-waszym-domu(|/)$ index.php?article=93&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^czy-szprosy-w-oknach-to-dobry-pomysl-na-jaki-rodzaj-szprosow-warto-sie-zdecydowac-i-o-czym-nalezy-pamietac-dokonujac-tego-wyboru(|/)$ index.php?article=94&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-prawidlowo-myc-i-konserwowac-ramy-okienne-z-drewna-oraz-pcv(|/)$ index.php?article=95&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^przyszla-pora-na-moskitiery-w-oknach-ochron-siebie-i-swoich-bliskich-przed-letnia-inwazja-owadow(|/)$ index.php?article=96&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^proste-domowe-sposoby-na-czyste-szyby-bez-smug-sprawdzcie-jak-nalezy-myc-je-latem-oraz-o-kazdej-innej-porze-roku(|/)$ index.php?article=97&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^lato-to-doskonala-pora-na-wymiane-okien-jak-nalezy-sie-do-tego-przygotowac(|/)$ index.php?article=98&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^letnie-dekoracje-okien-i-parapetow-o-czym-warto-pamietac-przygotowujac-sie-do-zmiany-ich-wystroju(|/)$ index.php?article=99&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^inteligentne-sterowanie-domem-z-vidokiem(|/)$ index.php?article=100&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^ogromne-znaczenie-szklenia-okien(|/)$ index.php?article=101&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^vidok-all-inclusive-najlepsze-okna-i-drzwi(|/)$ index.php?article=102&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^vidok-solidny-producent-okien-i-drzwi(|/)$ index.php?article=103&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^najlepsze-profile-okienne-z-funkcja-tiltsafe(|/)$ index.php?article=104&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^system-przesuwny-vidok-optic(|/)$ index.php?article=105&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^kupuj-lokalnie-wsparcie-dla-polskich-przedsiebiorcow(|/)$ index.php?article=106&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^systemy-aluminiowe-vidok-z-rabatem-10(|/)$ index.php?article=107&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^praca-w-domu-w-biurze-z-pieknym-vidokiem(|/)$ index.php?article=108&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^ulga-termomodernizacyjna-odlicz-od-podatku-okna-i-drzwi(|/)$ index.php?article=109&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^promocja-na-okna-drewniane-vidok-na-lepsze-jutro(|/)$ index.php?article=110&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-dobrym-stylu-hygge(|/)$ index.php?article=111&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^najpiekniejsze-kolory-okien(|/)$ index.php?article=112&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^rabat-na-montaz-okien-i-drzwi(|/)$ index.php?article=113&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-przeciwsloneczne-szklenie-selektywne(|/)$ index.php?article=114&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-odporne-na-wiatr-bezpieczny-dom-we-wzgledu-na-pogode(|/)$ index.php?article=115&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okno-horyzontalne-do-nowoczesnego-wnetrza(|/)$ index.php?article=116&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^wymiana-okien-termomodernizacja-domu(|/)$ index.php?article=117&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^izolacyjnosc-akustyczna-okien-na-najwyzszym-poziomie(|/)$ index.php?article=118&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^profile-okien-a-design-stolarki(|/)$ index.php?article=119&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^dom-bez-barier-okna-pvc(|/)$ index.php?article=120&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-dobrym-stylu-boho(|/)$ index.php?article=121&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^trendy-i-nowosci-w-roku-2020(|/)$ index.php?article=122&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^zaluzje-fasadowe-niezbedna-ochrona-domu(|/)$ index.php?article=123&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^cieply-dom-na-zime-jakie-okna-wybrac(|/)$ index.php?article=124&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^promocja-black-week-vidok(|/)$ index.php?article=125&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^ciche-wnetrza-okna-dzwiekoszczelne-vidok(|/)$ index.php?article=126&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^promocja-system-przesuwny(|/)$ index.php?article=127&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^dlaczego-warto-zamontowac-okna-i-drzwi-przed-zima(|/)$ index.php?article=128&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^budowa-domu-zamieniamy-stan-surowy-otwarty-na-zamkniety(|/)$ index.php?article=129&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^drzwi-otwierane-bez-klucza-w-inteligentnym-domu(|/)$ index.php?article=130&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okucia-nx-najlepszym-wyborem(|/)$ index.php?article=131&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^drewno-we-wnetrzach-stolarka-drewniana-podstawa-eleganckiej-aranzacji(|/)$ index.php?article=132&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-energooszczedne-w-ramach-programu-czyste-powietrze(|/)$ index.php?article=133&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^drzwi-aluminiowe-niesamowity-design-w-parze-z-komfortem(|/)$ index.php?article=134&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^vidok-dla-firm-najlepsze-okna-do-nowoczesnego-biura(|/)$ index.php?article=135&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^nowe-okucia-roto-nx-czas-na-zmiane(|/)$ index.php?article=136&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^drzwi-zewnetrzne-vidok-polaczenie-elegancji-i-bezpieczenstwa(|/)$ index.php?article=137&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-dobrym-stylu-nowojorski-salon(|/)$ index.php?article=138&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^klamki-do-drzwi-przesuwnych-vidok-polska(|/)$ index.php?article=139&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^minimalizm-a-okna-pvc-czyli-ogromna-rola-designu(|/)$ index.php?article=140&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-narozne-dwustronny-vidok-na-przestrzen(|/)$ index.php?article=141&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-pionowe-jako-najnowszy-trend-wnetrzarski(|/)$ index.php?article=142&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-dobrym-stylu-eklektyczne-mieszkanie(|/)$ index.php?article=143&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^antywlamaniowa-ochrona-domu-okna-drzwi-i-rolety-vidok(|/)$ index.php?article=144&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^pvc-czy-aluminiowe-jakie-okna-wybrac(|/)$ index.php?article=145&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^rolety-zewnetrzne-caloroczny-komfort-termiczny(|/)$ index.php?article=146&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^smart-shopping-czyli-swiadoma-inwestycja-w-okna(|/)$ index.php?article=147&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^drzwi-tarasowe-przesuwne-tworzymy-przestrzen-idealna-do-wypoczynku(|/)$ index.php?article=148&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-kolankowe-wprowadz-wiecej-swiatla-do-swojego-domu(|/)$ index.php?article=149&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okucia-jakie-role-pelnia-w-oknach(|/)$ index.php?article=150&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-zaplanowac-okna-do-kuchni(|/)$ index.php?article=151&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jaki-kolor-okien-wybrac-odchodzimy-od-uniwersalnej-bieli(|/)$ index.php?article=152&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^panoramiczne-okna-wspanialy-vidok-na-przestrzen(|/)$ index.php?article=153&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^co-wplywa-na-izolacyjnosc-akustyczna-okna(|/)$ index.php?article=154&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-drewniano-aluminiowe-czyli-dialog-tradycji-z-nowoczesnoscia(|/)$ index.php?article=155&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^zaluzje-fasadowe-skuteczna-ochrona-przed-sloncem(|/)$ index.php?article=156&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^dlaczego-warto-wybrac-drzwi-tarasowe-przesuwne(|/)$ index.php?article=157&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^inova-smoove-innowacyjny-system-przesuwny-marki-vidok(|/)$ index.php?article=158&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-pvc-antracyt-ekskluzywne-wykonczenie-wnetrza(|/)$ index.php?article=159&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^szprosy-elegancki-dodatek-do-okien-czy-przemijajacy-trend(|/)$ index.php?article=160&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^ekskluzywne-klamki-do-drzwi-i-okien-marki-vidok(|/)$ index.php?article=161&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^energooszczedne-okna-pvc-komfort-cieplny-na-dlugie-lata(|/)$ index.php?article=162&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^smart-vidok-zaawansowana-technologia-w-twoim-domu(|/)$ index.php?article=163&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^trendy-architektury-2019-jakie-okna-wybrac-tego-roku(|/)$ index.php?article=164&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^innowacje-w-produkcji-drzwi-tarasowych(|/)$ index.php?article=165&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-pvc-marki-vidok-poznaj-sekret-ich-unikatowego-designu(|/)$ index.php?article=166&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-o-duzych-gabarytach-jakie-sa-ich-zalety(|/)$ index.php?article=167&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^bezpieczne-drzwi-do-twojego-domu(|/)$ index.php?article=168&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-pvc-antywlamaniowe-jak-produkujemy-je-w-vidoku(|/)$ index.php?article=169&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^inteligentne-okna-nowoczesne-technologie-systemow-vidok(|/)$ index.php?article=170&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-drewniane-dlaczego-drewno-jest-lepsze-niz-pvc(|/)$ index.php?article=171&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^na-czym-polega-cieply-montaz-okna(|/)$ index.php?article=172&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^szklenie-selektywne-suncool-kontrola-sloneczna-na-najwyzszym-poziomie(|/)$ index.php?article=173&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^rolety-zewnetrzne-ich-charakterystyka-oraz-zastosowanie(|/)$ index.php?article=174&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-dzialaja-rolety-screen(|/)$ index.php?article=175&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-do-domu-energooszczednego-a-pasywnego-roznice(|/)$ index.php?article=176&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jakie-okna-wybrac-do-domu-2(|/)$ index.php?article=177&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^poznaj-najlepsza-promocje-na-okna-pvc-w-tym-roku(|/)$ index.php?article=178&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^z-vidokiem-im-wiecej-kupujesz-tym-wiecej-zyskujesz(|/)$ index.php?article=179&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^turniej-vidok-cup(|/)$ index.php?article=180&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^zlota-mysl-technologiczna(|/)$ index.php?article=181&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^unikatowe-rozwiazania-tworzace-bezpieczne-wnetrze(|/)$ index.php?article=182&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^vidok-producentem-ekskluzywnych-wyrobow(|/)$ index.php?article=183&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-185-dodatki-do-drzwi-i-okien-drewnianych-oraz-pvc(|/)$ index.php?article=185&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-186-okucia(|/)$ index.php?article=186&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-187-szklenie(|/)$ index.php?article=187&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-188-klamki(|/)$ index.php?article=188&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-189-stolarka-p-poz(|/)$ index.php?article=189&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-190-parapety(|/)$ index.php?article=190&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-191-moskitiery(|/)$ index.php?article=191&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-192-okna-dachowe(|/)$ index.php?article=192&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-193-szprosy(|/)$ index.php?article=193&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-194-salon-nowy-sacz(|/)$ index.php?article=194&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-195-salon-rzeszow(|/)$ index.php?article=195&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-196-salon-krosno(|/)$ index.php?article=196&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-197-salon-lancut(|/)$ index.php?article=197&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-198-salon-przemysl(|/)$ index.php?article=198&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-199-salon-sanok(|/)$ index.php?article=199&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-201-salon-stalowa-wola(|/)$ index.php?article=201&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-202-salon-tarnobrzeg(|/)$ index.php?article=202&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-203-salon-mielec(|/)$ index.php?article=203&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-204-salon-nowy-targ(|/)$ index.php?article=204&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-205-salon-zakopane(|/)$ index.php?article=205&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-206-salon-gorlice(|/)$ index.php?article=206&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-207-salon-krakow(|/)$ index.php?article=207&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^firma-vidok-zaprasza-na-dni-otwarte-w-salonie-okien-i-drzwi-w-krakowie(|/)$ index.php?article=210&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^inteligentny-dom-z-inteligentnymi-oknami-czyli-smart-vidok-w-pelnej-okazalosci-kto-i-dlaczego-powinien-zainteresowac-sie-tym-niezwyklym-systemem-1(|/)$ index.php?article=211&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-w-najmodniejszych-stylach-wnetrzarskich-jak-dobrac-okna-i-drzwi-pasujace-do-stylu-egzotycznego(|/)$ index.php?article=212&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-rozwiazac-problem-z-nieszczelnymi-oknami-skad-biora-sie-nieszczelnosci-w-oknach-i-jakich-metod-nalezy-uzyc-do-usuniecia-okreslonego-typu-przewiewow(|/)$ index.php?article=213&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^trendy-wnetrzarskie-ktore-beda-modne-w-2022-roku-jak-zmieni-sie-podejscie-do-aranzacji-domow-i-mieszkan-w-ciagu-nadchodzacych-miesiecy(|/)$ index.php?article=214&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^macie-kominek-w-salonie-lub-zastanawiacie-sie-nad-jego-instalacja-sprawdzcie-dlaczego-powinniscie-sie-rowniez-zastanowic-nad-wymiana-okien(|/)$ index.php?article=215&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^bezpieczne-okna-i-drzwi-tarasowe-to-bezpieczny-dom-dlaczego-w-jaki-sposob-odpowiednie-drzwi-i-okna-antywlamaniowe-pozwola-wam-zadbac-o-swoje-bezpieczenstwo(|/)$ index.php?article=216&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^brama-garazowa-segmentowa-czy-brama-rolowana-ktore-rozwiazanie-okaze-sie-lepsze(|/)$ index.php?article=217&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-na-poddaszu-jak-rozplanowac-okna-dachowe-na-jakiej-wysokosci-je-zamontowac-i-jak-zabezpieczyc-poddasze-przed-nadmiernym-nagrzewaniem-sie(|/)$ index.php?article=218&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-rozwiazac-problem-z-nieszczelnymi-oknami/(|/)$ index.php?article=219&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-wybrac-okna-do-nowoczesnej-stodoly(|/)$ index.php?article=220&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^rolety-zewnetrzne-podtynkowe-a-natynkowe-roznice(|/)$ index.php?article=221&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^czy-zlew-pod-oknem-to-dobry-pomysl(|/)$ index.php?article=222&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^stolarka-aluminiowa-co-to-jest-jakie-ma-zalety-i-czy-warto-sie-na-nia-zdecydowac(|/)$ index.php?article=223&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^pochwyt-do-drzwi-kontra-klasyczna-klamka-co-to-jest-i-ktore-z-nich-wybrac(|/)$ index.php?article=224&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-226-salon-lezajsk(|/)$ index.php?article=226&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^ekspozycja-okien-a-kierunki-swiata-jak-rozmiescic-okna-w-nowym-domu(|/)$ index.php?article=227&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-228-salon-trader-nowy-sacz(|/)$ index.php?article=228&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-229-salon-solaris-katowice(|/)$ index.php?article=229&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^aranzacja-okna-w-pokoju-dziewczynki(|/)$ index.php?article=230&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^5-sygnalow-ze-twoje-okna-nadaja-sie-do-wymiany(|/)$ index.php?article=231&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^ciepla-ramka-co-to-jest-jakie-korzysci-plyna-z-jej-zastosowania(|/)$ index.php?article=232&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^8-sposobow-na-to-jak-optycznie-powiekszyc-pokoj(|/)$ index.php?article=233&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-234-vidok-golf-cup(|/)$ index.php?article=234&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-czyscic-rolety-zewnetrzne-i-zaluzje-fasadowe(|/)$ index.php?article=235&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jakie-rolety-na-drzwi-tarasowe-przesuwne/(|/)$ index.php?article=236&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-naprawic-uszkodzone-drzwi-drewniane(|/)$ index.php?article=237&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^brama-garazowa-uchylna-czy-segmentowa(|/)$ index.php?article=238&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-uszczelnic-stare-okna-drewniane(|/)$ index.php?article=239&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^jak-wyregulowac-drzwi-wejsciowe(|/)$ index.php?article=240&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^kiedy-i-jak-montowac-rolety-zewnetrzne(|/)$ index.php?article=241&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^wnetrze-w-stylu-loftowym-jak-je-urzadzic-i-jakie-okna-wybrac(|/)$ index.php?article=242&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^trendy-wnetrzarskie-2023-jakie-okna-i-drzwi-bedziemy-wybierac-w-nowym-roku(|/)$ index.php?article=243&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-pvc-mity(|/)$ index.php?article=244&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-do-domu-parterowego(|/)$ index.php?article=245&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^feng-shui-w-domu(|/)$ index.php?article=246&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^brda-dom(|/)$ index.php?article=247&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^drzwi-wejsciowe-szklane(|/)$ index.php?article=248&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^dom-atrialny(|/)$ index.php?article=249&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-250-rolety-zasilane-energia-sloneczna(|/)$ index.php?article=250&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^niski-prog-w-drzwiach-balkonowych(|/)$ index.php?article=252&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-253-jak-urzadzic-dom-w-stylu-dworkowym-wybieramy-idealne-okna-oraz-drzwi-do-dworku(|/)$ index.php?article=253&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^kontaktron-okienny-co-to-jest-kiedy-i-w-jakim-celu-sie-go-stosuje(|/)$ index.php?article=254&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^okna-do-domu-z-bali-jakie-wybrac(|/)$ index.php?article=255&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^a-256-okiennice-zewnetrze-czy-wciaz-sa-w-trendach-i-do-jakiego-budownictwa-pasuja(|/)$ index.php?article=256&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^czym-jest-dom-zeroenergetyczny-czy-warto(|/)$ index.php?article=257&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^trendy-w-architekturze-mieszkaniowej-na-rok-2024-co-bedzie-modne-we-wnetrzach(|/)$ index.php?article=258&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^w-jakie-okna-i-drzwi-wyposazyc-kontener-mieszkalny(|/)$ index.php?article=259&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^naswietle-i-doswietle-w-drzwiach-wejsciowych-co-to-jest-jakie-ma-zalety-czy-warto(|/)$ index.php?article=260&lang=pl&%{QUERY_STRING} [L] + +RewriteRule ^Adres Typ przekierowania Adres docelowy [R=301,L] +RewriteRule ^25-lat-vidoku/$ https://vidok.com/lider-od-1993/ [R=301,L] +RewriteRule ^okna/okna-pvc/okna-pvc-87/$ https://vidok.com/okna/okna-pvc/okna-pvc-94/ [R=301,L] +RewriteRule ^okna/okna-drewniane-2/$ https://vidok.com/okna-drewniane/ [R=301,L] +RewriteRule ^aluminiowe-okna-rzeszow-kupuje-u-najlepszych/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^automatyka-do-rolet/$ https://vidok.com/ [R=301,L] +RewriteRule ^bestseller-roku-goldenergy/$ https://vidok.com/okna/okna-pvc/linia-gold-energy/ [R=301,L] +RewriteRule ^bramy-garazowe-charakterystyka/$ https://vidok.com/bramy/ [R=301,L] +RewriteRule ^bramy-garazowe-zwieksz-bezpieczenstwo-swojego-domu-i-zadbaj-o-estetyke/$ https://vidok.com/bramy/ [R=301,L] +RewriteRule ^category/lastnews/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/10/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/11/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/12/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/13/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/14/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/15/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/16/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/17/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/18/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/19/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/20/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/21/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/22/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/23/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/24/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/25/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/26/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/27/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/28/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/3/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/4/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/5/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/6/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/7/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/8/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/lastnews/page/9/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/10/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/11/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/12/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/13/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/14/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/15/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/16/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/17/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/3/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/4/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/5/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/6/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/7/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/8/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/poradnik/page/9/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^category/uncategorized/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^cookie-policy/$ https://vidok.com/polityka-cookies/ [R=301,L] +RewriteRule ^czy-firma-vidok-sprzedaje-okucia/$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^czym-sie-charakteryzuja-dobre-okna-wroclaw/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^czym-sie-charakteryzuja-solidne-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^czym-wyroznia-sie-okna-stalowa-wola-od-pozostalych/$ https://vidok.com/salon-stalowa-wola/ [R=301,L] +RewriteRule ^czy-okna-bialystok-kupie-w-salonie-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^dobry-producent-okien-krakow-kupuje-u-naszym-salonie/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^dobry-producent-okien-krakow-zapraszamy-do-vidoku/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^doskonalej-jakosci-drzwi-krakow-kupuje-w-salonie-vidok/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^doskonalej-jakosci-okna-rzeszow-kupuje-w-vidoku/$ https://vidok.com/salon-rzeszow/ [R=301,L] +RewriteRule ^doskonale-okna-warszawa-na-wyciagniecie-reki/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^drewniane-czy-aluminiowe-jakie-okna-wybrac/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^drzwi-do-domu-jak-madrze-wybrac/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^drzwi-drewniane-budowa-i-wlasciwosci/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^drzwi-drewniane-w-salonie-vidoku/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^drzwi-dzierzoniow-gdzie-szukac/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^drzwi-harmonijkowe-dlaczego-warto-je-kupic/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^drzwi-krakow-kupuje-u-sprawdzonego-producenta/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^drzwi-krakow-kupuje-w-salonie-sprzedazy-vidoku/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^drzwi-najwazniejszy-element-domu/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^drzwi-pol-skone/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^drzwi-przesuwne-doskonale-parametry-w-rozmiarze-xxl/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^drzwi-tarasowe-pvc/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^drzwi-vidok-bezpieczenstwo-domu/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^drzwi-vidok-gwarancja-bezpieczenstwa-i-elegancji/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^drzwi-warszawa-sprawdz-oferte-firmy-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^drzwi-wejsciowe/$ https://vidok.com/drzwi-wejsciowe-4/ [R=301,L] +RewriteRule ^drzwi-wejsciowe-5/$ https://vidok.com/drzwi-wejsciowe-4/ [R=301,L] +RewriteRule ^drzwi-wejsciowe-drewniane/$ https://vidok.com/drzwi-wejsciowe-4/ [R=301,L] +RewriteRule ^drzwi-wejsciowe-drewniane-dom-energooszczedny/$ https://vidok.com/drzwi-wejsciowe-4/ [R=301,L] +RewriteRule ^drzwi-wejsciowe-pcv/$ https://vidok.com/drzwi-wejsciowe-4/ [R=301,L] +RewriteRule ^drzwi-wejsciowe-pvc/$ https://vidok.com/drzwi-wejsciowe-4/ [R=301,L] +RewriteRule ^drzwi-zewnetrzne-bielsko-biala-odkryj-ich-zalety/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^drzwi-zewnetrzne-szczecin-wlasciwosci/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^eleganckie-okna-parczew-znajdziesz-w-salonie-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^energooszczedne-okna-pvc-bydgoszcz/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^estetyczne-okna-w-kujawsko-pomorskim/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdansk/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-dostane-energooszczedne-okna-poznan/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-kupic-nowoczesne-rolety-zewnetrzne/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-kupie-energooszczedne-okna-gdansk/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-kupie-ladne-drzwi-do-domu/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-kupie-nowe-okna-z-dofinansowaniem/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-kupie-oszczedne-okna-zielona-gora/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-kupie-wysokiej-jakosci-okna-krakow/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^gdzie-moge-kupic-okna-szczawnica/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-moge-zakupic-nowoczesne-okna-lodz/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-moge-zamowic-wysokiej-jakosci-drzwi-opole/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-w-nowym-saczu-kupie-solidne-drzwi/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-znajde-solidne-akcesoria-do-okien/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-znajde-wysokiej-klasy-okna-nowy-targ/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^innowacyjne-systemy-aluminiowe-znajdziesz-w-vidoku/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^jakie-akcesoria-do-drzwi-najlepiej-kupic/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^jakie-bramy-garazowe-mozemy-ci-zaproponowac/$ https://vidok.com/bramy/ [R=301,L] +RewriteRule ^jakie-drzwi-zewnetrzne/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^jakie-drzwi-zewnetrzne-beda-najlepsze-do-domu-jednorodzinnego/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^jakie-drzwi-zewnetrzne-najlepiej-kupic/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^jakie-okna-busko-zdroj-beda-najlepsze-do-domu-jednorodzinnego/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^jakie-okna-do-nowoczesnego-domu-wybrac/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^jakie-okna-drewniane-krakow-sa-warte-uwagi/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^jakie-okna-ekologiczne-najlepiej-kupic/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^jakie-okna-sa-na-topie/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^jakie-okna-torun-wybrac-do-domu/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^jakie-okna-vidok-beda-najlepsze-do-nowoczesnego-salonu/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^jakie-okna-wybrac/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^jakie-okna-wybrac-do-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^jakie-okna-wybrac-do-hotelu/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^jakie-parapety-znajde-w-asortymencie-vidok/$ https://vidok.com/parapety/ [R=301,L] +RewriteRule ^jakie-powinny-byc-dobre-drzwi/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^jakie-rolety-zewnetrzne-posiada-w-ofercie-vidok/$ https://vidok.com/rolety-zewnetrzne/ [R=301,L] +RewriteRule ^jakie-sa-solidne-akcesoria-do-drzwi/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^jakie-wymagania-musi-spelniac-najlepszy-producent-okien/$ https://vidok.com/firma/ [R=301,L] +RewriteRule ^jak-najlepiej-dbac-o-okna-od-nowosci/$ https://vidok.com/gwarancja/ [R=301,L] +RewriteRule ^jak-pielegnowac-okna/$ https://vidok.com/jak-prawidlowo-myc-i-konserwowac-ramy-okienne-z-drewna-oraz-pcv/ [R=301,L] +RewriteRule ^jak-pielegnowac-okna-poznaj-nasze-sposoby/$ https://vidok.com/jak-prawidlowo-myc-i-konserwowac-ramy-okienne-z-drewna-oraz-pcv/ [R=301,L] +RewriteRule ^klamki-do-drzwi-od-firmy-vidok-odkryj-ich-zalety/$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^kup-okna-czestochowa-u-znanego-producenta/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^linia-extreme/$ https://vidok.com/okna/okna-pvc/okna-pvc-83-extreme/ [R=301,L] +RewriteRule ^linia-goldenergy/$ https://vidok.com/okna/okna-pvc/linia-gold-energy/ [R=301,L] +RewriteRule ^linia-gold-energy/$ https://vidok.com/okna/okna-pvc/linia-gold-energy/ [R=301,L] +RewriteRule ^montaz-drzwi-krakow/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^moskitiera-do-okien/$ https://vidok.com/moskitiery/ [R=301,L] +RewriteRule ^najlepsza-oferta-na-okna-podkarpackie/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^najlepsza-stolarka-z-drewna-tylko-w-vidoku/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^najlepsze-okna-rzeszow-dostaniesz-w-vidoku/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^najlepsze-okna-rzeszow-znajdziesz-w-vidoku/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^najlepsze-okna-wroclaw-w-twoim-mieszkaniu/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^najlepszy-producent-okien-i-drzwi/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^najlepszy-producent-okien-vidok/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^najwyzszej-jakosci-szklenie-gwarancja-jakosci-okna/$ https://vidok.com/szklenie/ [R=301,L] +RewriteRule ^najwyzszej-klasy-okna-zakopane-znajdziesz-w-salonie-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^nowoczesne-drzwi-vidok-do-twojego-domu/$ https://vidok.com/drzwi/ [R=301,L] +RewriteRule ^nowoczesne-i-innowacyjne-okna-na-wyciagniecie-reki/$ https://vidok.com/ [R=301,L] +RewriteRule ^nowoczesne-okna-kielce-gdzie-je-moge-kupic/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^nowoczesne-okna-zakupisz-w-salonie-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^odpowiednio-dobrane-parapety-zmienia-wyglad-wnetrza-i-elewacji/$ https://vidok.com/parapety/ [R=301,L] +RewriteRule ^odwiedz-vidok-zobacz-okna-najwyzszej-jakosci/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^oferta-vidok-na-klamki-do-drzwi/$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^okna/okna-pvc/okna-pcv-87/$ https://vidok.com/okna/okna-pvc/okna-pvc-87/ [R=301,L] +RewriteRule ^okna/okna-pvc/okna-pcv-87/$ https://vidok.com/okna/okna-pvc/okna-pvc-87/ [R=301,L] +RewriteRule ^okna/okna-pvc/okna-pvc-83/$ https://vidok.com/okna/okna-pvc/okna-pvc-83-extreme/ [R=301,L] +RewriteRule ^okna-aluminiowe-czy-drewniano-aluminiowe-ktore-lepsze/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna-aluminiowe-czy-okna-drewniano-aluminiowe/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna-aluminiowe-dlaczego-warto-w-nie-zainwestowac/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna-aluminiowe-gliwice-dlaczego-warto/$ https://vidok.com/salon-gliwice/ [R=301,L] +RewriteRule ^okna-aluminiowe-i-ich-parametry-techniczne/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna-aluminiowe-vidok/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna-bydgoszcz-okna-torun-gdzie-kupie-lepsze/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-do-domu-pasywnego-gdzie-takie-kupie/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-drewniane-czestochowa-w-twoim-ulubionym-salonie/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-drewniane-czy-drewniano-aluminiowe/$ https://vidok.com/okna-drewniane-czy-drewniano-aluminiowe/ [R=301,L] +RewriteRule ^okna-drewniane-extrem/$ https://vidok.com/okna-drewniane/ [R=301,L] +RewriteRule ^okna-drewniane-krakow-kupuje-w-vidoku/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^okna-drewniane-krakow-zaprasza-do-salonu-znanego-producenta-okien/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^okna-drewniane-lubelskie-znajdziesz-w-vidoku/$ https://vidok.com/salon-lublin/ [R=301,L] +RewriteRule ^okna-drewniane-okna-drewniano-aluminiowe/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna-drewniane-pcv-czy-aluminiowe/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna-drewniane-szczecin-odwiedz-salon-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-drewniane-vidok-odkryj-ich-walory/$ https://vidok.com/okna-drewniane/ [R=301,L] +RewriteRule ^okna-drewniane-walbrzych-odkryj-naturalne-piekno/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-drewniane-warszawa-do-nowoczesnego-budownictwa/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-drewniano-aluminiowe-charakterystyka/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna-drewniano-aluminiowe-odkryj-ponadprzecietna-wytrzymalosc/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna-energooszczedne-energo/$ https://vidok.com/okna/okna-pvc/linia-gold-energy/ [R=301,L] +RewriteRule ^okna-gdansk-gustowny-wyglad-i-funkcjonalnosc/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-gdansk-i-drzwi-od-producenta/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-gliwice-sprawdz-oferte-firmy-vidok/$ https://vidok.com/salon-gliwice/ [R=301,L] +RewriteRule ^okna-jelenia-gora-poznaj-firme-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-jelenia-gora-poznaj-firme-vidok-2/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-kielce-na-co-zwrocic-uwage/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-kielce-zamowisz-w-vidoku/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-krakow-najlepsza-oferte-w-regionie/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^okna-krakow-ochrona-przed-niekorzystnymi-czynnikami-pogodowymi/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^okna-krynica-zdroj-zakupisz-w-salonie-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-lublin-czy-dostane-je-w-salonie-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-lublin-poznaj-oferte-vidoku/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-nowy-sacz-gdzie-kupisz-najlepsze/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-nowy-sacz-inwestycja-w-przyszlosc/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-nowy-sacz-odwiedz-salon-vidoku/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-nowy-sacz-oferta-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-pcv-gdansk-tu-kupisz-najlepsze/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-pcv-gliwice-to-dobry-wybor-do-domu-wolnostojacego/$ https://vidok.com/salon-gliwice/ [R=301,L] +RewriteRule ^okna-pcv-krakow-vidok-zaprasza/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^okna-pcv-krakow-w-tym-miescie-kupisz-najlepsze-systemy-okienne/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^okna-pcv-lublin-o-czym-nalezy-pamietac-przed-kupnem/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-pcv-mielec-zakupisz-w-punkcie-handlowym-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-pcv-nowy-sacz-tylko-u-sprawdzonego-producenta/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-pcv-rzeszow-postaw-na-sprawdzone-rozwiazania/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^okna-pcv-rzeszow-skorzystaj-z-oferty-cenionego-producenta/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^okna-piotrkow-trybunalski-zamowisz-w-vidoku/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-poznan-zainwestuj-w-okna-od-vidoku/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-pvc/$ https://vidok.com/okna/okna-pvc/ [R=301,L] +RewriteRule ^okna-pvc-22/$ https://vidok.com/okna/okna-pvc/ [R=301,L] +RewriteRule ^okna-pvc-a-okna-drewniane-charakterystyka/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^okna-rownolegle-przesuwne-wybierz-je/$ https://vidok.com/drzwi-tarasowe/ [R=301,L] +RewriteRule ^okna-rzeszow-kupuj-u-lokalnego-producenta/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-rzeszow-siegnij-po-najlepszy-asortyment/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^okna-rzeszow-skorzystaj-z-oferty/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^okna-rzeszow-sprawdz-asortyment-vidok/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^okna-rzeszow-w-salonie-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-rzeszow-zainwestuj-w-stolarke-od-najlepszego-producenta/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^okna-rzeszow-zaoszczedz-na-wydatkach-na-energie/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^okna-sopot-poznaj-bogata-oferte-vidoku/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-sosnowiec/$ https://vidok.com/salon-sosnowiec/ [R=301,L] +RewriteRule ^okna-sosnowiec-w-jakim-salonie-kupie-bardzo-dobre-okna-drewniane/$ https://vidok.com/salon-sosnowiec/ [R=301,L] +RewriteRule ^okna-stalowa-wola-inwestuj-w-produkty-cenionego-producenta/$ https://vidok.com/salon-stalowa-wola/ [R=301,L] +RewriteRule ^okna-stalowa-wola-odwiedz-salon-marki-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-stalowa-wola-odwiedz-salon-vidoku/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-tarnow-gdzie-znajde-solidne-okna/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-warszawa-czy-wiesz-gdzie-kupic-najlepsze/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-warszawa-wyglad-domu-zalezy-od-okien/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-wroclaw-gdzie-kupic/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-wroclaw-gdzie-zakupie-najlepsze/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-wroclaw-odwiedz-punkt-handlowy-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-wroclaw-odwiedz-punkt-handlowy-vidok-2/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-wroclaw-odwiedz-punkt-handlowy-vidok-3/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-wroclaw-poznaj-oferte-vidoku/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-zakopane-nowoczesny-dom/$ https://vidok.com/salon-zakopane/ [R=301,L] +RewriteRule ^okna-zakopane-odzwiedz-salon-vidok/$ https://vidok.com/salon-zakopane/ [R=301,L] +RewriteRule ^parapety-bez-tajemnic/$ https://vidok.com/parapety/ [R=301,L] +RewriteRule ^po-energooszczedne-okna-drewniane-krakow-udaje-sie-do-vidoku/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^po-okna-drewniane-krakow-udaje-sie-do-salonu-vidoku/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^po-solidne-okna-drewniane-krakow-udaje-do-vidoku/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^poznaj-drzwi-pol-skone-o-najwyzszej-jakosci/$ https://vidok.com/drzwi-wejsciowe-4/ [R=301,L] +RewriteRule ^producent-okien-gliwice-poznaj-bogaty-asortyment-firmy-vidok/$ https://vidok.com/salon-gliwice/ [R=301,L] +RewriteRule ^producent-okien-i-drzwi-ma-dla-ciebie-oferte/$ https://vidok.com/ [R=301,L] +RewriteRule ^producent-okien-jelenia-gora-sprawdz-asortyment-firmy-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^producent-okien-katowice-poznaj-oferte-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^producent-okien-katowice-skorzystaj-z-oferty-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^producent-okien-sosnowiec-szeroki-asortyment/$ https://vidok.com/salon-sosnowiec/ [R=301,L] +RewriteRule ^producent-okien-warszawa-zamow-sprawdzona-stolarke-okienna/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^renomowany-producent-drzwi-w-gorlicach-najlepszy-wybor/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^solidne-okna-pcv-krakow-kupuje-w-vidoku/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^solidne-okna-rzeszow-kupuje-w-naszym-firmowym-salonie/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^solidne-okucia-to-gwarancja-bezpieczenstwa/$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^sprawdz-gdzie-zakupic-akcesoria-do-okien/$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^sprawdz-gdzie-zamowic-innowacyjne-okna-walbrzych/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^sprawdz-jakie-akcesoria-do-drzwi-przydadza-ci-sie-w-domu/$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^sprawdz-jakie-akcesoria-do-okien-zakupisz-w-salonie-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^sprawdz-jak-wybrac-odpowiednie-okna/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^sprawdz-na-co-warto-zwrocic-uwage-kupujac-okna-krakow/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^stolarka-okienna-do-kuchni-okna-rzeszow-w-twoim-domu/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^stolarka-okienna-z-drewna-i-pcv/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^stolarka-otworowa-producent-okien-mielec/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^stolarka-przeciwpozarowa-ochrona-i-bezpieczenstwo/$ https://vidok.com/stolarka-p-poz/ [R=301,L] +RewriteRule ^stolarka-z-pvc-wysokiej-jakosci-okna-i-drzwi/$ https://vidok.com/lider-od-1993/ [R=301,L] +RewriteRule ^stylowe-drzwi-drewniane-krakow-poznaj-oferte-cenionego-polskiego-producenta/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^systemy-aluminiowe-gdzie-sprawdza-sie-najlepiej/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^systemy-aluminiowe-o-doskonalych-parametrach/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^systemy-aluminiowe-rozwiazanie-dla-nowoczesnych-budynkow/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^tag/aglomarmur/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/akcesoria-do-okien-i-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/akcesoria-do-okien-rzeszow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/akcesoria-do-okien-stalowa-wola/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/akcesoria-okienne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/aluminiowe-drzwi-zewnetrzne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/aluminium/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/antracytowe-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/antywlamaniowa-ochrona/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/aranzacja-wnetrz-z-vidokiem/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/artystyczny-nielad/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/atrakcyjne-wybarwienie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/automatyka-do-rolet/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/bezpieczenstwo/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/bezpieczenstwo-i-elegancja/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/bezpieczny-dom/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/bezszwowe-profile/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/bezszwowe-zgrzewy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/black-week-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/bliskosc-natury/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/blizej-natury/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/boho/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/bramy-garazowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/budowa-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/cieple-wnetrza/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/cieplo/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/cieplo-i-komfort/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/cieply-dom/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/cieply-montaz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/czy-pcv/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/czyste-powietrze/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/design-stolarki/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/dni-otwarte-vidok-krakow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/dobre-drzwi-do-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/dodatki-do-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/dodatki-do-okien-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/dofinansowanie-do-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/dom-bez-barier/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drewniane-czy-pcv/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drewniane-drzwi-zewnetrzne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drewniane-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drewno/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drewno-we-wnetrzach/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-alumimiowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-aluminiowe-opole/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-aluminiowe-zewnetrzne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-balkonowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-bez-klucza/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-do-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-drewniane/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-drewniane/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-drewniane-opole/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-dzierzoniow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-gdansk/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-hs/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-krakow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-marki-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-mielec/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-nowej-generacji/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-okleinowane/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-opole/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-pcw/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-pol-skone/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-przeciwpozarowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-przesuwne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-przesuwne-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-przesuwne-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-rzeszow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-szczecin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-tarasowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-tarasowe-pvc/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-wejsciowe-pcv/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-wejsciowe-szczecin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-wejsciowe-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-zewnetrzne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-zewnetrzne/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-zewnetrzne-bielsko-biala/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-zewnetrzne-pcv/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-zewnetrzne-szczecin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-zewnetrzne-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/duze-naslonecznienie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/duze-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/duze-przeszklenia/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/duze-przeszklenia/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/duze-rosliny/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/eklektyczne-mieszkanie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/ekologia/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/ekskluzywne-wnetrza/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/ekskluzywny-design/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/elegancki-design/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/eleganckie-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/eleganckie-wykonczenie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/energooszczednosc/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/energooszczedny-charakter/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/estetyczna-rama-okienna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/estetyka/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/extra-pakiet/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/extreme/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/firma-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/fornirowane-drzwi-pol-skone/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/goldenergy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/gold-energy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/halas-a-zdrowie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/harmonia/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/imponujace-parametry/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/innowacja/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/innowacje/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/innowacje/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/innowacyjna-technologia/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/innowacyjne-technologie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/inova-smoove/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/inteligentne-biuro/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/inteligentne-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/inteligentne-rozwiazania/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/inteligentne-rozwiazanie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/inwestycja-na-lata/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/izolacja-termiczna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/izolacyjnosc-akustyczna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/izolacyjnosc-cieplna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/jakie-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/jakie-okna-wybrac/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/jakie-okna-wybrac/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/jakie-okna-wybrac-do-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/jasne-poddasze/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/kameralna-atmosfera/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klamka/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klamka-antracyt/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klamka-do-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klamka-z-przyciskiem/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klamki/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klamki-classic/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klamki-do-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klamki-do-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klamki-okienne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klamki-swing/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klamki-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klasyczny-niebieski/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klasyka/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/klimat-drewna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/kna-pcv-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/komfort/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/komfort-i-bezpieczenstwo/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/komfortowe-uzytkowanie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/komfortowy-wypoczynek/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/kontakt-z-natura/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/kreatywne-kolory/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/ktore-okna-wybrac/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/lepsza-jakosc-zycia/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/linia-aqustic/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/linia-extreme/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/linia-goldenergy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/lofty/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/lokalny-producent/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/metody-montazu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/minimalizm/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/modernistyczne-domy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/modne-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/modny-kolor-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/montaz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/montaz-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/montaz-okien-i-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/moskitiera-do-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/moskitiery/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/na-co-zwrocic-uwage/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najlepsza-decyzja/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najlepsza-inwestycja/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najlepsze-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najlepsze-okna-krakow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najlepsze-okna-w-rzeszowie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najlepszy-producent/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najlepszy-producent-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najlepszy-producent-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najlepszy-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najlepszy-wybor/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najnowsze-trendy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najwyzsze-parametry/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/natura/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/naturalne-rozwiazania/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/naturalne-swiatlo/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nawiewniki/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/niezawodne-systemy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowczesne-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowe-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesna-architektura/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesna-stolarka/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesne-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesne-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesne-okna/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesne-rolety/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesne-rozwiazania/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesne-systemy-okienne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesne-technologie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesne-wnetrza/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesny-design/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesny-wyglad/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowosci/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowosci-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/ochrona-antywlamaniowa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/ochrona-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/ochrona-przed-sloncem/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/oferta-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/oferta-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/oferta-vidok/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna/page/3/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna/page/4/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna/page/5/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna/page/6/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna/page/7/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna/page/8/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe/page/3/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe/page/4/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-gdansk/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-gliwice/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-katowice/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-kielce/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-krakow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-krynica-zdroj/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-lublin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-nowy-sacz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-parczew/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-poznan/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-rzeszow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-sopot/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-sosnowiec/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-stalowa-wola/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-szczawnica/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-torun/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-tychy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-walbrzych/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-wroclaw/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-zakopane/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-zielona-gora/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowo-drewniane/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowo-drewniane-nowy-sacz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-antracyt/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-antywlamaniowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-bialystok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-busko-zdroj/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-bydgoszcz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-czestochowa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-dachowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-do-biura/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-do-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-do-domu/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-do-domu-pasywnego/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-do-ekologicznego-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-do-hotelu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-do-kuchni/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-do-nowoczesnego-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewaniane-opole/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewinane/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewinano-aluminiowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewinano-aluminiowe-tychy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-czestochowa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-katowice/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-kielce/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-krakow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-krynica-zdroj/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-lublin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-nowy-sacz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-parczew/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-poznan/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-rzeszow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-stalowa-wola/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-szczawnica/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-szczecin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-torun/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-tychy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-walbrzych/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-wroclaw/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-zielona-gora/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-gdansk/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-kielce/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-krakow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-lubelskie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-parczew/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-poznan/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-rzeszow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-sopot/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-sosnowiec/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-stalowa-wola/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-torun/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-wroclaw/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniano-aluminiowe-zakopane/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-ekologiczne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-energooszczedne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-energooszczedne/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-gdansk/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-gliwice/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-i-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-i-drzwi/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-i-drzwi/page/3/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-i-drzwi-kielce/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-i-drzwi-marki-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-i-drzwi-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-jelenia-gora/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-katowice/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-kielce/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-kolankowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-kolbuszowa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-krakow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-krakow/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-krynica-zdroj/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-lodz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-lublin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-marki-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-matowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-mielec/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-narozne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-nowy-sacz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-nowy-targ/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-olsztyn/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-opole/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-panoramiczne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-parczew/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-gdansk/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-gliwice/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-krakow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-krynica-zdroj/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-lublin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-opole/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-parczew/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-poznan/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-stalowa-wola/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-szczecin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-wroclaw/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-zakopane/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcw/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcw-nowy-targ/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcw-rzeszow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcw-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcw-wroclaw/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pionowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-piotrkow-trybunalski/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-plastikowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-podkarpackie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-poznan/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-przeciwpozarowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-przesuwne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-bydgoszcz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-katowice/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-krakow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-lublin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-mielec/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-nowy-targ/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-rzeszow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-sosnowiec/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-stalowa-wola/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-szczawnica/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-torun/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-tychy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-walbrzych/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-wroclaw/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-zielona-gora/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-rownolegle-przesuwne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-smart/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-sopot/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-sosnowiec/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-stalowa-wola/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-stalowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-szczecin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-tarnow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-torun/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-vidok/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-vidok/page/3/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-vidok/page/4/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-vidok-gliwice/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-vidok-mielec/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-vidok-tychy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-walbrzych/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-w-dobrym-stylu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-w-krakowie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-w-mielcu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-w-rzeszowie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-w-stylu-boho/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-zakopane/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-zielona-gora/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-z-pcv/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okno-do-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okno-horyzontalne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okno-w-kuchni/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okucia-nowej-generacji/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okucia-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/oscieznice/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/oslona-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/oslony-na-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/pakiet-promocji-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/panoramiczne-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/parametry-techniczne-okien-aluminiowych/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/parapety/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/parapety-aluminiowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/parapety-do-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/parapety-wewnetrzne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/parapety-zewnetrzne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/perfekcja/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/pielegnacja-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/pilkington/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/prace-wykonczeniowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-drzwi-i-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-drzwi-malopolskie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-drzwi-w-gorlicach/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-gdansk/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-i-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-i-drzwi/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-jelenia-gora/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-katowice/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-lublin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-malopolskie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-mielec/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-rzeszow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-sosnowiec/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-stalowa-wola/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/producent-okien-warszawa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/profesjonalizm/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/profesjonalny-montaz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/projekt-kuchni/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/promocja/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/promocja-na-montaz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/przestrzen/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rabat-50/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/regulacja-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rewelacyjna-statyka/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/roleta-putz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rolety/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rolety-beclever/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rolety-do-mieszkania/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rolety-materialowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rolety-putz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rolety-screen/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rolety-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rolety-zewnetrzne-lublin/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/salon-nowojorski/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/salon-okien-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/salon-vidok-w-krakowie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/salony-okien-i-drzwi-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/salon-z-tarasem/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/sklep-z-oknami/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/skrzydla-drzwiowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/smart-office/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/smart-shopping/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/smart-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/solidna-stolarka-okienno-drzwiowa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/solidne-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/solidne-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/spokoj/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/sprawdzony-producent/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stan-surowy-zamkniety/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-akustyczna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-aluminiowa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-drewniana/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-drzwiowa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-najwyzszej-jakosci/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-okienna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-okienno-drzwiowa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-otworowa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-przeciwpozarowa/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-z-drewna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-z-pcv/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stolarka-z-pvc/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/strefa-relaksu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/styl-glamour/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/styl-loftowy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/styl-nowojorski/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/stylowe-wnetrza/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/suncool/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/swiadoma-inwestycja/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/swoboda-relaksu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/system-okienny/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/system-przesuwny/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/system-przesuwny-inova-smoove/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/system-rozwierno-uchylny/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/systemy-aluminiowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/systemy-okienne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/systemy-przesuwne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/szeroki-wybor/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/szklenie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/szklenie-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/szklo-selektywne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/szprosy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/szyby/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/termomodernizacja-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/thermo-profil/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/trendy-2020/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/trwalosc/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/trwalosc-aluminium/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/ultramatowa-powierzchnia/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/unikatowe-wykonczenie/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/urzadzenie-do-domu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/vidok-na-taras/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/v-slide/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wakacyjny-urlop/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wentylacja/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/widok-na-horyzont/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wieksza-szczelnosc/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wielkoformatowe-okna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wspanialy-widok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wygoda/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wymiana-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wypoczynek-na-powietrzu/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wysoka-jakosc/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wysoka-trwalosc/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wysokiej-jakosci-okna-i-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wysokiej-klasy-systemy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/zaawansowana-konstrukcja/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/zaawansowana-technologia/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/zalety-drewna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/zaluzje-fasadowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/zaluzje-poziome/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/zaluzje-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/zawiasy-do-drzwi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^salon-radom/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^tag/akcesoria-do-okien/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/bezpieczny-dom/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/bliskosc-natury/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/domy-energooszczedne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/domy-pasywne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-drewniane-opole/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-mielec/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-pcv-krakow/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-pcv-opole/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-pcv/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-pvc/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi-zewnetrzne/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/drzwi/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/duze-przeszklenia/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/ekskluzywne-okna/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/flexi/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/lepsza-jakosc-zycia/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/materialy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/moskitiera-do-okien/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/najlepsza-decyzja/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/nowoczesne-wnetrza/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/ochrona-przed-sloncem/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-kielce/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowe-nowy-sacz/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-aluminiowo-drewniane/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-poznan/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane-rzeszow/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane/page/2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-drewniane/page/5/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-dzwiekoszczelne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pasywne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-gdansk/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pcv-gliwice/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-katowice/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc-lublin/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc/page/3/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-pvc/page/4/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-rownolegle-przesuwne/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/okna-warszawa/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/profesjonalizm/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/promocja-na-montaz/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/putz/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/regulacja-okien/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rodzaje-rolet/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rolety-zewnetrzne/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/rolety/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/salon-vidok-rzeszow/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/salon-z-tarasem/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/solidne-okna/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/styl-loftowy/feed/$ https://vidok.com/^poradnik/ [R=301,L] +RewriteRule ^tag/system-przesuwny-inova-smoove/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wakacyjny-urlop/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/wspanialy-widok/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/zewnetrzne-oslony-okienne/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/zewnetrzne-zaluzje-listewkowe/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^tag/zlota-mysl-technologiczna/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^50-lat-vidoku/$ https://vidok.com/ [R=301,L] +RewriteRule ^cennik/$ https://vidok.com/ [R=301,L] +RewriteRule ^cool_timeline/$ https://vidok.com/ [R=301,L] +RewriteRule ^cool_timeline/1994/$ https://vidok.com/ [R=301,L] +RewriteRule ^cool_timeline/6883/$ https://vidok.com/ [R=301,L] +RewriteRule ^cool_timeline/6914/$ https://vidok.com/ [R=301,L] +RewriteRule ^cool_timeline/7880/$ https://vidok.com/ [R=301,L] +RewriteRule ^cool_timeline/calkowita/$ https://vidok.com/ [R=301,L] +RewriteRule ^cool_timeline/pozyskanie/$ https://vidok.com/ [R=301,L] +RewriteRule ^cool_timeline/projekt/$ https://vidok.com/ [R=301,L] +RewriteRule ^cool_timeline/stolarka-drewniana/$ https://vidok.com/ [R=301,L] +RewriteRule ^cool_timeline/tytul/$ https://vidok.com/ [R=301,L] +RewriteRule ^dodatki-old/$ https://vidok.com/ [R=301,L] +RewriteRule ^drzwi-do-domu-jak-madrze-wybrac/feed/$ https://vidok.com/ [R=301,L] +RewriteRule ^drzwi-vidok-bezpieczenstwo-domu/feed/$ https://vidok.com/ [R=301,L] +RewriteRule ^gdzie-dostane-energooszczedne-okna-poznan/feed/$ https://vidok.com/ [R=301,L] +RewriteRule ^brama-garazowe-jaka-wybrac/$ https://vidok.com/ [R=301,L] +RewriteRule ^elementy_okienne/nawiewniki$ https://vidok.com/bramy/ [R=301,L] +RewriteRule ^elementy_okienne/szprosy$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^elementy_okienne/szyby/termoizolacyjne$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^wentylacja-nawiewniki-okienne-maja-znaczenie-2/$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^wentylacja-nawiewniki-okienne-maja-znaczenie/$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^zobacz-akcesoria-do-okien-firmy-vidok/$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^drzwi-przesuwne-jaki-system-najlepiej-wybrac/feed/$ https://vidok.com/dodatki-do-okien/ [R=301,L] +RewriteRule ^drzwi-tarasowe-2/$ https://vidok.com/drzwi-tarasowe/ [R=301,L] +RewriteRule ^drzwi-tarasowe-3/$ https://vidok.com/drzwi-tarasowe/ [R=301,L] +RewriteRule ^Gwarancja/$ https://vidok.com/drzwi-tarasowe/ [R=301,L] +RewriteRule ^kontakt-nowy-2/$ https://vidok.com/gwarancja/ [R=301,L] +RewriteRule ^kontakt-praca/$ https://vidok.com/gwarancja/ [R=301,L] +RewriteRule ^cieply-montaz-okien-czego-jest$ https://vidok.com/kontakt/ [R=301,L] +RewriteRule ^zapewnimy-ci-profesjonalny-montaz-okien-drzwi/$ https://vidok.com/kontakt/ [R=301,L] +RewriteRule ^najlepsza-stolarka-z-drewna-tylko-w-vidoku/feed/$ https://vidok.com/montaz/ [R=301,L] +RewriteRule ^stolarka_przeciw_pozarowa$ https://vidok.com/montaz/ [R=301,L] +RewriteRule ^stolarka_z_aluminium$ https://vidok.com/okna-drewniane/ [R=301,L] +RewriteRule ^stolarka_z_aluminium/wewnetrzna$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^stolarka_z_drewna$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^stolarka_z_drewna/drzwi_werandowe$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^strzyzow/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^systemy-aluminiowe-rozwiazanie-dla-nowoczesnych-budynkow/feed/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^vidok-nowoczesne-okna-i-drzwi-w-twoim-domu/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^vidok-parapety-najwyższej-jakosci/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^wybierz-okna-renowacyjne-vidok/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^okna-1/okna-aluminiowe$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^okna-aluminiowe-dlaczego-warto-w-nie-zainwestowac/feed/$ https://vidok.com/okna/ [R=301,L] +RewriteRule ^okna-aluminiowe/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^zobacz-nasze-systemy-aluminiowe/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna-pvc-optima$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna/okna-pvc/linia-extreme/$ https://vidok.com/okna/okna-aluminiowe/ [R=301,L] +RewriteRule ^okna-drewniane-do-kamienicy/feed/$ https://vidok.com/okna/okna-pvc/ [R=301,L] +RewriteRule ^okna-drewniane-okna-drewniano-aluminiowe/feed/$ https://vidok.com/okna/okna-pvc/okna-pvc-83-extreme/ [R=301,L] +RewriteRule ^okna-dzwiekoszczelne-vidok-jak-dzialaja-i-czym-nalezy-sie-kierowac-przy-ich-wyborze/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^okna-energooszczedne-energo/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^okna-pcv-czy-okna-aluminiowe-na-ktore-sie-zdecydowac-zapytaj/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^panoramiczne-okna-wspanialy-vidok-na-przestrzen/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^parapety-bez-tajemnic/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^parapety/zewnetrzne/atalowe$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^poradnik-s-2$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^poradnik-s-27$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^producent-okien-gliwice-poznaj-bogaty-asortyment-firmy-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^producent-okien-jelenia-gora-sprawdz-asortyment-firmy-vidok/feed/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^producent-okien-sosnowiec-szeroki-asortyment/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^profile-klasy-a$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^roletki_i_zaluzje/zaluzje$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^rolety_aluminiowe/automatyka_do_rolet$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^rolety-putz-a-rolety-beclever-ktory-system-jest-lepszy/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^rolety-vidok/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^roof-windows-2/$ https://vidok.com/poradnik/ [R=301,L] +RewriteRule ^doskonalej-jakosci-okna-rzeszow-kupuje-w-vidoku/$ https://vidok.com/rolety/ [R=301,L] +RewriteRule ^inteligentny-dom-rzeszow-przetestuj-smart-vidok/$ https://vidok.com/rolety/ [R=301,L] +RewriteRule ^okna-rzeszow-w-salonie-vidok/feed/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^okna-rzeszow/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^bochnia/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^zaluzje-bezpieczenstwo-i-komfort-uzytkowania/$ https://vidok.com/rzeszow-salon/ [R=301,L] +RewriteRule ^zaluzje-fasadowe-a-komfort-w-twoim-domu/$ https://vidok.com/salon-krakow/ [R=301,L] +RewriteRule ^zaluzje-fasadowe-czy-rolety-zewnetrze-co-bedzie-lepsze/$ https://vidok.com/zaluzje-fasadowe/ [R=301,L] +RewriteRule ^zaluzje-fasadowe-vidok-wielosc-zalet-w-jednym-produkcie/$ https://vidok.com/zaluzje-fasadowe/ [R=301,L] +RewriteRule ^zaluzje-vidok/$ https://vidok.com/zaluzje-fasadowe/ [R=301,L] +RewriteRule ^bialystok/$ https://vidok.com/zaluzje-fasadowe/ [R=301,L] +RewriteRule ^brzozow/$ https://vidok.com/zaluzje-fasadowe/ [R=301,L] +RewriteRule ^bydgoszcz/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^chrzanow/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^debica/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie_kupic/podkarpackie/tarnobrzeg$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-kupie-solidne-okna-pcv/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-kupie-wysokiej-jakosci-okna-tarnow/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^gdzie-zamowie-nowoczesne-okna-kolbuszowa/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^jaroslaw/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^jaslo/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^katowice/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^kielce/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^kolbuszowa/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^lesko/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^lodz/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^lubaczow/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^najlepsze-okna-wroclaw-w-twoim-mieszkaniu/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^nisko/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-drewniane-czestochowa-w-twoim-ulubionym-salonie/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-drewniane-krakow-kupuje-w-vidoku/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-drewniane-lubelskie-znajdziesz-w-vidoku/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-pcv-gliwice-to-dobry-wybor-do-domu-wolnostojacego/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-pcv-nowy-sacz-tylko-u-sprawdzonego-producenta/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-sosnowiec-w-jakim-salonie-kupie-bardzo-dobre-okna-drewniane/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-sosnowiec/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-sosnowiec/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^okna-tarnow-gdzie-znajde-solidne-okna/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^olkusz/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^olsztyn/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^oswiecim/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^p/profil$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^przeworsk/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^ropczyce/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-biala-podlaska/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-bielsko-biala/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-bilgoraj/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-boleslawiec/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-chelm/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-ciechanow/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-czestochowa/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-dzierzoniow/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-gliwice/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-glogow/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-jelenia-gora/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-krasnik/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-legionowo/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-legnica/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-lezajsk/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-lubartow/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-lubin/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-lublin/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-lukow/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-olesnica/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-ostroleka/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-otwock/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-piaseczno/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-plock/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-pulawy/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-ruda-slaska/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-sosnowiec/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-swidnica/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-swidnik/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-tychy/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-walbrzych/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-warszawa/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-wroclaw/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-zabrze/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^salon-zamosc/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^solidne-drzwi-wejsciowe-do-twojego-domu/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^solidne-okna-rzeszow-kupuje-w-naszym-firmowym-salonie/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^szczecin/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^tarnow/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^ustrzyki-dolne/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^vidok-najlepszy-producent-okien-krakow-juz-o-tym-wie/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^vidok-najlepszy-producent-okien-krakow-juz-o-tym-wie/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^vidok-producent-okien-malopolskie/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^vidok-renomowany-producent-okien-i-drzwi/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^vidok-solidny-producent-okien-i-drzwi/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^vidok-twoj-producent-okien-stalowa-wola/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^w-drzwi-drewniane-krakow-inwestuje-u-najlepszych/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^w-okna-aluminiowe-krakow-zaopatruje-sie-u-najlepszych/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^wejsciowe-drzwi-drewniane-krakow-znajdziew-naszym-salonie/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^wp-content/uploads/2018/10/vidok-jakie-okna-wybra$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^wysokiej-jakosci-okna-krakow-tylko-w-salonie-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^zamow-wysokiej-jakosci-okna-warszawa-w-salonie-vidok/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^zamow-wysokiej-jakosci-okna-warszawa-w-salonie-vidok/feed/$ https://vidok.com/znajdz-salon/ [R=301,L] +RewriteRule ^dokumenty-do-pobrania/OWS(|/)$ download.php?file=14&hash=5e57986301ba09727f0253bc70ea94aa [L] +RewriteRule ^dokumenty-do-pobrania/gwarancja(|/)$ download.php?file=15&hash=8288054211d79c35c385ff55ac577b97 [L] + +:Location *.(gif|jpg|png|webp|js|css|scss|svg) +Expires M12592000 +:Location +RewriteRule ^oferty-pracy(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=1&%{QUERY_STRING} [L] +RewriteRule ^newsletter/signin$ index.php?module=newsletter&action=signin [L] +RewriteRule ^newsletter/confirm/hash=(.*)$ index.php?module=newsletter&action=confirm&hash=$1 [L] +RewriteRule ^newsletter/unsubscribe/hash=(.*)$ index.php?module=newsletter&action=unsubscribe&hash=$1 [L] diff --git a/.vscode/ftp-kr.json b/.vscode/ftp-kr.json new file mode 100644 index 0000000..7bfdbbd --- /dev/null +++ b/.vscode/ftp-kr.json @@ -0,0 +1,17 @@ +{ + "host": "serwer1574995.home.pl", + "username": "projectpro", + "password": "ProjectPro2025!", + "remotePath": "/autoinstalator/wordpress9", + "protocol": "ftp", + "port": 0, + "fileNameEncoding": "utf8", + "autoUpload": true, + "autoDelete": false, + "autoDownload": false, + "ignoreRemoteModification": true, + "ignore": [ + ".git", + "/.vscode" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5b85e76 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,17 @@ +{ + "liveSassCompile.settings.formats": [ + { + "format": "compressed", + "extensionName": ".css", + "savePath": "~/../style-css/", + "savePathSegmentKeys": null, + "savePathReplaceSegmentsWith": null + } + ], + "liveSassCompile.settings.generateMap": true, + "liveSassCompile.settings.autoprefix": "defaults", + "liveSassCompile.settings.watchOnLaunch": true, + "liveSassCompile.settings.includeItems": [ + "/layout/style-scss/*.scss" + ] +} \ No newline at end of file diff --git a/.vscode/sftp.json b/.vscode/sftp.json new file mode 100644 index 0000000..45e1cb4 --- /dev/null +++ b/.vscode/sftp.json @@ -0,0 +1,12 @@ +{ + "name": "serwer1574995.home.pl", + "host": "serwer1574995.home.pl", + "protocol": "ftp", + "port": 21, + "username": "projectpro", + "password": "ProjectPro2025!", + "remotePath": "/autoinstalator/wordpress9", + "uploadOnSave": false, + "useTempFile": false, + "openSsh": false +} diff --git a/Platimun_design_Okna_drzwi.pdf b/Platimun_design_Okna_drzwi.pdf new file mode 100644 index 0000000..1982ed8 Binary files /dev/null and b/Platimun_design_Okna_drzwi.pdf differ diff --git a/admin/ajax.php b/admin/ajax.php new file mode 100644 index 0000000..d6bbc32 --- /dev/null +++ b/admin/ajax.php @@ -0,0 +1,38 @@ + '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/index.php b/admin/index.php new file mode 100644 index 0000000..4269761 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,86 @@ + '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/ajax.php b/ajax.php new file mode 100644 index 0000000..78caebb --- /dev/null +++ b/ajax.php @@ -0,0 +1,207 @@ + 'mysql', + 'database_name' => $database['name'], + 'server' => $database['host'], + 'username' => $database['user'], + 'password' => $database['password'], + 'charset' => 'utf8' + ] ); + +if ( !$lang_id = \S::get_session( 'current-lang' ) ) +{ + $lang_id = \front\factory\Languages::default_language(); + \S::set_session( 'current-lang', $lang_id ); +} + +if ( !$lang = \S::get_session( 'lang' ) ) +{ + $lang = \front\factory\Languages::lang_translations(); + \S::set_session( 'lang', $lang ); +} + +\front\controls\Site::check_url_params(); + +if ( !$settings = \S::get_session( 'settings' ) ) +{ + $settings = \front\factory\Settings::settings_details(); + \S::set_session( 'settings', $settings ); +} + +if ( \S::get( 'a' ) == 'calendar' ) +{ + echo \front\view\Site::calendar( \S::get( 'month' ), \S::get( 'year' ), true ); + exit; +} + +if ( \S::get( 'a' ) == 'widget-phone-now' ) +{ + $response = [ 'status' => 'error' ]; + + if ( \S::get( 'phone' ) ) + { + if ( \S::send_email( + $settings['contact_email'], + 'Prośba o oddzwonienie', + '

Nr telefonu: ' . \S::get( 'phone' ) . '

', + $settings['contact_email'] + ) ) + $response = [ 'status' => 'ok' ]; + } + echo json_encode( $response ); + exit; +} + +if ( \S::get( 'a' ) == 'contact_form' ) +{ + $response = [ 'status' => 'error' ]; + + if ( \S::get( 'email' ) ) + { + if ( \S::send_email( + $settings['contact_email'], + \S::get( 'subject' ), + '

Nr telefonu: ' . \S::get( 'phone' ) . '

' + . '

Email: ' . \S::get( 'email' ) . '

' + . '

' . \S::get( 'text' ) . '

', + \S::get( 'email' ) + ) ) + { + $mdb -> insert( 'pp_contact_emails', [ + 'email' => \S::get( 'email' ), + 'phone' => \S::get('phone' ), + 'title' => \S::get( 'subject' ), + 'mail' => \S::get( 'text' ), + 'add_date' => date("Y-m-d, H:i") + ]); + + $response = [ 'status' => 'ok' ]; + } + } + echo json_encode( $response ); + exit; +} +if ( \S::get( 'a' ) == 'cookie_close' ) +{ + setcookie( "cookie_information", "true", mktime( 0, 0, 0, 12, 31, 2115 ) ); + exit; +} + +if ( \S::get( 'a' ) == 'banner_close' ) +{ + \S::set_session( 'banner_close', true ); + exit; +} + +if ( \S::get( 'a' ) == 'contrast' ) +{ + \S::set_session( 'contrast', !\S::get_session( 'contrast' ) ); + exit; +} + +if ( \S::get( 'a' ) == 'article_unlock' ) +{ + \front\controls\Articles::article_unlock( + \S::get( 'password' ), + \S::get( 'article_id' ) + ); + exit; +} + +if ( \S::get( 'a' ) == 'pixieset_gallery_download' ) { + $url = \front\controls\Articles::images_download( \S::get( 'hash' ) ); + echo json_encode( [ 'url' => $url ] ); + exit; +} + +if ( \S::get( 'a' ) == 'pixieset_image_favorite' ) { + $status = \front\controls\Articles::pixieset_image_favorite( \S::get( 'image_id' ), \S::get( 'hash' ) ); + echo json_encode( [ 'status' => $status ] ); + exit; +} + +if ( \S::get( 'a' ) == 'pixieset_save_favorite_images' ) { + $result = \front\controls\Articles::pixieset_save_favorite_images( \S::get( 'hash' ) ); + echo json_encode( [ 'status' => $result ] ); + exit; +} + +if ( \S::get( 'a' ) == 'inline-edit-save' ) +{ + if ( strpos( \S::get( 'element_id' ), 'scontainer' ) !== false ) + { + $scontainer_id = str_replace( [ 'scontainer-', '-content' ], [ '', '' ], \S::get( 'element_id' ) ); + \Scontainer::updateByFrontEditor( $scontainer_id, \S::get( 'element_value' ), \S::get( 'lang_id' ) ); + \S::delete_cache(); + exit; + } + else + { + if ( \S::get( 'alltemplates' ) ) + $layouts = $mdb -> select( 'pp_layouts', 'id' ); + else + $layouts[] = \S::get( 'layout_id' ); + + foreach ( $layouts as $layout_id ) + { + $layout = \front\factory\Layouts::layout_details( $layout_id ); + $html = $layout['html']; + + if ( strpos( $html, '[META_INDEX]' ) !== false ) + { + $meta_index = true; + $html = str_replace( '[META_INDEX]', '', $html ); + } + + if ( strpos( $html, '[CSS]' ) !== false ) + { + $css = true; + $html = str_replace( '[CSS]', '', $html ); + } + + if ( strpos( $html, '[JAVA_SCRIPT]' ) !== false ) + { + $java_script = true; + $html = str_replace( '[JAVA_SCRIPT]', '', $html ); + } + + $html = preg_replace( '/^[ \t]*[\r\n]+/m', '', $html ); + + \S::suSetHtmlById( $html, \S::get( 'element_id' ), \S::get( 'element_value' ) ); + + if ( $meta_index ) + $html = str_replace( '', ' [META_INDEX]' . PHP_EOL . '', $html ); + + if ( $css ) + $html = str_replace( '', ' [CSS]' . PHP_EOL . '', $html ); + + if ( $java_script ) + $html = str_replace( '', ' [JAVA_SCRIPT]' . PHP_EOL . '', $html ); + + $html = str_replace( [ '%5B', '%5D', '%20', '%24' ], [ '[', ']', ' ', '$' ], $html ); + + $mdb -> update( 'pp_layouts', [ 'html' => $html ], [ 'id' => $layout_id ] ); + } + } + + \S::delete_cache(); +} +?> diff --git a/autoload/admin/class.Site.php b/autoload/admin/class.Site.php new file mode 100644 index 0000000..db3c613 --- /dev/null +++ b/autoload/admin/class.Site.php @@ -0,0 +1,71 @@ + $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': + + setcookie( $cookie_name, "", time() -(86400), "/", $domain ); + 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() ); + else + { + \S::alert( 'Nieprawidłowy adres url.' ); + return false; + } + } +} diff --git a/autoload/admin/controls/class.Articles.php b/autoload/admin/controls/class.Articles.php new file mode 100644 index 0000000..3c29724 --- /dev/null +++ b/autoload/admin/controls/class.Articles.php @@ -0,0 +1,147 @@ + 'error', 'msg' => 'Nie masz uprawnień' ] ); + exit; + } + + if ( \admin\factory\Articles::gallery_order_save( \S::get( 'article_id' ), \S::get( 'order' ) ) ) + echo json_encode( [ 'status' => 'ok', 'msg' => 'Artykuł został zapisany.' ] ); + + exit; + } + + static public function article_url_browser() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'article_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \Tpl::view( 'articles/articles-browse-list', [ + 'modal' => true + ] ); + } + + public static function browse_list() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'article_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Articles::browse_list(); + } + + public static function article_delete() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'article_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + if ( \admin\factory\Articles::articles_set_archive( \S::get( 'id' ) ) ) + \S::alert( 'Artykuł został przeniesiony do archiwum.' ); + + header( 'Location: /admin/articles/view_list/' ); + exit; + } + + public static function article_save() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'article_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania artykułu wystąpił błąd. Proszę spróbować ponownie.' ]; + $values = \S::json_to_array( \S::get( 'values' ) ); + + if ( is_array( $values ) ) foreach ( $values as $key => $val ) + { + if ( strpos( $key, 'ap_' ) !== false ) + $params[$key] = $val; + } + $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['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 + ) ) + $response = [ 'status' => 'ok', 'msg' => 'Artykuł został zapisany.', 'id' => $id ]; + + \admin\factory\Articles::insert_missing_hash(); + + echo json_encode( $response ); + exit; + } + + public static function article_edit() + { + global $user; + + 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() + ] ); + } + + public static function view_list() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'article_administration', $user['id'] ) ) + return \S::alert( 'Brak uprawnień.' ); + + return \admin\view\Articles::articles_list(); + } +} +?> \ No newline at end of file diff --git a/autoload/admin/controls/class.ArticlesArchive.php b/autoload/admin/controls/class.ArticlesArchive.php new file mode 100644 index 0000000..def5ffa --- /dev/null +++ b/autoload/admin/controls/class.ArticlesArchive.php @@ -0,0 +1,44 @@ + 'error', 'msg' => 'Podczas usuwania autora wystąpił błąd. Proszę spróbować ponownie.' ]; + $values = \S::json_to_array( \S::get( 'values' ) ); + + if ( \admin\factory\Authors::delete_author( \S::get( 'id' ) ) ) + \S::alert( 'Autor został usunięty.' ); + + header( 'Location: /admin/authors/view_list/' ); + exit; + } + + // zapis autora + static public function save() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'article_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania autora wystąpił błąd. Proszę spróbować ponownie.' ]; + $values = \S::json_to_array( \S::get( 'values' ) ); + + if ( $author_id = \admin\factory\Authors::save_author( $values['id'], $values['author'], $values['image'], $values['description'] ) ) + $response = [ 'status' => 'ok', 'msg' => 'Autor został zapisany.', 'id' => $author_id ]; + + echo json_encode( $response ); + exit; + } + + // edycja autora + static public function edit() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'article_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \Tpl::view( 'authors/author-edit', [ + 'author' => \admin\factory\Authors::get_single_author( \S::get( 'id' ) ), + 'languages' => \admin\factory\Languages::languages_list() + ] ); + } + + //autorzy artykułów + static public function view_list() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'article_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \Tpl::view( 'authors/view-list' ); + } +} \ No newline at end of file diff --git a/autoload/admin/controls/class.Backups.php b/autoload/admin/controls/class.Backups.php new file mode 100644 index 0000000..9d7b184 --- /dev/null +++ b/autoload/admin/controls/class.Backups.php @@ -0,0 +1,66 @@ + 'error', 'msg' => 'Podczas zapisywania baneru wystąpił błąd. Proszę spróbować ponownie.' ]; + $values = \S::json_to_array( \S::get( 'values' ) ); + + if ( $banner_id = \admin\factory\Banners::banner_save( $values['id'], $values['name'], $values['status'], $values['date_start'], $values['date_end'], + $values['home_page'], $values['src'], $values['url'], $values['html'], $values['text'] ) ) + $response = [ 'status' => 'ok', 'msg' => 'Baner został zapisany.', 'id' => $banner_id ]; + + echo json_encode( $response ); + exit; + } + + public static function banner_edit() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'baners_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Banners::banner_edit( + \admin\factory\Banners::banner_details( + \S::get( 'id' ) + ), + \admin\factory\Languages::languages_list() + ); + } + + public static function view_list() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'baners_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Banners::banners_list(); + } + +} +?> diff --git a/autoload/admin/controls/class.Emails.php b/autoload/admin/controls/class.Emails.php new file mode 100644 index 0000000..1e32d3b --- /dev/null +++ b/autoload/admin/controls/class.Emails.php @@ -0,0 +1,28 @@ + diff --git a/autoload/admin/controls/class.Languages.php b/autoload/admin/controls/class.Languages.php new file mode 100644 index 0000000..4624f42 --- /dev/null +++ b/autoload/admin/controls/class.Languages.php @@ -0,0 +1,126 @@ + 'error', 'msg' => 'Podczas zapisywania języka wystąpił błąd. Proszę spróbować ponownie.' ]; + + $values = \S::json_to_array( \S::get( 'values' ) ); + + if ( \admin\factory\Languages::language_save( + $values['id'], $values['name'], $values['status'], $values['start'], $values['o'], $values['domain'], $values['main_domain'] + ) ) + $response = [ 'status' => 'ok', 'msg' => 'Język został zapisany.', 'id' => $id ]; + + echo json_encode( $response ); + exit; + } + + public static function language_edit() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'language_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Languages::language_edit( + \admin\factory\Languages::language_details( + \S::get( 'id' ) + ), \admin\factory\Languages::max_order() + ); + } + + public static function view_list() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'language_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Languages::languages_list(); + } + + public static function translation_delete() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'language_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + if ( \admin\factory\Languages::translation_delete( \S::get( 'id' ) ) ) + \S::alert( 'Tłumaczenie zostało usunięte.' ); + header( 'Location: /admin/languages/translation_list/' ); + exit; + } + + public static function translation_save() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'language_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania tłumaczenia wystąpił błąd. Proszę spróbować ponownie.' ]; + + $values = \S::json_to_array( \S::get( 'values' ) ); + + $languages_list = \admin\factory\Languages::languages_list(); + if ( is_array( $languages_list ) and !empty( $languages_list ) ) foreach ( $languages_list as $language ) + { + \S::delete_session( 'lang-' . $language['id'] ); + $languages[ $language['id'] ] = $values[ $language['id'] ]; + } + + if ( $id = \admin\factory\Languages::translation_save( $values['id'], $values['text'], $languages ) ) + $response = [ 'status' => 'ok', 'msg' => 'Tłumaczenie zostało zapisane.', 'id' => $id ]; + + echo json_encode( $response ); + exit; + } + + public static function translation_edit() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'language_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Languages::translation_edit( + \admin\factory\Languages::translation_details( \S::get( 'id' ) ), + \admin\factory\Languages::languages_list() + ); + } + + public static function translation_list() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'language_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Languages::translations_list(); + } + +} +?> \ No newline at end of file diff --git a/autoload/admin/controls/class.Layouts.php b/autoload/admin/controls/class.Layouts.php new file mode 100644 index 0000000..0f62eab --- /dev/null +++ b/autoload/admin/controls/class.Layouts.php @@ -0,0 +1,59 @@ + 'error', 'msg' => 'Podczas zapisywania szablonu wystąpił błąd. Proszę spróbować ponownie.' ]; + $values = \S::json_to_array( \S::get( 'values' ) ); + + if ( $id = \admin\factory\Layouts::layout_save( $values['id'], $values['name'], $values['status'], $values['pages'], $values['html'], $values['css'], $values['js'], $values['m_html'], $values['m_css'], $values['m_js'] ) ) + $response = [ 'status' => 'ok', 'msg' => 'Szablon został zapisany.', 'id' => $id ]; + + echo json_encode( $response ); + exit; + } + + public static function layout_edit() + { + global $user; + if( !\admin\factory\Users::check_privileges( 'template_administration', $user['id'])) + return \S::alert('Nie masz uprawnień'); + + return \admin\view\Layouts::layout_edit( + \admin\factory\Layouts::layout_details( + \S::get( 'id' ) + ), + \admin\factory\Layouts::menus_list() + ); + } + + public static function view_list() + { + global $user; + if( !\admin\factory\Users::check_privileges( 'template_administration', $user['id'])) + return \S::alert('Nie masz uprawnień'); + + return \admin\view\Layouts::layouts_list(); + } +} +?> \ No newline at end of file diff --git a/autoload/admin/controls/class.Newsletter.php b/autoload/admin/controls/class.Newsletter.php new file mode 100644 index 0000000..6dc8dc8 --- /dev/null +++ b/autoload/admin/controls/class.Newsletter.php @@ -0,0 +1,167 @@ + 'ok', 'msg' => 'Emaile zostały zaimportowane.' ] ); + exit; + } + + public static function import() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'newsletter_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \Tpl::view( 'newsletter/import' ); + } + + public static function emails_list() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'newsletter_administration', $user['id'] ) ) + return \S::alert('Nie masz uprawnień'); + + return \admin\view\Newsletter::emails_list(); + } + + public static function send() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'newsletter_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + if ( \admin\factory\Newsletter::send( \S::get( 'dates' ), \S::get( 'template' ), \S::get( 'only_once' ) ) ) + \S::alert( 'Newsletter został dodany do kolejki wysyłania.' ); + + header( 'Location: /admin/newsletter/prepare/' ); + exit; + } + + public static function prepare() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'newsletter_administration', $user['id'] ) ) + return \S::alert('Nie masz uprawnień'); + + return \admin\view\Newsletter::prepare( + \admin\factory\Newsletter::templates_list() + ); + } + + public static function settings_save() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'newsletter_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + $values = \S::json_to_array( \S::get( 'values' ) ); + + \admin\factory\Settings::settings_update( 'newsletter_footer_1', $values['newsletter_footer_1'] ); + \admin\factory\Settings::settings_update( 'newsletter_footer_2', $values['newsletter_footer_2'] ); + \admin\factory\Settings::settings_update( 'newsletter_header', $values['newsletter_header'] ); + + \S::alert( 'Ustawienia zostały zapisane.' ); + + echo json_encode( [ 'status' => 'ok', 'msg' => 'Ustawienia zostały zapisane.' ] ); + exit; + } + + public static function settings() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'newsletter_administration', $user['id'])) + return \S::alert('Nie masz uprawnień'); + + return \admin\view\Newsletter::settings( + \admin\factory\Settings::settings_details() + ); + } + + public static function email_templates_user() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'newsletter_administration', $user['id'] ) ) + return \S::alert('Nie masz uprawnień'); + + return \admin\view\Newsletter::email_templates_user(); + } + + public static function email_templates_admin() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'newsletter_administration', $user['id'] ) ) + return \S::alert('Nie masz uprawnień'); + + return \admin\view\Newsletter::email_templates_admin(); + } + + public static function email_template_delete() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'newsletter_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + $is_admin = \admin\factory\Newsletter::is_admin_template( \S::get( 'id' ) ); + + if ( !$is_admin and \admin\factory\Newsletter::newsletter_template_delete( \S::get( 'id' ) ) ) + \S::alert( 'Szablon newslettera został usunięty.' ); + + if ( $is_admin ) + header( 'Location: /admin/newsletter/email_templates_admin/' ); + else + header( 'Location: /admin/newsletter/email_templates_user/' ); + exit; + } + + public static function email_template_edit() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'newsletter_administration', $user['id'])) + return \S::alert('Nie masz uprawnień'); + + return \admin\view\Newsletter::email_template_edit( + \admin\factory\Newsletter::email_template_detalis( + \S::get( 'id' ) + ) + ); + } + + public static function template_save() + { + global $user; + if ( !\admin\factory\Users::check_privileges( 'newsletter_administration', $user['id'])) + return \S::alert('Nie masz uprawnień'); + + $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania wystąpił błąd. Proszę spróbować ponownie.' ]; + $values = \S::json_to_array( \S::get( 'values' ) ); + + if ( $id = \admin\factory\Newsletter::template_save( $values['id'], $values['name'], $values['text'] ) ) + $response = [ 'status' => 'ok', 'msg' => 'Zmiany zostały zapisane.', 'id' => $id ]; + + echo json_encode( $response ); + exit; + } +} diff --git a/autoload/admin/controls/class.Pages.php b/autoload/admin/controls/class.Pages.php new file mode 100644 index 0000000..423fa1b --- /dev/null +++ b/autoload/admin/controls/class.Pages.php @@ -0,0 +1,155 @@ + \admin\factory\Pages::menus_list(), + 'modal' => true + ] ); + } + + static public function browse_list() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'page_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Pages::browse_list( + \admin\factory\Pages::menus_list() + ); + } + + public static function menu_delete() + { + global $user; + if ( !\admin\factory\Users::check_privileges( 'page_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + if ( \admin\factory\Pages::menu_delete( \S::get( 'id' ) ) ) + \S::set_message( 'Menu zostało usunięte.' ); + else + \S::alert( 'Podczas usuwania menu wystąpił błąd. Aby usunąć menu nie może ono posiadać przypiętych stron.' ); + header( 'Location: /admin/pages/view_list/' ); + exit; + } + + public static function page_delete() + { + global $user; + if ( !\admin\factory\Users::check_privileges( 'page_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + if ( \admin\factory\Pages::page_delete( \S::get( 'id' ) ) ) + \S::set_message( 'Strona została usunięta.' ); + else + \S::alert( 'Podczas usuwania strony wystąpił błąd. Aby usunąć stronę nie może ona posiadać przypiętych podstron.' ); + + header( 'Location: /admin/pages/view_list/' ); + exit; + } + + public static function page_articles() + { + global $user; + if ( !\admin\factory\Users::check_privileges( 'page_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Pages::page_articles( \S::get( 'id' ), + \admin\factory\Pages::page_articles( \S::get( 'id' ) ) ); + } + + public static function page_save() + { + global $user; + if ( !\admin\factory\Users::check_privileges( 'page_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania strony wystąpił błąd. Proszę spróbować ponownie.' ]; + $values = \S::json_to_array( \S::get( 'values' ) ); + + if ( $id = \admin\factory\Pages::page_save( + $values['id'], $values['title'], $values['seo_link'], $values['meta_title'], $values['meta_description'], $values['meta_keywords'], $values['menu_id'], + $values['parent_id'], $values['page_type'], $values['sort_type'], $values['layout_id'], $values['articles_limit'], $values['show_title'], + $values['status'], $values['link'], $values['noindex'], $values['start'], $values['site_title'], $values['block_direct_access'], $values['cache'], $values['canonical'] + ) ) + $response = [ 'status' => 'ok', 'msg' => 'Strona została zapisana.', 'id' => $id ]; + + echo json_encode( $response ); + exit; + } + + public static function page_edit() + { + global $user; + if ( !\admin\factory\Users::check_privileges( 'page_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Pages::page_edit( + \admin\factory\Pages::page_details( + \S::get( 'id' ) + ), \S::get( 'pid' ), \S::get( 'menu_id' ), + \admin\factory\Pages::menu_lists(), + \admin\factory\Layouts::layouts_list(), + \admin\factory\Languages::languages_list(), + \admin\factory\Settings::settings_details() + ); + } + + public static function menu_save() + { + global $user; + if ( !\admin\factory\Users::check_privileges( 'page_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + $response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania menu wystąpił błąd. Proszę spróbować ponownie.' ]; + $values = \S::json_to_array( \S::get( 'values' ) ); + + if ( \admin\factory\Pages::menu_save( $values['id'], $values['name'], + $values['status'] ) ) + $response = [ 'status' => 'ok', 'msg' => 'Menu zostało zapisane.' ]; + + echo json_encode( $response ); + exit; + } + + public static function menu_edit() + { + global $user; + if ( !\admin\factory\Users::check_privileges( 'page_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Pages::menu_edit( + \admin\factory\Pages::menu_details( \S::get( 'id' ) ) + ); + } + + public static function view_list() + { + global $user; + if ( !\admin\factory\Users::check_privileges( 'page_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Pages::pages_list( + \admin\factory\Pages::menus_list() + ); + } + +} +?> diff --git a/autoload/admin/controls/class.Scontainers.php b/autoload/admin/controls/class.Scontainers.php new file mode 100644 index 0000000..e9dd71f --- /dev/null +++ b/autoload/admin/controls/class.Scontainers.php @@ -0,0 +1,75 @@ + 'error', 'msg' => 'Podczas zapisywania kontenera wystąpił błąd. Proszę spróbować ponownie.' ]; + $values = \S::json_to_array( \S::get( 'values' ) ); + + if ( $id = \admin\factory\Scontainers::container_save( $values['id'], $values['title'], $values['text'], $values['status'], $values['show_title'], + $values['src'], $values['html'] + ) ) + $response = [ 'status' => 'ok', 'msg' => 'Kontener został zapisany.', 'id' => $id ]; + + echo json_encode( $response ); + exit; + } + + public static function container_edit() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'scontainers_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Scontainers::container_edit( + \admin\factory\Scontainers::container_details( + \S::get( 'id' ) + ), \admin\factory\Languages::languages_list() + ); + } + + public static function view_list() + { + global $user; + if ( !\admin\factory\Users::check_privileges( 'scontainers_administration', + $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\Scontainers::containers_list(); + } + +} \ No newline at end of file diff --git a/autoload/admin/controls/class.SeoAdditional.php b/autoload/admin/controls/class.SeoAdditional.php new file mode 100644 index 0000000..f1246d5 --- /dev/null +++ b/autoload/admin/controls/class.SeoAdditional.php @@ -0,0 +1,59 @@ + 'error', 'msg' => 'Podczas zapisywania elementu wystąpił błąd. Proszę spróbować ponownie.' ]; + $values = \S::json_to_array( \S::get( 'values' ) ); + + if ( $id = \admin\factory\SeoAdditional::element_save( $values['id'], $values['url'], $values['status'], $values['title'], $values['keywords'], $values['description'], $values['text'] ) ) + $response = [ 'status' => 'ok', 'msg' => 'Zmiany zostały zapisane.', 'id' => $id ]; + + echo json_encode( $response ); + exit; + } + + public static function element_edit() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'seo_administration', $user['id'])) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\SeoAdditional::element_edit( + \admin\factory\SeoAdditional::element_details( + \S::get( 'id' ) + ) + ); + } + + public static function main_view() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'seo_administration', $user['id'] ) ) + return \S::alert( 'Nie masz uprawnień' ); + + return \admin\view\SeoAdditional::main_view(); + } +} diff --git a/autoload/admin/controls/class.Settings.php b/autoload/admin/controls/class.Settings.php new file mode 100644 index 0000000..02cc3cf --- /dev/null +++ b/autoload/admin/controls/class.Settings.php @@ -0,0 +1,79 @@ + 'ok', 'msg' => 'Ustawienia zostały zapisane.' ] ); + exit; + } + + public static function view() + { + global $user; + + if ( !\admin\factory\Users::check_privileges( 'settings_administration', $user['id'])) + return \S::alert('Nie masz uprawnień'); + + return \admin\view\Settings::view( + \admin\factory\Settings::settings_details() + ); + } +} +?> \ No newline at end of file diff --git a/autoload/admin/controls/class.Update.php b/autoload/admin/controls/class.Update.php new file mode 100644 index 0000000..13fbfbf --- /dev/null +++ b/autoload/admin/controls/class.Update.php @@ -0,0 +1,29 @@ + diff --git a/autoload/admin/factory/class.Articles.php b/autoload/admin/factory/class.Articles.php new file mode 100644 index 0000000..55189a2 --- /dev/null +++ b/autoload/admin/factory/class.Articles.php @@ -0,0 +1,693 @@ + insert( 'pp_articles', [ + 'show_title' => $article['show_title'], + 'show_date_add' => $article['show_date_add'], + 'show_date_modify' => $article['show_date_modify'], + 'date_add' => date( 'Y-m-d H:i:s' ), + 'date_modify' => date( 'Y-m-d H:i:s' ), + 'modify_by' => $user['id'], + 'layout_id' => $article['layout_id'], + 'status' => $article['status'], + 'repeat_entry' => $article['repeat_entry'], + 'social_icons' => $article['social_icons'], + 'date_start' => $article['date_start'], + 'date_end' => $article['event_date'], + 'priority' => $article['priority'], + 'password' => $article['password'], + 'pixieset' => $article['pixieset'] + ] ); + + $article_tmp_id = $mdb -> id(); + + if ( $article_tmp_id ) + { + foreach ( $article['languages'] as $key => $val ) + { + $mdb -> insert( 'pp_articles_langs', [ + 'article_id' => $article_tmp_id, + 'lang_id' => $key, + 'title' => 'Kopia: ' . $val['title'], + 'entry' => $val['entry'], + 'text' => $val['text'], + 'meta_title' => null, + 'meta_description' => null, + 'meta_keywords' => null, + 'seo_link' => null, + 'copy_from' => $val['copy_from'], + 'block_direct_access' => $val['block_direct_access'] + ] ); + } + + foreach ( $article['params'] as $param ) + { + $mdb -> insert( 'pp_articles_additional_values', [ + 'param_id' => $param['param_id'], + 'value' => $param['value'], + 'article_id' => $article_tmp_id, + 'language_id' => $param['language_id'] + ] ); + } + + foreach ( $article['pages'] as $page ) + { + $order = self::max_order() + 1; + $mdb -> insert( 'pp_articles_pages', [ + 'article_id' => $article_tmp_id, + 'page_id' => $page, + 'o' => (int)$order + ] ); + } + return true; + } + } + return false; + } + + public static function insert_missing_hash() { + global $mdb; + + if ( $mdb -> count( 'pp_articles', [ 'hash' => null ] ) ) { + $rows = $mdb -> select( 'pp_articles', [ 'id', 'date_add' ], [ 'hash' => null ] ); + if ( is_array( $rows ) ) foreach ( $rows as $row ) { + $mdb -> update( 'pp_articles', [ 'hash' => md5( $row['id'] . $row['date_add'] ) ], [ 'id' => $row['id'] ] ); + } + } + return true; + } + + public static function gallery_order_save( $article_id, $order ) + { + global $mdb; + + $order = explode( ';', $order ); + if ( is_array( $order ) and !empty( $order ) ) foreach ( $order as $image_id ) + { + $mdb -> update( 'pp_articles_images', [ + 'o' => $i++ + ], [ + 'AND' => [ + 'article_id' => $article_id, + 'id' => $image_id + ] + ] ); + } + } + + public static function additional_params( $language = 0 ) + { + global $mdb; + return $mdb -> select( 'pp_articles_additional_params', '*', [ 'AND' => [ 'status' => 1, 'language' => $language ] ] ); + } + + public static function image_alt_change( $image_id, $image_alt ) + { + global $mdb; + $result = $mdb -> update( 'pp_articles_images', [ + 'alt' => $image_alt + ], [ + 'id' => $image_id + ] ); + \S::delete_cache(); + return $result; + } + + public static function articles_by_date_add( $date_start, $date_end ) + { + global $mdb; + + $results = $mdb -> query( 'SELECT ' + . 'id ' + . 'FROM ' + . 'pp_articles ' + . 'WHERE ' + . 'status = 1 ' + . 'AND ' + . 'date_add BETWEEN \'' . $date_start . '\' AND \'' . $date_end . '\' ' + . 'ORDER BY ' + . 'date_add DESC' ) -> fetchAll(); + if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) + $articles[] = \front\factory\Articles::article_details( $row['id'], 'pl' ); + + return $articles; + } + + public static function article_url( $article_id ) + { + global $mdb; + + $results = $mdb -> query( "SELECT seo_link FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = " . (int)$article_id . " AND seo_link != '' ORDER BY o ASC LIMIT 1" ) -> fetchAll(); + if ( !$results[0]['seo_link'] ) + { + $title = self::article_title( $article_id ); + return 'a-' . $article_id . '-' . \S::seo( $title ); + } + else + return $results[0]['seo_link']; + } + + public static function article_pages( $article_id ) + { + global $mdb; + + $results = $mdb -> query( "SELECT page_id FROM pp_articles_pages WHERE article_id = " . (int)$article_id ) -> fetchAll(); + if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) + { + if ( $out == '' ) + $out .= ' - '; + + $out .= \admin\factory\Pages::page_title( $row['page_id'] ); + + if ( end( $results ) != $row ) + $out .= ' / '; + } + + return $out; + } + + public static function article_title( $article_id ) + { + global $mdb; + $results = $mdb -> query( "SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = " . (int)$article_id . " AND title != '' ORDER BY o ASC LIMIT 1" ) -> fetchAll(); + return $results[0]['title']; + } + + public static function articles_set_archive( $article_id ) + { + global $mdb; + $result = $mdb -> update( 'pp_articles', [ 'status' => -1 ], [ 'id' => (int)$article_id ] ); + \S::htacces(); + \S::delete_cache(); + return $result; + } + + public static function file_name_change( $file_id, $file_name ) + { + global $mdb; + $mdb -> update( 'pp_articles_files', [ 'name' => $file_name ], [ 'id' => (int)$file_id ] ); + return true; + } + + public static function delete_file( $file_id ) + { + global $mdb; + $mdb -> update( 'pp_articles_files', [ 'to_delete' => 1 ], [ 'id' => (int)$file_id ] ); + return true; + } + public static function delete_img( $image_id ) + { + global $mdb; + $mdb -> update( 'pp_articles_images', [ 'to_delete' => 1 ], [ 'id' => (int)$image_id ] ); + return true; + } + + public static function article_details( $article_id ) + { + global $mdb; + + if ( $article = $mdb -> get( 'pp_articles', '*', [ 'id' => (int)$article_id ] ) ) + { + $results = $mdb -> select( 'pp_articles_langs', '*', [ 'article_id' => (int)$article_id ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + $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['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 ] ); + } + + return $article; + } + + public static function max_order() + { + global $mdb; + return $mdb -> max( 'pp_articles_pages', 'o' ); + } + + 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, + $meta_keywords, $layout_id, $pages, $noindex, $repeat_entry, $copy_from, $social_icons, $event_date, $tags, $block_direct_access, $priority, + $password, $pixieset, $id_author, $params ) + { + + global $mdb, $user; + + $event_date = explode( ' - ', $event_date ); + + if ( !$article_id ) + { + $mdb -> insert( 'pp_articles', [ + 'show_title' => $show_title == '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' ), + 'modify_by' => $user['id'], + 'layout_id' => $layout_id ? (int)$layout_id : null, + 'status' => $status == 'on' ? 1 : 0, + 'repeat_entry' => $repeat_entry == 'on' ? 1 : 0, + 'social_icons' => $social_icons == 'on' ? 1 : 0, + 'date_start' => $event_date[0] ? $event_date[0] : null, + 'date_end' => $event_date[1] ? $event_date[1] : null, + 'priority' => $priority == 'on' ? 1 : 0, + 'password' => $password ? $password : null, + 'pixieset' => $pixieset, + 'id_author' => $id_author ? $id_author : null + ] ); + + $id = $mdb -> id(); + + if ( $id ) + { + $i = 0; + + /* tłumaczenia */ + $results = $mdb -> select( 'pp_langs', [ 'id' ], [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results ) and count( $results ) > 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_articles_langs', [ + 'article_id' => (int)$id, + 'lang_id' => $row['id'], + 'title' => $title[ $i ] != '' ? $title[ $i ] : null, + 'main_image' => $main_image[$i] != '' ? $main_image[$i] : null, + 'entry' => $entry[ $i ] != '' ? $entry[ $i ] : null, + 'text' => $text[ $i ] != '' ? $text[ $i ] : null, + 'table_of_contents' => $table_of_contents[$i] != '' ? $table_of_contents[$i] : null, + 'meta_title' => $meta_title[ $i ] != '' ? $meta_title[ $i ] : null, + 'meta_description' => $meta_description[ $i ] != '' ? $meta_description[ $i ] : null, + 'meta_keywords' => $meta_keywords[ $i ] != '' ? $meta_keywords[ $i ] : null, + 'seo_link' => \S::seo( $seo_link[ $i ] ) != '' ? \S::seo( $seo_link[ $i ] ) : null, + 'noindex' => $noindex[ $i ], + 'copy_from' => $copy_from[ $i ] != '' ? $copy_from[ $i ] : null, + 'block_direct_access' => $block_direct_access[ $i ] + ] ); + $i++; + } + else if ( is_array( $results ) and count( $results ) == 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_articles_langs', [ + 'article_id' => (int)$id, + 'lang_id' => $row['id'], + 'title' => $title != '' ? $title : null, + 'main_image' => $main_image != '' ? $main_image : null, + 'entry' => $entry != '' ? $entry : null, + 'text' => $text != '' ? $text : null, + 'table_of_contents' => $table_of_contents != '' ? $table_of_contents : null, + 'meta_title' => $meta_title != '' ? $meta_title : null, + 'meta_description' => $meta_description != '' ? $meta_description : null, + 'meta_keywords' => $meta_keywords != '' ? $meta_keywords : null, + 'seo_link' => \S::seo( $seo_link ) != '' ? \S::seo( $seo_link ) : null, + 'noindex' => $noindex, + 'copy_from' => $copy_from != '' ? $copy_from : null, + 'block_direct_access' => $block_direct_access + ] ); + } + + /* parametry bez wersji językowych */ + $results = $mdb -> select( 'pp_articles_additional_params', '*', [ 'AND' => [ 'status' => 1, 'language' => 0 ] ] ); + if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_articles_additional_values', [ + 'param_id' => $row['id'], + 'value' => $params[ 'ap_' . $row['name'] ], + 'article_id' => (int)$id, + 'language_id' => null + ] ); + } + + /* strony */ + if ( is_array( $pages ) ) foreach ( $pages as $page ) + { + $order = self::max_order() + 1; + + $mdb -> insert( 'pp_articles_pages', [ + 'article_id' => (int)$id, + 'page_id' => (int)$page, + 'o' => (int)$order + ] ); + } + else if ( $pages ) + { + $order = self::max_order() + 1; + + $mdb -> insert( 'pp_articles_pages', [ + 'article_id' => (int)$id, + 'page_id' => (int)$pages, + 'o' => (int)$order + ] ); + } + + /* pliki */ + $results = $mdb -> select( 'pp_articles_files', '*', [ 'article_id' => null ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + { + $dir = '/upload/article_files/article_' . $id; + + $new_file_name = str_replace( '/upload/article_files/tmp', $dir, $row['src'] ); + + if ( file_exists( '..' . $row['src'] ) ) + { + if ( !is_dir( '../' . $dir ) and $created !== true ) + { + if ( mkdir( '../' . $dir, 0755, true ) ) + $created = true; + } + rename( '..' . $row['src'], '..' . $new_file_name ); + } + + $mdb -> update( 'pp_articles_files', [ 'src' => $new_file_name, 'article_id' => $id ], [ 'id' => $row['id'] ] ); + } + + $created = false; + + /* zdjęcia */ + $results = $mdb -> select( 'pp_articles_images', '*', [ 'article_id' => null ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + { + $dir = '/upload/article_images/article_' . $id; + + $new_file_name = str_replace( '/upload/article_images/tmp', $dir, $row['src'] ); + + if ( file_exists( '../' . $new_file_name ) ) + { + $ext = strrpos( $new_file_name, '.' ); + $fileName_a = substr( $new_file_name, 0, $ext ); + $fileName_b = substr( $new_file_name, $ext ); + + $count = 1; + + while ( file_exists( '../' . $fileName_a . '_' . $count . $fileName_b ) ) + $count++; + + $new_file_name = $fileName_a . '_' . $count . $fileName_b; + } + + if ( file_exists( '..' . $row['src'] ) ) + { + if ( !is_dir( '../' . $dir ) and $created !== true ) + { + if ( mkdir( '../' . $dir, 0755, true ) ) + $created = true; + } + rename( '..' . $row['src'], '..' . $new_file_name ); + } + + $mdb -> update( 'pp_articles_images', [ 'src' => $new_file_name, 'article_id' => (int)$id ], [ 'id' => $row['id'] ] ); + } + + /* tagi */ + $tags = explode( ',', $tags ); + if ( is_array( $tags ) ) foreach ( $tags as $tag ) + { + if ( trim( $tag ) != '' ) + { + $tag_id = $mdb -> get( 'pp_tags', 'id', [ 'name' => $tag ] ); + if ( !$tag_id ) + { + $mdb -> insert( 'pp_tags', [ 'name' => $tag ] ); + $tag_id = $mdb -> id(); + } + + $mdb -> insert( 'pp_articles_tags', [ 'article_id' => (int)$id, 'tag_id' => (int)$tag_id ] ); + } + } + + \S::htacces(); + \S::delete_cache(); + + return $id; + } + } + else + { + $mdb -> update( 'pp_articles', [ + 'show_title' => $show_title == 'on' ? 1 : 0, + 'show_date_add' => $show_date_add == 'on' ? 1 : 0, + 'show_date_modify' => $show_date_modify == 'on' ? 1 : 0, + '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, + 'repeat_entry' => $repeat_entry == 'on' ? 1 : 0, + 'social_icons' => $social_icons == 'on' ? 1 : 0, + 'date_start' => $event_date[0] ? $event_date[0] : null, + 'date_end' => $event_date[1] ? $event_date[1] : null, + 'priority' => $priority == 'on' ? 1 : 0, + 'password' => $password ? $password : null, + 'pixieset' => $pixieset, + 'id_author' => $id_author ? $id_author : null + ], [ + 'id' => (int)$article_id + ] ); + + if ( $date_add ) + $mdb -> update( 'pp_articles', [ 'date_add' => $date_add ], [ 'id' => (int)$article_id ] ); + + $i = 0; + + /* tłumaczenia */ + $mdb -> delete( 'pp_articles_langs', [ 'article_id' => (int)$article_id ] ); + + $results = $mdb -> select( 'pp_langs', [ 'id' ], [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results ) and count( $results ) > 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_articles_langs', [ + 'article_id' => (int)$article_id, + 'lang_id' => $row['id'], + 'title' => $title[ $i ] != '' ? $title[ $i ] : null, + 'main_image' => $main_image[$i] != '' ? $main_image[$i] : null, + 'entry' => $entry[ $i ] != '' ? $entry[ $i ] : null, + 'text' => $text[ $i ] != '' ? $text[ $i ] : null, + 'table_of_contents' => $table_of_contents[$i] != '' ? $table_of_contents[$i] : null, + 'meta_title' => $meta_title[ $i ] != '' ? $meta_title[ $i ] : null, + 'meta_description' => $meta_description[ $i ] != '' ? $meta_description[ $i ] : null, + 'meta_keywords' => $meta_keywords[ $i ] != '' ? $meta_keywords[ $i ] : null, + 'seo_link' => \S::seo( $seo_link[ $i ] ) != '' ? \S::seo( $seo_link[ $i ] ) : null, + 'noindex' => $noindex[ $i ], + 'copy_from' => $copy_from[ $i ] != '' ? $copy_from[ $i ] : null, + 'block_direct_access' => $block_direct_access[ $i ] + ] ); + $i++; + } + else if ( is_array( $results ) and count( $results ) == 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_articles_langs', [ + 'article_id' => (int)$article_id, + 'lang_id' => $row['id'], + 'title' => $title != '' ? $title : null, + 'main_image' => $main_image != '' ? $main_image : null, + 'entry' => $entry != '' ? $entry : null, + 'text' => $text != '' ? $text : null, + 'table_of_contents' => $table_of_contents != '' ? $table_of_contents : null, + 'meta_title' => $meta_title != '' ? $meta_title : null, + 'meta_description' => $meta_description != '' ? $meta_description : null, + 'meta_keywords' => $meta_keywords != '' ? $meta_keywords : null, + 'seo_link' => \S::seo( $seo_link ) != '' ? \S::seo( $seo_link ) : null, + 'noindex' => $noindex, + 'copy_from' => $copy_from != '' ? $copy_from : null, + 'block_direct_access' => $block_direct_access + ] ); + } + + /* dodatkowe parametry */ + $mdb -> delete( 'pp_articles_additional_values', [ 'article_id' => (int)$article_id ] ); + + /* parametry bez wersji językowych */ + $results = $mdb -> select( 'pp_articles_additional_params', '*', [ 'AND' => [ 'status' => 1, 'language' => 0 ] ] ); + if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_articles_additional_values', [ + 'param_id' => $row['id'], + 'value' => $params[ 'ap_' . $row['name'] ], + 'article_id' => (int)$article_id, + 'language_id' => null + ] ); + } + + /* parametry z wersjami językowymi */ + $results = $mdb -> select( 'pp_articles_additional_params', '*', [ 'AND' => [ 'status' => 1, 'language' => 1 ] ] ); + if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) + { + $results2 = $mdb -> select( 'pp_langs', [ 'id' ], [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results2 ) ) foreach ( $results2 as $row2 ) + { + $mdb -> insert( 'pp_articles_additional_values', [ + 'param_id' => $row['id'], + 'value' => $params[ 'ap_' . $row['name'] . '_' . $row2['id'] ], + 'article_id' => (int)$article_id, + 'language_id' => $row2['id'] + ] ); + } + } + + /* strony */ + $not_in = [ 0 ]; + + if ( is_array( $pages ) ) foreach ( $pages as $page ) + $not_in[] = $page; + else if ( $pages ) + $not_in[] = $pages; + + $mdb -> delete( 'pp_articles_pages', [ 'AND' => [ 'article_id' => (int)$article_id, 'page_id[!]' => $not_in ] ] ); + + $pages_tmp = $mdb -> select( 'pp_articles_pages', 'page_id', [ 'article_id' => (int)$article_id ] ); + + if ( !is_array( $pages ) ) + $pages = [ $pages ]; + + $pages = array_diff( $pages, $pages_tmp ); + + if ( is_array( $pages ) ) foreach ( $pages as $page ) + { + $order = self::max_order() + 1; + + $mdb -> insert( 'pp_articles_pages', [ + 'article_id' => (int)$article_id, + 'page_id' => (int)$page, + 'o' => (int)$order + ] ); + } + + /* pliki */ + $results = $mdb -> select( 'pp_articles_files', '*', [ 'article_id' => null ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + { + $dir = '/upload/article_files/article_' . $article_id; + + $new_file_name = str_replace( '/upload/article_files/tmp', $dir, $row['src'] ); + + if ( file_exists( '..' . $row['src'] ) ) + { + if ( !is_dir( '../' . $dir ) and $created !== true ) + { + if ( mkdir( '../' . $dir, 0755, true ) ) + $created = true; + } + rename( '..' . $row['src'], '..' . $new_file_name ); + } + + $mdb -> update( 'pp_articles_files', [ 'src' => $new_file_name, 'article_id' => (int)$article_id ], [ 'id' => $row['id'] ] ); + } + + $created = false; + + /* zdjęcia */ + $results = $mdb -> select( 'pp_articles_images', '*', [ 'article_id' => null ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + { + $dir = '/upload/article_images/article_' . $article_id; + + $new_file_name = str_replace( '/upload/article_images/tmp', $dir, $row['src'] ); + + if ( file_exists( '../' . $new_file_name ) ) + { + $ext = strrpos( $new_file_name, '.' ); + $fileName_a = substr( $new_file_name, 0, $ext ); + $fileName_b = substr( $new_file_name, $ext ); + + $count = 1; + + while ( file_exists( '../' . $fileName_a . '_' . $count . $fileName_b ) ) + $count++; + + $new_file_name = $fileName_a . '_' . $count . $fileName_b; + } + + if ( file_exists( '..' . $row['src'] ) ) + { + if ( !is_dir( '../' . $dir ) and $created !== true ) + { + if ( mkdir( '../' . $dir, 0755, true ) ) + $created = true; + } + rename( '..' . $row['src'], '..' . $new_file_name ); + } + + $mdb -> update( 'pp_articles_images', [ 'src' => $new_file_name, 'article_id' => (int)$article_id ], [ 'id' => $row['id'] ] ); + } + + $results = $mdb -> select( 'pp_articles_images', '*', [ 'AND' => [ 'article_id' => (int)$article_id, 'to_delete' => 1 ] ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + { + if ( file_exists( '../' . $row['src'] ) ) + unlink( '../' . $row['src'] ); + } + + $mdb -> delete( 'pp_articles_images', [ 'AND' => [ 'article_id' => (int)$article_id, 'to_delete' => 1 ] ] ); + + $results = $mdb -> select( 'pp_articles_files', '*', [ 'AND' => [ 'article_id' => (int)$article_id, 'to_delete' => 1 ] ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + { + if ( file_exists( '../' . $row['src'] ) ) + unlink( '../' . $row['src'] ); + } + + $mdb -> delete( 'pp_articles_files', [ 'AND' => [ 'article_id' => (int)$article_id, 'to_delete' => 1 ] ] ); + + /* tagi */ + $mdb -> delete( 'pp_articles_tags', [ 'article_id' => (int)$article_id ] ); + + $tags = explode( ',', $tags ); + if ( is_array( $tags ) ) foreach ( $tags as $tag ) + { + if ( trim( $tag ) != '' ) + { + $tag_id = $mdb -> get( 'pp_tags', 'id', [ 'name' => $tag ] ); + if ( !$tag_id ) + { + $mdb -> insert( 'pp_tags', [ 'name' => $tag ] ); + $tag_id = $mdb -> id(); + } + + $mdb -> insert( 'pp_articles_tags', [ 'article_id' => (int)$article_id, 'tag_id' => (int)$tag_id ] ); + } + } + + \S::htacces(); + \S::delete_cache(); + return $article_id; + } + } + + public static function delete_nonassigned_files() + { + global $mdb; + + $results = $mdb -> select( 'pp_articles_files', '*', [ 'article_id' => null ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + { + if ( file_exists( '../' . $row['src'] ) ) + unlink( '../' . $row['src'] ); + } + + $mdb -> delete( 'pp_articles_files', [ 'article_id' => null ] ); + } + + public static function delete_nonassigned_images() + { + global $mdb; + + $results = $mdb -> select( 'pp_articles_images', '*', [ 'article_id' => null ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + { + if ( file_exists( '../' . $row['src'] ) ) + unlink( '../' . $row['src'] ); + } + + $mdb -> delete( 'pp_articles_images', [ 'article_id' => null ] ); + } +} +?> \ No newline at end of file diff --git a/autoload/admin/factory/class.ArticlesArchive.php b/autoload/admin/factory/class.ArticlesArchive.php new file mode 100644 index 0000000..c43dbf2 --- /dev/null +++ b/autoload/admin/factory/class.ArticlesArchive.php @@ -0,0 +1,29 @@ + update( 'pp_articles', [ 'status' => 0 ], [ 'id' => (int)$article_id ] ); + + } + + public static function article_delete( $article_id ) + { + global $mdb; + $mdb -> delete( 'pp_articles_pages', [ 'article_id' => (int)$article_id ] ); + $mdb -> delete( 'pp_articles_langs', [ 'article_id' => (int)$article_id ] ); + $mdb -> delete( 'pp_articles_images', [ 'article_id' => (int)$article_id ] ); + $mdb -> delete( 'pp_articles_files', [ 'article_id' => (int)$article_id ] ); + $mdb -> delete( 'pp_articles_tags', [ 'article_id' => (int)$article_id ] ); + $mdb -> delete( 'pp_articles', [ 'id' => (int)$article_id ] ); + + \S::delete_dir( '../upload/article_images/article_' . (int)$article_id . '/' ); + \S::delete_dir( '../upload/article_files/article_' . (int)$article_id . '/' ); + + return true; + + } +} diff --git a/autoload/admin/factory/class.Authors.php b/autoload/admin/factory/class.Authors.php new file mode 100644 index 0000000..5c05c7a --- /dev/null +++ b/autoload/admin/factory/class.Authors.php @@ -0,0 +1,117 @@ + select( 'pp_authors', '*', [ 'ORDER' => [ 'author' => 'ASC' ] ] ); + } + + // usunięcie autora + static public function delete_author( $id_author ) + { + global $mdb; + + $result = $mdb -> delete( 'pp_authors', [ 'id' => (int)$id_author ] ); + \S::delete_cache(); + + return $result; + } + + // zapis autora + static public function save_author( $id_author, $author, $image, $description ) + { + global $mdb; + + if ( !$id_author ) + { + $mdb -> insert( 'pp_authors', [ + 'author' => $author, + 'image' => $image + ] ); + + $id = $mdb -> id(); + + if ( $id ) + { + $i = 0; + + $results = $mdb -> select( 'pp_langs', [ 'id' ], [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results ) and count( $results ) > 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_authors_langs', [ + 'id_author' => (int)$id, + 'id_lang' => $row['id'], + 'description' => $description[ $i ] + ] ); + $i++; + } + else if ( is_array( $results ) and count( $results ) == 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_authors_langs', [ + 'id_author' => (int)$id, + 'id_lang' => $row['id'], + 'description' => $description + ] ); + } + + \S::delete_cache(); + + return $id; + } + } + else + { + $mdb -> update( 'pp_authors', [ + 'author' => $author, + 'image' => $image + ], [ + 'id' => (int)$id_author + ] ); + + $mdb -> delete( 'pp_authors_langs', [ 'id_author' => (int)$id_author ] ); + + $i = 0; + + $results = $mdb -> select( 'pp_langs', [ 'id' ], [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results ) and count( $results ) > 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_authors_langs', [ + 'id_author' => (int)$id_author, + 'id_lang' => $row['id'], + 'description' => $description[ $i ] + ] ); + $i++; + } + else if ( is_array( $results ) and count( $results ) == 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_authors_langs', [ + 'id_author' => (int)$id_author, + 'id_lang' => $row['id'], + 'description' => $description + ] ); + } + + \S::delete_cache(); + + return $id_author; + } + return false; + } + + // szczególy autora + static public function get_single_author( $id_author ) + { + global $mdb; + + $author = $mdb -> get( 'pp_authors', '*', [ 'id' => (int)$id_author ] ); + + $results = $mdb -> select( 'pp_authors_langs', '*', [ 'id_author' => (int)$id_author ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + $author['languages'][$row['id_lang']] = $row; + + return $author; + } +} \ No newline at end of file diff --git a/autoload/admin/factory/class.Backups.php b/autoload/admin/factory/class.Backups.php new file mode 100644 index 0000000..ccf6154 --- /dev/null +++ b/autoload/admin/factory/class.Backups.php @@ -0,0 +1,77 @@ + save( '../backups/' . $backupfile . '.sql' ); + + $zipTo = '../backups/' . $backupfile . '.zip'; + $zip = new \ZipArchive(); + $zip -> open( $zipTo, \ZipArchive::CREATE ); + $folder = '../'; + $iter = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator( $folder, \RecursiveDirectoryIterator::SKIP_DOTS ), + \RecursiveIteratorIterator::SELF_FIRST, + \RecursiveIteratorIterator::CATCH_GET_CHILD + ); + + foreach ( $iter as $file ) + { + if ( !strstr( $file, '../backups' ) and !strstr( $file, ' ../temp' ) and !strstr( $file, '../updates' ) ) + { + if ( is_dir( $file ) ) + { + $zip -> addEmptyDir( str_replace( $folder, '', $file . '/' ) ); + } + else if ( is_file( $file ) ) + { + $zip -> addFromString( str_replace( $folder, '', $file ), + file_get_contents( $file ) ); + } + } + } + $zip -> close(); + return true; + } + + public static function backup_delete( $file ) + { + if ( file_exists( '../backups/' . $file ) ) + unlink( '../backups/' . $file ); + return true; + } +} \ No newline at end of file diff --git a/autoload/admin/factory/class.Banners.php b/autoload/admin/factory/class.Banners.php new file mode 100644 index 0000000..ebab27b --- /dev/null +++ b/autoload/admin/factory/class.Banners.php @@ -0,0 +1,129 @@ + delete( 'pp_banners', [ 'id' => (int) $banner_id ] ); + \S::delete_cache(); + + return $result; + } + + public static function banner_save( $banner_id, $name, $status, $date_start, $date_end, $home_page, $src, $url, $html, $text ) + { + global $mdb; + + if ( !$banner_id ) + { + $mdb -> insert( 'pp_banners', [ + 'name' => $name, + 'status' => $status == 'on' ? 1 : 0, + 'date_start' => $date_start != '' ? $date_start : null, + 'date_end' => $date_end != '' ? $date_end : null, + 'home_page' => $home_page == 'on' ? 1 : 0 + ] ); + + $id = $mdb -> id(); + + if ( $id ) + { + $i = 0; + + $results = $mdb -> select( 'pp_langs', [ 'id' ], [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results ) and count( $results ) > 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_banners_langs', [ + 'id_banner' => (int)$id, + 'id_lang' => $row['id'], + 'src' => $src[ $i ], + 'url' => $url[ $i ], + 'html' => $html[ $i ], + 'text' => $text[ $i ] + ] ); + $i++; + } + else if ( is_array( $results ) and count( $results ) == 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_banners_langs', [ + 'id_banner' => (int)$id, + 'id_lang' => $row['id'], + 'src' => $src, + 'url' => $url, + 'html' => $html, + 'text' => $text + ] ); + } + + \S::delete_cache(); + + return $id; + } + } + else + { + $mdb -> update( 'pp_banners', + [ + 'name' => $name, + 'status' => $status == 'on' ? 1 : 0, + 'date_start' => $date_start != '' ? $date_start : null, + 'date_end' => $date_end != '' ? $date_end : null, + 'home_page' => $home_page == 'on' ? 1 : 0 + ], [ + 'id' => (int) $banner_id + ] ); + + $mdb -> delete( 'pp_banners_langs', [ 'id_banner' => (int)$banner_id ] ); + + $i = 0; + + $results = $mdb -> select( 'pp_langs', [ 'id' ], [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results ) and count( $results ) > 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_banners_langs', [ + 'id_banner' => (int)$banner_id, + 'id_lang' => $row['id'], + 'src' => $src[ $i ], + 'url' => $url[ $i ], + 'html' => $html[ $i ], + 'text' => $text[ $i ] + ] ); + $i++; + } + else if ( is_array( $results ) and count( $results ) == 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_banners_langs', [ + 'id_banner' => (int)$banner_id, + 'id_lang' => $row['id'], + 'src' => $src, + 'url' => $url, + 'html' => $html, + 'text' => $text + ] ); + } + + \S::delete_cache(); + return $banner_id; + } + return false; + } + + public static function banner_details( $id_banner ) + { + global $mdb; + + $banner = $mdb -> get( 'pp_banners', '*', [ 'id' => (int)$id_banner ] ); + + $results = $mdb -> select( 'pp_banners_langs', '*', [ 'id_banner' => (int)$id_banner ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + $banner['languages'][$row['id_lang']] = $row; + + return $banner; + } + +} +?> diff --git a/autoload/admin/factory/class.Emails.php b/autoload/admin/factory/class.Emails.php new file mode 100644 index 0000000..cf77301 --- /dev/null +++ b/autoload/admin/factory/class.Emails.php @@ -0,0 +1,11 @@ + get( 'pp_contact_emails', '*', [ 'id' => (int)$email_id ] ); + } +} diff --git a/autoload/admin/factory/class.Languages.php b/autoload/admin/factory/class.Languages.php new file mode 100644 index 0000000..403fcbd --- /dev/null +++ b/autoload/admin/factory/class.Languages.php @@ -0,0 +1,181 @@ + query( 'SELECT domain FROM pp_langs WHERE status = 1 AND domain IS NOT NULL GROUP BY domain' ) -> fetchAll( \PDO::FETCH_ASSOC ); + } + + public static function default_domain() + { + global $mdb; + $results = $mdb -> query( 'SELECT domain FROM pp_langs WHERE status = 1 AND domain IS NOT NULL AND main_domain = 1' ) -> fetchAll(); + return $default_domain = $results[0][0]; + } + + public static function translation_delete( $translation_id ) + { + global $mdb; + return $mdb -> delete( 'pp_langs_translations', [ 'id' => $translation_id ] ); + } + + public static function translation_save( $translation_id, $text, $languages ) + { + global $mdb; + + if ( $translation_id ) + { + $mdb -> update( 'pp_langs_translations', [ 'text' => $text ], [ 'id' => $translation_id ] ); + if ( is_array( $languages ) and !empty( $languages ) ): foreach ( $languages as $key => $val ): + $mdb -> update( 'pp_langs_translations', [ $key => $val ], [ 'id' => $translation_id ] ); + endforeach; endif; + \S::htacces(); + \S::delete_cache(); + return $translation_id; + } + else + { + $mdb -> insert( 'pp_langs_translations', [ 'text' => $text ] ); + if ( $translation_id = $mdb -> id() ) + { + if ( is_array( $languages ) and !empty( $languages ) ): foreach ( $languages as $key => $val ): + $mdb -> update( 'pp_langs_translations', [ $key => $val ], [ 'id' => $translation_id ] ); + endforeach; endif; + } + \S::htacces(); + \S::delete_cache(); + return $translation_id; + } + } + + public static function translation_details( $translation_id ) + { + global $mdb; + return $mdb -> get( 'pp_langs_translations', '*', [ 'id' => $translation_id ] ); + } + + public static function language_delete( $language_id ) + { + global $mdb; + + if ( $mdb -> count( 'pp_langs' ) > 1 ) + { + if ( $mdb -> query( 'ALTER TABLE pp_langs_translations DROP ' . $language_id ) + and + $mdb -> delete( 'pp_langs', [ 'id' => $language_id ] ) + ) + return true; + } + return false; + } + + public static function max_order() + { + global $mdb; + return $mdb -> max( 'pp_langs', 'o' ); + } + + public static function language_save( $language_id, $name, $status, $start, $o, $domain, $main_domain ) + { + global $mdb; + + if ( $start == 'on' and $status == 'on' and !\S::get_domain( $domain ) ) + $mdb -> update( 'pp_langs', [ + 'start' => 0 + ], [ + 'id[!]' => $language_id + ] ); + + if ( $start == 'on' and $status == 'on' and \S::get_domain( $domain ) ) + $mdb -> update( 'pp_langs', [ + 'start' => 0 + ], [ + 'AND' => [ 'id[!]' => $language_id, 'domain' => \S::get_domain( $domain ) ] + ] ); + + if ( $main_domain == 'on' and $domain and $status == 'on' ) + $mdb -> update( 'pp_langs', [ + 'main_domain' => 0 + ], [ + ' id[!]' => $language_id + ] ); + + if ( $mdb -> count( 'pp_langs', [ 'id' => $language_id ] ) ) + { + $mdb -> update( 'pp_langs', [ + 'status' => $status == 'on' ? 1 : 0, + 'start' => $start == 'on' ? 1 : 0, + 'name' => $name, + 'o' => $o, + 'domain' => \S::get_domain( $domain ) ? \S::get_domain( $domain ) : null, + 'main_domain' => $main_domain == 'on' and \S::get_domain( $domain ) ? 1 : 0, + ], [ + 'id' => $language_id + ] ); + } + else + { + if ( $mdb -> query( 'ALTER TABLE pp_langs_translations ADD ' . strtolower( $language_id ) . ' TEXT NULL DEFAULT NULL' ) ) + { + $mdb -> insert( 'pp_langs', [ + 'id' => strtolower( $language_id ), + 'name' => $name, + 'status' => $status == 'on' ? 1 : 0, + 'start' => $start == 'on' ? 1 : 0, + 'o' => $o, + 'domain' => \S::get_domain( $domain ) ? \S::get_domain( $domain ) : null, + 'main_domain' => $main_domain == 'on' && \S::get_domain( $domain ) ? 1 : 0, + ] ); + } + } + + if ( !$mdb -> count( 'pp_langs', [ 'AND' => [ 'status' => 1, 'domain[!]' => null ] ] ) ) + { + if ( !$mdb -> count( 'pp_langs', [ 'AND' => [ 'status' => 1, 'start' => 1, 'domain' => null ] ] ) ) + { + if ( $id_tmp = $mdb -> get( 'pp_langs', 'id', [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ) ) + $mdb -> update( 'pp_langs', [ 'start' => 1 ], [ 'id' => $id_tmp ] ); + } + } + + $domains = $mdb -> select( 'pp_langs', 'domain', [ 'domain[!]' => null, 'GROUP' => 'domain'] ); + if ( is_array( $domains ) and !empty( $domains ) ) + { + $mdb -> update( 'pp_langs', [ 'start' => 0 ], [ 'domain' => null ] ); + foreach ( $domains as $domain ) + { + if ( !$mdb -> count( 'pp_langs', [ 'AND' => [ 'status' => 1, 'start' => 1, 'domain' => $domain ] ] ) ) + { + if ( $id_tmp = $mdb -> get( 'pp_langs', 'id', [ 'AND' => [ 'status' => 1, 'domain' => $domain ], 'ORDER' => [ 'o' => 'ASC' ] ] ) ) + $mdb -> update( 'pp_langs', [ 'start' => 1 ], [ 'id' => $id_tmp ] ); + } + } + } + + if ( !$mdb -> count( 'pp_langs', [ 'AND' => [ 'status' => 1, 'main_domain' => 1 ] ] ) ) + { + if ( $id_tmp = $mdb -> get( 'pp_langs', 'id', [ 'AND' => [ 'status' => 1, 'domain[!]' => null ], 'ORDER' => [ 'o' => 'ASC' ] ] ) ) + $mdb -> update( 'pp_langs', [ 'main_domain' => 1 ], [ 'id' => $id_tmp ] ); + } + + \S::htacces(); + \S::delete_cache(); + return $language_id; + } + + public static function language_details( $language_id ) + { + global $mdb; + return $mdb -> get( 'pp_langs', '*', [ 'id' => $language_id ] ); + } + + public static function languages_list() + { + global $mdb; + return $mdb -> select( 'pp_langs', '*', [ 'ORDER' => [ 'o' => 'ASC' ] ] ); + } +} +?> \ No newline at end of file diff --git a/autoload/admin/factory/class.Layouts.php b/autoload/admin/factory/class.Layouts.php new file mode 100644 index 0000000..626fcdc --- /dev/null +++ b/autoload/admin/factory/class.Layouts.php @@ -0,0 +1,141 @@ + count( 'pp_layouts' ) > 1 ) + return $mdb -> delete( 'pp_layouts', [ 'id' => (int)$layout_id ] ); + return false; + } + + public static function layout_details( $layout_id ) + { + global $mdb; + $layout = $mdb -> get( 'pp_layouts', '*', [ 'id' => (int)$layout_id ] ); + + $layout['pages'] = $mdb -> select( 'pp_layouts_pages', 'page_id', [ 'layout_id' => (int)$layout_id ] ); + + return $layout; + + } + + public static function layout_save( $layout_id, $name, $status, $pages, $html, $css, $js, $m_html, $m_css, $m_js ) + { + global $mdb; + if ( !$layout_id ) + { + if ( $status == 'on' ) + $mdb -> update( 'pp_layouts', [ 'status' => 0 ] ); + + $mdb -> insert( 'pp_layouts', [ + 'name' => $name, + 'html' => $html, + 'css' => $css, + 'js' => $js, + 'm_html' => $m_html, + 'm_css' => $m_css, + 'm_js' => $m_js, + 'status' => $status == 'on' ? 1 : 0 + ] ); + + $id = $mdb -> id(); + + if ( $id ) + { + if ( is_array( $pages ) ) foreach ( $pages as $page ) + { + $mdb -> delete( 'pp_layouts_pages', [ 'page_id' => (int)$page ] ); + + $mdb -> insert( 'pp_layouts_pages', [ + 'layout_id' => (int)$id, + 'page_id' => (int)$page + ] ); + } + else if ( $pages ) + { + $mdb -> delete( 'pp_layouts_pages', [ 'page_id' => (int)$pages ] ); + + $mdb -> insert( 'pp_layouts_pages', [ + 'layout_id' => (int)$id, + 'page_id' => (int)$pages + ] ); + } + + \S::delete_cache(); + + return $id; + } + } + else + { + if ( $status == 'on' ) + $mdb -> update( 'pp_layouts', [ 'status' => 0 ] ); + + $mdb -> update( 'pp_layouts', [ + 'name' => $name, + 'html' => $html, + 'css' => $css, + 'js' => $js, + 'm_html' => $m_html, + 'm_css' => $m_css, + 'm_js' => $m_js, + 'status' => $status == 'on' ? 1 : 0 + ], [ + 'id' => $layout_id + ] ); + + $mdb -> delete( 'pp_layouts_pages', [ 'layout_id' => (int)$layout_id ] ); + + if ( is_array( $pages ) ) foreach ( $pages as $page ) + { + $mdb -> delete( 'pp_layouts_pages', [ 'page_id' => (int)$page ] ); + + $mdb -> insert( 'pp_layouts_pages', [ + 'layout_id' => (int)$layout_id, + 'page_id' => (int)$page + ] ); + } + else if ( $pages ) + { + $mdb -> delete( 'pp_layouts_pages', [ 'page_id' => (int)$pages ] ); + + $mdb -> insert( 'pp_layouts_pages', [ + 'layout_id' => (int)$layout_id, + 'page_id' => (int)$pages + ] ); + } + + \S::delete_cache(); + + return $layout_id; + } + return false; + + } + + public static function menus_list() + { + global $mdb; + $results = $mdb -> select( 'pp_menus', 'id', [ 'ORDER' => [ 'name' => 'ASC' ] ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + { + $menu = \admin\factory\Pages::menu_details( $row ); + $menu['pages'] = \admin\factory\Pages::menu_pages( $row ); + + $menus[] = $menu; + } + return $menus; + + } + + public static function layouts_list() + { + global $mdb; + return $mdb -> select( 'pp_layouts', '*', [ 'ORDER' => [ 'name' => 'ASC' ] ] ); + } + +} +?> \ No newline at end of file diff --git a/autoload/admin/factory/class.Newsletter.php b/autoload/admin/factory/class.Newsletter.php new file mode 100644 index 0000000..0706148 --- /dev/null +++ b/autoload/admin/factory/class.Newsletter.php @@ -0,0 +1,105 @@ + count( 'pp_newsletter', [ 'email' => trim( $email ) ] ) ) + $mdb -> insert( 'pp_newsletter', [ + 'email' => trim( $email ), + 'hash' => md5( $email . time() ), + 'status' => 1 + ] ); + } + return true; + } + + public static function is_admin_template( $template_id ) + { + global $mdb; + return $mdb -> get( 'pp_newsletter_templates', 'is_admin', [ 'id' => (int)$template_id ] ); + } + + public static function newsletter_template_delete( $template_id ) + { + global $mdb; + return $mdb -> delete( 'pp_newsletter_templates', [ 'id' => (int)$template_id ] ); + } + + public static function send( $dates, $template, $only_once ) + { + global $mdb; + + $results = $mdb -> select( 'pp_newsletter', 'email', [ 'status' => 1 ] ); + if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row ) + { + if ( $template and $only_once ) + { + if ( !$mdb -> count( 'pp_newsletter_send', [ 'AND' => [ 'id_template' => $template, 'email' => $row ] ] ) ) + $mdb -> insert( 'pp_newsletter_send', [ + 'email' => $row, + 'dates' => $dates, + 'id_template' => $template ? $template : null, + 'only_once' => ( $only_once == 'on' and $template ) ? 1 : 0 + ] ); + } + else + $mdb -> insert( 'pp_newsletter_send', [ + 'email' => $row, + 'dates' => $dates, + 'id_template' => $template ? $template : null, + 'only_once' => ( $only_once == 'on' and $template ) ? 1 : 0 + ] ); + } + return true; + } + + public static function email_template_detalis ($id_template) + { + global $mdb; + + $result = $mdb -> get ('pp_newsletter_templates', '*', [ 'id' => (int)$id_template ] ); + return $result; + } + + public static function template_save($id, $name, $text) + { + global $mdb; + if ( !$id ) + { + if ( $mdb -> insert( 'pp_newsletter_templates', [ + 'name' => $name, + 'text' => $text + ] ) ) + { + \S::delete_cache(); + return $mdb -> id(); + } + } + else + { + $mdb -> update( 'pp_newsletter_templates', [ + 'name' => $name, + 'text' => $text + + ], [ + 'id' => (int)$id + ] ); + + \S::delete_cache(); + return $id; + } + } + + public static function templates_list() + { + global $mdb; + return $mdb -> select( 'pp_newsletter_templates', '*', [ 'is_admin' => 0, 'ORDER' => [ 'name' => 'ASC' ] ] ); + } +} diff --git a/autoload/admin/factory/class.Pages.php b/autoload/admin/factory/class.Pages.php new file mode 100644 index 0000000..3f5c7b8 --- /dev/null +++ b/autoload/admin/factory/class.Pages.php @@ -0,0 +1,509 @@ + 'pełne artykuły', 1 => 'wprowadzenia', 2 => 'miniaturki', 3 => 'link', 4 => 'kontakt' ]; + public static $_sort_types = [ + 0 => 'data dodania - najstarsze na początku', + 1 => 'data dodania - najnowsze na początku', + 2 => 'data modyfikacji - rosnąco', + 3 => 'data mofyfikacji - malejąco', + 4 => 'ręczne', + 5 => 'alfabetycznie - A - Z', + 6 => 'alfabetycznie - Z - A' + ]; + + public static function save_articles_order( $page_id, $articles ) + { + global $mdb; + if ( is_array( $articles ) ) + { + $mdb -> update( 'pp_articles_pages', [ 'o' => 0 ], + [ 'page_id' => (int) $page_id ] ); + + for ( $i = 0; $i < count( $articles ); $i++ ) + { + if ( $articles[$i]['item_id'] ) + { + $x++; + $mdb -> update( 'pp_articles_pages', [ 'o' => $x ], + [ 'AND' => [ 'page_id' => (int) $page_id, 'article_id' => $articles[$i]['item_id'] ] ] ); + } + } + } + return true; + } + + public static function page_articles( $page_id ) + { + global $mdb; + $results = $mdb -> query( 'SELECT ' + . 'article_id, o, status ' + . 'FROM ' + . 'pp_articles_pages AS ap ' + . 'INNER JOIN pp_articles AS a ON a.id = ap.article_id ' + . 'WHERE ' + . 'page_id = ' . (int) $page_id . ' AND status != -1 ' + . 'ORDER BY ' + . 'o ASC' ) -> fetchAll(); + if ( is_array( $results ) ) + foreach ( $results as $row ) + { + $row['title'] = \admin\factory\Articles::article_title( $row['article_id'] ); + $articles[] = $row; + } + return $articles; + } + + public static function menus_list() + { + global $mdb; + return $mdb -> select( 'pp_menus', '*', [ 'ORDER' => [ 'name' => 'ASC' ] ] ); + } + + public static function save_pages_order( $menu_id, $pages ) + { + global $mdb; + if ( is_array( $pages ) ) + { + $mdb -> update( 'pp_pages', [ 'o' => 0 ], [ 'menu_id' => (int) $menu_id ] ); + + for ( $i = 0; $i < count( $pages ); $i++ ) + { + if ( $pages[$i]['item_id'] ) + { + $pages[$i]['parent_id'] ? $parent_id = $pages[$i]['parent_id'] : $parent_id = 0; + + if ( $pages[$i]['item_id'] && $pages[$i]['depth'] > 1 ) + { + if ( $pages[$i]['depth'] == 2 ) + $parent_id = null; + + $x++; + + $mdb -> update( 'pp_pages', [ 'o' => $x, 'parent_id' => $parent_id ], + [ 'id' => (int) $pages[$i]['item_id'] ] ); + } + } + } + } + + \S::delete_cache(); + + return true; + } + + public static function page_delete( $page_id ) + { + global $mdb; + if ( $mdb -> count( 'pp_pages', [ 'parent_id' => (int) $page_id ] ) ) + return false; + + if ( $mdb -> delete( 'pp_pages', [ 'id' => (int) $page_id ] ) ) + { + \S::delete_cache(); + \S::htacces(); + return true; + } + return false; + } + + public static function max_order() + { + global $mdb; + return $mdb -> max( 'pp_pages', 'o' ); + } + + public static function page_save( + $page_id, $title, $seo_link, $meta_title, $meta_description, $meta_keywords, $menu_id, $parent_id, $page_type, $sort_type, $layout_id, $articles_limit, $show_title, $status, $link, $noindex, $start, + $site_title, $block_direct_access, $cache, $canonical + ) + { + global $mdb; + + if ( !$parent_id ) + $parent_id = null; + + if ( !$page_id ) + { + $order = self::max_order() + 1; + + $mdb -> insert( 'pp_pages', [ + 'menu_id' => (int) $menu_id, + 'page_type' => $page_type, + 'sort_type' => $sort_type, + 'articles_limit' => $articles_limit, + 'show_title' => $show_title == 'on' ? 1 : 0, + 'status' => $status == 'on' ? 1 : 0, + 'o' => (int) $order, + 'parent_id' => $parent_id, + 'start' => $start == 'on' ? 1 : 0, + 'cache' => $cache == 'on' ? 1 : 0 + ] ); + + $id = $mdb -> id(); + + if ( $id ) + { + if ( $start ) + $mdb -> update( 'pp_pages', [ 'start' => 0 ], [ 'id[!]' => (int)$id ] ); + + if ( $layout_id ) + $mdb -> insert( 'pp_layouts_pages', [ 'page_id' => (int) $id, 'layout_id' => (int)$layout_id ] ); + + $i = 0; + + $results = $mdb -> select( 'pp_langs', [ 'id' ], [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results ) and count( $results ) > 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_pages_langs', [ + 'page_id' => (int) $id, + 'lang_id' => $row['id'], + 'title' => $title[$i] != '' ? $title[$i] : null, + 'meta_description' => $meta_description[$i] != '' ? $meta_description[$i] : null, + 'meta_keywords' => $meta_keywords[$i] != '' ? $meta_keywords[$i] : null, + 'meta_title' => $meta_title[$i] != '' ? $meta_title[$i] : null, + 'seo_link' => \S::seo( $seo_link[$i] ) != '' ? \S::seo( $seo_link[$i] ) : null, + 'noindex' => $noindex[$i], + 'site_title' => $site_title[$i] != '' ? $site_title[$i] : null, + 'link' => $link[$i] != '' ? $link[$i] : null, + 'block_direct_access' => $block_direct_access[$i], + 'canonical' => $canonical[$i] != '' ? $canonical[$i] : null + ] ); + $i++; + } + else if ( is_array( $results ) and count( $results ) == 1 ) + { + foreach ( $results as $row ) + { + $mdb -> insert( 'pp_pages_langs', [ + 'page_id' => (int) $id, + 'lang_id' => $row['id'], + 'title' => $title != '' ? $title : null, + 'meta_description' => $meta_description != '' ? $meta_description : null, + 'meta_keywords' => $meta_keywords != '' ? $meta_keywords : null, + 'meta_title' => $meta_title != '' ? $meta_title : null, + 'seo_link' => \S::seo( $seo_link ) != '' ? \S::seo( $seo_link ) : null, + 'noindex' => $noindex, + 'site_title' => $site_title != '' ? $site_title : null, + 'link' => $link != '' ? $link : null, + 'block_direct_access' => $block_direct_access, + 'canonical' => $canonical != '' ? $canonical : null + ] ); + } + } + + \S::htacces(); + \S::delete_cache(); + + return $id; + } + } + else + { + $mdb -> update( 'pp_pages', + [ + 'menu_id' => (int) $menu_id, + 'page_type' => $page_type, + 'sort_type' => $sort_type, + 'articles_limit' => $articles_limit, + 'show_title' => $show_title == 'on' ? 1 : 0, + 'status' => $status == 'on' ? 1 : 0, + 'parent_id' => $parent_id, + 'start' => $start == 'on' ? 1 : 0, + 'cache' => $cache == 'on' ? 1 : 0 + ], [ + 'id' => (int) $page_id + ] ); + + if ( $layout_id ) + { + $mdb -> delete( 'pp_layouts_pages', [ 'page_id' => (int) $page_id ] ); + $mdb -> insert( 'pp_layouts_pages', + [ 'layout_id' => (int) $layout_id, 'page_id' => (int) $page_id ] ); + } + + if ( $start ) + $mdb -> update( 'pp_pages', [ 'start' => 0 ], + [ 'id[!]' => (int) $page_id ] ); + + $i = 0; + + $mdb -> delete( 'pp_pages_langs', [ 'page_id' => (int) $page_id ] ); + + $results = $mdb -> select( 'pp_langs', [ 'id' ], + [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results ) and count( $results ) > 1 ) + foreach ( $results as $row ) + { + $mdb -> insert( 'pp_pages_langs', + [ + 'page_id' => (int) $page_id, + 'lang_id' => $row['id'], + 'title' => $title[$i] != '' ? $title[$i] : null, + 'meta_description' => $meta_description[$i] != '' ? $meta_description[$i] : null, + 'meta_keywords' => $meta_keywords[$i] != '' ? $meta_keywords[$i] : null, + 'meta_title' => $meta_title[$i] != '' ? $meta_title[$i] : null, + 'seo_link' => \S::seo( $seo_link[$i] ) != '' ? \S::seo( $seo_link[$i] ) : null, + 'noindex' => $noindex[$i], + 'site_title' => $site_title[$i] != '' ? $site_title[$i] : null, + 'link' => $link[$i] != '' ? $link[$i] : null, + 'block_direct_access' => $block_direct_access[$i], + 'canonical' => $canonical[$i] != '' ? $canonical[$i] : null + ] ); + + $i++; + } + else if ( is_array( $results ) and count( $results ) == 1 ) + foreach ( $results as $row ) + { + $mdb -> insert( 'pp_pages_langs', + [ + 'page_id' => (int) $page_id, + 'lang_id' => $row['id'], + 'title' => $title != '' ? $title : null, + 'meta_description' => $meta_description != '' ? $meta_description : null, + 'meta_keywords' => $meta_keywords != '' ? $meta_keywords : null, + 'meta_title' => $meta_title != '' ? $meta_title : null, + 'seo_link' => \S::seo( $seo_link ) != '' ? \S::seo( $seo_link ) : null, + 'noindex' => $noindex, + 'site_title' => $site_title != '' ? $site_title : null, + 'link' => $link != '' ? $link : null, + 'block_direct_access' => $block_direct_access, + 'canonical' => $canonical != '' ? $canonical : null + ] ); + } + + self::update_supages_menu_id( $page_id, $menu_id ); + + \S::htacces(); + \S::delete_cache(); + + return $page_id; + } + return false; + } + + public static function update_supages_menu_id( $parent_id, $menu_id ) + { + global $mdb; + + $mdb -> update( 'pp_pages', [ 'menu_id' => (int) $menu_id ], + [ 'parent_id' => $parent_id ] ); + + $results = $mdb -> select( 'pp_pages', [ 'id' ], [ 'parent_id' => $parent_id ] ); + if ( is_array( $results ) ) + foreach ( $results as $row ) + self::update_supages_menu_id( $row['id'], $menu_id ); + } + + public static function generate_seo_link( $title, $page_id, $article_id, + $lang, $pid ) + { + global $mdb; + + $seo_link = \S::seo( $title ); + + + while ( !$seo_link_check ) + { + if ( $mdb -> count( 'pp_pages_langs', + [ 'AND' => [ 'seo_link' => $seo_link, 'page_id[!]' => (int) $page_id ] ] ) ) + $seo_link = $seo_link . '-' . ( ++$i ); + else + $seo_link_check = true; + } + + $seo_link_check = false; + + while ( !$seo_link_check ) + { + if ( $mdb -> count( 'pp_articles_langs', + [ 'AND' => [ 'seo_link' => $seo_link, 'article_id[!]' => (int) $article_id ] ] ) ) + $seo_link = $seo_link . '-' . ( ++$i ); + else + $seo_link_check = true; + } + return $seo_link; + } + + public static function google_url_preview( $page_id, $title, $lang, $pid, $id, $seo_link, $language_link = '' ) + { + global $mdb; + + $prefix = $language_link; + $status = true; + $id_page = $page_id; + + do + { + if ( $page_id ) + { + $parent = \admin\factory\Pages::page_details( $page_id ); + $parent_id = $parent['parent_id']; + } + else + $parent_id = $pid; + + if ( $parent_id ) + { + $results = $mdb -> query( "SELECT title, seo_link, page_id FROM pp_pages_langs AS ppl, pp_langs AS pl WHERE lang_id = pl.id AND page_id = " . (int) $parent_id . " AND ppl.lang_id = '" . $lang . "' " ) -> fetchAll(); + if ( $results[0]['seo_link'] ) + $seo = $results[0]['seo_link'] . '/' . $seo; + else + $seo = 's-' . $results[0]['page_id'] . '-' . \S::seo( $results[0]['title'] ) . '/' . $seo; + $page_id = $results[0]['page_id']; + } + else + $status = false; + } + while ( $status ); + + if ( $id ) + { + if ( !$seo_link ) + $seo = $seo . 's-' . $id . '-' . \S::seo( $title ); + else + $seo = $seo . $seo_link; + } + else + { + if ( !$seo_link ) + $seo = $seo . 's-' . $id_page . '-' . \S::seo( $title ); + else + $seo = $seo . $seo_link; + } + + if ( $prefix ) + $seo = $prefix . $seo; + + return $seo; + } + + public static function menu_delete( $menu_id ) + { + global $mdb; + + if ( $mdb -> count( 'pp_pages', [ 'menu_id' => (int) $menu_id ] ) ) + return false; + + return $mdb -> delete( 'pp_menus', [ 'id' => (int) $menu_id ] ); + } + + public static function menu_details( $menu_id ) + { + global $mdb; + return $mdb -> get( 'pp_menus', '*', [ 'id' => (int) $menu_id ] ); + } + + public static function menu_save( $menu_id, $name, $status ) + { + global $mdb; + + $status == 'on' ? $status = 1 : $status = 0; + + if ( !$menu_id ) + { + return $mdb -> insert( 'pp_menus', + [ + 'name' => $name, + 'status' => $status + ] ); + } + else + { + $mdb -> update( 'pp_menus', + [ + 'name' => $name, + 'status' => $status + ], [ + 'id' => (int) $menu_id + ] ); + + return true; + } + return false; + } + + public static function menu_lists() + { + global $mdb; + return $mdb -> select( 'pp_menus', '*', [ 'ORDER' => [ 'id' => 'ASC' ] ] ); + } + + public static function page_details( $page_id ) + { + global $mdb; + + $page = $mdb -> get( 'pp_pages', '*', [ 'id' => (int) $page_id ] ); + + $results = $mdb -> select( 'pp_pages_langs', '*', + [ 'page_id' => (int) $page_id ] ); + if ( is_array( $results ) ) + foreach ( $results as $row ) + $page['languages'][$row['lang_id']] = $row; + + $page['layout_id'] = $mdb -> get( 'pp_layouts_pages', 'layout_id', + [ 'page_id' => (int) $page_id ] ); + + return $page; + } + + public static function page_url( $page_id ) + { + global $mdb; + + $results = $mdb -> query( "SELECT seo_link, title lang_id FROM pp_pages_langs AS ppl, pp_langs AS pl WHERE lang_id = pl.id AND page_id = " . (int) $page_id . " AND seo_link != '' ORDER BY o ASC LIMIT 1" ) -> fetchAll(); + + if ( !$results[0]['seo_link'] ) + { + $title = self::page_title( $article_id ); + return 's-' . $page_id . '-' . \S::seo( $title ); + } + else + return $results[0]['seo_link']; + } + + public static function page_title( $page_id ) + { + global $mdb; + + $result = $mdb -> select( 'pp_pages_langs', + [ '[><]pp_langs' => [ 'lang_id' => 'id' ] ], 'title', + [ 'AND' => [ 'page_id' => (int) $page_id, 'title[!]' => '' ], 'ORDER' => [ 'o' => 'ASC' ], 'LIMIT' => 1 ] ); + return $result[0]; + } + + public static function page_languages( $page_id ) + { + global $mdb; + return $mdb -> select( 'pp_pages_langs', '*', + [ 'AND' => [ 'page_id' => (int) $page_id, 'title[!]' => null ] ] ); + } + + public static function menu_pages( $menu_id, $parent_id = null ) + { + global $mdb; + + $results = $mdb -> select( 'pp_pages', + [ 'id', 'menu_id', 'status', 'parent_id', 'start' ], + [ 'AND' => [ 'menu_id' => $menu_id, 'parent_id' => $parent_id ], 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results ) ) + foreach ( $results as $row ) + { + $row['title'] = self::page_title( $row['id'] ); + $row['languages'] = self::page_languages( $row['id'] ); + $row['subpages'] = self::menu_pages( $menu_id, $row['id'] ); + + $pages[] = $row; + } + + return $pages; + } + +} + +?> \ No newline at end of file diff --git a/autoload/admin/factory/class.Scontainers.php b/autoload/admin/factory/class.Scontainers.php new file mode 100644 index 0000000..9d355a7 --- /dev/null +++ b/autoload/admin/factory/class.Scontainers.php @@ -0,0 +1,121 @@ + delete( 'pp_scontainers', [ 'id' => (int) $container_id ] ); + } + + public static function container_save( $container_id, $title, $text, $status, $show_title, $src, $html ) + { + global $mdb; + + if ( !$container_id ) + { + $mdb -> insert( 'pp_scontainers', + [ + 'status' => $status == 'on' ? 1 : 0, + 'show_title' => $show_title == 'on' ? 1 : 0, + 'src' => $src + ] ); + + $id = $mdb -> id(); + + if ( $id ) + { + $i = 0; + + $results = $mdb -> select( 'pp_langs', [ 'id' ], [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results ) and count( $results ) > 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_scontainers_langs', + [ + 'container_id' => (int) $id, + 'lang_id' => $row['id'], + 'title' => $title[$i], + 'text' => $text[$i], + 'html' => $html[$i] + ] ); + $i++; + } + else if ( is_array( $results ) and count( $results ) == 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_scontainers_langs', [ + 'container_id' => (int) $id, + 'lang_id' => $row['id'], + 'title' => $title, + 'text' => $text, + 'html' => $html + ] ); + } + + \S::delete_cache(); + + return $id; + } + } + else + { + $mdb -> update( 'pp_scontainers', + [ + 'status' => $status == 'on' ? 1 : 0, + 'show_title' => $show_title == 'on' ? 1 : 0, + 'src' => $src + ], + [ + 'id' => (int) $container_id + ] ); + + $mdb -> delete( 'pp_scontainers_langs', + [ 'container_id' => (int) $container_id ] ); + + $i = 0; + + $results = $mdb -> select( 'pp_langs', [ 'id' ], [ 'status' => 1, 'ORDER' => [ 'o' => 'ASC' ] ] ); + if ( is_array( $results ) and count( $results ) > 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_scontainers_langs', + [ + 'container_id' => (int) $container_id, + 'lang_id' => $row['id'], + 'title' => $title[$i], + 'text' => $text[$i], + 'html' => $html[$i] + ] ); + $i++; + } + else if ( is_array( $results ) and count( $results ) == 1 ) foreach ( $results as $row ) + { + $mdb -> insert( 'pp_scontainers_langs', + [ + 'container_id' => (int) $container_id, + 'lang_id' => $row['id'], + 'title' => $title, + 'text' => $text, + 'html' => $html + ] ); + } + + \S::delete_cache(); + + return $container_id; + } + } + + public static function container_details( $container_id ) + { + global $mdb; + + $container = $mdb -> get( 'pp_scontainers', '*', [ 'id' => (int) $container_id ] ); + + $results = $mdb -> select( 'pp_scontainers_langs', '*', [ 'container_id' => (int) $container_id ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + $container['languages'][$row['lang_id']] = $row; + + return $container; + } +} \ No newline at end of file diff --git a/autoload/admin/factory/class.SeoAdditional.php b/autoload/admin/factory/class.SeoAdditional.php new file mode 100644 index 0000000..db3ef58 --- /dev/null +++ b/autoload/admin/factory/class.SeoAdditional.php @@ -0,0 +1,55 @@ + delete( 'pp_seo_additional', [ 'id' => (int)$element_id ] ); + } + + public static function element_save( $id, $url, $status, $title, $keywords, $description, $text ) + { + global $mdb; + + if ( !$id ) + { + if ( $mdb -> insert( 'pp_seo_additional', [ + 'url' => $url, + 'status' => $status == 'on' ? 1 : 0, + 'title' => $title, + 'keywords' => $keywords, + 'description' => $description, + 'text' => $text + ] ) ) + { + \S::delete_cache(); + return $mdb -> id(); + } + } + else + { + $mdb -> update( 'pp_seo_additional', [ + 'url' => $url, + 'status' => $status == 'on' ? 1 : 0, + 'title' => $title, + 'keywords' => $keywords, + 'description' => $description, + 'text' => $text + + ], [ + 'id' => (int)$id + ] ); + + \S::delete_cache(); + return $id; + } + } + + public static function element_details( $element_id ) + { + global $mdb; + $result = $mdb -> get ( 'pp_seo_additional', '*', [ 'id' => (int)$element_id ] ); + return $result; + } +} diff --git a/autoload/admin/factory/class.Settings.php b/autoload/admin/factory/class.Settings.php new file mode 100644 index 0000000..15f608a --- /dev/null +++ b/autoload/admin/factory/class.Settings.php @@ -0,0 +1,147 @@ + count( 'pp_settings', [ 'param' => $param ] ) ) + return $mdb -> update( 'pp_settings', [ 'value' => $value ], [ 'param' => $param ] ); + else + return $mdb -> insert( 'pp_settings', [ 'param' => $param, 'value' => $value ] ); + } + + public static function settings_save( + $firm_name, $firm_adress, $additional_info, $contact_form, $contact_email, $email_host, $email_port, $email_login, $email_password, $google_maps, + $facebook_link, $statistic_code, $htaccess, $robots, $newsletter_header, $newsletter_footer_1, $newsletter_footer_2, $google_map_key, $google_search_console, $update, $devel, + $news_limit, $visit_counter, $calendar, $tags, $ssl, $mysql_debug, $htaccess_cache, $visits, $links_structure, $link_version, $widget_phone, $update_key ) + { + global $mdb; + + $mdb -> query( 'TRUNCATE pp_settings' ); + + $mdb -> insert( 'pp_settings', [ + [ + 'param' => 'firm_name', + 'value' => $firm_name, + ], [ + 'param' => 'firm_adress', + 'value' => $firm_adress + ], [ + 'param' => 'additional_info', + 'value' => $additional_info + ], [ + 'param' => 'contact_form', + 'value' => $contact_form + ], [ + 'param' => 'contact_email', + 'value' => $contact_email + ], [ + 'param' => 'email_host', + 'value' => $email_host + ], [ + 'param' => 'email_port', + 'value' => $email_port + ], [ + 'param' => 'email_login', + 'value' => $email_login + ], [ + 'param' => 'email_password', + 'value' => $email_password + ], [ + 'param' => 'google_maps', + 'value' => $google_maps == 'on' ? 1 : 0 + ], [ + "param" => 'facebook_link', + 'value' => $facebook_link + ], [ + 'param' => 'statistic_code', + 'value' => $statistic_code + ], [ + 'param' => 'htaccess', + 'value' => $htaccess + ], [ + 'param' => 'robots', + 'value' => $robots + ], [ + 'param' => 'newsletter_header', + 'value' => $newsletter_header + ], [ + 'param' => 'newsletter_footer_1', + 'value' => $newsletter_footer_1 + ], [ + 'param' => 'newsletter_footer_2', + 'value' => $newsletter_footer_2 + ], [ + 'param' => 'google_map_key', + 'value' => $google_map_key + ], [ + 'param' => 'google_search_console', + 'value' => $google_search_console + ], [ + 'param' => 'update', + 'value' => $update == 'on' ? 1 : 0 + ], [ + 'param' => 'devel', + 'value' => $devel == 'on' ? 1 : 0 + ], [ + 'param' => 'news_limit', + 'value' => $news_limit + ], [ + 'param' => 'visit_counter', + 'value' => $visit_counter == 'on' ? 1 : 0 + ], [ + 'param' => 'calendar', + 'value' => $calendar == 'on' ? 1 : 0 + ], [ + 'param' => 'tags', + 'value' => $tags == 'on' ? 1 : 0 + ], [ + 'param' => 'ssl', + 'value' => $ssl == 'on' ? 1 : 0 + ], [ + 'param' => 'mysql_debug', + 'value' => $mysql_debug == 'on' ? 1 : 0 + ], [ + 'param' => 'htaccess_cache', + 'value' => $htaccess_cache == 'on' ? 1 : 0 + ], [ + 'param' => 'visits', + 'value' => $visits + ], [ + 'param' => 'links_structure', + 'value' => $links_structure + ], [ + 'param' => 'link_version', + 'value' => $link_version + ], [ + 'param' => 'widget_phone', + 'value' => $widget_phone == 'on' ? 1 : 0 + ], [ + 'param' => 'update_key', + 'value' => $update_key + ] + ] + ); + + \S::set_message( 'Ustawienia zostały zapisane' ); + \S::delete_cache(); + \S::htacces(); + + return true; + } + + public static function settings_details() + { + global $mdb; + + $results = $mdb -> select( 'pp_settings', '*', [ 'ORDER' => [ 'id' => 'ASC' ] ] ); + if ( is_array( $results ) ) foreach ( $results as $row ) + $settings[$row['param']] = $row['value']; + + return $settings; + } + +} +?> \ No newline at end of file diff --git a/autoload/admin/factory/class.Update.php b/autoload/admin/factory/class.Update.php new file mode 100644 index 0000000..277d55d --- /dev/null +++ b/autoload/admin/factory/class.Update.php @@ -0,0 +1,88 @@ + (float)\S::get_version() ) + { + if ( strlen( $ver ) == 5 ) + $dir = substr( $ver, 0, strlen( $ver ) - 2 ) . 0; + else + $dir = substr( $ver, 0, strlen( $ver ) - 1 ) . 0; + + $file = file_get_contents( 'http://www.cmspro.project-dc.pl/updates/' . $dir . '/ver_' . $ver . '.zip' ); + + $dlHandler = fopen( 'update.zip' , 'w' ); + if ( !fwrite( $dlHandler, $file ) ) + return false; + fclose( $dlHandler ); + + if ( !file_exists( 'update.zip' ) ) + return false; + else + { + /* aktualizacja bazy danych */ + $sql = file_get_contents( 'http://www.cmspro.project-dc.pl/updates/' . $dir . '/ver_' . $ver . '_sql.txt' ); + $sql = explode( PHP_EOL, $sql ); + if ( is_array( $sql ) and !empty( $sql ) ) foreach ( $sql as $query ) + { + if ( $sql ) + $result = $mdb -> query( $query ); + } + + /* usuwanie zbędnych plików */ + $lines = file_get_contents( 'http://www.cmspro.project-dc.pl/updates/' . $dir . '/ver_' . $ver . '_files.txt' ); + $lines = explode( PHP_EOL, $lines ); + if ( is_array( $lines ) ) foreach ( $lines as $line ) + { + if ( strpos( $line, 'F: ' ) !== false ) + { + $file = substr( $line, 3, strlen( $line ) ); + if ( file_exists( $file ) ) + unlink( $file ); + } + + if ( strpos( $line, 'D: ' ) !== false ) + { + $dir = substr( $line, 3, strlen( $line ) ); + if ( is_dir( $dir ) ) + \S::delete_dir( $dir ); + } + } + + /* wgrywanie nowych plików */ + $file_name = 'update.zip'; + + $path = pathinfo( realpath( $file_name ), PATHINFO_DIRNAME ); + $path = substr( $path, 0, strlen( $path ) - 5 ); + $zip = new \ZipArchive; + $res = $zip -> open( $file_name ); + if ( $res === TRUE ) + { + $zip -> extractTo( $path ); + $zip -> close(); + unlink( $file_name ); + } + + $updateThis = fopen( '../libraries/version.ini', 'w' ); + fwrite( $updateThis, $ver ); + fclose( $updateThis ); + + return true; + } + } + } + } +} \ No newline at end of file diff --git a/autoload/admin/factory/class.Users.php b/autoload/admin/factory/class.Users.php new file mode 100644 index 0000000..a7c68eb --- /dev/null +++ b/autoload/admin/factory/class.Users.php @@ -0,0 +1,185 @@ + delete( 'pp_users', [ 'id' => (int)$user_id ] ); + + } + + public static function user_details( $user_id ) + { + global $mdb; + return $mdb -> get( 'pp_users', '*', [ 'id' => (int)$user_id ] ); + } + + public static function user_privileges( $user_id ) + { + global $mdb; + 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 ) + { + global $mdb, $lang; + + $mdb -> delete( 'pp_users_privileges', [ 'id_user' => (int) $user_id ] ); + + if ( !$user_id ) + { + 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 ( $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 ( is_array( $privileges ) ) + { + foreach ( $privileges as $pri ) + { + $mdb -> insert( 'pp_users_privileges', + [ + 'name' => $pri, + 'id_user' => $id_user + ] ); + } + } + else + { + $mdb -> insert( 'pp_users_privileges', + [ + 'name' => $privileges, + 'id_user' => $id_user + ] ); + } + + 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 $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 + ] ); + + $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 + ] ); + + if ( is_array( $privileges ) ) + { + foreach ( $privileges as $pri ) + { + $mdb -> insert( 'pp_users_privileges', [ + 'name' => $pri, + 'id_user' => $user_id + ] ); + } + } + else + { + $mdb -> insert( 'pp_users_privileges', [ + 'name' => $privileges, + 'id_user' => $user_id + ] ); + } + return $response = [ 'status' => 'ok', 'msg' => 'Uzytkownik został zapisany.' ]; + } + \S::delete_cache(); + } + + 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' ]; + } + + public static function logon( $login, $password ) + { + global $mdb; + + 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 ] + ] + ] ) ) + { + $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', [ 'status' => 0 ], [ 'login' => $login ] ); + return -1; + } + } + return 0; + } + + public static function details( $login ) + { + global $mdb; + return $mdb -> get( 'pp_users', '*', [ 'login' => $login ] ); + } + + public static function check_privileges( $name, $user_id ) + { + global $mdb; + + 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; + } + } +} +?> diff --git a/autoload/admin/view/class.Articles.php b/autoload/admin/view/class.Articles.php new file mode 100644 index 0000000..127ad9f --- /dev/null +++ b/autoload/admin/view/class.Articles.php @@ -0,0 +1,37 @@ + render( 'articles/articles-browse-list' ); + } + + public static function subpages_list( $pages, $article_pages, $parent_id = 0, $step = 1 ) + { + $tpl = new \Tpl(); + $tpl -> pages = $pages; + $tpl -> parent_id = $parent_id; + $tpl -> step = $step; + $tpl -> article_pages = $article_pages; + return $tpl -> render( 'articles/subpages-list' ); + } + + public static function articles_list() + { + $tpl = new \Tpl; + return $tpl -> render( 'articles/articles-list' ); + } + + public static function article_edit( $values ) + { + $tpl = new \Tpl; + if ( is_array( $values ) ) foreach ( $values as $key => $val ) + $tpl -> $key = $val; + return $tpl -> render( 'articles/article-edit' ); + } +} +?> \ No newline at end of file diff --git a/autoload/admin/view/class.ArticlesArchive.php b/autoload/admin/view/class.ArticlesArchive.php new file mode 100644 index 0000000..766aa2b --- /dev/null +++ b/autoload/admin/view/class.ArticlesArchive.php @@ -0,0 +1,11 @@ + render( 'articles/articles-archive-list' ); + } +} diff --git a/autoload/admin/view/class.Backups.php b/autoload/admin/view/class.Backups.php new file mode 100644 index 0000000..7f602a0 --- /dev/null +++ b/autoload/admin/view/class.Backups.php @@ -0,0 +1,12 @@ + backups = $backups; + return $tpl -> render ('backups/backup-list'); + } +} diff --git a/autoload/admin/view/class.Banners.php b/autoload/admin/view/class.Banners.php new file mode 100644 index 0000000..ff1ee58 --- /dev/null +++ b/autoload/admin/view/class.Banners.php @@ -0,0 +1,20 @@ + render( 'banners/banners-list' ); + } + + public static function banner_edit( $banner, $languages ) + { + $tpl = new \Tpl; + $tpl -> banner = $banner; + $tpl -> languages = $languages; + return $tpl -> render( 'banners/banner-edit' ); + } +} +?> diff --git a/autoload/admin/view/class.Emails.php b/autoload/admin/view/class.Emails.php new file mode 100644 index 0000000..b91cf56 --- /dev/null +++ b/autoload/admin/view/class.Emails.php @@ -0,0 +1,17 @@ + render( 'emails/emails-list' ); + } + public static function email_details( $email ) + { + $tpl = new \Tpl; + $tpl -> email = $email; + return $tpl -> render( 'emails/email-details' ); + } +} diff --git a/autoload/admin/view/class.FileManager.php b/autoload/admin/view/class.FileManager.php new file mode 100644 index 0000000..15a45de --- /dev/null +++ b/autoload/admin/view/class.FileManager.php @@ -0,0 +1,12 @@ + render( 'filemanager/filemanager' ); + } +} +?> diff --git a/autoload/admin/view/class.Languages.php b/autoload/admin/view/class.Languages.php new file mode 100644 index 0000000..96a2bd5 --- /dev/null +++ b/autoload/admin/view/class.Languages.php @@ -0,0 +1,32 @@ + languages = $languages; + $tpl -> translation = $translation; + return $tpl -> render( 'languages/translation-edit' ); + } + public static function language_edit( $language, $order ) + { + $tpl = new \Tpl; + $tpl -> language = $language; + $tpl -> order = $order; + return $tpl -> render( 'languages/language-edit' ); + } + public static function translations_list() + { + $tpl = new \Tpl; + return $tpl -> render( 'languages/translations-list' ); + } + public static function languages_list() + { + $tpl = new \Tpl; + return $tpl -> render( 'languages/languages-list' ); + } +} +?> \ No newline at end of file diff --git a/autoload/admin/view/class.Layouts.php b/autoload/admin/view/class.Layouts.php new file mode 100644 index 0000000..cd47888 --- /dev/null +++ b/autoload/admin/view/class.Layouts.php @@ -0,0 +1,29 @@ + pages = $pages; + $tpl -> step = $step; + $tpl -> layout_pages = $layout_pages; + return $tpl -> render( 'layouts/subpages-list' ); + } + + public static function layout_edit( $layout, $menus ) + { + $tpl = new \Tpl; + $tpl -> layout = $layout; + $tpl -> menus = $menus; + return $tpl -> render( 'layouts/layout-edit' ); + } + + public static function layouts_list() + { + $tpl = new \Tpl; + return $tpl -> render( 'layouts/layouts-list' ); + } +} +?> \ No newline at end of file diff --git a/autoload/admin/view/class.Newsletter.php b/autoload/admin/view/class.Newsletter.php new file mode 100644 index 0000000..f40fb74 --- /dev/null +++ b/autoload/admin/view/class.Newsletter.php @@ -0,0 +1,55 @@ + render( 'newsletter/emails-list' ); + } + + public static function preview( $articles, $settings, $template, $dates = '' ) + { + $tpl = new \Tpl; + $tpl -> articles = $articles; + $tpl -> settings = $settings; + $tpl -> template = $template; + $tpl -> dates = $dates; + return $tpl -> render( 'newsletter/preview' ); + } + + public static function prepare( $templates ) + { + $tpl = new \Tpl; + $tpl -> templates = $templates; + return $tpl -> render( 'newsletter/prepare' ); + } + + public static function settings( $settings ) + { + $tpl = new \Tpl; + $tpl -> settings = $settings; + return $tpl -> render( 'newsletter/settings' ); + } + + public static function email_templates_user() + { + $tpl = new \Tpl; + return $tpl -> render( 'newsletter/email-templates-user' ); + } + + public static function email_templates_admin() + { + $tpl = new \Tpl; + return $tpl -> render( 'newsletter/email-templates-admin' ); + } + + public static function email_template_edit($template) + { + $tpl = new \Tpl; + $tpl -> email_template = $template; + return $tpl -> render( 'newsletter/email-template-edit' ); + } +} + \ No newline at end of file diff --git a/autoload/admin/view/class.Page.php b/autoload/admin/view/class.Page.php new file mode 100644 index 0000000..23bcbce --- /dev/null +++ b/autoload/admin/view/class.Page.php @@ -0,0 +1,18 @@ + content = \admin\Site::route(); + return $tpl -> render( 'site/main-layout' ); + } +} +?> diff --git a/autoload/admin/view/class.PagePanel.php b/autoload/admin/view/class.PagePanel.php new file mode 100644 index 0000000..2fc13ab --- /dev/null +++ b/autoload/admin/view/class.PagePanel.php @@ -0,0 +1,21 @@ + _add = $add; + $tpl -> _save = $save; + $tpl -> _cancel = $cancel; + $tpl -> _id_form = $form; + $tpl -> _title = $title; + $tpl -> _back = $back; + $tpl -> _update = $update; + $tpl -> _save_ajax = $save_ajax; + $tpl -> _delete_ajax = $delete_ajax; + return $tpl -> render( 'other/page-panel' ); + } +} +?> diff --git a/autoload/admin/view/class.Pages.php b/autoload/admin/view/class.Pages.php new file mode 100644 index 0000000..f6c521e --- /dev/null +++ b/autoload/admin/view/class.Pages.php @@ -0,0 +1,68 @@ + pages = $pages; + $tpl -> parent_id = $parent_id; + $tpl -> step = $step; + return $tpl -> render( 'pages/subpages-browse-list' ); + } + + static public function browse_list( $menus, $modal = false ) + { + return \Tpl::view( 'pages/pages-browse-list', [ + 'menus' => $menus, + 'modal' => $modal + ] ); + } + + public static function page_articles( $page_id, $articles ) + { + $tpl = new \Tpl; + $tpl -> page_id = $page_id; + $tpl -> articles = $articles; + return $tpl -> render( 'pages/page-articles' ); + } + + public static function page_edit( $page, $parent_id, $menu_id, $menus, $layouts, $languages, $settings ) + { + $tpl = new \Tpl; + $tpl -> menu_id = $menu_id; + $tpl -> parent_id = $parent_id; + $tpl -> menus = $menus; + $tpl -> page = $page; + $tpl -> layouts = $layouts; + $tpl -> languages = $languages; + $tpl -> settings = $settings; + return $tpl -> render( 'pages/page-edit' ); + + } + + public static function menu_edit( $menu ) + { + $tpl = new \Tpl; + $tpl -> menu = $menu; + return $tpl -> render( 'pages/menu-edit' ); + } + + public static function pages_list( $menus ) + { + $tpl = new \Tpl; + $tpl -> menus = $menus; + return $tpl -> render( 'pages/pages-list' ); + } + + public static function subpages_list( $pages, $parent_id = null, $step = 1 ) + { + $tpl = new \Tpl(); + $tpl -> pages = $pages; + $tpl -> parent_id = $parent_id; + $tpl -> step = $step; + return $tpl -> render( 'pages/subpages-list' ); + } +} +?> \ No newline at end of file diff --git a/autoload/admin/view/class.Scontainers.php b/autoload/admin/view/class.Scontainers.php new file mode 100644 index 0000000..8496c54 --- /dev/null +++ b/autoload/admin/view/class.Scontainers.php @@ -0,0 +1,20 @@ + container = $container; + $tpl -> languages = $languages; + return $tpl -> render( 'scontainers/container-edit' ); + } + + public static function containers_list() + { + $tpl = new \Tpl; + return $tpl -> render( 'scontainers/containers-list' ); + } +} diff --git a/autoload/admin/view/class.SeoAdditional.php b/autoload/admin/view/class.SeoAdditional.php new file mode 100644 index 0000000..4d15e03 --- /dev/null +++ b/autoload/admin/view/class.SeoAdditional.php @@ -0,0 +1,17 @@ + element = $element; + return $tpl -> render( 'seo-additional/element-edit' ); + } + + public static function main_view() + { + $tpl = new \Tpl; + return $tpl -> render( 'seo-additional/main-view' ); + } +} diff --git a/autoload/admin/view/class.Settings.php b/autoload/admin/view/class.Settings.php new file mode 100644 index 0000000..8ee7e4b --- /dev/null +++ b/autoload/admin/view/class.Settings.php @@ -0,0 +1,13 @@ + settings = $settings; + return $tpl -> render( 'settings/settings' ); + } +} +?> \ No newline at end of file diff --git a/autoload/admin/view/class.Update.php b/autoload/admin/view/class.Update.php new file mode 100644 index 0000000..a2e0f7f --- /dev/null +++ b/autoload/admin/view/class.Update.php @@ -0,0 +1,13 @@ + ver = \S::get_version(); + $tpl -> new_ver = \S::get_new_version(); + return $tpl -> render( 'update/main-view' ); + } +} diff --git a/autoload/admin/view/class.Users.php b/autoload/admin/view/class.Users.php new file mode 100644 index 0000000..fa16e51 --- /dev/null +++ b/autoload/admin/view/class.Users.php @@ -0,0 +1,26 @@ + render( 'site/unlogged-layout' ); + } + + public static function users_list() + { + $tpl = new \Tpl; + return $tpl -> render( 'users/users-list' ); + } + + public static function user_edit( $user, $privileges ) + { + $tpl = new \Tpl; + $tpl -> user = $user; + $tpl -> privileges = $privileges; + return $tpl -> render( 'users/user-edit' ); + } +} +?> diff --git a/autoload/class.Article.php b/autoload/class.Article.php new file mode 100644 index 0000000..76eca61 --- /dev/null +++ b/autoload/class.Article.php @@ -0,0 +1,196 @@ + get( 'pp_articles', '*', [ 'id' => (int)$article_id ] ); + if ( \S::is_array_fix( $result ) ) foreach ( $result as $key => $val ) + $this -> $key = $val; + + $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'] ) + { + $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 ) + $this -> language = $row2; + } + else + $this -> language = $row; + + preg_match_all( \front\view\Site::container_pattern, $this -> 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 ); + $this -> language['entry'] = str_replace( '[KONTENER:' . $container_list_tmp[1] . ']', \front\view\Scontainers::scontainer( $container_list_tmp[1] ), $this -> language['entry'] ); + } + + preg_match_all( \front\view\Site::container_pattern, $this -> 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 ); + $this -> language['text'] = str_replace( '[KONTENER:' . $container_list_tmp[1] . ']', \front\view\Scontainers::scontainer( $container_list_tmp[1] ), $this -> language['text'] ); + } + } + + $this -> images = $mdb -> select( 'pp_articles_images', '*', [ 'article_id' => (int)$article_id, 'ORDER' => [ 'o' => 'ASC', 'id' => 'ASC' ] ] ); + $this -> files = $mdb -> select( 'pp_articles_files', '*', [ 'article_id' => (int)$article_id ] ); + $this -> pages = $mdb -> select( 'pp_articles_pages', 'page_id', [ 'article_id' => (int)$article_id ] ); + $this -> 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']; + else + $params[ $row['name'] ][$row['language_id']] = $row['value']; + } + $this -> params = $params; + } + + public function updateView() + { + global $mdb; + $mdb -> update( 'pp_articles', [ 'views[+]' => 1 ], [ 'id' => $this -> id ] ); + } + + static public function newsList( $articles ) + { + return \Tpl::view( 'articles/news-list', [ + 'articles' => $articles + ] ); + } + + // pobierz najczęściej wyświtlane artykuły + static public function getTopNews( $page_id, $limit = 6, $lang_id ) + { + global $mdb; + + if ( !$articles_id = \Cache::fetch( "getTopNews:$page_id:$limit:$lang_id" ) ) + { + $articles_id = $mdb -> query( 'SELECT * FROM ( ' + . 'SELECT ' + . 'a.id, date_add, views, ' + . '( 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.views DESC ' + . 'LIMIT ' + . '0, ' . (int)$limit ) -> fetchAll( \PDO::FETCH_ASSOC ); + \Cache::store( "getTopNews:$page_id:$limit:$lang_id", $articles_id ); + } + + if ( \S::is_array_fix( $articles_id ) ) foreach ( $articles_id as $article_tmp ) + { + if ( !$article = \Cache::fetch( 'article:' . $article_tmp['id'] . ':' . $lang_id ) ) + { + $article = new \Article( $article_tmp['id'], $lang_id ); + \Cache::store( 'article:' . $article_tmp['id'] . ':' . $lang_id, $article ); + } + $articles[] = $article; + } + + return $articles; + } + + static public function getNews( $page_id, $limit = 6, $lang_id ) + { + global $mdb; + + if ( !$articles_id = \Cache::fetch( "getNews:$page_id:$limit:$lang_id" ) ) + { + $articles_id = $mdb -> query( 'SELECT * FROM ( ' + . 'SELECT ' + . 'a.id, date_add, ' + . '( 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.date_add DESC ' + . 'LIMIT ' + . '0, ' . (int)$limit ) -> fetchAll( \PDO::FETCH_ASSOC ); + \Cache::store( "getNews:$page_id:$limit:$lang_id", $articles_id ); + } + + if ( \S::is_array_fix( $articles_id ) ) foreach ( $articles_id as $article_tmp ) + { + if ( !$article = \Cache::fetch( 'article:' . $article_tmp['id'] . ':' . $lang_id ) ) + { + $article = new \Article( $article_tmp['id'], $lang_id ); + \Cache::store( 'article:' . $article_tmp['id'] . ':' . $lang_id, $article ); + } + $articles[] = $article; + } + + return $articles; + } + + public function __get( $variable ) + { + if ( array_key_exists( $variable, $this -> data ) ) + return $this -> $variable; + } + + public function __set( $variable, $value ) + { + $this -> $variable = $value; + } + + public function offsetExists( $offset ) + { + return isset( $this -> $offset ); + } + + public function offsetGet( $offset ) + { + return $this -> $offset; + } + + public function offsetSet( $offset, $value ) + { + $this -> $offset = $value; + } + + public function offsetUnset( $offset ) + { + unset( $this -> $offset ); + } +} \ No newline at end of file diff --git a/autoload/class.Cache.php b/autoload/class.Cache.php new file mode 100644 index 0000000..d268fcb --- /dev/null +++ b/autoload/class.Cache.php @@ -0,0 +1,46 @@ + $data[0] ) + { + if ( file_exists( $filename ) ) + unlink( $filename ); + return false; + } + + return $data[1]; + } +} +?> \ No newline at end of file diff --git a/autoload/class.Html.php b/autoload/class.Html.php new file mode 100644 index 0000000..d2500c9 --- /dev/null +++ b/autoload/class.Html.php @@ -0,0 +1,91 @@ + params = $params; + return $tpl -> render( 'html/form-text' ); + } + + public static function input_switch( array $params = array() ) + { + $tpl = new \Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/input-switch' ); + } + + public static function select( array $params = array() ) + { + $tpl = new \Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/select' ); + } + + public static function textarea( array $params = array() ) + { + $defaults = array( + 'rows' => 4, + ); + + $params = array_merge( $defaults, $params ); + + $tpl = new \Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/textarea' ); + } + + public static function input_icon( array $params = array() ) + { + $defaults = array( + 'type' => 'text', + ); + + $params = array_merge( $defaults, $params ); + + $tpl = new \Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/input-icon' ); + } + + public static function input( array $params = array() ) + { + $defaults = array( + 'type' => 'text', + ); + + $params = array_merge( $defaults, $params ); + + $tpl = new \Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/input' ); + } + + public static function button( array $params = array() ) + { + $defaults = array( + 'class' => 'btn-sm btn-info', + ); + + $params = array_merge( $defaults, $params ); + + $tpl = new \Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/button' ); + } + + public static function panel( array $params = array() ) + { + $defaults = array( + 'title' => 'panel-title', + 'class' => 'panel-primary', + 'content' => 'panel-content' + ); + + $params = array_merge( $defaults, $params ); + + $tpl = new \Tpl; + $tpl -> params = $params; + return $tpl -> render( 'html/panel' ); + } +} diff --git a/autoload/class.Image.php b/autoload/class.Image.php new file mode 100644 index 0000000..0322890 --- /dev/null +++ b/autoload/class.Image.php @@ -0,0 +1,312 @@ + img_src = $file; + $this->setImageFile($file); + } else { + echo 'a'; exit; + $this->setImageString($file); + } + } + } + + /** + * Set image resource from file + * + * @param string $file Path to image file + * @return ImageManipulator for a fluent interface + * @throws InvalidArgumentException + */ + public function setImageFile($file) + { + if (!(is_readable($file) && is_file($file))) { + throw new InvalidArgumentException("Image file $file is not readable"); + } + + if (is_resource($this->image)) { + imagedestroy($this->image); + } + + list ($this->width, $this->height, $type) = getimagesize($file); + + switch ($type) { + case IMAGETYPE_GIF : + $this->image = imagecreatefromgif($file); + break; + case IMAGETYPE_JPEG : + $this->image = imagecreatefromjpeg($file); + break; + case IMAGETYPE_PNG : + $this->image = imagecreatefrompng($file); + break; + default : + throw new InvalidArgumentException("Image type $type not supported"); + } + + return $this; + } + + /** + * Set image resource from string data + * + * @param string $data + * @return ImageManipulator for a fluent interface + * @throws RuntimeException + */ + public function setImageString($data) + { + if (is_resource($this->image)) { + imagedestroy($this->image); + } + + if (!$this->image = imagecreatefromstring($data)) { + throw new RuntimeException('Cannot create image from data string'); + } + $this->width = imagesx($this->image); + $this->height = imagesy($this->image); + return $this; + } + + /** + * Resamples the current image + * + * @param int $width New width + * @param int $height New height + * @param bool $constrainProportions Constrain current image proportions when resizing + * @return ImageManipulator for a fluent interface + * @throws RuntimeException + */ + public function resample( $width, $height, $constrainProportions = true ) + { + if (!is_resource($this->image)) { + throw new RuntimeException('No image set'); + } + if ($constrainProportions) { + if ($this->height >= $this->width) { + $width = round($height / $this->height * $this->width); + } else { + $height = round($width / $this->width * $this->height); + } + } + + $temp = imagecreatetruecolor($width, $height); + + imagecopyresampled($temp, $this->image, 0, 0, 0, 0, $width, $height, $this->width, $this->height); + + if ( function_exists('exif_read_data') ) + { + $exif = exif_read_data( $this -> img_src ); + if ( $exif && isset($exif['Orientation']) ) + { + $orientation = $exif['Orientation']; + if ( $orientation != 1 ) + { + $deg = 0; + switch ($orientation) + { + case 3: + $deg = 180; + break; + case 6: + $deg = 270; + break; + case 8: + $deg = 90; + break; + } + + if ( $deg ) + $temp = imagerotate( $temp, $deg, 0 ); + } + } + } + return $this->_replace($temp); + } + + /** + * Enlarge canvas + * + * @param int $width Canvas width + * @param int $height Canvas height + * @param array $rgb RGB colour values + * @param int $xpos X-Position of image in new canvas, null for centre + * @param int $ypos Y-Position of image in new canvas, null for centre + * @return ImageManipulator for a fluent interface + * @throws RuntimeException + */ + public function enlargeCanvas($width, $height, array $rgb = array(), $xpos = null, $ypos = null) + { + if (!is_resource($this->image)) { + throw new RuntimeException('No image set'); + } + + $width = max($width, $this->width); + $height = max($height, $this->height); + + $temp = imagecreatetruecolor($width, $height); + if (count($rgb) == 3) { + $bg = imagecolorallocate($temp, $rgb[0], $rgb[1], $rgb[2]); + imagefill($temp, 0, 0, $bg); + } + + if (null === $xpos) { + $xpos = round(($width - $this->width) / 2); + } + if (null === $ypos) { + $ypos = round(($height - $this->height) / 2); + } + + imagecopy($temp, $this->image, (int) $xpos, (int) $ypos, 0, 0, $this->width, $this->height); + return $this->_replace($temp); + } + + /** + * Crop image + * + * @param int|array $x1 Top left x-coordinate of crop box or array of coordinates + * @param int $y1 Top left y-coordinate of crop box + * @param int $x2 Bottom right x-coordinate of crop box + * @param int $y2 Bottom right y-coordinate of crop box + * @return ImageManipulator for a fluent interface + * @throws RuntimeException + */ + public function crop($x1, $y1 = 0, $x2 = 0, $y2 = 0) + { + if (!is_resource($this->image)) { + throw new RuntimeException('No image set'); + } + if (is_array($x1) && 4 == count($x1)) { + list($x1, $y1, $x2, $y2) = $x1; + } + + $x1 = max($x1, 0); + $y1 = max($y1, 0); + + $x2 = min($x2, $this->width); + $y2 = min($y2, $this->height); + + $width = $x2 - $x1; + $height = $y2 - $y1; + + $temp = imagecreatetruecolor($width, $height); + imagecopy($temp, $this->image, 0, 0, $x1, $y1, $width, $height); + + return $this->_replace($temp); + } + + /** + * Replace current image resource with a new one + * + * @param resource $res New image resource + * @return ImageManipulator for a fluent interface + * @throws UnexpectedValueException + */ + protected function _replace($res) + { + if (!is_resource($res)) { + throw new UnexpectedValueException('Invalid resource'); + } + if (is_resource($this->image)) { + imagedestroy($this->image); + } + $this->image = $res; + $this->width = imagesx($res); + $this->height = imagesy($res); + return $this; + } + + /** + * Save current image to file + * + * @param string $fileName + * @return void + * @throws RuntimeException + */ + public function save($fileName, $type = IMAGETYPE_JPEG) + { + $dir = dirname($fileName); + if (!is_dir($dir)) { + if (!mkdir($dir, 0755, true)) { + throw new RuntimeException('Error creating directory ' . $dir); + } + } + + try { + switch ($type) { + case IMAGETYPE_GIF : + if (!imagegif($this->image, $fileName)) { + throw new RuntimeException; + } + break; + case IMAGETYPE_PNG : + if (!imagepng($this->image, $fileName)) { + throw new RuntimeException; + } + break; + case IMAGETYPE_JPEG : + default : + if (!imagejpeg($this->image, $fileName, 95)) { + throw new RuntimeException; + } + } + } catch (Exception $ex) { + throw new RuntimeException('Error saving image file to ' . $fileName); + } + } + + /** + * Returns the GD image resource + * + * @return resource + */ + public function getResource() + { + return $this->image; + } + + /** + * Get current image resource width + * + * @return int + */ + public function getWidth() + { + return $this->width; + } + + /** + * Get current image height + * + * @return int + */ + public function getHeight() + { + return $this->height; + } +} \ No newline at end of file diff --git a/autoload/class.Mobile_Detect.php b/autoload/class.Mobile_Detect.php new file mode 100644 index 0000000..50d57f0 --- /dev/null +++ b/autoload/class.Mobile_Detect.php @@ -0,0 +1,1431 @@ + + * Nick Ilyin + * + * Original author: Victor Stanciu + * + * @license Code and contributions have 'MIT License' + * More details: https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt + * + * @link Homepage: http://mobiledetect.net + * GitHub Repo: https://github.com/serbanghita/Mobile-Detect + * Google Code: http://code.google.com/p/php-mobile-detect/ + * README: https://github.com/serbanghita/Mobile-Detect/blob/master/README.md + * HOWTO: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples + * + * @version 2.8.16 + */ + +class Mobile_Detect +{ + /** + * Mobile detection type. + * + * @deprecated since version 2.6.9 + */ + const DETECTION_TYPE_MOBILE = 'mobile'; + + /** + * Extended detection type. + * + * @deprecated since version 2.6.9 + */ + const DETECTION_TYPE_EXTENDED = 'extended'; + + /** + * A frequently used regular expression to extract version #s. + * + * @deprecated since version 2.6.9 + */ + const VER = '([\w._\+]+)'; + + /** + * Top-level device. + */ + const MOBILE_GRADE_A = 'A'; + + /** + * Mid-level device. + */ + const MOBILE_GRADE_B = 'B'; + + /** + * Low-level device. + */ + const MOBILE_GRADE_C = 'C'; + + /** + * Stores the version number of the current release. + */ + const VERSION = '2.8.16'; + + /** + * A type for the version() method indicating a string return value. + */ + const VERSION_TYPE_STRING = 'text'; + + /** + * A type for the version() method indicating a float return value. + */ + const VERSION_TYPE_FLOAT = 'float'; + + /** + * A cache for resolved matches + * @var array + */ + protected $cache = array(); + + /** + * The User-Agent HTTP header is stored in here. + * @var string + */ + protected $userAgent = null; + + /** + * HTTP headers in the PHP-flavor. So HTTP_USER_AGENT and SERVER_SOFTWARE. + * @var array + */ + protected $httpHeaders = array(); + + /** + * CloudFront headers. E.g. CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer & CloudFront-Is-Tablet-Viewer. + * @var array + */ + protected $cloudfrontHeaders = array(); + + /** + * The matching Regex. + * This is good for debug. + * @var string + */ + protected $matchingRegex = null; + + /** + * The matches extracted from the regex expression. + * This is good for debug. + * @var string + */ + protected $matchesArray = null; + + /** + * The detection type, using self::DETECTION_TYPE_MOBILE or self::DETECTION_TYPE_EXTENDED. + * + * @deprecated since version 2.6.9 + * + * @var string + */ + protected $detectionType = self::DETECTION_TYPE_MOBILE; + + /** + * HTTP headers that trigger the 'isMobile' detection + * to be true. + * + * @var array + */ + protected static $mobileHeaders = array( + + 'HTTP_ACCEPT' => array('matches' => array( + // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/ + 'application/x-obml2d', + // BlackBerry devices. + 'application/vnd.rim.html', + 'text/vnd.wap.wml', + 'application/vnd.wap.xhtml+xml' + )), + 'HTTP_X_WAP_PROFILE' => null, + 'HTTP_X_WAP_CLIENTID' => null, + 'HTTP_WAP_CONNECTION' => null, + 'HTTP_PROFILE' => null, + // Reported by Opera on Nokia devices (eg. C3). + 'HTTP_X_OPERAMINI_PHONE_UA' => null, + 'HTTP_X_NOKIA_GATEWAY_ID' => null, + 'HTTP_X_ORANGE_ID' => null, + 'HTTP_X_VODAFONE_3GPDPCONTEXT' => null, + 'HTTP_X_HUAWEI_USERID' => null, + // Reported by Windows Smartphones. + 'HTTP_UA_OS' => null, + // Reported by Verizon, Vodafone proxy system. + 'HTTP_X_MOBILE_GATEWAY' => null, + // Seen this on HTC Sensation. SensationXE_Beats_Z715e. + 'HTTP_X_ATT_DEVICEID' => null, + // Seen this on a HTC. + 'HTTP_UA_CPU' => array('matches' => array('ARM')), + ); + + /** + * List of mobile devices (phones). + * + * @var array + */ + protected static $phoneDevices = array( + 'iPhone' => '\biPhone\b|\biPod\b', // |\biTunes + 'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+', + 'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m', + 'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6', + // @todo: Is 'Dell Streak' a tablet or a phone? ;) + 'Dell' => 'Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b', + 'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\bMoto E\b', + 'Samsung' => 'Samsung|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205', + 'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802)', + 'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533', + 'Asus' => 'Asus.*Galaxy|PadFone.*Mobile', + // http://www.micromaxinfo.com/mobiles/smartphones + // Added because the codes might conflict with Acer Tablets. + 'Micromax' => 'Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b', + // @todo Complete the regex. + 'Palm' => 'PalmSource|Palm', // avantgo|blazer|elaine|hiptop|plucker|xiino ; + 'Vertu' => 'Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature', // Just for fun ;) + // http://www.pantech.co.kr/en/prod/prodList.do?gbrand=VEGA (PANTECH) + // Most of the VEGA devices are legacy. PANTECH seem to be newer devices based on Android. + 'Pantech' => 'PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790', + // http://www.fly-phone.com/devices/smartphones/ ; Included only smartphones. + 'Fly' => 'IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250', + // http://fr.wikomobile.com + 'Wiko' => 'KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM', + 'iMobile' => 'i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)', + // Added simvalley mobile just for fun. They have some interesting devices. + // http://www.simvalley.fr/telephonie---gps-_22_telephonie-mobile_telephones_.html + 'SimValley' => '\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b', + // Wolfgang - a brand that is sold by Aldi supermarkets. + // http://www.wolfgangmobile.com/ + 'Wolfgang' => 'AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q', + 'Alcatel' => 'Alcatel', + 'Nintendo' => 'Nintendo 3DS', + // http://en.wikipedia.org/wiki/Amoi + 'Amoi' => 'Amoi', + // http://en.wikipedia.org/wiki/INQ + 'INQ' => 'INQ', + // @Tapatalk is a mobile app; http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039 + 'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser', + ); + + /** + * List of tablet devices. + * + * @var array + */ + protected static $tabletDevices = array( + 'iPad' => 'iPad|iPad.*Mobile', // @todo: check for mobile friendly emails topic. + 'NexusTablet' => 'Android.*Nexus[\s]+(7|9|10)|^.*Android.*Nexus(?:(?!Mobile).)*$', + 'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T360', // SCH-P709|SCH-P729|SM-T2558|GT-I9205 - Samsung Mega - treat them like a regular phone. + // http://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html + 'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI)\b', + // Only the Surface tablets with Windows RT are considered mobile. + // http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx + 'SurfaceTablet' => 'Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)', + // http://shopping1.hp.com/is-bin/INTERSHOP.enfinity/WFS/WW-USSMBPublicStore-Site/en_US/-/USD/ViewStandardCatalog-Browse?CatalogCategoryID=JfIQ7EN5lqMAAAEyDcJUDwMT + 'HPTablet' => 'HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10', + // Watch out for PadFone, see #132. + // http://www.asus.com/de/Tablets_Mobile/Memo_Pad_Products/ + 'AsusTablet' => '^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\bK00F\b|\bK00C\b|\bK00E\b|\bK00L\b|TX201LA|ME176C|ME102A|\bM80TA\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K017 |ME572C|ME103K|ME170C|ME171C|\bME70C\b|ME581C|ME581CL|ME8510C|ME181C', + 'BlackBerryTablet' => 'PlayBook|RIM Tablet', + 'HTCtablet' => 'HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410', + 'MotorolaTablet' => 'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617', + 'NookTablet' => 'Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2', + // http://www.acer.ro/ac/ro/RO/content/drivers + // http://www.packardbell.co.uk/pb/en/GB/content/download (Packard Bell is part of Acer) + // http://us.acer.com/ac/en/US/content/group/tablets + // http://www.acer.de/ac/de/DE/content/models/tablets/ + // Can conflict with Micromax and Motorola phones codes. + 'AcerTablet' => 'Android.*; \b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\b|W3-810|\bA3-A10\b|\bA3-A11\b', + // http://eu.computers.toshiba-europe.com/innovation/family/Tablets/1098744/banner_id/tablet_footerlink/ + // http://us.toshiba.com/tablets/tablet-finder + // http://www.toshiba.co.jp/regza/tablet/ + 'ToshibaTablet' => 'Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO', + // http://www.nttdocomo.co.jp/english/service/developer/smart_phone/technical_info/spec/index.html + // http://www.lg.com/us/tablets + 'LGTablet' => '\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\b', + 'FujitsuTablet' => 'Android.*\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\b', + // Prestigio Tablets http://www.prestigio.com/support + 'PrestigioTablet' => 'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD', + // http://support.lenovo.com/en_GB/downloads/default.page?# + 'LenovoTablet' => 'Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)', + // http://www.dell.com/support/home/us/en/04/Products/tab_mob/tablets + 'DellTablet' => 'Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7', + // http://www.yarvik.com/en/matrix/tablets/ + 'YarvikTablet' => 'Android.*\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\b', + 'MedionTablet' => 'Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB', + 'ArnovaTablet' => 'AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2', + // http://www.intenso.de/kategorie_en.php?kategorie=33 + // @todo: http://www.nbhkdz.com/read/b8e64202f92a2df129126bff.html - investigate + 'IntensoTablet' => 'INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004', + // IRU.ru Tablets http://www.iru.ru/catalog/soho/planetable/ + 'IRUTablet' => 'M702pro', + 'MegafonTablet' => 'MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b', + // http://www.e-boda.ro/tablete-pc.html + 'EbodaTablet' => 'E-Boda (Supreme|Impresspeed|Izzycomm|Essential)', + // http://www.allview.ro/produse/droseries/lista-tablete-pc/ + 'AllViewTablet' => 'Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)', + // http://wiki.archosfans.com/index.php?title=Main_Page + 'ArchosTablet' => '\b(101G9|80G9|A101IT)\b|Qilive 97R|Archos5|\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\b', + // http://www.ainol.com/plugin.php?identifier=ainol&module=product + 'AinolTablet' => 'NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark', + // @todo: inspect http://esupport.sony.com/US/p/select-system.pl?DIRECTOR=DRIVER + // Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser + // http://www.sony.jp/support/tablet/ + 'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612', + // http://www.support.philips.com/support/catalog/worldproducts.jsp?userLanguage=en&userCountry=cn&categoryid=3G_LTE_TABLET_SU_CN_CARE&title=3G%20tablets%20/%20LTE%20range&_dyncharset=UTF-8 + 'PhilipsTablet' => '\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b', + // db + http://www.cube-tablet.com/buy-products.html + 'CubeTablet' => 'Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT', + // http://www.cobyusa.com/?p=pcat&pcat_id=3001 + 'CobyTablet' => 'MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010', + // http://www.match.net.cn/products.asp + 'MIDTablet' => 'M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733', + // http://www.msi.com/support + // @todo Research the Windows Tablets. + 'MSITablet' => 'MSI \b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\b', + // @todo http://www.kyoceramobile.com/support/drivers/ + // 'KyoceraTablet' => null, + // @todo http://intexuae.com/index.php/category/mobile-devices/tablets-products/ + // 'IntextTablet' => null, + // http://pdadb.net/index.php?m=pdalist&list=SMiT (NoName Chinese Tablets) + // http://www.imp3.net/14/show.php?itemid=20454 + 'SMiTTablet' => 'Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)', + // http://www.rock-chips.com/index.php?do=prod&pid=2 + 'RockChipTablet' => 'Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A', + // http://www.fly-phone.com/devices/tablets/ ; http://www.fly-phone.com/service/ + 'FlyTablet' => 'IQ310|Fly Vision', + // http://www.bqreaders.com/gb/tablets-prices-sale.html + 'bqTablet' => '(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris E10)|Maxwell.*Lite|Maxwell.*Plus', + // http://www.huaweidevice.com/worldwide/productFamily.do?method=index&directoryId=5011&treeId=3290 + // http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&directoryId=3372&treeId=0&tb=1&type=software (including legacy tablets) + 'HuaweiTablet' => 'MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim', + // Nec or Medias Tab + 'NecTablet' => '\bN-06D|\bN-08D', + // Pantech Tablets: http://www.pantechusa.com/phones/ + 'PantechTablet' => 'Pantech.*P4100', + // Broncho Tablets: http://www.broncho.cn/ (hard to find) + 'BronchoTablet' => 'Broncho.*(N701|N708|N802|a710)', + // http://versusuk.com/support.html + 'VersusTablet' => 'TOUCHPAD.*[78910]|\bTOUCHTAB\b', + // http://www.zync.in/index.php/our-products/tablet-phablets + 'ZyncTablet' => 'z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900', + // http://www.positivoinformatica.com.br/www/pessoal/tablet-ypy/ + 'PositivoTablet' => 'TB07STA|TB10STA|TB07FTA|TB10FTA', + // https://www.nabitablet.com/ + 'NabiTablet' => 'Android.*\bNabi', + 'KoboTablet' => 'Kobo Touch|\bK080\b|\bVox\b Build|\bArc\b Build', + // French Danew Tablets http://www.danew.com/produits-tablette.php + 'DanewTablet' => 'DSlide.*\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\b', + // Texet Tablets and Readers http://www.texet.ru/tablet/ + 'TexetTablet' => 'NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE', + // Avoid detecting 'PLAYSTATION 3' as mobile. + 'PlaystationTablet' => 'Playstation.*(Portable|Vita)', + // http://www.trekstor.de/surftabs.html + 'TrekstorTablet' => 'ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab', + // http://www.pyleaudio.com/Products.aspx?%2fproducts%2fPersonal-Electronics%2fTablets + 'PyleAudioTablet' => '\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b', + // http://www.advandigital.com/index.php?link=content-product&jns=JP001 + // because of the short codenames we have to include whitespaces to reduce the possible conflicts. + 'AdvanTablet' => 'Android.* \b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\b ', + // http://www.danytech.com/category/tablet-pc + 'DanyTechTablet' => 'Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1', + // http://www.galapad.net/product.html + 'GalapadTablet' => 'Android.*\bG1\b', + // http://www.micromaxinfo.com/tablet/funbook + 'MicromaxTablet' => 'Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b', + // http://www.karbonnmobiles.com/products_tablet.php + 'KarbonnTablet' => 'Android.*\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\b', + // http://www.myallfine.com/Products.asp + 'AllFineTablet' => 'Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide', + // http://www.proscanvideo.com/products-search.asp?itemClass=TABLET&itemnmbr= + 'PROSCANTablet' => '\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\b', + // http://www.yonesnav.com/products/products.php + 'YONESTablet' => 'BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026', + // http://www.cjshowroom.com/eproducts.aspx?classcode=004001001 + // China manufacturer makes tablets for different small brands (eg. http://www.zeepad.net/index.html) + 'ChangJiaTablet' => 'TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503', + // http://www.gloryunion.cn/products.asp + // http://www.allwinnertech.com/en/apply/mobile.html + // http://www.ptcl.com.pk/pd_content.php?pd_id=284 (EVOTAB) + // @todo: Softwiner tablets? + // aka. Cute or Cool tablets. Not sure yet, must research to avoid collisions. + 'GUTablet' => 'TX-A1301|TX-M9002|Q702|kf026', // A12R|D75A|D77|D79|R83|A95|A106C|R15|A75|A76|D71|D72|R71|R73|R77|D82|R85|D92|A97|D92|R91|A10F|A77F|W71F|A78F|W78F|W81F|A97F|W91F|W97F|R16G|C72|C73E|K72|K73|R96G + // http://www.pointofview-online.com/showroom.php?shop_mode=product_listing&category_id=118 + 'PointOfViewTablet' => 'TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10', + // http://www.overmax.pl/pl/katalog-produktow,p8/tablety,c14/ + // @todo: add more tests. + 'OvermaxTablet' => 'OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)', + // http://hclmetablet.com/India/index.php + 'HCLTablet' => 'HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync', + // http://www.edigital.hu/Tablet_es_e-book_olvaso/Tablet-c18385.html + 'DPSTablet' => 'DPS Dream 9|DPS Dual 7', + // http://www.visture.com/index.asp + 'VistureTablet' => 'V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10', + // http://www.mijncresta.nl/tablet + 'CrestaTablet' => 'CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989', + // MediaTek - http://www.mediatek.com/_en/01_products/02_proSys.php?cata_sn=1&cata1_sn=1&cata2_sn=309 + 'MediatekTablet' => '\bMT8125|MT8389|MT8135|MT8377\b', + // Concorde tab + 'ConcordeTablet' => 'Concorde([ ]+)?Tab|ConCorde ReadMan', + // GoClever Tablets - http://www.goclever.com/uk/products,c1/tablet,c5/ + 'GoCleverTablet' => 'GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042', + // Modecom Tablets - http://www.modecom.eu/tablets/portal/ + 'ModecomTablet' => 'FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003', + // Vonino Tablets - http://www.vonino.eu/tablets + 'VoninoTablet' => '\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\bQ8\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\b', + // ECS Tablets - http://www.ecs.com.tw/ECSWebSite/Product/Product_Tablet_List.aspx?CategoryID=14&MenuID=107&childid=M_107&LanID=0 + 'ECSTablet' => 'V07OT2|TM105A|S10OT1|TR10CS1', + // Storex Tablets - http://storex.fr/espace_client/support.html + // @note: no need to add all the tablet codes since they are guided by the first regex. + 'StorexTablet' => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab', + // Generic Vodafone tablets. + 'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7', + // French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb + // Aka: http://www.essentielb.fr/ + 'EssentielBTablet' => 'Smart[ \']?TAB[ ]+?[0-9]+|Family[ \']?TAB2', + // Ross & Moor - http://ross-moor.ru/ + 'RossMoorTablet' => 'RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711', + // i-mobile http://product.i-mobilephone.com/Mobile_Device + 'iMobileTablet' => 'i-mobile i-note', + // http://www.tolino.de/de/vergleichen/ + 'TolinoTablet' => 'tolino tab [0-9.]+|tolino shine', + // AudioSonic - a Kmart brand + // http://www.kmart.com.au/webapp/wcs/stores/servlet/Search?langId=-1&storeId=10701&catalogId=10001&categoryId=193001&pageSize=72¤tPage=1&searchCategory=193001%2b4294965664&sortBy=p_MaxPrice%7c1 + 'AudioSonicTablet' => '\bC-22Q|T7-QC|T-17B|T-17P\b', + // AMPE Tablets - http://www.ampe.com.my/product-category/tablets/ + // @todo: add them gradually to avoid conflicts. + 'AMPETablet' => 'Android.* A78 ', + // Skk Mobile - http://skkmobile.com.ph/product_tablets.php + 'SkkTablet' => 'Android.* (SKYPAD|PHOENIX|CYCLOPS)', + // Tecno Mobile (only tablet) - http://www.tecno-mobile.com/index.php/product?filterby=smart&list_order=all&page=1 + 'TecnoTablet' => 'TECNO P9', + // JXD (consoles & tablets) - http://jxd.hk/products.asp?selectclassid=009008&clsid=3 + 'JXDTablet' => 'Android.*\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\b', + // i-Joy tablets - http://www.i-joy.es/en/cat/products/tablets/ + 'iJoyTablet' => 'Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)', + // http://www.intracon.eu/tablet + 'FX2Tablet' => 'FX2 PAD7|FX2 PAD10', + // http://www.xoro.de/produkte/ + // @note: Might be the same brand with 'Simply tablets' + 'XoroTablet' => 'KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151', + // http://www1.viewsonic.com/products/computing/tablets/ + 'ViewsonicTablet' => 'ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a', + // http://www.odys.de/web/internet-tablet_en.html + 'OdysTablet' => 'LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10', + // http://www.captiva-power.de/products.html#tablets-en + 'CaptivaTablet' => 'CAPTIVA PAD', + // IconBIT - http://www.iconbit.com/products/tablets/ + 'IconbitTablet' => 'NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S', + // http://www.teclast.com/topic.php?channelID=70&topicID=140&pid=63 + 'TeclastTablet' => 'T98 4G|\bP80\b|\bX90HD\b|X98 Air|X98 Air 3G|\bX89\b|P80 3G|\bX80h\b|P98 Air|\bX89HD\b|P98 3G|\bP90HD\b|P89 3G|X98 3G|\bP70h\b|P79HD 3G|G18d 3G|\bP79HD\b|\bP89s\b|\bA88\b|\bP10HD\b|\bP19HD\b|G18 3G|\bP78HD\b|\bA78\b|\bP75\b|G17s 3G|G17h 3G|\bP85t\b|\bP90\b|\bP11\b|\bP98t\b|\bP98HD\b|\bG18d\b|\bP85s\b|\bP11HD\b|\bP88s\b|\bA80HD\b|\bA80se\b|\bA10h\b|\bP89\b|\bP78s\b|\bG18\b|\bP85\b|\bA70h\b|\bA70\b|\bG17\b|\bP18\b|\bA80s\b|\bA11s\b|\bP88HD\b|\bA80h\b|\bP76s\b|\bP76h\b|\bP98\b|\bA10HD\b|\bP78\b|\bP88\b|\bA11\b|\bA10t\b|\bP76a\b|\bP76t\b|\bP76e\b|\bP85HD\b|\bP85a\b|\bP86\b|\bP75HD\b|\bP76v\b|\bA12\b|\bP75a\b|\bA15\b|\bP76Ti\b|\bP81HD\b|\bA10\b|\bT760VE\b|\bT720HD\b|\bP76\b|\bP73\b|\bP71\b|\bP72\b|\bT720SE\b|\bC520Ti\b|\bT760\b|\bT720VE\b|T720-3GE|T720-WiFi', + // Onda - http://www.onda-tablet.com/buy-android-onda.html?dir=desc&limit=all&order=price + 'OndaTablet' => '\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\b[\s]+', + 'JaytechTablet' => 'TPC-PA762', + 'BlaupunktTablet' => 'Endeavour 800NG|Endeavour 1010', + // http://www.digma.ru/support/download/ + // @todo: Ebooks also (if requested) + 'DigmaTablet' => '\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b', + // http://www.evolioshop.com/ro/tablete-pc.html + // http://www.evolio.ro/support/downloads_static.html?cat=2 + // @todo: Research some more + 'EvolioTablet' => 'ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b', + // @todo http://www.lavamobiles.com/tablets-data-cards + 'LavaTablet' => 'QPAD E704|\bIvoryS\b|E-TAB IVORY|\bE-TAB\b', + // https://www.celkonmobiles.com/?_a=categoryphones&sid=2 + 'CelkonTablet' => 'CT695|CT888|CT[\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\bCT-1\b', + // http://www.wolderelectronics.com/productos/manuales-y-guias-rapidas/categoria-2-miTab + 'WolderTablet' => 'miTab \b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\b', + // http://www.mi.com/en + 'MiTablet' => '\bMI PAD\b|\bHM NOTE 1W\b', + // http://www.nbru.cn/index.html + 'NibiruTablet' => 'Nibiru M1|Nibiru Jupiter One', + // http://navroad.com/products/produkty/tablety/ + 'NexoTablet' => 'NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI', + // http://leader-online.com/new_site/product-category/tablets/ + // http://www.leader-online.net.au/List/Tablet + 'LeaderTablet' => 'TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100', + // http://www.datawind.com/ubislate/ + 'UbislateTablet' => 'UbiSlate[\s]?7C', + // http://www.pocketbook-int.com/ru/support + 'PocketBookTablet' => 'Pocketbook', + // http://www.tesco.com/direct/hudl/ + 'Hudl' => 'Hudl HT7S3', + // http://www.telstra.com.au/home-phone/thub-2/ + 'TelstraTablet' => 'T-Hub2', + 'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\bM6pro\b|CT1020W|arc 10HD|\bJolla\b|\bTP750\b' + ); + + /** + * List of mobile Operating Systems. + * + * @var array + */ + protected static $operatingSystems = array( + 'AndroidOS' => 'Android', + 'BlackBerryOS' => 'blackberry|\bBB10\b|rim tablet os', + 'PalmOS' => 'PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino', + 'SymbianOS' => 'Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\bS60\b', + // @reference: http://en.wikipedia.org/wiki/Windows_Mobile + 'WindowsMobileOS' => 'Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;', + // @reference: http://en.wikipedia.org/wiki/Windows_Phone + // http://wifeng.cn/?r=blog&a=view&id=106 + // http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx + // http://msdn.microsoft.com/library/ms537503.aspx + 'WindowsPhoneOS' => 'Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;', + 'iOS' => '\biPhone.*Mobile|\biPod|\biPad', + // http://en.wikipedia.org/wiki/MeeGo + // @todo: research MeeGo in UAs + 'MeeGoOS' => 'MeeGo', + // http://en.wikipedia.org/wiki/Maemo + // @todo: research Maemo in UAs + 'MaemoOS' => 'Maemo', + 'JavaOS' => 'J2ME/|\bMIDP\b|\bCLDC\b', // '|Java/' produces bug #135 + 'webOS' => 'webOS|hpwOS', + 'badaOS' => '\bBada\b', + 'BREWOS' => 'BREW', + ); + + /** + * List of mobile User Agents. + * + * @var array + */ + protected static $browsers = array( + // @reference: https://developers.google.com/chrome/mobile/docs/user-agent + 'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?', + 'Dolfin' => '\bDolfin\b', + 'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+', + 'Skyfire' => 'Skyfire', + 'IE' => 'IEMobile|MSIEMobile', // |Trident/[.0-9]+ + 'Firefox' => 'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile', + 'Bolt' => 'bolt', + 'TeaShark' => 'teashark', + 'Blazer' => 'Blazer', + // @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3 + 'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari', + // http://en.wikipedia.org/wiki/Midori_(web_browser) + //'Midori' => 'midori', + 'Tizen' => 'Tizen', + 'UCBrowser' => 'UC.*Browser|UCWEB', + 'baiduboxapp' => 'baiduboxapp', + 'baidubrowser' => 'baidubrowser', + // https://github.com/serbanghita/Mobile-Detect/issues/7 + 'DiigoBrowser' => 'DiigoBrowser', + // http://www.puffinbrowser.com/index.php + 'Puffin' => 'Puffin', + // http://mercury-browser.com/index.html + 'Mercury' => '\bMercury\b', + // http://en.wikipedia.org/wiki/Obigo_Browser + 'ObigoBrowser' => 'Obigo', + // http://en.wikipedia.org/wiki/NetFront + 'NetFront' => 'NF-Browser', + // @reference: http://en.wikipedia.org/wiki/Minimo + // http://en.wikipedia.org/wiki/Vision_Mobile_Browser + 'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger', + ); + + /** + * Utilities. + * + * @var array + */ + protected static $utilities = array( + // Experimental. When a mobile device wants to switch to 'Desktop Mode'. + // http://scottcate.com/technology/windows-phone-8-ie10-desktop-or-mobile/ + // https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011 + // https://developers.facebook.com/docs/sharing/best-practices + 'Bot' => 'Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom', + 'MobileBot' => 'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2', + 'DesktopMode' => 'WPDesktop', + 'TV' => 'SonyDTV|HbbTV', // experimental + 'WebKit' => '(webkit)[ /]([\w.]+)', + // @todo: Include JXD consoles. + 'Console' => '\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\b', + 'Watch' => 'SM-V700', + ); + + /** + * All possible HTTP headers that represent the + * User-Agent string. + * + * @var array + */ + protected static $uaHttpHeaders = array( + // The default User-Agent string. + 'HTTP_USER_AGENT', + // Header can occur on devices using Opera Mini. + 'HTTP_X_OPERAMINI_PHONE_UA', + // Vodafone specific header: http://www.seoprinciple.com/mobile-web-community-still-angry-at-vodafone/24/ + 'HTTP_X_DEVICE_USER_AGENT', + 'HTTP_X_ORIGINAL_USER_AGENT', + 'HTTP_X_SKYFIRE_PHONE', + 'HTTP_X_BOLT_PHONE_UA', + 'HTTP_DEVICE_STOCK_UA', + 'HTTP_X_UCBROWSER_DEVICE_UA' + ); + + /** + * The individual segments that could exist in a User-Agent string. VER refers to the regular + * expression defined in the constant self::VER. + * + * @var array + */ + protected static $properties = array( + + // Build + 'Mobile' => 'Mobile/[VER]', + 'Build' => 'Build/[VER]', + 'Version' => 'Version/[VER]', + 'VendorID' => 'VendorID/[VER]', + + // Devices + 'iPad' => 'iPad.*CPU[a-z ]+[VER]', + 'iPhone' => 'iPhone.*CPU[a-z ]+[VER]', + 'iPod' => 'iPod.*CPU[a-z ]+[VER]', + //'BlackBerry' => array('BlackBerry[VER]', 'BlackBerry [VER];'), + 'Kindle' => 'Kindle/[VER]', + + // Browser + 'Chrome' => array('Chrome/[VER]', 'CriOS/[VER]', 'CrMo/[VER]'), + 'Coast' => array('Coast/[VER]'), + 'Dolfin' => 'Dolfin/[VER]', + // @reference: https://developer.mozilla.org/en-US/docs/User_Agent_Strings_Reference + 'Firefox' => 'Firefox/[VER]', + 'Fennec' => 'Fennec/[VER]', + // http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx + // https://msdn.microsoft.com/en-us/library/ie/hh869301(v=vs.85).aspx + 'IE' => array('IEMobile/[VER];', 'IEMobile [VER]', 'MSIE [VER];', 'Trident/[0-9.]+;.*rv:[VER]'), + // http://en.wikipedia.org/wiki/NetFront + 'NetFront' => 'NetFront/[VER]', + 'NokiaBrowser' => 'NokiaBrowser/[VER]', + 'Opera' => array( ' OPR/[VER]', 'Opera Mini/[VER]', 'Version/[VER]' ), + 'Opera Mini' => 'Opera Mini/[VER]', + 'Opera Mobi' => 'Version/[VER]', + 'UC Browser' => 'UC Browser[VER]', + 'MQQBrowser' => 'MQQBrowser/[VER]', + 'MicroMessenger' => 'MicroMessenger/[VER]', + 'baiduboxapp' => 'baiduboxapp/[VER]', + 'baidubrowser' => 'baidubrowser/[VER]', + 'Iron' => 'Iron/[VER]', + // @note: Safari 7534.48.3 is actually Version 5.1. + // @note: On BlackBerry the Version is overwriten by the OS. + 'Safari' => array( 'Version/[VER]', 'Safari/[VER]' ), + 'Skyfire' => 'Skyfire/[VER]', + 'Tizen' => 'Tizen/[VER]', + 'Webkit' => 'webkit[ /][VER]', + + // Engine + 'Gecko' => 'Gecko/[VER]', + 'Trident' => 'Trident/[VER]', + 'Presto' => 'Presto/[VER]', + + // OS + 'iOS' => ' \bi?OS\b [VER][ ;]{1}', + 'Android' => 'Android [VER]', + 'BlackBerry' => array('BlackBerry[\w]+/[VER]', 'BlackBerry.*Version/[VER]', 'Version/[VER]'), + 'BREW' => 'BREW [VER]', + 'Java' => 'Java/[VER]', + // @reference: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx + // @reference: http://en.wikipedia.org/wiki/Windows_NT#Releases + 'Windows Phone OS' => array( 'Windows Phone OS [VER]', 'Windows Phone [VER]'), + 'Windows Phone' => 'Windows Phone [VER]', + 'Windows CE' => 'Windows CE/[VER]', + // http://social.msdn.microsoft.com/Forums/en-US/windowsdeveloperpreviewgeneral/thread/6be392da-4d2f-41b4-8354-8dcee20c85cd + 'Windows NT' => 'Windows NT [VER]', + 'Symbian' => array('SymbianOS/[VER]', 'Symbian/[VER]'), + 'webOS' => array('webOS/[VER]', 'hpwOS/[VER];'), + ); + + /** + * Construct an instance of this class. + * + * @param array $headers Specify the headers as injection. Should be PHP _SERVER flavored. + * If left empty, will use the global _SERVER['HTTP_*'] vars instead. + * @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT + * from the $headers array instead. + */ + public function __construct( + array $headers = null, + $userAgent = null + ) { + $this->setHttpHeaders($headers); + $this->setUserAgent($userAgent); + } + + /** + * Get the current script version. + * This is useful for the demo.php file, + * so people can check on what version they are testing + * for mobile devices. + * + * @return string The version number in semantic version format. + */ + public static function getScriptVersion() + { + return self::VERSION; + } + + /** + * Set the HTTP Headers. Must be PHP-flavored. This method will reset existing headers. + * + * @param array $httpHeaders The headers to set. If null, then using PHP's _SERVER to extract + * the headers. The default null is left for backwards compatibilty. + */ + public function setHttpHeaders($httpHeaders = null) + { + // use global _SERVER if $httpHeaders aren't defined + if (!is_array($httpHeaders) || !count($httpHeaders)) { + $httpHeaders = $_SERVER; + } + + // clear existing headers + $this->httpHeaders = array(); + + // Only save HTTP headers. In PHP land, that means only _SERVER vars that + // start with HTTP_. + foreach ($httpHeaders as $key => $value) { + if (substr($key, 0, 5) === 'HTTP_') { + $this->httpHeaders[$key] = $value; + } + } + + // In case we're dealing with CloudFront, we need to know. + $this->setCfHeaders($httpHeaders); + } + + /** + * Retrieves the HTTP headers. + * + * @return array + */ + public function getHttpHeaders() + { + return $this->httpHeaders; + } + + /** + * Retrieves a particular header. If it doesn't exist, no exception/error is caused. + * Simply null is returned. + * + * @param string $header The name of the header to retrieve. Can be HTTP compliant such as + * "User-Agent" or "X-Device-User-Agent" or can be php-esque with the + * all-caps, HTTP_ prefixed, underscore seperated awesomeness. + * + * @return string|null The value of the header. + */ + public function getHttpHeader($header) + { + // are we using PHP-flavored headers? + if (strpos($header, '_') === false) { + $header = str_replace('-', '_', $header); + $header = strtoupper($header); + } + + // test the alternate, too + $altHeader = 'HTTP_' . $header; + + //Test both the regular and the HTTP_ prefix + if (isset($this->httpHeaders[$header])) { + return $this->httpHeaders[$header]; + } elseif (isset($this->httpHeaders[$altHeader])) { + return $this->httpHeaders[$altHeader]; + } + + return null; + } + + public function getMobileHeaders() + { + return self::$mobileHeaders; + } + + /** + * Get all possible HTTP headers that + * can contain the User-Agent string. + * + * @return array List of HTTP headers. + */ + public function getUaHttpHeaders() + { + return self::$uaHttpHeaders; + } + + + /** + * Set CloudFront headers + * http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-device + * + * @param array $cfHeaders List of HTTP headers + * + * @return boolean If there were CloudFront headers to be set + */ + public function setCfHeaders($cfHeaders = null) { + // use global _SERVER if $cfHeaders aren't defined + if (!is_array($cfHeaders) || !count($cfHeaders)) { + $cfHeaders = $_SERVER; + } + + // clear existing headers + $this->cloudfrontHeaders = array(); + + // Only save CLOUDFRONT headers. In PHP land, that means only _SERVER vars that + // start with cloudfront-. + $response = false; + foreach ($cfHeaders as $key => $value) { + if (substr(strtolower($key), 0, 16) === 'http_cloudfront_') { + $this->cloudfrontHeaders[strtoupper($key)] = $value; + $response = true; + } + } + + return $response; + } + + /** + * Retrieves the cloudfront headers. + * + * @return array + */ + public function getCfHeaders() + { + return $this->cloudfrontHeaders; + } + + /** + * Set the User-Agent to be used. + * + * @param string $userAgent The user agent string to set. + * + * @return string|null + */ + public function setUserAgent($userAgent = null) + { + // Invalidate cache due to #375 + $this->cache = array(); + + if (false === empty($userAgent)) { + return $this->userAgent = $userAgent; + } else { + $this->userAgent = null; + foreach ($this->getUaHttpHeaders() as $altHeader) { + if (false === empty($this->httpHeaders[$altHeader])) { // @todo: should use getHttpHeader(), but it would be slow. (Serban) + $this->userAgent .= $this->httpHeaders[$altHeader] . " "; + } + } + + if (!empty($this->userAgent)) { + return $this->userAgent = trim($this->userAgent); + } + } + + if (count($this->getCfHeaders()) > 0) { + return $this->userAgent = 'Amazon CloudFront'; + } + return $this->userAgent = null; + } + + /** + * Retrieve the User-Agent. + * + * @return string|null The user agent if it's set. + */ + public function getUserAgent() + { + return $this->userAgent; + } + + /** + * Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or + * self::DETECTION_TYPE_EXTENDED. Otherwise, nothing is set. + * + * @deprecated since version 2.6.9 + * + * @param string $type The type. Must be a self::DETECTION_TYPE_* constant. The default + * parameter is null which will default to self::DETECTION_TYPE_MOBILE. + */ + public function setDetectionType($type = null) + { + if ($type === null) { + $type = self::DETECTION_TYPE_MOBILE; + } + + if ($type !== self::DETECTION_TYPE_MOBILE && $type !== self::DETECTION_TYPE_EXTENDED) { + return; + } + + $this->detectionType = $type; + } + + public function getMatchingRegex() + { + return $this->matchingRegex; + } + + public function getMatchesArray() + { + return $this->matchesArray; + } + + /** + * Retrieve the list of known phone devices. + * + * @return array List of phone devices. + */ + public static function getPhoneDevices() + { + return self::$phoneDevices; + } + + /** + * Retrieve the list of known tablet devices. + * + * @return array List of tablet devices. + */ + public static function getTabletDevices() + { + return self::$tabletDevices; + } + + /** + * Alias for getBrowsers() method. + * + * @return array List of user agents. + */ + public static function getUserAgents() + { + return self::getBrowsers(); + } + + /** + * Retrieve the list of known browsers. Specifically, the user agents. + * + * @return array List of browsers / user agents. + */ + public static function getBrowsers() + { + return self::$browsers; + } + + /** + * Retrieve the list of known utilities. + * + * @return array List of utilities. + */ + public static function getUtilities() + { + return self::$utilities; + } + + /** + * Method gets the mobile detection rules. This method is used for the magic methods $detect->is*(). + * + * @deprecated since version 2.6.9 + * + * @return array All the rules (but not extended). + */ + public static function getMobileDetectionRules() + { + static $rules; + + if (!$rules) { + $rules = array_merge( + self::$phoneDevices, + self::$tabletDevices, + self::$operatingSystems, + self::$browsers + ); + } + + return $rules; + + } + + /** + * Method gets the mobile detection rules + utilities. + * The reason this is separate is because utilities rules + * don't necessary imply mobile. This method is used inside + * the new $detect->is('stuff') method. + * + * @deprecated since version 2.6.9 + * + * @return array All the rules + extended. + */ + public function getMobileDetectionRulesExtended() + { + static $rules; + + if (!$rules) { + // Merge all rules together. + $rules = array_merge( + self::$phoneDevices, + self::$tabletDevices, + self::$operatingSystems, + self::$browsers, + self::$utilities + ); + } + + return $rules; + } + + /** + * Retrieve the current set of rules. + * + * @deprecated since version 2.6.9 + * + * @return array + */ + public function getRules() + { + if ($this->detectionType == self::DETECTION_TYPE_EXTENDED) { + return self::getMobileDetectionRulesExtended(); + } else { + return self::getMobileDetectionRules(); + } + } + + /** + * Retrieve the list of mobile operating systems. + * + * @return array The list of mobile operating systems. + */ + public static function getOperatingSystems() + { + return self::$operatingSystems; + } + + /** + * Check the HTTP headers for signs of mobile. + * This is the fastest mobile check possible; it's used + * inside isMobile() method. + * + * @return bool + */ + public function checkHttpHeadersForMobile() + { + + foreach ($this->getMobileHeaders() as $mobileHeader => $matchType) { + if (isset($this->httpHeaders[$mobileHeader])) { + if (is_array($matchType['matches'])) { + foreach ($matchType['matches'] as $_match) { + if (strpos($this->httpHeaders[$mobileHeader], $_match) !== false) { + return true; + } + } + + return false; + } else { + return true; + } + } + } + + return false; + + } + + /** + * Magic overloading method. + * + * @method boolean is[...]() + * @param string $name + * @param array $arguments + * @return mixed + * @throws BadMethodCallException when the method doesn't exist and doesn't start with 'is' + */ + public function __call($name, $arguments) + { + // make sure the name starts with 'is', otherwise + if (substr($name, 0, 2) !== 'is') { + throw new BadMethodCallException("No such method exists: $name"); + } + + $this->setDetectionType(self::DETECTION_TYPE_MOBILE); + + $key = substr($name, 2); + + return $this->matchUAAgainstKey($key); + } + + /** + * Find a detection rule that matches the current User-agent. + * + * @param null $userAgent deprecated + * @return boolean + */ + protected function matchDetectionRulesAgainstUA($userAgent = null) + { + // Begin general search. + foreach ($this->getRules() as $_regex) { + if (empty($_regex)) { + continue; + } + + if ($this->match($_regex, $userAgent)) { + return true; + } + } + + return false; + } + + /** + * Search for a certain key in the rules array. + * If the key is found the try to match the corresponding + * regex against the User-Agent. + * + * @param string $key + * + * @return boolean + */ + protected function matchUAAgainstKey($key) + { + // Make the keys lowercase so we can match: isIphone(), isiPhone(), isiphone(), etc. + $key = strtolower($key); + if (false === isset($this->cache[$key])) { + + // change the keys to lower case + $_rules = array_change_key_case($this->getRules()); + + if (false === empty($_rules[$key])) { + $this->cache[$key] = $this->match($_rules[$key]); + } + + if (false === isset($this->cache[$key])) { + $this->cache[$key] = false; + } + } + + return $this->cache[$key]; + } + + /** + * Check if the device is mobile. + * Returns true if any type of mobile device detected, including special ones + * @param null $userAgent deprecated + * @param null $httpHeaders deprecated + * @return bool + */ + public function isMobile($userAgent = null, $httpHeaders = null) + { + + if ($httpHeaders) { + $this->setHttpHeaders($httpHeaders); + } + + if ($userAgent) { + $this->setUserAgent($userAgent); + } + + // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront' + if ($this->getUserAgent() === 'Amazon CloudFront') { + $cfHeaders = $this->getCfHeaders(); + if(array_key_exists('HTTP_CLOUDFRONT_IS_MOBILE_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_MOBILE_VIEWER'] === 'true') { + return true; + } + } + + $this->setDetectionType(self::DETECTION_TYPE_MOBILE); + + if ($this->checkHttpHeadersForMobile()) { + return true; + } else { + return $this->matchDetectionRulesAgainstUA(); + } + + } + + /** + * Check if the device is a tablet. + * Return true if any type of tablet device is detected. + * + * @param string $userAgent deprecated + * @param array $httpHeaders deprecated + * @return bool + */ + public function isTablet($userAgent = null, $httpHeaders = null) + { + // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront' + if ($this->getUserAgent() === 'Amazon CloudFront') { + $cfHeaders = $this->getCfHeaders(); + if(array_key_exists('HTTP_CLOUDFRONT_IS_TABLET_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_TABLET_VIEWER'] === 'true') { + return true; + } + } + + $this->setDetectionType(self::DETECTION_TYPE_MOBILE); + + foreach (self::$tabletDevices as $_regex) { + if ($this->match($_regex, $userAgent)) { + return true; + } + } + + return false; + } + + /** + * This method checks for a certain property in the + * userAgent. + * @todo: The httpHeaders part is not yet used. + * + * @param string $key + * @param string $userAgent deprecated + * @param string $httpHeaders deprecated + * @return bool|int|null + */ + public function is($key, $userAgent = null, $httpHeaders = null) + { + // Set the UA and HTTP headers only if needed (eg. batch mode). + if ($httpHeaders) { + $this->setHttpHeaders($httpHeaders); + } + + if ($userAgent) { + $this->setUserAgent($userAgent); + } + + $this->setDetectionType(self::DETECTION_TYPE_EXTENDED); + + return $this->matchUAAgainstKey($key); + } + + /** + * Some detection rules are relative (not standard), + * because of the diversity of devices, vendors and + * their conventions in representing the User-Agent or + * the HTTP headers. + * + * This method will be used to check custom regexes against + * the User-Agent string. + * + * @param $regex + * @param string $userAgent + * @return bool + * + * @todo: search in the HTTP headers too. + */ + public function match($regex, $userAgent = null) + { + $match = (bool) preg_match(sprintf('#%s#is', $regex), (false === empty($userAgent) ? $userAgent : $this->userAgent), $matches); + // If positive match is found, store the results for debug. + if ($match) { + $this->matchingRegex = $regex; + $this->matchesArray = $matches; + } + + return $match; + } + + /** + * Get the properties array. + * + * @return array + */ + public static function getProperties() + { + return self::$properties; + } + + /** + * Prepare the version number. + * + * @todo Remove the error supression from str_replace() call. + * + * @param string $ver The string version, like "2.6.21.2152"; + * + * @return float + */ + public function prepareVersionNo($ver) + { + $ver = str_replace(array('_', ' ', '/'), '.', $ver); + $arrVer = explode('.', $ver, 2); + + if (isset($arrVer[1])) { + $arrVer[1] = @str_replace('.', '', $arrVer[1]); // @todo: treat strings versions. + } + + return (float) implode('.', $arrVer); + } + + /** + * Check the version of the given property in the User-Agent. + * Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31) + * + * @param string $propertyName The name of the property. See self::getProperties() array + * keys for all possible properties. + * @param string $type Either self::VERSION_TYPE_STRING to get a string value or + * self::VERSION_TYPE_FLOAT indicating a float value. This parameter + * is optional and defaults to self::VERSION_TYPE_STRING. Passing an + * invalid parameter will default to the this type as well. + * + * @return string|float The version of the property we are trying to extract. + */ + public function version($propertyName, $type = self::VERSION_TYPE_STRING) + { + if (empty($propertyName)) { + return false; + } + + // set the $type to the default if we don't recognize the type + if ($type !== self::VERSION_TYPE_STRING && $type !== self::VERSION_TYPE_FLOAT) { + $type = self::VERSION_TYPE_STRING; + } + + $properties = self::getProperties(); + + // Check if the property exists in the properties array. + if (true === isset($properties[$propertyName])) { + + // Prepare the pattern to be matched. + // Make sure we always deal with an array (string is converted). + $properties[$propertyName] = (array) $properties[$propertyName]; + + foreach ($properties[$propertyName] as $propertyMatchString) { + + $propertyPattern = str_replace('[VER]', self::VER, $propertyMatchString); + + // Identify and extract the version. + preg_match(sprintf('#%s#is', $propertyPattern), $this->userAgent, $match); + + if (false === empty($match[1])) { + $version = ($type == self::VERSION_TYPE_FLOAT ? $this->prepareVersionNo($match[1]) : $match[1]); + + return $version; + } + + } + + } + + return false; + } + + /** + * Retrieve the mobile grading, using self::MOBILE_GRADE_* constants. + * + * @return string One of the self::MOBILE_GRADE_* constants. + */ + public function mobileGrade() + { + $isMobile = $this->isMobile(); + + if ( + // Apple iOS 4-7.0 – Tested on the original iPad (4.3 / 5.0), iPad 2 (4.3 / 5.1 / 6.1), iPad 3 (5.1 / 6.0), iPad Mini (6.1), iPad Retina (7.0), iPhone 3GS (4.3), iPhone 4 (4.3 / 5.1), iPhone 4S (5.1 / 6.0), iPhone 5 (6.0), and iPhone 5S (7.0) + $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) >= 4.3 || + $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) >= 4.3 || + $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) >= 4.3 || + + // Android 2.1-2.3 - Tested on the HTC Incredible (2.2), original Droid (2.2), HTC Aria (2.1), Google Nexus S (2.3). Functional on 1.5 & 1.6 but performance may be sluggish, tested on Google G1 (1.5) + // Android 3.1 (Honeycomb) - Tested on the Samsung Galaxy Tab 10.1 and Motorola XOOM + // Android 4.0 (ICS) - Tested on a Galaxy Nexus. Note: transition performance can be poor on upgraded devices + // Android 4.1 (Jelly Bean) - Tested on a Galaxy Nexus and Galaxy 7 + ( $this->version('Android', self::VERSION_TYPE_FLOAT)>2.1 && $this->is('Webkit') ) || + + // Windows Phone 7.5-8 - Tested on the HTC Surround (7.5), HTC Trophy (7.5), LG-E900 (7.5), Nokia 800 (7.8), HTC Mazaa (7.8), Nokia Lumia 520 (8), Nokia Lumia 920 (8), HTC 8x (8) + $this->version('Windows Phone OS', self::VERSION_TYPE_FLOAT) >= 7.5 || + + // Tested on the Torch 9800 (6) and Style 9670 (6), BlackBerry® Torch 9810 (7), BlackBerry Z10 (10) + $this->is('BlackBerry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 6.0 || + // Blackberry Playbook (1.0-2.0) - Tested on PlayBook + $this->match('Playbook.*Tablet') || + + // Palm WebOS (1.4-3.0) - Tested on the Palm Pixi (1.4), Pre (1.4), Pre 2 (2.0), HP TouchPad (3.0) + ( $this->version('webOS', self::VERSION_TYPE_FLOAT) >= 1.4 && $this->match('Palm|Pre|Pixi') ) || + // Palm WebOS 3.0 - Tested on HP TouchPad + $this->match('hp.*TouchPad') || + + // Firefox Mobile 18 - Tested on Android 2.3 and 4.1 devices + ( $this->is('Firefox') && $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 18 ) || + + // Chrome for Android - Tested on Android 4.0, 4.1 device + ( $this->is('Chrome') && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 4.0 ) || + + // Skyfire 4.1 - Tested on Android 2.3 device + ( $this->is('Skyfire') && $this->version('Skyfire', self::VERSION_TYPE_FLOAT) >= 4.1 && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 ) || + + // Opera Mobile 11.5-12: Tested on Android 2.3 + ( $this->is('Opera') && $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11.5 && $this->is('AndroidOS') ) || + + // Meego 1.2 - Tested on Nokia 950 and N9 + $this->is('MeeGoOS') || + + // Tizen (pre-release) - Tested on early hardware + $this->is('Tizen') || + + // Samsung Bada 2.0 - Tested on a Samsung Wave 3, Dolphin browser + // @todo: more tests here! + $this->is('Dolfin') && $this->version('Bada', self::VERSION_TYPE_FLOAT) >= 2.0 || + + // UC Browser - Tested on Android 2.3 device + ( ($this->is('UC Browser') || $this->is('Dolfin')) && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 ) || + + // Kindle 3 and Fire - Tested on the built-in WebKit browser for each + ( $this->match('Kindle Fire') || + $this->is('Kindle') && $this->version('Kindle', self::VERSION_TYPE_FLOAT) >= 3.0 ) || + + // Nook Color 1.4.1 - Tested on original Nook Color, not Nook Tablet + $this->is('AndroidOS') && $this->is('NookTablet') || + + // Chrome Desktop 16-24 - Tested on OS X 10.7 and Windows 7 + $this->version('Chrome', self::VERSION_TYPE_FLOAT) >= 16 && !$isMobile || + + // Safari Desktop 5-6 - Tested on OS X 10.7 and Windows 7 + $this->version('Safari', self::VERSION_TYPE_FLOAT) >= 5.0 && !$isMobile || + + // Firefox Desktop 10-18 - Tested on OS X 10.7 and Windows 7 + $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 10.0 && !$isMobile || + + // Internet Explorer 7-9 - Tested on Windows XP, Vista and 7 + $this->version('IE', self::VERSION_TYPE_FLOAT) >= 7.0 && !$isMobile || + + // Opera Desktop 10-12 - Tested on OS X 10.7 and Windows 7 + $this->version('Opera', self::VERSION_TYPE_FLOAT) >= 10 && !$isMobile + ){ + return self::MOBILE_GRADE_A; + } + + if ( + $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT)<4.3 || + $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT)<4.3 || + $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT)<4.3 || + + // Blackberry 5.0: Tested on the Storm 2 9550, Bold 9770 + $this->is('Blackberry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 5 && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT)<6 || + + //Opera Mini (5.0-6.5) - Tested on iOS 3.2/4.3 and Android 2.3 + ($this->version('Opera Mini', self::VERSION_TYPE_FLOAT) >= 5.0 && $this->version('Opera Mini', self::VERSION_TYPE_FLOAT) <= 7.0 && + ($this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 || $this->is('iOS')) ) || + + // Nokia Symbian^3 - Tested on Nokia N8 (Symbian^3), C7 (Symbian^3), also works on N97 (Symbian^1) + $this->match('NokiaN8|NokiaC7|N97.*Series60|Symbian/3') || + + // @todo: report this (tested on Nokia N71) + $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11 && $this->is('SymbianOS') + ){ + return self::MOBILE_GRADE_B; + } + + if ( + // Blackberry 4.x - Tested on the Curve 8330 + $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) <= 5.0 || + // Windows Mobile - Tested on the HTC Leo (WinMo 5.2) + $this->match('MSIEMobile|Windows CE.*Mobile') || $this->version('Windows Mobile', self::VERSION_TYPE_FLOAT) <= 5.2 || + + // Tested on original iPhone (3.1), iPhone 3 (3.2) + $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) <= 3.2 || + $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) <= 3.2 || + $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) <= 3.2 || + + // Internet Explorer 7 and older - Tested on Windows XP + $this->version('IE', self::VERSION_TYPE_FLOAT) <= 7.0 && !$isMobile + ){ + return self::MOBILE_GRADE_C; + } + + // All older smartphone platforms and featurephones - Any device that doesn't support media queries + // will receive the basic, C grade experience. + return self::MOBILE_GRADE_C; + } +} diff --git a/autoload/class.Page.php b/autoload/class.Page.php new file mode 100644 index 0000000..37731bc --- /dev/null +++ b/autoload/class.Page.php @@ -0,0 +1,9 @@ +readImage($file); + + if ($file_type === 'png') + { + $image->setImageFormat('webp'); + $image->setImageCompressionQuality($compression_quality); + $image->setOption('webp:lossless', 'true'); + } + + $image->writeImage($output_file); + return $output_file; + } + + return false; + } + + static public function is_array_fix($value) + { + if (is_array($value) and count($value)) + return true; + return false; + } + + public static function suAppendHtmlById(&$s, $sId, $sHtml, &$oDoc = null) + { + return \S::suSetHtmlElementById($oDoc, $s, $sId, $sHtml, true, false); + } + + public static function suInsertHtmlById(&$s, $sId, $sHtml, &$oDoc = null) + { + return \S::suSetHtmlElementById($oDoc, $s, $sId, $sHtml, false, true); + } + + public static function suAddHtmlBeforeById(&$s, $sId, $sHtml, &$oDoc = null) + { + return \S::suSetHtmlElementById($oDoc, $s, $sId, $sHtml, false, true, true); + } + + public static function suAddHtmlAfterById(&$s, $sId, $sHtml, &$oDoc = null) + { + return \S::suSetHtmlElementById($oDoc, $s, $sId, $sHtml, true, false, true); + } + + public static function suSetHtmlById(&$s, $sId, $sHtml, &$oDoc = null) + { + return \S::suSetHtmlElementById($oDoc, $s, $sId, $sHtml, true, true); + } + + public static function suReplaceHtmlElementById(&$s, $sId, $sHtml, &$oDoc = null) + { + return \S::suSetHtmlElementById($oDoc, $s, $sId, $sHtml, false, false); + } + + public static function suRemoveHtmlElementById(&$s, $sId, &$oDoc = null) + { + return \S::suSetHtmlElementById($oDoc, $s, $sId, null, false, false); + } + + public static function suSetHtmlElementById(&$oDoc, &$s, $sId, $sHtml, $bAppend = false, $bInsert = false, $bAddToOuter = false) + { + if (\S::suIsValidString($s) && \S::suIsValidString($sId)) + { + $bCreate = true; + if (is_object($oDoc)) + { + if (!($oDoc instanceof DOMDocument)) + { + return false; + } + $bCreate = false; + } + + if ($bCreate) + { + $oDoc = new DOMDocument(); + } + + libxml_use_internal_errors(true); + $oDoc->loadHTML($s, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); + libxml_use_internal_errors(false); + $oNode = $oDoc->getElementById($sId); + + if (is_object($oNode)) + { + $bReplaceOuter = (!$bAppend && !$bInsert); + + $sId = uniqid('SHEBI-'); + $aId = array("", ""); + + if ($bReplaceOuter) + { + if (\S::suIsValidString($sHtml)) + { + $oNode->parentNode->replaceChild($oDoc->createComment($sId), $oNode); + $s = $oDoc->saveHtml(); + $s = str_replace($aId, $sHtml, $oDoc->saveHtml()); + } + else + { + $oNode->parentNode->removeChild($oNode); + $s = $oDoc->saveHtml(); + } + return true; + } + + $bReplaceInner = ($bAppend && $bInsert); + $sThis = null; + + if (!$bReplaceInner) + { + $sThis = $oDoc->saveHTML($oNode); + $sThis = ($bInsert ? $sHtml : '') . ($bAddToOuter ? $sThis : (substr($sThis, strpos($sThis, '>') + 1, - (strlen($oNode->nodeName) + 3)))) . ($bAppend ? $sHtml : ''); + } + + if (!$bReplaceInner && $bAddToOuter) + { + $oNode->parentNode->replaceChild($oDoc->createComment($sId), $oNode); + $sId = &$aId; + } + else + { + $oNode->nodeValue = $sId; + } + + $s = str_replace($sId, $bReplaceInner ? $sHtml : $sThis, $oDoc->saveHtml()); + return true; + } + } + return false; + } + + public static function suIsValidString(&$s, &$iLen = null, $minLen = null, $maxLen = null) + { + if (!is_string($s) || !isset($s{ + 0})) + { + return false; + } + + if ($iLen !== null) + { + $iLen = strlen($s); + } + + return (($minLen === null ? true : ($minLen > 0 && isset($s{ + $minLen - 1}))) && + $maxLen === null ? true : ($maxLen >= $minLen && !isset($s{ + $maxLen}))); + } + + public static function log_db_error($db_tmp, $debug) + { + global $settings; + + if ($settings['mysql_debug']) + { + $out .= date('Y-m-d H:i:s') . PHP_EOL; + $out .= $db_tmp->error()[2] . PHP_EOL; + $out .= $db_tmp->last() . PHP_EOL; + $out .= $debug[0]['file'] . ' | ' . $debug[0]['line'] . PHP_EOL; + $out .= '--------------------------------------------------------------------------------------------' . PHP_EOL; + + if (!is_dir('logs')) + mkdir('logs', 0755, true); + + $content = file_get_contents('logs/' . date('Y-m-d') . '.txt'); + $content = $out . $content; + file_put_contents('logs/' . date('Y-m-d') . '.txt', $content); + die('Blad bazy danych.'); + } + } + + public static function lang($text) + { + global $lang; + return $lang[$text] ? $lang[$text] : 'LANG-' . $text; + } + + public static function cache_read($path) + { + $f = fopen($path, 'r'); + $buffer = ''; + while (!feof($f)) + { + $buffer .= fread($f, 2048); + } + fclose($f); + return $buffer; + } + + public static function cache_write($cache_url, $cache_file, $html) + { + $dir = md5($cache_url); + $dir = 'cache/' . $dir[0] . '/' . $dir[1] . '/'; + + if (!is_dir($dir)) + mkdir($dir, 0755, true); + + $f = fopen($cache_file, 'w'); + fwrite($f, $html, strlen($html)); + fclose($f); + return true; + } + + public static function cache_file_url($cache_url) + { + $cache = md5($cache_url); + return 'cache/' . $cache{ + 1} . '/' . $cache{ + 2} . '/' . $cache; + } + + public static function date_diff($data1, $data2, $rodz = '60') + { + $data1 = date('Y-m-d H:i:s', strtotime($data1)); + $data2 = date('Y-m-d H:i:s', strtotime($data2)); + + $d1_t = explode(' ', $data1); + $d1_tt = explode('-', $d1_t[0]); + $rok1 = $d1_tt[0]; + $mc1 = $d1_tt[1]; + $d1 = $d1_tt[2]; + $d1_tt = explode(':', $d1_t[1]); + $g1 = $d1_tt[0]; + $m1 = $d1_tt[1]; + $s1 = $d1_tt[2]; + + $d2_t = explode(' ', $data2); + $d2_tt = explode('-', $d2_t[0]); + $rok2 = $d2_tt[0]; + $mc2 = $d2_tt[1]; + $d2 = $d2_tt[2]; + $d2_tt = explode(':', $d2_t[1]); + $g2 = $d2_tt[0]; + $m2 = $d2_tt[1]; + $s2 = $d2_tt[2]; + + $lt = mktime($g2, $m2, $s2, $mc2, $d2, $rok2); + $st = mktime($g1, $m1, $s1, $mc1, $d1, $rok1); + + return round(($lt - $st) / $rodz); + } + + public static function is_token_valid($token) + { + if (!empty($_SESSION['tokens'][$token])) + { + unset($_SESSION['tokens'][$token]); + return true; + } + return false; + } + + public static function get_token() + { + $token = sha1(mt_rand()); + if (!isset($_SESSION['tokens'])) + $_SESSION['tokens'] = [$token => 1]; + else + $_SESSION['tokens'][$token] = 1; + return $token; + } + + public static function get_domain($url) + { + $parseUrl = parse_url(trim($url)); + return trim($parseUrl[host] ? str_replace('www.', '', $parseUrl[host]) : str_replace('www.', '', array_shift(explode('/', $parseUrl[path], 2)))); + } + + public static function get_domain_url($url) + { + global $settings; + + $settings['link_version'] ? $www = 'www.' : $www = ''; + $settings['ssl'] == true ? $domain_prefix = 'https' : $domain_prefix = 'http'; + return $domain_prefix . '://' . $www . \S::get_domain($url); + } + + public static function max_db_value($table, $column) + { + global $mdb; + $results = $mdb->query('SELECT MAX(' . $column . ') FROM ' . $table)->fetchAll(); + return $results[0][0]; + } + + public static function shuffle_assoc($list) + { + if (!is_array($list)) + return $list; + + $keys = array_keys($list); + shuffle($keys); + $random = array(); + foreach ($keys as $key) + $random[$key] = $list[$key]; + return $random; + } + + public static function escape($value) + { + $return = ''; + for ($i = 0; $i < strlen($value); ++$i) + { + $char = $value[$i]; + $ord = ord($char); + if ($char !== "'" && $char !== "\"" && $char !== '\\' && $ord >= 32 && $ord <= 126) + $return .= $char; + else + $return .= '\\x' . dechex($ord); + } + return $return; + } + + public static function is_bot() + { + $bots = ["Slurp", "Scooter", "URL_Spider_SQL", "Googlebot", "Firefly", "WebBug", "WebFindBot", "crawler", "appie", "msnbot", "InfoSeek", "FAST", "Spade", "NationalDirectory"]; + $agent = strtolower($_SERVER['HTTP_USER_AGENT']); + foreach ($bots as $bot) + if (stripos($agent, $bot) !== false) + return true; + return false; + } + + public static function months() + { + return array(1 => 'Styczeń', 2 => 'Luty', 3 => 'Marzec', 4 => 'Kwiecień', 5 => 'Maj', 6 => 'Czerwiec', 7 => 'Lipiec', 8 => 'Sierpień', 9 => 'Wrzesień', 10 => 'Październik', 11 => 'Listopad', 12 => 'Grudzień'); + } + + public static function months_short() + { + return [1 => 'sty', 2 => 'lut', 3 => 'mar', 4 => 'kwi', 5 => 'maj', 6 => 'cze', 7 => 'lip', 8 => 'sie', 9 => 'wrz', 10 => 'paź', 11 => 'lis', 12 => 'gru']; + } + + public static function chmod_r($path, $chmod = 0755) + { + $dir = new DirectoryIterator($path); + foreach ($dir as $item) + { + chmod($item->getPathname(), $chmod); + if ($item->isDir() && !$item->isDot()) + self::chmod_r($item->getPathname()); + } + } + + public static function rrmdir($dir) + { + if (is_dir($dir)) + { + $files = scandir($dir); + foreach ($files as $file) + if ($file != "." && $file != "..") + \S::rrmdir("$dir/$file"); + rmdir($dir); + } + else if (file_exists($dir)) + unlink($dir); + } + + public static function rcopy($src, $dst) + { + if (is_dir($src)) + { + mkdir($dst, 0755); + $files = scandir($src); + foreach ($files as $file) + if ($file != "." && $file != "..") + \S::rcopy("$src/$file", "$dst/$file"); + } + else if (file_exists($src)) + copy($src, $dst); + + \S::rrmdir($src); + } + + public static function is_mobile() + { + $detect = new \Mobile_Detect; + return $detect->isMobile(); + } + + public static function get_new_version() + { + global $settings; + + if ($version = \S::get_session('new-version')) + return $version; + + $versions = file_get_contents('http://www.cmspro.project-dc.pl/updates/versions.php?key=' . $settings['update_key']); + $versions = explode(PHP_EOL, $versions); + $version = str_replace(',', '.', max($versions)); + + \S::set_session('new-version', $version); + + return $version; + } + + public static function get_version() + { + return str_replace(',', '.', @file_get_contents('../libraries/version.ini')); + } + + public static function pre($data, $type = '') + { + $data = str_replace('Array + (', '', $data); + $data = str_replace(')', '', $data); + + echo '' . print_r($data, true) . ''; + } + + public static function json_to_array($json) + { + $values_tmp = json_decode($json, true); + + if (is_array($values_tmp)) + foreach ($values_tmp as $val) + { + if (isset($values[$val['name']])) + { + if (is_array($values[$val['name']])) + $values[$val['name']][] = $val['value']; + else + $values[$val['name']] = array($values[$val['name']], $val['value']); + } + else + $values[$val['name']] = $val['value']; + } + return $values; + } + + public static function set_session($var, $val) + { + $_SESSION[$var] = $val; + } + + public static function get_session($var) + { + return $_SESSION[$var]; + } + + public static function delete_session($var) + { + unset($_SESSION[$var]); + } + + public static function get($var, $strip_tags = false) + { + if (isset($_POST[$var])) + { + if (is_string($_POST[$var])) + { + if ($strip_tags) + return trim(strip_tags($_POST[$var])); + else + return trim($_POST[$var]); + } + else + return $_POST[$var]; + } + else + { + if (isset($_GET[$var])) + { + if (is_string($_GET[$var])) + { + if ($strip_tags) + return trim(strip_tags($_GET[$var])); + else + return trim($_GET[$var]); + } + else + return $_GET[$var]; + } + } + } + + public static function set_message($text) + { + self::set_session('message', $text); + } + + public static function alert($text, $class = 'alert-success') + { + self::set_session('alert', $text); + self::set_session('alert-class', $class); + } + + static public function get_language_domain($lang_id) + { + global $mdb; + + $settings = \front\factory\Settings::settings_details(); + $default_domain = \admin\factory\Languages::default_domain(); + $settings['link_version'] ? $www = 'www.' : $www = ''; + + $domain = $mdb->get('pp_langs', 'domain', ['id' => $lang_id]); + if (!$domain) + { + if ($default_domain) + return $www . $default_domain; + else + return $www . preg_replace('#^(http(s)?://)?w{3}\.#', '$1', $_SERVER['SERVER_NAME']); + } + else + { + return $www . $domain; + } + } + + public static function htacces($dir = '../') + { + global $mdb; + + $settings = \front\factory\Settings::settings_details(); + $default_domain = \admin\factory\Languages::default_domain(); + $available_domains = \admin\factory\Languages::available_domains(); + + $settings['link_version'] ? $www = 'www.' : $www = ''; + + $settings['ssl'] == true ? $domain_prefix = 'https' : $domain_prefix = 'http'; + + $default_domain ? $url = $default_domain : $url = preg_replace('#^(http(s)?://)?w{3}\.#', '$1', $_SERVER['SERVER_NAME']); + + $robots = 'User-agent: *' . PHP_EOL; + $robots .= 'Allow: /' . PHP_EOL; + + unlink('../sitemap.xml'); + if (is_array($available_domains) and !empty($available_domains)) + { + foreach ($available_domains as $domain) + { + $site_map[$domain['domain']] = '' . 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 + ); + } + 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 + ); + } + + /* 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; + + $results = $mdb->select('pp_langs', ['id', 'start', 'domain', 'main_domain'], ['status' => 1, 'ORDER' => ['o' => 'ASC']]); + if (is_array($results)) foreach ($results as $row) + { + $row['domain'] ? $url_tmp = $row['domain'] : $url_tmp = $url; + + !$row['start'] ? $language_link = $row['id'] . '/' : $language_link = ''; + + $results2 = $mdb->select( + 'pp_pages_langs', + ['[><]pp_pages' => ['page_id' => 'id']], + ['seo_link', 'title', 'page_id', 'noindex', 'start', 'page_type'], + ['AND' => ['status' => 1, 'lang_id' => $row['id'], 'block_direct_access' => 0], 'ORDER' => ['start' => 'DESC', 'o' => 'ASC']] + ); + if (is_array($results2)) foreach ($results2 as $row2) + { + if ($row2['title']) + { + /* sitemap.xml */ + if ($row2['page_type'] != 3 and !$row2['noindex']) + { + $site_map[$url_tmp] .= '' . 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']); + + $site_map[$url_tmp] .= '' . $domain_prefix . '://' . $www . $url_tmp . '/' . $seo . '' . 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']); + + $site_map[$url_tmp] .= '' . $domain_prefix . '://' . $www . $url_tmp . '/' . $seo . '' . 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 . '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 %{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 %{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 %{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 %{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 %{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 . 'RewriteRule ^' . $seo . '(|/)$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . '&%{QUERY_STRING} [L]'; + $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '/s/1(|/)$ ' . $seo . ' [R=301,L]'; + $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]'; + } + 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 . 'RewriteRule ^' . $seo . '(|/)$ index.php?a=page&id=' . $row2['page_id'] . '&lang=' . $row['id'] . '&%{QUERY_STRING} [L]'; + $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $seo . '/s/1(|/)$ ' . $seo . ' [R=301,L]'; + $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; + } + } + } + + $results2 = $mdb->select( + '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) + { + $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']; + } + + /* sitemap */ + if (!$row2['block_direct_access'] and $row2['title']) + { + $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; + 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] .= '' . date('Y-m-d') . '' . PHP_EOL; + $site_map[$url_tmp] .= 'daily' . PHP_EOL; + $site_map[$url_tmp] .= '0.6' . PHP_EOL; + $site_map[$url_tmp] .= '' . PHP_EOL; + } + + /* robots.txt */ + if ($row2['noindex']) + { + $robots .= 'User-agent: GoogleBot' . PHP_EOL; + if ($row2['seo_link']) + $robots .= 'Disallow: /' . $row2['seo_link'] . '$' . PHP_EOL; + else + $robots .= 'Disallow: /a-' . $row2['article_id'] . '-' . self::seo($row2['title']) . '$' . PHP_EOL; + } + + if (!$row2['block_direct_access']) + { + if ($row2['seo_link']) + { + $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $language_link . \S::seo($row2['seo_link']) . '(|/)$ index.php?article=' . $row2['article_id'] . '&lang=' . $row['id'] . '&%{QUERY_STRING} [L]'; + } + else if ($row2['title'] != null) + { + $htaccess_data .= PHP_EOL . 'RewriteRule ^' . $language_link . 'a-' . $row2['article_id'] . '-' . \S::seo($row2['title']) . '(|/)$ index.php?article=' . $row2['article_id'] . '&lang=' . $row['id'] . '&%{QUERY_STRING} [L]'; + } + $htaccess_data .= PHP_EOL; + } + } + } + + $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]'; + } + + $results = $mdb->get('pp_settings', 'value', ['param' => 'htaccess']); + if ($results) + $htaccess_data .= 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) + $site_map[$domain['domain']] .= ''; + } + else + $site_map[$url] .= ''; + + if ( $settings['ssl'] ) + { + if ( $settings['link_version'] ) + { + $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; + + if ( !$settings['url_version'] ) + $redirect .= '## 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]'; + else + $redirect .= '## Add trailing slash' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !(/$|\.)' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL + . 'RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]'; + + $htaccess_data = str_replace( '{REDIRECT}', $redirect, $htaccess_data ); + } + else + { + $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; + + if ( !$settings['url_version'] ) + $redirect .= '## 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]'; + else + $redirect .= '## Add trailing slash' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !(/$|\.)' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL + . 'RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]'; + + $htaccess_data = str_replace( '{REDIRECT}', $redirect, $htaccess_data ); + } + } + else + { + if ($settings['link_version']) + { + $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; + + if ( !$settings['url_version'] ) + $redirect .= '## 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]'; + else + $redirect .= '## Add trailing slash' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !(/$|\.)' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL + . 'RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]'; + + $htaccess_data = str_replace( '{REDIRECT}', $redirect, $htaccess_data ); + } + else + { + $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; + + if ( !$settings['url_version'] ) + $redirect .= '## 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]'; + else + $redirect .= '## Add trailing slash' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !(/$|\.)' . PHP_EOL + . 'RewriteCond %{REQUEST_URI} !^/admin/(.*) [NC]' . PHP_EOL + . 'RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]'; + + $htaccess_data = str_replace( '{REDIRECT}', $redirect, $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; + } + + public static function delete_cache() + { + \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); + + else if (is_dir($dir)) + { + $scan = glob(rtrim($dir, '/') . '/*'); + + 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); + } + } + + 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->SMTPDebug = 2; + $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 + ) + ); + + 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(); + } + return false; + } +} diff --git a/autoload/class.Scontainer.php b/autoload/class.Scontainer.php new file mode 100644 index 0000000..b867571 --- /dev/null +++ b/autoload/class.Scontainer.php @@ -0,0 +1,45 @@ + update( 'pp_scontainers_langs', [ + 'text' => $content + ], [ + 'AND' => [ 'container_id' => $scontainer_id, 'lang_id' => $lang_id ] + ] ); + } + + public function __get( $variable ) + { + if ( array_key_exists( $variable, $this -> data ) ) + return $this -> $variable; + } + + public function __set( $variable, $value ) + { + $this -> $variable = $value; + } + + public function offsetExists( $offset ) + { + return isset( $this -> $offset ); + } + + public function offsetGet( $offset ) + { + return $this -> $offset; + } + + public function offsetSet( $offset, $value ) + { + $this -> $offset = $value; + } + + public function offsetUnset( $offset ) + { + unset( $this -> $offset ); + } +} \ No newline at end of file diff --git a/autoload/class.Tpl.php b/autoload/class.Tpl.php new file mode 100644 index 0000000..1227612 --- /dev/null +++ b/autoload/class.Tpl.php @@ -0,0 +1,73 @@ + dir = $dir; + } + + public static function view( $file, $values = '' ) + { + $tpl = new \Tpl; + if ( is_array( $values ) ) foreach ( $values as $key => $val ) + $tpl -> $key = $val; + return $tpl -> render( $file ); + } + + public function secureHTML( $val ) + { + $out = stripslashes( $val ); + $out = str_replace( "'", "'", $out ); + $out = str_replace( '"', """, $out ); + $out = str_replace( "<", "<", $out ); + $out = str_replace( ">", ">", $out ); + return $out; + } + + public function render( $file ) + { + if ( file_exists( 'templates_user/' . $file . '.php' ) ) + { + ob_start(); + include 'templates_user/' . $file . '.php'; + $out = ob_get_contents(); + ob_end_clean(); + + return $out; + } + else if ( file_exists( 'templates/' . $file . '.php' ) ) + { + ob_start(); + include 'templates/' . $file . '.php'; + $out = ob_get_contents(); + ob_end_clean(); + + return $out; + } + else if ( file_exists( $file . '.php' ) ) + { + ob_start(); + include $file . '.php'; + $out = ob_get_contents(); + ob_end_clean(); + + return $out; + } + else + return '