first commit
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.vscode/ftp-kr.sync.cache.json
|
||||||
792
.htaccess
Normal file
@@ -0,0 +1,792 @@
|
|||||||
|
AddType application/x-httpd-php74 .php
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /
|
||||||
|
Options +FollowSymlinks
|
||||||
|
Options -Indexes
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} !^www\.
|
||||||
|
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]
|
||||||
|
RewriteCond %{SERVER_PORT} !=443
|
||||||
|
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]
|
||||||
|
|
||||||
|
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]
|
||||||
|
|
||||||
|
RewriteCond %{REQUEST_URI} ^/globelusUser/(.*) [NC]
|
||||||
|
RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L]
|
||||||
|
RewriteCond %{REQUEST_URI} ^/globelusAdverts/(.*) [NC]
|
||||||
|
RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L]
|
||||||
|
RewriteCond %{REQUEST_URI} ^/globelusFirms/(.*) [NC]
|
||||||
|
RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L]
|
||||||
|
RewriteCond %{REQUEST_URI} ^/globelusCv/(.*) [NC]
|
||||||
|
RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L]
|
||||||
|
RewriteCond %{REQUEST_URI} ^/globelusCandidates/(.*) [NC]
|
||||||
|
RewriteRule ^([^/]*)/([^/]*)/(.*)$ 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]
|
||||||
|
|
||||||
|
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.php
|
||||||
|
RewriteRule ^ /%1 [R=301,L]
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
Header set Cache-Control "no-cache, no-store, must-revalidate"
|
||||||
|
Header set Pragma "no-cache"
|
||||||
|
Header set Expires 0
|
||||||
|
</IfModule>
|
||||||
|
<Files *.conf>
|
||||||
|
Order Deny,Allow
|
||||||
|
Deny from all
|
||||||
|
</Files>
|
||||||
|
<Files *.log>
|
||||||
|
Order Deny,Allow
|
||||||
|
Deny from all
|
||||||
|
</Files>
|
||||||
|
<Files *.ini>
|
||||||
|
Order Deny,Allow
|
||||||
|
Deny from all
|
||||||
|
</Files>
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^pl/$ index.php?a=change_language&id=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{REQUEST_URI} ^/home$
|
||||||
|
RewriteRule ^(.*)$ https://www.globelus.pl/ [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{REQUEST_URI} ^/home-s-1$
|
||||||
|
RewriteRule ^(.*)$ https://www.globelus.pl/ [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{REQUEST_URI} "^/$"
|
||||||
|
RewriteRule ^$ index.php?a=page&id=2&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^home$ index.php?a=page&id=2&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^home-s-1$ home [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^home-s-([0-9]+)$ index.php?a=page&id=2&lang=pl&bs=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule home %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^home$ index.php?a=page&id=2&lang=pl [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^home-s-([0-9]+)$ index.php?a=page&id=2&lang=pl&bs=$1 [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^szukasz-pracy$ index.php?a=page&id=8&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^szukasz-pracy-s-1$ szukasz-pracy [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^szukasz-pracy-s-([0-9]+)$ index.php?a=page&id=8&lang=pl&bs=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule szukasz-pracy %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^szukasz-pracy$ index.php?a=page&id=8&lang=pl [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^szukasz-pracy-s-([0-9]+)$ index.php?a=page&id=8&lang=pl&bs=$1 [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^regulamin$ index.php?a=page&id=19&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^regulamin-s-1$ regulamin [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^regulamin-s-([0-9]+)$ index.php?a=page&id=19&lang=pl&bs=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule regulamin %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^regulamin$ index.php?a=page&id=19&lang=pl [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^regulamin-s-([0-9]+)$ index.php?a=page&id=19&lang=pl&bs=$1 [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^polityka-prywatnosci$ index.php?a=page&id=20&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^polityka-prywatnosci-s-1$ polityka-prywatnosci [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^polityka-prywatnosci-s-([0-9]+)$ index.php?a=page&id=20&lang=pl&bs=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule polityka-prywatnosci %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^polityka-prywatnosci$ index.php?a=page&id=20&lang=pl [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^polityka-prywatnosci-s-([0-9]+)$ index.php?a=page&id=20&lang=pl&bs=$1 [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^polityka-plikow-cookie$ index.php?a=page&id=24&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^polityka-plikow-cookie-s-1$ polityka-plikow-cookie [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^polityka-plikow-cookie-s-([0-9]+)$ index.php?a=page&id=24&lang=pl&bs=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule polityka-plikow-cookie %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^polityka-plikow-cookie$ index.php?a=page&id=24&lang=pl [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^polityka-plikow-cookie-s-([0-9]+)$ index.php?a=page&id=24&lang=pl&bs=$1 [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^dla-pracodawcy$ index.php?a=page&id=5&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^dla-pracodawcy-s-1$ dla-pracodawcy [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^dla-pracodawcy-s-([0-9]+)$ index.php?a=page&id=5&lang=pl&bs=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule dla-pracodawcy %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^dla-pracodawcy$ index.php?a=page&id=5&lang=pl [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^dla-pracodawcy-s-([0-9]+)$ index.php?a=page&id=5&lang=pl&bs=$1 [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^dla-kandydata$ index.php?a=page&id=21&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^dla-kandydata-s-1$ dla-kandydata [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^dla-kandydata-s-([0-9]+)$ index.php?a=page&id=21&lang=pl&bs=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule dla-kandydata %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^dla-kandydata$ index.php?a=page&id=21&lang=pl [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^dla-kandydata-s-([0-9]+)$ index.php?a=page&id=21&lang=pl&bs=$1 [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^blog-o-pracy$ index.php?a=page&id=6&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^blog-o-pracy-s-1$ blog-o-pracy [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^blog-o-pracy-s-([0-9]+)$ index.php?a=page&id=6&lang=pl&bs=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule blog-o-pracy %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^blog-o-pracy$ index.php?a=page&id=6&lang=pl [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^blog-o-pracy-s-([0-9]+)$ index.php?a=page&id=6&lang=pl&bs=$1 [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^kontakt$ index.php?a=page&id=7&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^kontakt-s-1$ kontakt [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^kontakt-s-([0-9]+)$ index.php?a=page&id=7&lang=pl&bs=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule kontakt %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^kontakt$ index.php?a=page&id=7&lang=pl [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^kontakt-s-([0-9]+)$ index.php?a=page&id=7&lang=pl&bs=$1 [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^jakiej-pracy-szukasz$ index.php?a=page&id=27&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^jakiej-pracy-szukasz-s-1$ jakiej-pracy-szukasz [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^jakiej-pracy-szukasz-s-([0-9]+)$ index.php?a=page&id=27&lang=pl&bs=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule jakiej-pracy-szukasz %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^jakiej-pracy-szukasz$ index.php?a=page&id=27&lang=pl [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^jakiej-pracy-szukasz-s-([0-9]+)$ index.php?a=page&id=27&lang=pl&bs=$1 [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^elektryk-w-norwegii-uprawnienia-dsb-zarobki$ index.php?article=9&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^elektryk-w-norwegii-uprawnienia-dsb-zarobki %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^elektryk-w-norwegii-uprawnienia-dsb-zarobki$ index.php?article=9&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^certyfikaty-vca-scc-i-osc-kluczem-do-dobrzej-platnej-pracy-za-granica$ index.php?article=10&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^certyfikaty-vca-scc-i-osc-kluczem-do-dobrzej-platnej-pracy-za-granica %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^certyfikaty-vca-scc-i-osc-kluczem-do-dobrzej-platnej-pracy-za-granica$ index.php?article=10&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^operator-maszyn-budowlanych-w-norwegii-uznawanie-polskich-uprawnien$ index.php?article=11&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^operator-maszyn-budowlanych-w-norwegii-uznawanie-polskich-uprawnien %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^operator-maszyn-budowlanych-w-norwegii-uznawanie-polskich-uprawnien$ index.php?article=11&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-w-danii-zatwierdzenie-kwalifikacji-zawodowych-przez-dunska-inspekcje-pracy$ index.php?article=12&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-w-danii-zatwierdzenie-kwalifikacji-zawodowych-przez-dunska-inspekcje-pracy %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^praca-w-danii-zatwierdzenie-kwalifikacji-zawodowych-przez-dunska-inspekcje-pracy$ index.php?article=12&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-w-holandii-co-warto-wiedziec-przed-wyjazdem$ index.php?article=13&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-w-holandii-co-warto-wiedziec-przed-wyjazdem %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^praca-w-holandii-co-warto-wiedziec-przed-wyjazdem$ index.php?article=13&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^niemcy-co-nowego-w-2019-roku$ index.php?article=14&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^niemcy-co-nowego-w-2019-roku %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^niemcy-co-nowego-w-2019-roku$ index.php?article=14&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^s1-e109-czy-e106-wszystko-o-ubezpieczeniach-za-granica$ index.php?article=16&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^s1-e109-czy-e106-wszystko-o-ubezpieczeniach-za-granica %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^s1-e109-czy-e106-wszystko-o-ubezpieczeniach-za-granica$ index.php?article=16&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^daj-sie-zlowic-lowcy-glow$ index.php?article=17&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^daj-sie-zlowic-lowcy-glow %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^daj-sie-zlowic-lowcy-glow$ index.php?article=17&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^prawo-pracy-w-holandii-poznaj-swoje-prawa$ index.php?article=18&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^prawo-pracy-w-holandii-poznaj-swoje-prawa %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^prawo-pracy-w-holandii-poznaj-swoje-prawa$ index.php?article=18&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^austria-poczatki$ index.php?article=19&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^austria-poczatki %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^austria-poczatki$ index.php?article=19&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^malta-ukryta-wyspa-szczescia$ index.php?article=20&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^malta-ukryta-wyspa-szczescia %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^malta-ukryta-wyspa-szczescia$ index.php?article=20&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^jak-sprawdzic-przyszlego-pracodawce$ index.php?article=21&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^jak-sprawdzic-przyszlego-pracodawce %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^jak-sprawdzic-przyszlego-pracodawce$ index.php?article=21&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^niemcy-ile-mozna-zarobic$ index.php?article=22&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^niemcy-ile-mozna-zarobic %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^niemcy-ile-mozna-zarobic$ index.php?article=22&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasilek-rodzinny-w-danii$ index.php?article=23&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasilek-rodzinny-w-danii %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^zasilek-rodzinny-w-danii$ index.php?article=23&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasilek-chorobowy-w-szwecji$ index.php?article=24&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasilek-chorobowy-w-szwecji %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^zasilek-chorobowy-w-szwecji$ index.php?article=24&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^a-25-urlop-wypoczynkowy$ index.php?article=25&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^a-25-urlop-wypoczynkowy %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^a-25-urlop-wypoczynkowy$ index.php?article=25&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^a-26-czas-rozliczen-podatkowych-2020$ index.php?article=26&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^a-26-czas-rozliczen-podatkowych-2020 %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^a-26-czas-rozliczen-podatkowych-2020$ index.php?article=26&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^a-27-polskie-500-czy-zagraniczne-zasilki$ index.php?article=27&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^a-27-polskie-500-czy-zagraniczne-zasilki %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^a-27-polskie-500-czy-zagraniczne-zasilki$ index.php?article=27&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-w-dobie-koronawirusa-jak-przygotowac-sie-do-wyjazdu-za-granice$ index.php?article=30&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-w-dobie-koronawirusa-jak-przygotowac-sie-do-wyjazdu-za-granice %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^praca-w-dobie-koronawirusa-jak-przygotowac-sie-do-wyjazdu-za-granice$ index.php?article=30&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^ulga-abolicyjna-w-2021-jak-rozliczyc-sie-z-dochodow-za-granica$ index.php?article=31&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^ulga-abolicyjna-w-2021-jak-rozliczyc-sie-z-dochodow-za-granica %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^ulga-abolicyjna-w-2021-jak-rozliczyc-sie-z-dochodow-za-granica$ index.php?article=31&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-na-produkcji-za-granica$ index.php?article=32&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-na-produkcji-za-granica %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^praca-na-produkcji-za-granica$ index.php?article=32&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasady-bhp-ktore-musisz-znac$ index.php?article=33&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasady-bhp-ktore-musisz-znac %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^zasady-bhp-ktore-musisz-znac$ index.php?article=33&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^mowa-ciala-podczas-rozmowy-online-o-czym-musisz-wiedziec$ index.php?article=34&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^mowa-ciala-podczas-rozmowy-online-o-czym-musisz-wiedziec %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^mowa-ciala-podczas-rozmowy-online-o-czym-musisz-wiedziec$ index.php?article=34&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-sezonowa-gdzie-szukac$ index.php?article=35&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-sezonowa-gdzie-szukac %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^praca-sezonowa-gdzie-szukac$ index.php?article=35&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-w-niemczech-dla-par$ index.php?article=36&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-w-niemczech-dla-par %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^praca-w-niemczech-dla-par$ index.php?article=36&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasilek-rodzinny-w-niemczech-kindergeld-wszystko-co-musisz-wiedziec$ index.php?article=37&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasilek-rodzinny-w-niemczech-kindergeld-wszystko-co-musisz-wiedziec %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^zasilek-rodzinny-w-niemczech-kindergeld-wszystko-co-musisz-wiedziec$ index.php?article=37&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^jak-sie-przebranzowic-porady-ulatwiajace-zmiane-zawodu$ index.php?article=38&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^jak-sie-przebranzowic-porady-ulatwiajace-zmiane-zawodu %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^jak-sie-przebranzowic-porady-ulatwiajace-zmiane-zawodu$ index.php?article=38&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^kiedy-zlozyc-wypowiedzenie-umowy-o-prace$ index.php?article=39&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^kiedy-zlozyc-wypowiedzenie-umowy-o-prace %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^kiedy-zlozyc-wypowiedzenie-umowy-o-prace$ index.php?article=39&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasilek-chorobowy-w-niemczech$ index.php?article=40&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasilek-chorobowy-w-niemczech %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^zasilek-chorobowy-w-niemczech$ index.php?article=40&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasilek-rodzinny-w-norwegii$ index.php?article=41&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^zasilek-rodzinny-w-norwegii %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^zasilek-rodzinny-w-norwegii$ index.php?article=41&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-jako-opiekunka-osob-starszych-w-wielkiej-brytanii$ index.php?article=42&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^praca-jako-opiekunka-osob-starszych-w-wielkiej-brytanii %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^praca-jako-opiekunka-osob-starszych-w-wielkiej-brytanii$ index.php?article=42&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^na-czym-polega-praca-magazyniera-obowiazki-i-zakres-zadan$ index.php?article=43&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^na-czym-polega-praca-magazyniera-obowiazki-i-zakres-zadan %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^na-czym-polega-praca-magazyniera-obowiazki-i-zakres-zadan$ index.php?article=43&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^ubezpieczenie-do-pracy-za-granica-co-powinienes-wiedziec$ index.php?article=44&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^ubezpieczenie-do-pracy-za-granica-co-powinienes-wiedziec %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^ubezpieczenie-do-pracy-za-granica-co-powinienes-wiedziec$ index.php?article=44&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^dania-prawo-pracy$ index.php?article=45&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^dania-prawo-pracy %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^dania-prawo-pracy$ index.php?article=45&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^jak-rozliczyc-podatek-w-holandii-zmiany-podatkowe-w-2023-roku$ index.php?article=46&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^jak-rozliczyc-podatek-w-holandii-zmiany-podatkowe-w-2023-roku %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^jak-rozliczyc-podatek-w-holandii-zmiany-podatkowe-w-2023-roku$ index.php?article=46&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^francja-prawo-pracy$ index.php?article=47&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^francja-prawo-pracy %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^francja-prawo-pracy$ index.php?article=47&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)(utm_source|gclid)=[^&]+(&.*)?
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^a-48-agencja-posrednictwa-pracy-czy-agencja-pracy-tymczasowej$ index.php?article=48&lang=pl&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteCond %{REQUEST_METHOD} !=POST
|
||||||
|
RewriteRule ^a-48-agencja-posrednictwa-pracy-czy-agencja-pracy-tymczasowej %{REQUEST_URI}? [R=301,L]
|
||||||
|
RewriteCond %{HTTP_HOST} ^(www\.)?globelus.pl$
|
||||||
|
RewriteRule ^a-48-agencja-posrednictwa-pracy-czy-agencja-pracy-tymczasowej$ index.php?article=48&lang=pl [L]
|
||||||
|
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule ^(.*)/$ /$1 [L,R]
|
||||||
|
|
||||||
|
#ogólne
|
||||||
|
RewriteRule ^rejestracja$ index.php?module=globelusUser&action=register [L]
|
||||||
|
RewriteRule ^logowanie$ index.php?module=globelusUser&action=login [L]
|
||||||
|
RewriteRule ^odzyskiwanie-hasla$ index.php?module=globelusUser&action=recover_password [L]
|
||||||
|
RewriteRule ^ponowna-aktywacja/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusUser&action=resend_activation_mail&hash=$1 [L]
|
||||||
|
RewriteRule ^login-as/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusUser&action=login_as&hash=$1&%{QUERY_STRING} [L]
|
||||||
|
|
||||||
|
#baza ogłoszeń
|
||||||
|
RewriteCond %{QUERY_STRING} =""
|
||||||
|
RewriteRule ^oferty-pracy$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr_reset=true&%{QUERY_STRING} [L]
|
||||||
|
RewriteCond %{QUERY_STRING} !=""
|
||||||
|
RewriteRule ^oferty-pracy$ index.php?module=globelusAdverts&action=adverts_list&cp=1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferta/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusAdverts&action=advert_details&advert_id=$1 [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&cc_name=$1&cc_name2=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/z-podanym-wynagrodzeniem$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&sl=on&cc_name=$1&cc_name2=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/z-podanym-wynagrodzeniem/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&sl=on&cc_name=$1&cc_name2=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/bez-jezyka$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&wl=on&cc_name=$1&cc_name2=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/bez-jezyka/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&wl=on&cc_name=$1&cc_name2=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/bez-doswiadczenia$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&we=on&cc_name=$1&cc_name2=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/bez-doswiadczenia/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&we=on&cc_name=$1&cc_name2=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/dla-par$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&fc=on&cc_name=$1&cc_name2=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/dla-par/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&fc=on&cc_name=$1&cc_name2=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/od-zaraz$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&fn=on&cc_name=$1&cc_name2=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/od-zaraz/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&fn=on&cc_name=$1&cc_name2=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/cala-polska$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=1&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/cala-polska/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=1&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/dolnoslaskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=2&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/dolnoslaskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=2&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/kujawsko-pomorskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=3&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/kujawsko-pomorskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=3&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/lubelskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=4&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/lubelskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=4&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/lubuskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=5&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/lubuskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=5&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/lodzkie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=6&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/lodzkie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=6&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/malopolskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=7&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/malopolskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=7&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/mazowieckie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=8&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/mazowieckie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=8&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/opolskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=9&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/opolskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=9&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/podkarpackie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=10&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/podkarpackie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=10&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/podlaskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=11&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/podlaskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=11&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/pomorskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=12&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/pomorskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=12&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/slaskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=13&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/slaskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=13&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/swietokrzyskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=14&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/swietokrzyskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=14&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/warminsko-mazurskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=15&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/warminsko-mazurskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=15&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/wielkopolskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=16&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/wielkopolskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=16&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/zachodniopomorskie$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&v[]=17&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/zachodniopomorskie/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&v[]=17&cc_name=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/([a-zA-Z-]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=1&filtr=t&cc_name=$1&cc_name2=$2&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/([a-zA-Z-]*)/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$3&filtr=t&cc_name=$1&cc_name2=$2&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^oferty-pracy/([a-zA-Z-]*)/([0-9]*)(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=$2&filtr=t&cc_name=$1&cc_name2=$1%{QUERY_STRING} [L]
|
||||||
|
|
||||||
|
#lista pracodawców
|
||||||
|
RewriteRule ^pracodawcy(|/)$ index.php?module=globelusFirms&action=firms_list&cp=1 [L]
|
||||||
|
RewriteRule ^pracodawcy/([a-z]*)(|/)$ index.php?module=globelusFirms&action=firms_list&cp=1&letter=$1 [L]
|
||||||
|
RewriteRule ^pracodawcy/([a-z]*)/([0-9]*)(|/)$ index.php?module=globelusFirms&action=firms_list&cp=$2&letter=$1 [L]
|
||||||
|
RewriteRule ^pracodawcy/([0-9]*)(|/)$ index.php?module=globelusFirms&action=firms_list&cp=$1 [L]
|
||||||
|
RewriteRule ^pracodawca/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusFirms&action=firm_profile&user_id=$1 [L]
|
||||||
|
|
||||||
|
#pobieranie cv
|
||||||
|
RewriteRule ^cv/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusCandidates&action=cv_download&user_id=$1&token=$2 [L]
|
||||||
|
RewriteRule ^cv-tmp/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusCandidates&action=cv_tmp_download&answer_id=$1&token=$2 [L]
|
||||||
|
|
||||||
|
#avatary
|
||||||
|
RewriteRule ^avatar/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusCandidates&action=avatar&user_id=$1&token=$2 [L]
|
||||||
|
|
||||||
|
#loga
|
||||||
|
RewriteRule ^logo/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusFirms&action=logo&user_id=$1&token=$2 [L]
|
||||||
|
RewriteRule ^img_header/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusFirms&action=img_header&user_id=$1&token=$2 [L]
|
||||||
|
RewriteRule ^img_bottom/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusFirms&action=img_bottom&user_id=$1&token=$2 [L]
|
||||||
|
RewriteRule ^advert_add_img_top/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusFirms&action=advert_add_img_top&advert_id=$1&token=$2 [L]
|
||||||
|
RewriteRule ^advert_add_img_bottom/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusFirms&action=advert_add_img_bottom&advert_id=$1&token=$2 [L]
|
||||||
|
|
||||||
|
#baza cv
|
||||||
|
RewriteRule ^baza-cv(|/)$ index.php?module=globelusCv&action=cv_list&cp=1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^baza-cv/([0-9]*)(|/)$ index.php?module=globelusCv&action=cv_list&cp=$1&%{QUERY_STRING} [L]
|
||||||
|
RewriteRule ^kandydat/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusCv&action=candidate_profile&user_id=$1 [L]
|
||||||
|
RewriteRule ^proponowany-kandydat/([0-9]*)/([a-zA-Z0-9-]*)(|/)$ index.php?module=globelusCv&action=proposed_candidate_profile&user_id=$1 [L]
|
||||||
|
|
||||||
|
#panel kandydata
|
||||||
|
RewriteRule ^panel-kandydata/profil(|/)$ index.php?module=globelusCandidates&action=profile_preview [L]
|
||||||
|
RewriteRule ^panel-kandydata/odswiez(|/)$ index.php?module=globelusCandidates&action=profile_refresh [L]
|
||||||
|
RewriteRule ^panel-kandydata/przedluz(|/)$ index.php?module=globelusCandidates&action=profile_extend [L]
|
||||||
|
RewriteRule ^panel-kandydata/wylacz-profil(|/)$ index.php?module=globelusCandidates&action=profile_disable [L]
|
||||||
|
RewriteRule ^panel-kandydata/publikuj-profil(|/)$ index.php?module=globelusCandidates&action=profile_enable [L]
|
||||||
|
RewriteRule ^panel-kandydata/ustawienia-konta(|/)$ index.php?module=globelusCandidates&action=profile_settings [L]
|
||||||
|
RewriteRule ^panel-kandydata/edycja-profilu(|/)$ index.php?module=globelusCandidates&action=profile_edit [L]
|
||||||
|
RewriteRule ^panel-kandydata/wyslane-aplikacje(|/)$ index.php?module=globelusCandidates&action=answers_list [L]
|
||||||
|
RewriteRule ^panel-kandydata/obserwowane-oferty(|/)$ index.php?module=globelusCandidates&action=adverts_list [L]
|
||||||
|
RewriteRule ^panel-kandydata(|/)$ panel-kandydata/profil [L,R=301]
|
||||||
|
|
||||||
|
#panel pracodawcy
|
||||||
|
RewriteRule ^panel-pracodawcy/profil(|/)$ index.php?module=globelusFirms&action=profile_preview [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/ustawienia-konta(|/)$ index.php?module=globelusFirms&action=profile_settings [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/edycja-profilu(|/)$ index.php?module=globelusFirms&action=profile_edit [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/ogloszenia(|/)$ index.php?module=globelusFirms&action=adverts_list [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/ogloszenia/alert_promotion(|/)$ index.php?module=globelusFirms&action=adverts_list&alert_promotion=true [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/dodaj-ogloszenie(|/)$ index.php?module=globelusFirms&action=advert_add [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/edytuj-ogloszenie/([0-9]*)$ index.php?module=globelusFirms&action=advert_edit&advert_id=$1 [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/odpowiedzi/([0-9]*)$ index.php?module=globelusFirms&action=advert_answers&advert_id=$1 [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/odpowiedzi-na-ogloszenia(|/)$ index.php?module=globelusFirms&action=answers [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/obserwowani-kandydaci(|/)$ index.php?module=globelusFirms&action=followed_candidates [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/proponowani-kandydaci(|/)$ index.php?module=globelusFirms&action=proposed_candidates [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/przedluz-ogloszenie/([0-9]*)(|/)$ index.php?module=globelusFirms&action=advert_extend&advert_id=$1 [L]
|
||||||
|
RewriteRule ^panel-pracodawcy(|/)$ panel-pracodawcy/profil [L,R=301]
|
||||||
|
RewriteRule ^panel-pracodawcy/odswiez-ogloszenie/([0-9]*)(|/)$ index.php?module=globelusFirms&action=advert_refresh&advert_id=$1 [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/zakup-punktow(|/)$ index.php?module=globelusFirms&action=buy_points [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/zakup-punktow/pakiet=([0-9]*)(|/)$ index.php?module=globelusFirms&action=create_order&package=$1 [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/zakup-punktow/status(|/)$ index.php?module=globelusFirms&action=set_order_status [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/zakup-punktow/platnosc-prawidlowa(|/)$ index.php?module=globelusFirms&action=payment_success [L]
|
||||||
|
RewriteRule ^panel-pracodawcy/zakup-punktow/platnosc-nieprawidlowa(|/)$ index.php?module=globelusFirms&action=payment_error [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]
|
||||||
17
.vscode/ftp-kr.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"host": "s33.mydevil.net",
|
||||||
|
"username": "f1004_projectpro",
|
||||||
|
"password": "4-nB+ii5H4u1q55tpiVA[0v@S%xchU",
|
||||||
|
"remotePath": "/domains/globelus.pl/public_html",
|
||||||
|
"protocol": "ftp",
|
||||||
|
"port": 0,
|
||||||
|
"fileNameEncoding": "utf8",
|
||||||
|
"autoUpload": true,
|
||||||
|
"autoDelete": false,
|
||||||
|
"autoDownload": false,
|
||||||
|
"ignoreRemoteModification": true,
|
||||||
|
"ignore": [
|
||||||
|
".git",
|
||||||
|
"/.vscode"
|
||||||
|
]
|
||||||
|
}
|
||||||
17
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"liveSassCompile.settings.formats": [
|
||||||
|
{
|
||||||
|
"format": "compressed",
|
||||||
|
"extensionName": ".css",
|
||||||
|
"savePath": "~/../style/",
|
||||||
|
"savePathSegmentKeys": null,
|
||||||
|
"savePathReplaceSegmentsWith": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"liveSassCompile.settings.generateMap": true,
|
||||||
|
"liveSassCompile.settings.autoprefix": "defaults",
|
||||||
|
"liveSassCompile.settings.watchOnLaunch": true,
|
||||||
|
"liveSassCompile.settings.includeItems": [
|
||||||
|
"/layout/style-scss/style.scss",
|
||||||
|
]
|
||||||
|
}
|
||||||
12
.vscode/sftp.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "s33.mydevil.net",
|
||||||
|
"host": "s33.mydevil.net",
|
||||||
|
"protocol": "ftp",
|
||||||
|
"port": 21,
|
||||||
|
"username": "f1004_projectpro",
|
||||||
|
"password": "4-nB+ii5H4u1q55tpiVA[0v@S%xchU",
|
||||||
|
"remotePath": "/domains/globelus.pl/public_html",
|
||||||
|
"uploadOnSave": false,
|
||||||
|
"useTempFile": false,
|
||||||
|
"openSsh": false
|
||||||
|
}
|
||||||
50
404.html
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Błąd 404</title>
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
font-family:Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
.wrap {
|
||||||
|
width: 1000px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
width: 300px;
|
||||||
|
position: absolute;
|
||||||
|
top: 25%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
#p404 {
|
||||||
|
font-size: 180px;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
#btn a {
|
||||||
|
color: #eee;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
background: #5b7fb1;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#btn a:hover {
|
||||||
|
background: #2E5386;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrap">
|
||||||
|
<div class="logo">
|
||||||
|
<p id="p404">404</p>
|
||||||
|
<p>Przykro nam, żądana strona nie istnieje</p>
|
||||||
|
<p id="btn"><a href="/">Wróć do strony głównej</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
38
admin/ajax.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?
|
||||||
|
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT );
|
||||||
|
function __autoload_my_classes( $classname )
|
||||||
|
{
|
||||||
|
$q = explode( '\\' , $classname );
|
||||||
|
$c = array_pop( $q );
|
||||||
|
$f = '../autoload/' . implode( '/' , $q ) . '/class.' . $c . '.php';
|
||||||
|
if ( $c == 'Savant3' )
|
||||||
|
{
|
||||||
|
require_once( '../autoload/Savant3.php' );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if ( file_exists( $f ) )
|
||||||
|
require_once( $f );
|
||||||
|
}
|
||||||
|
spl_autoload_register( '__autoload_my_classes' );
|
||||||
|
|
||||||
|
require_once '../config.php';
|
||||||
|
require_once '../libraries/medoo/medoo.php';
|
||||||
|
require_once '../libraries/grid/config.php';
|
||||||
|
date_default_timezone_set('Europe/Warsaw');
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
$mdb = new medoo( [
|
||||||
|
'database_type' => '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';
|
||||||
|
?>
|
||||||
54
admin/ajax/articles.php
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
$a = \S::get( 'a' );
|
||||||
|
|
||||||
|
if ( $a == 'article_image_delete' )
|
||||||
|
{
|
||||||
|
$response = [ 'status' => 'error', 'msg' => 'Podczas usuwania zdjecia wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||||
|
|
||||||
|
if ( \admin\factory\Articles::delete_img( \S::get( 'image_id' ) ) )
|
||||||
|
$response = [ 'status' => 'ok' ];
|
||||||
|
|
||||||
|
echo json_encode( $response );
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $a == 'article_file_delete' )
|
||||||
|
{
|
||||||
|
$response = [ 'status' => 'error', 'msg' => 'Podczas usuwania załącznika wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||||
|
|
||||||
|
if ( \admin\factory\Articles::delete_file( \S::get( 'file_id' ) ) )
|
||||||
|
$response = [ 'status' => 'ok' ];
|
||||||
|
|
||||||
|
echo json_encode( $response );
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $a == 'article_image_alt_change' )
|
||||||
|
{
|
||||||
|
$response = [ 'status' => 'error', 'msg' => 'Podczas zmiany atrybutu alt zdjęcia wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||||
|
|
||||||
|
if ( \admin\factory\Articles::image_alt_change( \S::get( 'image_id' ), \S::get( 'image_alt' ) ) )
|
||||||
|
$response = [ 'status' => 'ok' ];
|
||||||
|
|
||||||
|
echo json_encode( $response );
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $a == 'article_file_name_change' )
|
||||||
|
{
|
||||||
|
$response = [ 'status' => 'error', 'msg' => 'Podczas zmiany nazwy załącznika wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||||
|
|
||||||
|
if ( \admin\factory\Articles::file_name_change( \S::get( 'file_id' ), \S::get( 'file_name' ) ) )
|
||||||
|
$response = [ 'status' => 'ok' ];
|
||||||
|
|
||||||
|
echo json_encode( $response );
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $a == 'google_url_preview_article' )
|
||||||
|
{
|
||||||
|
if ( \S::get( 'article_id' ) )
|
||||||
|
echo $_SERVER['SERVER_NAME'] . '/a-' . \S::get( 'article_id' ) . '-' . \S::seo( \S::get( 'title' ) );
|
||||||
|
else
|
||||||
|
echo $_SERVER['SERVER_NAME'] . '/a-' . ( \S::max_db_value( 'pp_articles', 'id' ) + 1 ) . '-' . \S::seo( \S::get( 'title' ) );
|
||||||
|
}
|
||||||
16
admin/ajax/newsletter.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
$a = \S::get( 'a' );
|
||||||
|
|
||||||
|
if ( $a == 'newsletter-preview' )
|
||||||
|
{
|
||||||
|
$dates = explode( ' - ', \S::get( 'dates' ) );
|
||||||
|
$template = \S::get('template');
|
||||||
|
|
||||||
|
echo \admin\view\Newsletter::preview(
|
||||||
|
\admin\factory\Articles::articles_by_date_add( $dates[0], $dates[1] ),
|
||||||
|
\admin\factory\Settings::settings_details(),
|
||||||
|
\admin\factory\Newsletter::email_template_detalis( $template ),
|
||||||
|
\S::get( 'dates' )
|
||||||
|
);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
91
admin/ajax/pages.php
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$a = \S::get('a');
|
||||||
|
|
||||||
|
if ($a == 'save_articles_order') {
|
||||||
|
$response = ['status' => 'error', 'msg' => 'Podczas zapisywania kolejności wyświetlania artykułów wystąpił błąd. Proszę spróbować ponownie.'];
|
||||||
|
|
||||||
|
if (\admin\factory\Pages::save_articles_order(\S::get('page_id'), \S::get('articles')))
|
||||||
|
$response = ['status' => 'ok'];
|
||||||
|
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($a == 'save_pages_order') {
|
||||||
|
$response = ['status' => 'error', 'msg' => 'Podczas zapisywania kolejności stron wystąpił błąd. Proszę spróbować ponownie.'];
|
||||||
|
|
||||||
|
if (\admin\factory\Pages::save_pages_order(\S::get('menu_id'), \S::get('pages')))
|
||||||
|
$response = ['status' => 'ok'];
|
||||||
|
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($a == 'generate_seo_link') {
|
||||||
|
$response = ['status' => 'error', 'msg' => 'Podczas generowania pola "seo link" wystąpił błąd. Proszę spróbować ponownie.'];
|
||||||
|
|
||||||
|
if ($seo_link = \admin\factory\Pages::generate_seo_link(\S::get('title'), \S::get('page_id'), \S::get('article_id'), \S::get('lang'), \S::get('pid')))
|
||||||
|
$response = ['status' => 'ok', 'seo_link' => $seo_link];
|
||||||
|
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($a == 'cookie_menus') {
|
||||||
|
$array = unserialize($_COOKIE['cookie_menus']);
|
||||||
|
|
||||||
|
if ($array[\S::get('menu_id')] == 0)
|
||||||
|
$array[\S::get('menu_id')] = 1;
|
||||||
|
else
|
||||||
|
$array[\S::get('menu_id')] = 0;
|
||||||
|
|
||||||
|
$array = serialize($array);
|
||||||
|
|
||||||
|
setcookie('cookie_menus', $array, time() + 3600 * 24 * 365);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($a == 'cookie_pages') {
|
||||||
|
$array = unserialize($_COOKIE['cookie_pages']);
|
||||||
|
|
||||||
|
if ($array[\S::get('page_id')] == 0)
|
||||||
|
$array[\S::get('page_id')] = 1;
|
||||||
|
else
|
||||||
|
$array[\S::get('page_id')] = 0;
|
||||||
|
|
||||||
|
$array = serialize($array);
|
||||||
|
|
||||||
|
setcookie('cookie_pages', $array, time() + 3600 * 24 * 365);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $a == 'google_url_preview' )
|
||||||
|
{
|
||||||
|
$settings = \front\factory\Settings::settings_details();
|
||||||
|
$structure = $settings['links_structure'];
|
||||||
|
|
||||||
|
if ( $structure )
|
||||||
|
{
|
||||||
|
if ( \S::get( 'page_id' ) )
|
||||||
|
{
|
||||||
|
$seo_link = \admin\factory\Pages::google_url_preview(\S::get('page_id'), \S::get('title'), \S::get('lang_id'), \S::get('pid'), 0, \S::get('seo_link'));
|
||||||
|
echo $seo_link;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$seo_link = \admin\factory\Pages::google_url_preview(0, \S::get('title'), \S::get('lang_id'), \S::get('pid'), \S::max_db_value('pp_pages', 'id') + 1, \S::get('seo_link'));
|
||||||
|
echo $seo_link;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( \S::get( 'seo_link' ) )
|
||||||
|
echo \S::get( 'seo_link' );
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( \S::get( 'page_id' ) )
|
||||||
|
echo $prefix . 's-' . \S::get('page_id') . '-' . \S::seo(\S::get('title'));
|
||||||
|
else
|
||||||
|
echo $prefix . 's-' . ( \S::max_db_value('pp_pages', 'id') + 1 ) . '-' . \S::seo(\S::get('title'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
admin/ajax/users.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
$a = \S::get( 'a' );
|
||||||
|
|
||||||
|
if ( $a == 'check_login' )
|
||||||
|
{
|
||||||
|
$response = \admin\factory\Users::check_login( \S::get( 'login' ), \S::get( 'user_id' ) );
|
||||||
|
echo json_encode( $response );
|
||||||
|
exit;
|
||||||
|
}
|
||||||
556
admin/css/custom.css
Normal file
@@ -0,0 +1,556 @@
|
|||||||
|
body.external-page #content .admin-form {
|
||||||
|
max-width: 450px;
|
||||||
|
}
|
||||||
|
.sidebar-menu > li > a > span:nth-child(2) {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
ol.sortable, ol.sortable ol {
|
||||||
|
margin: 0 0 0 25px;
|
||||||
|
padding: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
ol.sortable {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
ol.sortable, ol.sortable *, ol.sortable *:before, ol.sortable *:after {
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
.sortable li {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.sortable li div.content {
|
||||||
|
color: #454545;
|
||||||
|
cursor: move;
|
||||||
|
height: 45px;
|
||||||
|
line-height: 45px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 10px;
|
||||||
|
border-bottom: 1px solid #e1e1e1;
|
||||||
|
}
|
||||||
|
.sortable li div.content.text-danger {
|
||||||
|
color: #e9573f !important;
|
||||||
|
}
|
||||||
|
.sortable li.sort-branch div {
|
||||||
|
color: #383838;
|
||||||
|
}
|
||||||
|
.sort-leaf .disclose {
|
||||||
|
content: "- ";
|
||||||
|
text-indent: -3000px;
|
||||||
|
background-image: url( "/libraries/jquery-nested-sortable/skin-vista/icons.gif" );
|
||||||
|
background-position: -16px -64px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
display: inline-block;
|
||||||
|
height: 16px;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 16px;
|
||||||
|
margin: 16px 5px 0 1px;
|
||||||
|
}
|
||||||
|
li.sort-collapsed.sort-hover div {
|
||||||
|
border-color: #999999;
|
||||||
|
}
|
||||||
|
.disclose {
|
||||||
|
cursor: pointer;
|
||||||
|
width: 20px;
|
||||||
|
display: none;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.sortable li.sort-collapsed > ol {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.sortable li.sort-branch > div > .disclose {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
.sortable li.sort-collapsed > div > .disclose > span:before {
|
||||||
|
display: inline-block;
|
||||||
|
font-family: FontAwesome;
|
||||||
|
font-size: 10px;
|
||||||
|
content: "\f054";
|
||||||
|
height: 25px;
|
||||||
|
width: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
border-radius: 13px;
|
||||||
|
background: #eeeeee;
|
||||||
|
color: #3bafda;
|
||||||
|
border: 1px solid #3bafda;
|
||||||
|
}
|
||||||
|
.sortable li.sort-collapsed > div > .disclose:hover > span:before, .sortable li.sort-expanded > div > .disclose:hover > span:before {
|
||||||
|
background: #3bafda;
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
.sortable li.sort-expanded > div > .disclose > span:before {
|
||||||
|
display: inline-block;
|
||||||
|
font-family: FontAwesome;
|
||||||
|
font-size: 10px;
|
||||||
|
content: "\f078";
|
||||||
|
height: 25px;
|
||||||
|
width: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
border-radius: 13px;
|
||||||
|
background: #eeeeee;
|
||||||
|
color: #3bafda;
|
||||||
|
border: 1px solid #3bafda;
|
||||||
|
}
|
||||||
|
.placeholder {
|
||||||
|
outline: 1px dashed #4183C4;
|
||||||
|
}
|
||||||
|
.sort-error {
|
||||||
|
background: #fbe3e4;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
.menu_sortable .btn-group {
|
||||||
|
margin-top: 7px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.menu_sortable div:hover .btn-group {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.menu_sortable div:hover {
|
||||||
|
background: #f0f0f0;
|
||||||
|
}
|
||||||
|
.resp-vtabs::after {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.resp-tab-content {
|
||||||
|
padding: 25px 15px;
|
||||||
|
}
|
||||||
|
.resp-tab-content .resp-tab-content {
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
.resp-tabs-list li, .resp-tab-active {
|
||||||
|
padding: 8px 20px !important;
|
||||||
|
}
|
||||||
|
.resp-tab-content .resp-tabs-list {
|
||||||
|
border-bottom: 0;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
background: #f1f1f1;
|
||||||
|
}
|
||||||
|
.resp-tab-content .resp-tabs-list li {
|
||||||
|
border-left: 0 !important;
|
||||||
|
border-right: 0 !important;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.resp-tab-content .resp-tabs-list::after {
|
||||||
|
clear: both;
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.resp-tab-content .resp-tab-active {
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
.resp-tab-content .form-group {
|
||||||
|
margin: 0 0 15px 0;
|
||||||
|
}
|
||||||
|
.input-group span.btn-info {
|
||||||
|
border-color: rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
#overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 1300;
|
||||||
|
background: rgba( 0, 0, 0, 0.2 );
|
||||||
|
display: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
#g-row-limit {
|
||||||
|
width: auto;
|
||||||
|
display: inline-block;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
padding: 4px 12px;
|
||||||
|
}
|
||||||
|
#images-uploader, #files-uploader {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
#images-uploader, #images-uploader *, #files-uploader, #files-uploader * {
|
||||||
|
box-sizing: content-box !important;
|
||||||
|
}
|
||||||
|
#images-list {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
#images-list li {
|
||||||
|
background: #FFF;
|
||||||
|
text-align: center;
|
||||||
|
display: block;
|
||||||
|
height: 165px;
|
||||||
|
margin: 5px 5px 10px 5px;
|
||||||
|
vertical-align: middle;
|
||||||
|
float: left;
|
||||||
|
width: calc( 25% - 10px );
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#images-list li.sortable-chosen {
|
||||||
|
-webkit-box-shadow: -1px 1px 6px rgba( 0, 0, 0, .75 );
|
||||||
|
-moz-box-shadow: -1px 1px 6px rgba( 0, 0, 0, .75 );
|
||||||
|
box-shadow: -1px 1px 6px rgba( 0, 0, 0, .75 );
|
||||||
|
}
|
||||||
|
#images-list li .article-image {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
#images-list li .image-alt {
|
||||||
|
padding: 5px;
|
||||||
|
height: 30px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
#images-list li .article_image_delete {
|
||||||
|
border: 0;
|
||||||
|
padding: 13px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
#images-list li .article_image_delete i {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
#images-list li .image-alt {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10px;
|
||||||
|
border: 0;
|
||||||
|
background: rgba( 0, 0, 0, .2 );
|
||||||
|
text-align: center;
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
#images-list li .image-alt::placeholder {
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
#images-list li:hover .article-image-edit, #images-list li.pending .article-image-edit {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.article-image-edit {
|
||||||
|
background: rgba( 255, 255, 255, .8 );
|
||||||
|
position: absolute;
|
||||||
|
height: 100%;
|
||||||
|
width: 150px;
|
||||||
|
cursor: pointer;
|
||||||
|
line-height: 168px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.article-image-edit i {
|
||||||
|
font-size: 28px;
|
||||||
|
color: #cc0000;
|
||||||
|
}
|
||||||
|
.article-image-edit img {
|
||||||
|
height: 50px;
|
||||||
|
position: relative;
|
||||||
|
top: 12px;
|
||||||
|
}
|
||||||
|
#files-list {
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#files-list li {
|
||||||
|
float: left;
|
||||||
|
margin: 5px 7px;
|
||||||
|
}
|
||||||
|
#files-list li .article_file_delete {
|
||||||
|
border-color: rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
#elfinder * {
|
||||||
|
box-sizing: content-box !important;
|
||||||
|
}
|
||||||
|
#elfinder {
|
||||||
|
background: #EBEBEB;
|
||||||
|
}
|
||||||
|
.elfinder-button {
|
||||||
|
background: #FFF !important;
|
||||||
|
}
|
||||||
|
.elfinder-cwd, .elfinder .elfinder-navbar, .std42-dialog .ui-dialog-content, .elfinder-contextmenu .elfinder-contextmenu-item span {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.elfinder-contextmenu-item {
|
||||||
|
background: #FFF;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.elfinder-cwd-view-icons .elfinder-cwd-filename {
|
||||||
|
-webkit-border-radius: 0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
.elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover, .elfinder-cwd table td.ui-state-hover, .elfinder-button-menu .ui-state-hover {
|
||||||
|
background: #2c373d;
|
||||||
|
}
|
||||||
|
.elfinder-cwd-filename input[type="text"] {
|
||||||
|
border: 0px !important;
|
||||||
|
padding: 0px !important;
|
||||||
|
}
|
||||||
|
#elfinder {
|
||||||
|
height: 750px !important;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.elfinder-cwd table tr:nth-child(2n+1) {
|
||||||
|
background: #D3D3D3;
|
||||||
|
}
|
||||||
|
.elfinder-cwd table tr {
|
||||||
|
border-top: 1px solid #CCC;
|
||||||
|
}
|
||||||
|
.elfinder-cwd table tr td {
|
||||||
|
padding: 5px 12px !important;
|
||||||
|
}
|
||||||
|
.elfinder-workzone {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
#elfinder .ui-dialog {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
position: absolute !important;
|
||||||
|
}
|
||||||
|
.navbar-branding .navbar-brand {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.navbar-branding .navbar-version {
|
||||||
|
opacity: .5;
|
||||||
|
font-size: 12px;
|
||||||
|
height: 60px;
|
||||||
|
line-height: 60px;
|
||||||
|
padding: 0 15px;
|
||||||
|
color: #666;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.navbar .label {
|
||||||
|
position: relative;
|
||||||
|
top: 15px;
|
||||||
|
float: left;
|
||||||
|
height: 28px;
|
||||||
|
}
|
||||||
|
body.sb-top .navbar-branding {
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
.flags {
|
||||||
|
margin: -4px 0 0 20px !important;
|
||||||
|
background: none;
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
.flags:hover {
|
||||||
|
border: 0px !important;
|
||||||
|
background: none !important;
|
||||||
|
}
|
||||||
|
.flags img {
|
||||||
|
height: 10px;
|
||||||
|
margin-right: 5px;
|
||||||
|
opacity: .4;
|
||||||
|
}
|
||||||
|
.CodeMirror {
|
||||||
|
height: 500px !important;
|
||||||
|
}
|
||||||
|
.nav > li > a {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
#newsletter-preview {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
div.jqi .jqititle {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
#google-preview {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.google-title {
|
||||||
|
color: #1a0dab;
|
||||||
|
font-family: arial,sans-serif;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 21.6px;
|
||||||
|
width: 600px;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.google-url {
|
||||||
|
color: rgb(0, 102, 33);
|
||||||
|
font-family: arial,sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 16px;
|
||||||
|
width: 600px;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.google-description {
|
||||||
|
color: rgb(84, 84, 84);
|
||||||
|
font-family: arial,sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 18.2px;
|
||||||
|
width: 600px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.sidebar-left-content {
|
||||||
|
background: #114975;
|
||||||
|
}
|
||||||
|
.sidebar-menu li.disable_menu {
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: .3;
|
||||||
|
}
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li > a {
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
body.sb-top.sb-top-sm #sidebar_left .sidebar-menu > li > a > span:nth-child(1) {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu li > a > span.caret {
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li.active > a,
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li:hover > a,
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li > a.menu-open,
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li > a:hover,
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li > a:focus {
|
||||||
|
background: #FFF;
|
||||||
|
color: #114975;
|
||||||
|
}
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu liactive > a > span.caret,
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li:hover > a > span.caret,
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li > a.menu-open > span.caret,
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li > a:hover > span.caret,
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li > a:focus > span.caret {
|
||||||
|
color: #114975;
|
||||||
|
}
|
||||||
|
.sidebar-menu > li > ul {
|
||||||
|
background: #FFF;
|
||||||
|
-webkit-box-shadow: -1px 1px 6px rgba(0,0,0,0.2);
|
||||||
|
-moz-box-shadow: -1px 1px 6px rgba(0,0,0,0.2);
|
||||||
|
box-shadow: -1px 1px 6px rgba(0,0,0,0.2);
|
||||||
|
}
|
||||||
|
.sidebar-menu > li > ul > li > a {
|
||||||
|
color: #114975;
|
||||||
|
border-bottom: 1px solid #f3f3f3;
|
||||||
|
}
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li > ul > li > a.menu-open:after, body.sb-top #sidebar_left .sidebar-menu > li > ul > li.active > a:after, body.sb-top #sidebar_left .sidebar-menu > li > ul > li:hover > a:after, body.sb-top #sidebar_left .sidebar-menu > li > ul > li:focus > a:after {
|
||||||
|
width: 5px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.sidebar-menu > li > ul > li > a:hover, .sidebar-menu > li > ul > li > a:focus {
|
||||||
|
color: #114975;
|
||||||
|
}
|
||||||
|
.sidebar-menu > li > ul > li:hover > a:after, .sidebar-menu > li > ul > li:focus > a:after {
|
||||||
|
background: #70ca63;
|
||||||
|
}
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li > ul {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
.progress-box {
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
z-index:200;
|
||||||
|
background: #fff;
|
||||||
|
padding:0px;
|
||||||
|
margin-left:-15px;
|
||||||
|
}
|
||||||
|
.progress{
|
||||||
|
margin:15px;
|
||||||
|
height:35px;
|
||||||
|
transform: translateY(-100%);
|
||||||
|
position:relative;
|
||||||
|
top:30%;
|
||||||
|
background-color: #333;
|
||||||
|
}
|
||||||
|
.version{
|
||||||
|
position:relative;
|
||||||
|
top: 5%;
|
||||||
|
}
|
||||||
|
.version h3 p{
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.version h3{
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
.form-group.text-right div{
|
||||||
|
padding-right:15px;
|
||||||
|
}
|
||||||
|
.remember{
|
||||||
|
font-size: 13px !important;
|
||||||
|
}
|
||||||
|
#remember{
|
||||||
|
display: inline-block !important;
|
||||||
|
width:15px;
|
||||||
|
height:15px;
|
||||||
|
top: 2px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.popo {
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid;
|
||||||
|
border-color: red;
|
||||||
|
border-radius: 50%;
|
||||||
|
height: 20px;
|
||||||
|
width: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.popover-btn {
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
color: red;
|
||||||
|
height: 20px;
|
||||||
|
width: 20px;
|
||||||
|
text-indent: -4px;
|
||||||
|
}
|
||||||
|
.mfp-auto-cursor .mfp-content {
|
||||||
|
max-width: 1000px;
|
||||||
|
}
|
||||||
|
.mfp-auto-cursor .mfp-content .col-lg-9,
|
||||||
|
.mfp-auto-cursor .mfp-content .row {
|
||||||
|
width: 100%;
|
||||||
|
float: none;
|
||||||
|
max-width: 1000px;
|
||||||
|
}
|
||||||
|
.mfp-auto-cursor .mfp-content .g-container {
|
||||||
|
max-width: 1000px;
|
||||||
|
}
|
||||||
|
.mfp-close, .mfp-close:active {
|
||||||
|
right: -7px;
|
||||||
|
top: -27px;
|
||||||
|
background: #FFF !important;
|
||||||
|
}
|
||||||
|
.affix {
|
||||||
|
top: 0;
|
||||||
|
z-index: 100;
|
||||||
|
left:0px;
|
||||||
|
}
|
||||||
|
.affix + .panel-heading{
|
||||||
|
padding-top: 70px;
|
||||||
|
}
|
||||||
|
.g-container hr {
|
||||||
|
margin: 5px 0;
|
||||||
|
}
|
||||||
|
.resp-vtabs li.resp-tab-active {
|
||||||
|
background: #4186da !important;
|
||||||
|
color: #FFF;
|
||||||
|
border-left: 0 !important;
|
||||||
|
}
|
||||||
|
.resp-vtabs > .resp-tabs-container {
|
||||||
|
border: 0 !important;
|
||||||
|
border-left: 1px solid #e5e5e5 !important;
|
||||||
|
}
|
||||||
|
@media ( min-width: 1199px ) {
|
||||||
|
.g-container .panel-body form {
|
||||||
|
max-width: 1400px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
body.sb-top #toggle_sidemenu_t {
|
||||||
|
width: 60px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li > ul {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
body.sb-top #sidebar_left .sidebar-menu > li > ul > li > a {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
BIN
admin/css/lang-de.jpg
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
admin/css/lang-en.jpg
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
admin/css/lang-fr.jpg
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
admin/css/lang-it.jpg
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
admin/css/lang-pl.jpg
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
admin/css/lang-ru.jpg
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
admin/css/lang-uk.jpg
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
admin/css/user-icon.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
90
admin/index.php
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<?
|
||||||
|
if ( file_exists( 'ip.conf' ) )
|
||||||
|
{
|
||||||
|
$ips = file_get_contents( 'ip.conf' );
|
||||||
|
$ips = preg_split( "/\\r\\n|\\r|\\n/", $ips );
|
||||||
|
$ips = array_filter( $ips );
|
||||||
|
if ( is_array( $ips ) and !empty( $ips ) )
|
||||||
|
{
|
||||||
|
if ( !in_array( $_SERVER['REMOTE_ADDR'], $ips ) )
|
||||||
|
die( 'Brak dostępu.' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED );
|
||||||
|
function __autoload_my_classes( $classname )
|
||||||
|
{
|
||||||
|
$q = explode( '\\' , $classname );
|
||||||
|
$c = array_pop( $q );
|
||||||
|
$f = '../autoload/' . implode( '/' , $q ) . '/class.' . $c . '.php';
|
||||||
|
if ( file_exists( $f ) )
|
||||||
|
require_once( $f );
|
||||||
|
}
|
||||||
|
spl_autoload_register( '__autoload_my_classes' );
|
||||||
|
|
||||||
|
require_once '../config.php';
|
||||||
|
require_once '../libraries/medoo/medoo.php';
|
||||||
|
require_once '../libraries/grid/config.php';
|
||||||
|
require_once '../libraries/rb.php';
|
||||||
|
date_default_timezone_set( 'Europe/Warsaw' );
|
||||||
|
|
||||||
|
$settings = \front\factory\Settings::settings_details();
|
||||||
|
|
||||||
|
if ( file_exists( 'config.php' ) )
|
||||||
|
include 'config.php';
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
if ( !isset( $_SESSION['check'] ) )
|
||||||
|
{
|
||||||
|
session_regenerate_id();
|
||||||
|
$_SESSION['check'] = true;
|
||||||
|
$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $_SESSION['ip'] !== $_SERVER['REMOTE_ADDR'] )
|
||||||
|
{
|
||||||
|
session_destroy();
|
||||||
|
header( 'Location: /admin/' );
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$mdb = new medoo( [
|
||||||
|
'database_type' => 'mysql',
|
||||||
|
'database_name' => $database['name'],
|
||||||
|
'server' => $database['host'],
|
||||||
|
'username' => $database['user'],
|
||||||
|
'password' => $database['password'],
|
||||||
|
'charset' => 'utf8'
|
||||||
|
] );
|
||||||
|
|
||||||
|
\R::setup( 'mysql:host=' . $database['host'] . ';dbname=' . $database['name'], $database['user'], $database['password'] );
|
||||||
|
|
||||||
|
$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();
|
||||||
|
?>
|
||||||
0
admin/ip.conf
Normal file
BIN
admin/temp/0/0/s_cache_0047d160c092782f86e0fa99fd757ec2
Normal file
BIN
admin/temp/0/2/s_cache_02d0ebd1ee4d477a0ad2ad15c5574df3
Normal file
BIN
admin/temp/2/7/s_cache_27b78efdd24467520df9564ac7e25df1
Normal file
BIN
admin/temp/4/b/s_cache_4b916ae533b4ded88ddc3edfe99de1be
Normal file
BIN
admin/temp/6/e/s_cache_6eded5c6872bb8249821f098bebf975f
Normal file
BIN
admin/temp/9/2/s_cache_9201756461df9208196a8079623a88de
Normal file
BIN
admin/temp/9/8/s_cache_983f33f4a9bff45deec33c98de937621
Normal file
BIN
admin/temp/b/b/s_cache_bbe08f3b3e300f067bb68e6c954e9592
Normal file
BIN
admin/temp/b/d/s_cache_bd58fe07f0d6fec4f37dad0d2511988e
Normal file
BIN
admin/temp/d/2/s_cache_d2ddf25f0337cf7f91b2755c6c1e38bf
Normal file
BIN
admin/temp/d/3/s_cache_d38d9415157c16fca6ab38a13e007b8f
Normal file
BIN
admin/temp/e/4/s_cache_e4199e5530135e67fb5864f3928b4f4f
Normal file
BIN
admin/temp/f/0/s_cache_f005b5c45fc2d184946cb5270f0633df
Normal file
BIN
admin/temp/f/e/s_cache_fe36c28d27446104c8d219c5f1d26a82
Normal file
42
admin/templates/additional-menu.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<? global $user;?>
|
||||||
|
<li>
|
||||||
|
<a class="accordion-toggle" href="#">
|
||||||
|
<span class="sidebar-title">Globelus</span>
|
||||||
|
<span class="caret"></span>
|
||||||
|
</a>
|
||||||
|
<ul class="nav sub-nav">
|
||||||
|
<li>
|
||||||
|
<a href="/admin/globelus_adverts/main_view/">Lista ogłoszeń</a>
|
||||||
|
</li>
|
||||||
|
<!--<li>
|
||||||
|
<a href="/admin/globelus_adverts/answers/">Lista odpowiedzi na ogłoszenia</a>
|
||||||
|
</li>-->
|
||||||
|
<li>
|
||||||
|
<a href="/admin/globelus_candidates/main_view/">Lista kandydatów</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/globelus_candidates/uregistered_main_view/">Lista kandydatów niezarejestrowanych</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/globelus_firms/main_view/">Lista pracodawców</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/globelus_params/countries_list/">Kraje</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/globelus_params/categories_list/">Branże</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/globelus_params/positions_list/">Stanowiska</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/globelus_firms/orders_list/">Zamówienia punktów</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/globelus_firms/points_history/">Historia punktów</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/globelus_settings/main_view/">Ustawienia</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
1064
admin/templates/articles/article-edit.php
Normal file
67
admin/templates/articles/articles-archive-list.php
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_articles' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'id, date_add, date_modify, status, '
|
||||||
|
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title '
|
||||||
|
. 'FROM '
|
||||||
|
. 'pp_articles AS pa WHERE status = -1 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'id, date_add, date_modify, status, '
|
||||||
|
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title '
|
||||||
|
. 'FROM '
|
||||||
|
. 'pp_articles AS pa WHERE status = -1 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
$grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Tytuł',
|
||||||
|
'db' => 'id',
|
||||||
|
'replace' => [ 'sql' => "SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = [id] AND title != '' ORDER BY o ASC LIMIT 1" ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data dodania',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data modyfikacji',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_modify]" ) );'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Akcja',
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 50px;' ],
|
||||||
|
'content' => '<a href="/admin/articles_archive/article_restore/id=[id]">przywróć</a>'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Akcja',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/articles_archive/article_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 50px;' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
115
admin/templates/articles/articles-browse-list.php
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_articles' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'id, date_add, date_modify, status, '
|
||||||
|
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, '
|
||||||
|
. '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user '
|
||||||
|
. 'FROM '
|
||||||
|
. 'pp_articles AS pa WHERE status != -1 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'id, date_add, date_modify, status, '
|
||||||
|
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, '
|
||||||
|
. '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user '
|
||||||
|
. 'FROM '
|
||||||
|
. 'pp_articles AS pa WHERE status != -1 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
$grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Tytuł', 'db' => 'title', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'Data dodania', 'db' => 'date_add', 'type' => 'date_range' ],
|
||||||
|
[ 'name' => 'Data modyfikacji', 'db' => 'date_modify', 'type' => 'date_range' ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Tytuł',
|
||||||
|
'db' => 'title',
|
||||||
|
'sort' => true,
|
||||||
|
'php' => 'echo "[title]"; echo "<small class=\'text-muted\'>" . \admin\factory\Articles::article_pages( [id] ) . "</small>";'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywny',
|
||||||
|
'db' => 'status',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data dodania',
|
||||||
|
'db' => 'date_add',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data modyfikacji',
|
||||||
|
'db' => 'date_modify',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_modify]" ) );'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Modyfikowany przez',
|
||||||
|
'db' => 'user',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Akcja',
|
||||||
|
'db' => 'id',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'php' => 'echo "<a href=\'#\' class=\'button\' url=\'/" . \admin\factory\Articles::article_url( [id] ) . "\'>wybierz</a>";'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
body.sb-top.sb-top-sm .navbar.navbar-fixed-top + #sidebar_left + #content_wrapper {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function getUrlParam(paramName)
|
||||||
|
{
|
||||||
|
var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i');
|
||||||
|
var match = window.location.search.match(reParam);
|
||||||
|
|
||||||
|
return (match && match.length > 1) ? match[1] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$( function()
|
||||||
|
{
|
||||||
|
$( '#sidebar_left, .navbar-fixed-top' ).hide();
|
||||||
|
|
||||||
|
var funcNum = getUrlParam('CKEditorFuncNum');
|
||||||
|
|
||||||
|
$( 'body' ).on( 'click', '.button', function()
|
||||||
|
{
|
||||||
|
window.opener.CKEDITOR.tools.callFunction(funcNum, $( this ).attr( 'url' ) );
|
||||||
|
window.close();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
103
admin/templates/articles/articles-list.php
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_articles' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'id, date_add, date_modify, status, '
|
||||||
|
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, '
|
||||||
|
. '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user '
|
||||||
|
. 'FROM '
|
||||||
|
. 'pp_articles AS pa WHERE status != -1 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'id, date_add, date_modify, status, '
|
||||||
|
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, '
|
||||||
|
. '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user '
|
||||||
|
. 'FROM '
|
||||||
|
. 'pp_articles AS pa WHERE status != -1 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
if ( !\S::get_session( 'gpp_articlesorder' ) )
|
||||||
|
$grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Tytuł', 'db' => 'title', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'Data dodania', 'db' => 'date_add', 'type' => 'date_range' ],
|
||||||
|
[ 'name' => 'Data modyfikacji', 'db' => 'date_modify', 'type' => 'date_range' ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Tytuł',
|
||||||
|
'db' => 'title',
|
||||||
|
'sort' => true,
|
||||||
|
'php' => 'echo "<a href=\'/admin/articles/article_edit/id=[id]\'>[title]</a>"; echo "<small class=\'text-muted\'>" . \admin\factory\Articles::article_pages( [id] ) . "</small>";'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywny',
|
||||||
|
'db' => 'status',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data dodania',
|
||||||
|
'db' => 'date_add',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data modyfikacji',
|
||||||
|
'db' => 'date_modify',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_modify]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Modyfikowany przez',
|
||||||
|
'db' => 'user',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Edytuj',
|
||||||
|
'action' => [ 'type' => 'edit', 'url' => '/admin/articles/article_edit/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Usuń',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/articles/article_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Dodaj artykuł',
|
||||||
|
'url' => '/admin/articles/article_edit/',
|
||||||
|
'icon' => 'fa-plus-circle',
|
||||||
|
'class' => 'btn-success'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
16
admin/templates/articles/subpages-list.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<? if ( is_array( $this -> pages ) ):?>
|
||||||
|
<ol>
|
||||||
|
<? foreach ( $this -> pages as $page ):?>
|
||||||
|
<li id="list_<?= $page['id'];?>" idk="<?= $page['id'];?>" class="sort-nonesting list_<?= $page['id'];?>" menu="<?= $page['menu_id'];?>">
|
||||||
|
<div class="content <?= $this -> step < 2 ? $tmp = 'content_page' : $tmp = 'content_page_last_level';?>" <? if ( !$page['status'] ) echo 'style="color: #cc0000;"';?>>
|
||||||
|
<span class="disclose"><span></span></span>
|
||||||
|
<input type="checkbox" class="g-checkbox" name="pages" value="<?= $page['id'];?>" <? if ( is_array( $this -> article_pages ) and in_array( $page['id'], $this -> article_pages ) ):?>checked="checked"<? endif;?> /><?= $page['title'];?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
if ( is_array( $page['subpages'] ) )
|
||||||
|
echo \admin\view\Articles::subpages_list( $page['subpages'], $this -> article_pages, $page['id'], $this -> step + 1 );
|
||||||
|
?>
|
||||||
|
</li>
|
||||||
|
<? endforeach;?>
|
||||||
|
</ol>
|
||||||
|
<? endif;?>
|
||||||
65
admin/templates/backups/backup-list.php
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_backups' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> src = $this -> backups;
|
||||||
|
$grid -> debug = true;
|
||||||
|
$grid -> order = [ 'column' => 'name', 'type' => 'DESC' ];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
'sort' => true,
|
||||||
|
'php' => 'echo "<a href=\'/../backups/[name]\' target=\'_blank\'>[name]</a>";'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Usuń',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/backups/backup_delete/name=[name]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Utwórz kopie zapasową',
|
||||||
|
'url' => '#',
|
||||||
|
'icon' => 'fa-plus-circle',
|
||||||
|
'class' => 'confirm btn btn-success btn-sm mr5"'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Pobierz plik restore.php',
|
||||||
|
'url' => '/admin/backups/download_restore_file/',
|
||||||
|
'icon' => 'fa-download',
|
||||||
|
'class' => 'btn btn-system btn-sm mr5"'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function ()
|
||||||
|
{
|
||||||
|
$('body').on('click', '.confirm', function ()
|
||||||
|
{
|
||||||
|
$.prompt('Na pewno chcesz utworzyć kopię zapasową ?',
|
||||||
|
{
|
||||||
|
title: 'Potwierdź utworzenie',
|
||||||
|
submit: function (e, v, m, f)
|
||||||
|
{
|
||||||
|
if ( v === true)
|
||||||
|
document.location.href = '/admin/backups/backup_save/';
|
||||||
|
},
|
||||||
|
buttons: {
|
||||||
|
'tak': true, 'nie': false
|
||||||
|
},
|
||||||
|
focus: 1
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
180
admin/templates/banners/banner-edit.php
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||||
|
<?
|
||||||
|
\S::set_session( 'admin', true );
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="settings-tabs">
|
||||||
|
<ul class="resp-tabs-list settings-tabs">
|
||||||
|
<li><i class="fa fa-wrench"></i>Ustawienia</li>
|
||||||
|
<li><i class="fa fa-file"></i>Zawartość</li>
|
||||||
|
</ul>
|
||||||
|
<div class="resp-tabs-container settings-tabs">
|
||||||
|
<div>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Nazwa',
|
||||||
|
'name' => 'name',
|
||||||
|
'id' => 'name',
|
||||||
|
'value' => $this -> banner['name'],
|
||||||
|
'class' => 'require'
|
||||||
|
) );
|
||||||
|
?>
|
||||||
|
<?= \Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Aktywny',
|
||||||
|
'name' => 'status',
|
||||||
|
'checked' => $this -> banner['status'] == 1 or ! $this -> banner['id'] ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?= Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Data rozpoczęcia',
|
||||||
|
'name' => 'date_start',
|
||||||
|
'id' => 'date_start',
|
||||||
|
'value' => $this -> banner['date_start'],
|
||||||
|
'class' => 'date'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Data zakończenia',
|
||||||
|
'name' => 'date_end',
|
||||||
|
'id' => 'date_end',
|
||||||
|
'value' => $this -> banner['date_end'],
|
||||||
|
'class' => 'date'
|
||||||
|
) );
|
||||||
|
?>
|
||||||
|
<?= \Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Slajder / Strona główna',
|
||||||
|
'name' => 'home_page',
|
||||||
|
'checked' => $this -> banner['home_page'] == 1 ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div id="languages-main">
|
||||||
|
<ul class="resp-tabs-list languages-main">
|
||||||
|
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||||
|
<? if ( $lg['status'] ):?>
|
||||||
|
<li><?= $lg['name'];?></a></li>
|
||||||
|
<? endif;?>
|
||||||
|
<? endforeach;
|
||||||
|
endif;?>
|
||||||
|
</ul>
|
||||||
|
<div class="resp-tabs-container languages-main">
|
||||||
|
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||||
|
<? if ( $lg['status'] ):?>
|
||||||
|
<div>
|
||||||
|
<?= \Html::input_icon(
|
||||||
|
array(
|
||||||
|
'label' => 'Obraz',
|
||||||
|
'name' => 'src',
|
||||||
|
'id' => 'src_' . $lg['id'],
|
||||||
|
'value' => $this -> banner['languages'][ $lg['id'] ]['src'],
|
||||||
|
'icon_content' => 'przeglądaj',
|
||||||
|
'icon_js' => "window.open ( 'http://" . $_SERVER['SERVER_NAME'] . "/libraries/filemanager-9.14.0/dialog.php?type=1&popup=1&field_id=src_" . $lg['id'] . "&akey=c3cb2537d25c0efc9e573d059d79c3b8', 'mywindow', 'location=1,status=1,scrollbars=1, width=1100,height=700');"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Url',
|
||||||
|
'name' => 'url',
|
||||||
|
'id' => 'url_' . $lg['id'],
|
||||||
|
'value' => $this -> banner['languages'][ $lg['id'] ]['url']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Kod html',
|
||||||
|
'name' => 'html',
|
||||||
|
'id' => 'html_' . $lg['id'],
|
||||||
|
'value' => $this -> banner['languages'][$lg['id']]['html']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Treść',
|
||||||
|
'name' => 'text',
|
||||||
|
'id' => 'text_' . $lg['id'],
|
||||||
|
'value' => $this -> banner['languages'][$lg['id']]['text']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
$('#text_<?= $lg['id'];?>').ckeditor({
|
||||||
|
toolbar: 'MyTool',
|
||||||
|
height: '300'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<? endif;?>
|
||||||
|
<? endforeach; endif;?>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'banner-edit';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Edycja baneru';
|
||||||
|
$grid -> fields = [
|
||||||
|
[
|
||||||
|
'db' => 'id',
|
||||||
|
'type' => 'hidden',
|
||||||
|
'value' => $this -> banner['id']
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [ 'url' => '/admin/banners/banner_save/', 'back_url' => '/admin/banners/view_list/' ],
|
||||||
|
'cancel' => [ 'url' => '/admin/banners/view_list/' ]
|
||||||
|
];
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function ()
|
||||||
|
{
|
||||||
|
disable_menu();
|
||||||
|
|
||||||
|
$('input[type="text"].date').datetimepicker({
|
||||||
|
format: "YYYY-MM-DD",
|
||||||
|
pickTime: false
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '#settings-tabs' ).easyResponsiveTabs({
|
||||||
|
width: 'auto',
|
||||||
|
fit: true,
|
||||||
|
tabidentify: 'settings-tabs',
|
||||||
|
type: 'vertical'
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#languages-main').easyResponsiveTabs({
|
||||||
|
width: 'auto',
|
||||||
|
fit: true,
|
||||||
|
tabidentify: 'languages-main'
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>
|
||||||
78
admin/templates/banners/banners-list.php
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_banners' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Nazwa', 'db' => 'name', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
'sort' => true,
|
||||||
|
'php' => 'echo "<a href=\"/admin/banners/banner_edit/id=[id]\">[name]</a>";'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywny',
|
||||||
|
'db' => 'status',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Strona główna',
|
||||||
|
'db' => 'home_page',
|
||||||
|
'replace' => [ 'array' => [ 0 => 'nie', 1 => '<span class="text-system">tak</span>' ] ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Slajder',
|
||||||
|
'db' => 'home_page',
|
||||||
|
'replace' => [ 'array' => [ 1 => 'nie', 0 => '<span class="text-system">tak</span>' ] ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data rozpoczęcia',
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'if ( "[date_start]" ) echo date( "Y-m-d", strtotime( "[date_start]" ) ); else echo "-";'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data zakończenia',
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'if ( "[date_end]" ) echo date( "Y-m-d", strtotime( "[date_end]" ) ); else echo "-";'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Edytuj',
|
||||||
|
'action' => [ 'type' => 'edit', 'url' => '/admin/banners/banner_edit/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Usuń',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/banners/banner_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Dodaj baner',
|
||||||
|
'url' => '/admin/banners/banner_edit/',
|
||||||
|
'icon' => 'fa-plus-circle',
|
||||||
|
'class' => 'btn-success'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
56
admin/templates/emails/email-details.php
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="col-lg-3 control-label text-right">Email:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<p><?= $this -> email['email'];?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="col-lg-3 control-label text-right">Numer telefonu:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<p><?= $this -> email['phone'];?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="col-lg-3 control-label text-right">Temat:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<p><?= $this -> email['title'];?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="col-lg-3 control-label text-right">Wiadomość:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<p><?= nl2br($this -> email['mail']);?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="col-lg-3 control-label text-right">Data wysłania:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<p><?= date( "Y-m-d H:i", strtotime( $this -> email[add_date] ) )?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit();
|
||||||
|
$grid -> id = 'email-details';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> title = 'Szczegóły Wiadomości';
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [ '' => '/admin/emails/view_list/', 'back_url' => '/admin/emails/view_list/'],
|
||||||
|
'cancel' => [ 'url' => '/admin/emails/view_list/' ]
|
||||||
|
];
|
||||||
|
$grid -> form = false;
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
#g-edit-save{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
56
admin/templates/emails/email_details.php
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="col-lg-4 control-label text-right">Email:</label>
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<p><?= $this -> email['email'];?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="col-lg-4 control-label text-right">Numer telefonu:</label>
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<p> <?= $this -> email['phone'];?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="col-lg-4 control-label text-right">Temat:</label>
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<p> <?= $this -> email['title'];?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="col-lg-4 control-label text-right">Wiadomość:</label>
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<p> <?= nl2br($this -> email['mail']);?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="col-lg-4 control-label text-right">Data wysłania:</label>
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<p> <?=date( "Y-m-d H:i", strtotime( $this -> email[add_date] ) )?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit();
|
||||||
|
$grid -> id = 'email-detali';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> title = 'Szczegóły Wiadomości';
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [ '' => '/admin/emails/view_list/', 'back_url' => '/admin/emails/view_list/'],
|
||||||
|
'cancel' => [ 'url' => '/admin/emails/view_list/' ]
|
||||||
|
];
|
||||||
|
$grid -> form = false;
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
#g-edit-save{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
41
admin/templates/emails/emails-list.php
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_contact_emails' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data',
|
||||||
|
'db' => 'add_date',
|
||||||
|
'td' => [ ],
|
||||||
|
'th' => ['style' => 'width: 220px;' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[add_date]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Email',
|
||||||
|
'db' => 'email',
|
||||||
|
'content' => '<a href="/admin/emails/email_details/id=[id]">[email]</a>',
|
||||||
|
'sort' => true ,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Temat',
|
||||||
|
'db' => 'title',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Szczegóły',
|
||||||
|
'content' => '<a href="/admin/emails/email_details/id=[id]">Szczegóły</a>',
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
1
admin/templates/filemanager/filemanager.php
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<iframe src="/libraries/filemanager-9.14.1/dialog.php?akey=c3cb2537d25c0efc9e573d059d79c3b8" style="border: 0px; width: 100%; height: 800px; background: #FFF; padding: 5px;"></iframe>
|
||||||
560
admin/templates/globelus-adverts/advert-preview.php
Normal file
@@ -0,0 +1,560 @@
|
|||||||
|
<?
|
||||||
|
global $db, $settings;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<div class="logo">
|
||||||
|
<? if ( file_exists( '../' . \front\factory\GlobelusFirms::logo_url( $this -> advert['user_id'] ) ) ):?>
|
||||||
|
<img src="/logo/<?= $this -> advert['user_id'];?>/<?= \S::get_token();?>">
|
||||||
|
<? else:?>
|
||||||
|
<img src="/images/no-logo.jpg">
|
||||||
|
<? endif;?>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Wyłączone przez administratora',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'disabled_by_admin',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> advert['disabled_by_admin'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'disabled_by_admin', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Tytuł',
|
||||||
|
'id' => 'title',
|
||||||
|
'value' => $this -> advert['title'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'title', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::form_text(
|
||||||
|
array(
|
||||||
|
'label' => 'Pracodawca',
|
||||||
|
'id' => 'firm_name',
|
||||||
|
'text' => $this -> advert['firm_name']
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?
|
||||||
|
$countries[0] = '--- brak przypisanego kraju ---';
|
||||||
|
if ( is_array( $this -> countries ) and count( $this -> countries ) ): foreach ( $this -> countries as $country ):
|
||||||
|
$countries[ $country['id'] ] = $country['name'];
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Kraj',
|
||||||
|
'id' => 'country_id',
|
||||||
|
'values' => $countries,
|
||||||
|
'value' => $this -> advert['country_id'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'country_id', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Miasto',
|
||||||
|
'id' => 'city',
|
||||||
|
'value' => $this -> advert['city'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'city', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?
|
||||||
|
$voivodeships[''] = '--- brak przypisanego województwa ---';
|
||||||
|
if ( is_array( $this -> voivodeships ) ): foreach ( $this -> voivodeships as $voivodeship ):
|
||||||
|
$voivodeships[ $voivodeship['id'] ] = $voivodeship['name'];
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Województwo',
|
||||||
|
'id' => 'id_voivodeship',
|
||||||
|
'values' => $voivodeships,
|
||||||
|
'value' => $this -> advert['id_voivodeship'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'id_voivodeship', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?
|
||||||
|
$categories[0] = '--- brak przypisanej kategorii ---';
|
||||||
|
if ( is_array( $this -> categories ) and count( $this -> categories ) ): foreach ( $this -> categories as $category ):
|
||||||
|
$categories[ $category['id'] ] = $category['name'];
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Branża',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'category_id',
|
||||||
|
'values' => $categories,
|
||||||
|
'value' => $this -> advert['category_id'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'category_id', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Ogłoszenie wyróżnione',
|
||||||
|
'id' => 'highlight',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> advert['highlight'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'highlight', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<div class="highlight_date">
|
||||||
|
<label class="col-lg-3 control-label">Wyróżnione do:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<p class='form-control-static'><?= $this -> advert['highlight_to'];?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Ogłoszenie polecane',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'main_page',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> advert['main_page'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'main_page', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<div class="main_page_date">
|
||||||
|
<label class="col-lg-3 control-label">Na stronie głównej do:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<p class='form-control-static'><?= $this -> advert['main_page_to'];?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Wynagrodzenie',
|
||||||
|
'id' => 'salary',
|
||||||
|
'value' => $this -> advert['salary'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'salary', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Rodzaj pracy',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'work_type',
|
||||||
|
//'values' => [ 1 => 'praca stała', 2 => 'praca tymczasowa', 3 => 'praca sezonowa', 4 => 'praktyka/staż', 5 => 'inna ],
|
||||||
|
'values' => [ 6 => 'praca na czas nieokreślony', 7 => 'praca na czas określony/tymczasowa', 8 => 'staż/praktyka', 9 => 'B2B', 10 => 'umowa agencyjna', 11 => 'praca zdalna' ],
|
||||||
|
'value' => $this -> advert['work_type'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'work_type', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Bez znajomości języka',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'without_language',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> advert['without_language'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'without_language', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Bez doświadczenia',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'without_experience',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> advert['without_experience'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'without_experience', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Dla par',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'for_couples',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> advert['for_couples'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'for_couples', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select( [
|
||||||
|
'label' => 'Zapewnione zakwaterowanie',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'accommodation',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> advert['accommodation'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'accommodation', 'operation' => 'update' ]
|
||||||
|
] );?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input( [
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Jaki koszt dla pracownika?',
|
||||||
|
'id' => 'accommodation_cost',
|
||||||
|
'value' => $this -> advert['accommodation_cost'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'accommodation_cost', 'operation' => 'update' ]
|
||||||
|
] );?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select( [
|
||||||
|
'label' => 'Gwarancja godzin',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'overtime',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> advert['overtime'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'overtime', 'operation' => 'update' ]
|
||||||
|
] );?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input( [
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Ile godzin gwarantuje pracodawca?',
|
||||||
|
'id' => 'overtime_quantity',
|
||||||
|
'value' => $this -> advert['overtime_quantity'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'overtime_quantity', 'operation' => 'update' ]
|
||||||
|
] );?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select( [
|
||||||
|
'label' => 'Pracodawca refunduje przejazd/przelot',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'travel_refund',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> advert['travel_refund'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'travel_refund', 'operation' => 'update' ]
|
||||||
|
] );?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select( [
|
||||||
|
'label' => 'Praca dla obywateli spoza UE',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'outside_ue',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> advert['outside_ue'],
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'outside_ue', 'operation' => 'update' ]
|
||||||
|
] );?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Treść',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'name' => 'text',
|
||||||
|
'id' => 'text',
|
||||||
|
'value' => $this -> advert['text'],
|
||||||
|
'inline' => true,
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'text', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<hr />
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Klauzule',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'name' => 'clauses',
|
||||||
|
'id' => 'clauses',
|
||||||
|
'value' => $this -> advert['clauses'],
|
||||||
|
'inline' => true,
|
||||||
|
'params' => [ 'table' => 'globelus_adverts', 'column_id' => 'id', 'row_id' => $this -> advert['id'], 'column' => 'clauses', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'candidate-preview';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Podgląd ogłoszenia';
|
||||||
|
$grid -> actions = [
|
||||||
|
'cancel' => [ 'url' => '/admin/globelus_adverts/main_view/' ]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var old_data = [];
|
||||||
|
$( function()
|
||||||
|
{
|
||||||
|
$( 'body' ).on( 'change', '#highlight', function()
|
||||||
|
{
|
||||||
|
var advert_id = $( this ).attr( 'row_id' );
|
||||||
|
var highlight_status = $( this ).val();
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus/highlight_save/',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
advert_id: advert_id,
|
||||||
|
highlight_status: highlight_status
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
$( '#g-edit-cancel' ).attr( 'disabled', 'disabled' );
|
||||||
|
},
|
||||||
|
success: function( response )
|
||||||
|
{
|
||||||
|
$( '#g-edit-cancel' ).removeAttr( 'disabled' );
|
||||||
|
data = jQuery.parseJSON( response );
|
||||||
|
|
||||||
|
if ( data.status == 'ok' )
|
||||||
|
$( '.highlight_date p' ).html( data.highlight_to );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'change', '#main_page', function()
|
||||||
|
{
|
||||||
|
var advert_id = $( this ).attr( 'row_id' );
|
||||||
|
var main_page_status = $( this ).val();
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus/main_page_save/',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
advert_id: advert_id,
|
||||||
|
main_page_status: main_page_status
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
$( '#g-edit-cancel' ).attr( 'disabled', 'disabled' );
|
||||||
|
},
|
||||||
|
success: function( response )
|
||||||
|
{
|
||||||
|
$( '#g-edit-cancel' ).removeAttr( 'disabled' );
|
||||||
|
data = jQuery.parseJSON( response );
|
||||||
|
|
||||||
|
if ( data.status == 'ok' )
|
||||||
|
$( '.main_page_date p' ).html( data.main_page_to );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '#text' ).ckeditor( {
|
||||||
|
toolbar : 'MyTool',
|
||||||
|
height:'350'
|
||||||
|
});
|
||||||
|
|
||||||
|
var editor = $('#text').ckeditorGet();
|
||||||
|
editor.on( 'blur', function( evt ) {
|
||||||
|
var text = evt.editor.getData();
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus/save_to_db/',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
table: 'globelus_adverts',
|
||||||
|
column_id: 'id',
|
||||||
|
row_id: '<?= $this -> advert['id'];?>',
|
||||||
|
column: 'text',
|
||||||
|
operation: 'update',
|
||||||
|
value: text
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
$( '#g-edit-cancel' ).attr( 'disabled', 'disabled' );
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
$( '#g-edit-cancel' ).removeAttr( 'disabled' );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '#clauses' ).ckeditor( {
|
||||||
|
toolbar : 'MyTool',
|
||||||
|
height:'350'
|
||||||
|
});
|
||||||
|
|
||||||
|
var editor1 = $('#clauses').ckeditorGet();
|
||||||
|
editor1.on( 'blur', function( evt ) {
|
||||||
|
var text = evt.editor.getData();
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus/save_to_db/',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
table: 'globelus_adverts',
|
||||||
|
column_id: 'id',
|
||||||
|
row_id: '<?= $this -> advert['id'];?>',
|
||||||
|
column: 'clauses',
|
||||||
|
operation: 'update',
|
||||||
|
value: text
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
$( '#g-edit-cancel' ).attr( 'disabled', 'disabled' );
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
$( '#g-edit-cancel' ).removeAttr( 'disabled' );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'focus', '.form-edit', function()
|
||||||
|
{
|
||||||
|
old_data[ $( this ).attr( 'name' ) ] = $( this ).val();
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'change', '.form-edit', function()
|
||||||
|
{
|
||||||
|
var input = $( this );
|
||||||
|
var table = $( this ).attr( 'table' );
|
||||||
|
var column_id = $( this ).attr( 'column_id' );
|
||||||
|
var row_id = $( this ).attr( 'row_id' );
|
||||||
|
var column = $( this ).attr( 'column' );
|
||||||
|
var operation = $( this ).attr( 'operation' );
|
||||||
|
var value = $( this ).val();
|
||||||
|
var values = $( this ).attr( 'values' );
|
||||||
|
|
||||||
|
if ( input.attr( 'type' ) === 'checkbox' )
|
||||||
|
{
|
||||||
|
if ( !input.is( ':checked' ) )
|
||||||
|
value = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus/save_to_db/',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
table: table,
|
||||||
|
column_id: column_id,
|
||||||
|
row_id: row_id,
|
||||||
|
column: column,
|
||||||
|
operation: operation,
|
||||||
|
value: value,
|
||||||
|
values: values
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
input.attr( 'readonly', 'readonly' );
|
||||||
|
$( '#g-edit-cancel' ).attr( 'disabled', 'disabled' );
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
input.removeAttr( 'readonly' );
|
||||||
|
$( '#g-edit-cancel' ).removeAttr( 'disabled' );
|
||||||
|
|
||||||
|
response = jQuery.parseJSON( data );
|
||||||
|
|
||||||
|
if ( response.status !== 'ok' )
|
||||||
|
{
|
||||||
|
if ( input.attr( 'type' ) === 'checkbox' )
|
||||||
|
{
|
||||||
|
if ( input.is( ':checked' ) === false )
|
||||||
|
input.prop( 'checked', true );
|
||||||
|
else
|
||||||
|
input.prop( 'checked', false );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
input.val( old_data[ input.attr( 'name' ) ] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style type="text/css">
|
||||||
|
hr {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
#g-edit-save {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.g-container .panel-body {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
|
height: 150px;
|
||||||
|
width: 150px;
|
||||||
|
overflow: hidden;
|
||||||
|
float: right;
|
||||||
|
padding: 10px;
|
||||||
|
background: #FFF;
|
||||||
|
box-shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.2 );
|
||||||
|
}
|
||||||
|
.logo img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
88
admin/templates/globelus-adverts/answers-list.php
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
<?
|
||||||
|
global $db, $settings;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<? if ( is_array( $this -> answers ) and count( $this -> answers ) ):?>
|
||||||
|
<? foreach ( $this -> answers as $answer ):?>
|
||||||
|
<div class="answer mb10">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-2 col-lg-1">
|
||||||
|
<div class="img">
|
||||||
|
<? if ( $answer['user_id'] and file_exists( '../' . \front\factory\GlobelusCandidates::avatar_url( $answer['user_id'] ) ) ):?>
|
||||||
|
<img src="/avatar/<?= $answer['user_id'];?>/<?= \S::get_token();?>">
|
||||||
|
<? else:?>
|
||||||
|
<img src="/images/no-avatar.png">
|
||||||
|
<? endif;?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-10 col-lg-11">
|
||||||
|
<p style="color:<? if ( !$answer['displayed'] ):?>#e72f34;<? else:?>#8c8c8c;<? endif;?>">
|
||||||
|
<b><?= $answer['surname'] . ' ' . $answer['name'];?></b> | <?= date( 'Y-m-d H:i', strtotime( $answer['date_add'] ) );?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<?= $lang['tel.'];?> <?= $answer['phone'];?> |
|
||||||
|
<?= $lang['email'];?> <a href="mailto:<?= $answer['email'];?>"><?= $answer['email'];?></a> |
|
||||||
|
<? if ( ( $answer['cv'] and file_exists( '../' . $answer['cv'] ) ) || ( !$answer['cv'] and $answer['user_id'] and file_exists( '../' . \front\factory\GlobelusCandidates::cv_url( $answer['user_id'] ) ) ) ):?>
|
||||||
|
<?
|
||||||
|
if ( !$answer['cv'] and $answer['user_id'] and file_exists( '../' . \front\factory\GlobelusCandidates::cv_url( $answer['user_id'] ) ) )
|
||||||
|
$cv_url = '/cv/' . $answer['user_id'] . '/' . \S::get_token() . '/';
|
||||||
|
else if ( $answer['cv'] and file_exists( '../' . $answer['cv'] ) )
|
||||||
|
$cv_url = '/cv-tmp/' . $answer['id'] . '/' . \S::get_token() . '/';
|
||||||
|
?>
|
||||||
|
<a href="<?= $cv_url;?>" class="cv">
|
||||||
|
<i class="fa fa-file-text-o"></i> pobierz CV
|
||||||
|
</a>
|
||||||
|
<? endif;?>
|
||||||
|
</p>
|
||||||
|
<div class="mt10">
|
||||||
|
<?= nl2br( $answer['text'] );?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<? endforeach;?>
|
||||||
|
<? else:?>
|
||||||
|
<div class="alert alert-danger mt20">Brak odpowiedzi do tego ogłoszenia.</div>
|
||||||
|
<? endif;?>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'answers-list';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Odpowiedzi do ogłoszenia: ' . $this -> advert['title'];
|
||||||
|
$grid -> actions = [
|
||||||
|
'cancel' => [ 'url' => '/admin/globelus_adverts/main_view/' ]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
hr {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
#g-edit-save {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.form-group {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.g-container .panel-body {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.img {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 150px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
.img img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
97
admin/templates/globelus-adverts/anwers.php
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_adverts_answers' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gaa.id, gaa.date_add, CONCAT( gaa.name, \' \', gaa.surname ) AS username, gaa.email, gaa.phone, gaa.text, title, advert_id, gaa.cv, gaa.user_id, gaa.displayed '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_adverts_answers AS gaa '
|
||||||
|
. 'INNER JOIN globelus_adverts AS ga ON ga.id = gaa.advert_id '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gaa.id, gaa.date_add, CONCAT( gaa.name, \' \', gaa.surname ) AS username, gaa.email, gaa.phone, gaa.text, title, advert_id, gaa.cv, gaa.user_id, gaa.displayed '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_adverts_answers AS gaa '
|
||||||
|
. 'INNER JOIN globelus_adverts AS ga ON ga.id = gaa.advert_id '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
$grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Imię i nazwisko', 'db' => 'username', 'type' => 'text' ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Data dodania',
|
||||||
|
'db' => 'date_add',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 130px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Ogłoszenie',
|
||||||
|
'db' => 'title',
|
||||||
|
'sort' => true,
|
||||||
|
'td' => [ 'style' => 'min-width: 200px; white-space: nowrap;' ],
|
||||||
|
'php' =>
|
||||||
|
'echo "<a href=\'/admin/globelus_adverts/advert_preview/id=[advert_id]\' target=\'_blank\' style=\'color:"; if ( [displayed] ) echo "#e72f34;"; else echo "#8c8c8c;"; echo "\'>"; '
|
||||||
|
. 'echo addslashes( mb_substr( \'[title]\', 0, 25, \'UTF-8\' ) ); '
|
||||||
|
. 'if ( strlen( \'[title]\' ) > 25 ) echo "..."; '
|
||||||
|
. 'echo "</a>"; '
|
||||||
|
], [
|
||||||
|
'name' => 'Data dodania',
|
||||||
|
'db' => 'date_add',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 130px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Imię i nazwisko',
|
||||||
|
'db' => 'username',
|
||||||
|
'sort' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Email',
|
||||||
|
'db' => 'email',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 130px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ]
|
||||||
|
], [
|
||||||
|
'name' => 'Telefon',
|
||||||
|
'db' => 'phone',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 130px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ]
|
||||||
|
], [
|
||||||
|
'name' => 'Tekst',
|
||||||
|
'db' => 'text'
|
||||||
|
], [
|
||||||
|
'name' => 'CV',
|
||||||
|
'db' => 'cv',
|
||||||
|
'td' => [ 'style' => 'white-space: nowrap;' ],
|
||||||
|
'php' =>
|
||||||
|
'if ( ( "[cv]" and file_exists( "../[cv]" ) ) || ( !"[cv]" and [user_id] and file_exists( "../" . \front\factory\GlobelusCandidates::cv_url( [user_id] ) ) ) ) { '
|
||||||
|
. 'if ( !"[cv]" and [user_id] and file_exists( "../" . \front\factory\GlobelusCandidates::cv_url( [user_id] ) ) ) '
|
||||||
|
. '$cv_url = "/cv/[user_id]/" . \S::get_token() . "/"; '
|
||||||
|
. 'else if ( "[cv]" and file_exists( "../[cv]" ) ) '
|
||||||
|
. '$cv_url = "/cv-tmp/[id]/" . \S::get_token() . "/"; '
|
||||||
|
. 'echo "<a href=\'" . $cv_url . "\' target=\'_blank\'>"; '
|
||||||
|
. 'echo "<i class=\'fa fa-file-text-o\'></i> pobierz CV"; '
|
||||||
|
. 'echo "</a>"; '
|
||||||
|
. '} '
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
174
admin/templates/globelus-adverts/main-view.php
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_adverts' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'ga.id, title, ga.date_add, user_id, email, visible, highlight, main_page, last_refresh, visits, disabled_by_admin, additional_promotion, '
|
||||||
|
. '( SELECT COUNT(0) FROM globelus_adverts_answers AS gaa WHERE gaa.advert_id = ga.id AND deleted = 0 ) AS answers_count '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_adverts AS ga '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'ga.id, title, ga.date_add, user_id, email, visible, highlight, main_page, last_refresh, visits, disabled_by_admin, additional_promotion, '
|
||||||
|
. '( SELECT COUNT(0) FROM globelus_adverts_answers AS gaa WHERE gaa.advert_id = ga.id AND deleted = 0 ) AS answers_count '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_adverts AS ga '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
if ( !\S::get_session( 'gglobelus_advertsorder' ) )
|
||||||
|
$grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Tytuł', 'db' => 'title', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Aktywne', 'db' => 'visible', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'Wyłączone przez Admina', 'db' => 'disabled_by_admin', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'Pracodawca', 'db' => 'user_id', 'type' => 'select', 'replace' => [ 'array' => $this -> firms_list ] ],
|
||||||
|
[ 'name' => 'Wyróżnione', 'db' => 'highlight', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'Polecane', 'db' => 'main_page', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'Dodatkowa promocja', 'db' => 'additional_promotion', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'Email', 'db' => 'email', 'type' => 'text' ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Tytuł',
|
||||||
|
'db' => 'title',
|
||||||
|
'sort' => true,
|
||||||
|
'td' => [ 'style' => 'min-width: 200px; white-space: nowrap;' ],
|
||||||
|
'php' =>
|
||||||
|
'echo "<a href=\'/admin/globelus_adverts/advert_preview/id=[id]\'>"; '
|
||||||
|
. 'if ( [disabled_by_admin] ) '
|
||||||
|
. 'echo "<span class=\'text-danger\'>"; '
|
||||||
|
. 'echo addslashes( mb_substr( \'[title]\', 0, 25, \'UTF-8\' ) ); '
|
||||||
|
. 'if ( strlen( \'[title]\' ) > 25 ) echo "..."; '
|
||||||
|
. 'if ( [disabled_by_admin] ) '
|
||||||
|
. 'echo "</span>"; '
|
||||||
|
. 'echo "</a>"; '
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Pracodawca',
|
||||||
|
'db' => 'user_id',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'replace' => [ 'sql' => 'SELECT firm_name FROM globelus_firms_data WHERE user_id = [user_id]' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Email',
|
||||||
|
'db' => 'email'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywne',
|
||||||
|
'db' => 'visible',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'sort' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Wyłączone przez Admina',
|
||||||
|
'db' => 'disabled_by_admin',
|
||||||
|
'php' => 'echo "<select class=\'disabled_by_admin form-control\' order=\'[id]\'>"; '
|
||||||
|
. 'echo "<option value=\'0\'"; if ( ![disabled_by_admin] ) echo "selected=\'selected\'"; echo ">nie</option>"; '
|
||||||
|
. 'echo "<option value=\'1\'"; if ( [disabled_by_admin] ) echo "selected=\'selected\'"; echo ">tak</option>"; '
|
||||||
|
. 'echo "</select>";',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data dodania',
|
||||||
|
'db' => 'date_add',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 130px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Odświeżono',
|
||||||
|
'db' => 'last_refresh',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'if ( "[last_refresh]" ) echo date( "Y-m-d H:i", strtotime( "[last_refresh]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Wyróżnione',
|
||||||
|
'db' => 'highlight',
|
||||||
|
'replace' => [ 'array' => [ 0 => 'nie', 1 => '<span style="color: #2cbd2b;">tak</span>' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Polecane',
|
||||||
|
'db' => 'main_page',
|
||||||
|
'replace' => [ 'array' => [ 0 => 'nie', 1 => '<span style="color: #f70;">tak</span>' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'sort' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Dodatkowa promocja',
|
||||||
|
'db' => 'additional_promotion',
|
||||||
|
'replace' => [ 'array' => [ 0 => 'nie', 1 => '<span style="color: #f70;">tak</span>' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Wyświetlenia',
|
||||||
|
'db' => 'visits',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Odpowiedzi',
|
||||||
|
'db' => 'answers_count',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'echo "<a href=\'/admin/globelus_adverts/answers_list/id=[id]\'>[answers_count]</a>";',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Usuń',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/globelus_adverts/advert_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( 'body' ).on( 'change', '.disabled_by_admin', function(){
|
||||||
|
var input = $( this );
|
||||||
|
|
||||||
|
var advert_id = $( this ).parents( 'tr' ).attr( 'id' );
|
||||||
|
var disabled_by_admin = $( this ).val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus_adverts/disabled_by_admin/',
|
||||||
|
data: {
|
||||||
|
advert_id: advert_id,
|
||||||
|
disabled_by_admin: disabled_by_admin
|
||||||
|
},
|
||||||
|
beforeSend: function() {
|
||||||
|
input.attr( 'disabled', 'disabled' );
|
||||||
|
},
|
||||||
|
success: function( data ) {
|
||||||
|
input.removeAttr( 'disabled' );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
840
admin/templates/globelus-candidates/candidate-preview.php
Normal file
@@ -0,0 +1,840 @@
|
|||||||
|
<?
|
||||||
|
global $db, $settings;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<div class="row mb15">
|
||||||
|
<div class="col-xs-12 text-right">
|
||||||
|
<a href="#" class="btn btn-danger swith-account-type">zmień na konto pracodawcy</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<? if ( $this -> candidate['auto_create'] ):?>
|
||||||
|
<div class="row mb15">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<b><u>Profil założony z odpowiedzi na ogłoszenie</u></b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<? endif;?>
|
||||||
|
<div class="avatar">
|
||||||
|
<? if ( file_exists( '../' . \front\factory\GlobelusCandidates::avatar_url( $this -> candidate['id'] ) ) ):?>
|
||||||
|
<img src="/avatar/<?= $this -> candidate['id'];?>/<?= \S::get_token();?>">
|
||||||
|
<? else:?>
|
||||||
|
<img src="/images/no-avatar.png">
|
||||||
|
<? endif;?>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::form_text(
|
||||||
|
array(
|
||||||
|
'label' => 'Profil wyróżniony',
|
||||||
|
'id' => 'highlight',
|
||||||
|
'text' => $this -> candidate['highlight'] ? '<span class="text-success">tak</span> - ' . $this -> candidate['highlight_to'] : '<span class="text-danger">nie</span><a href="#" class="btn btn-success highlight btn-xs ml10">Włącz wyróżnienie na 2 tygodnie</a>'
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Profil wypełniony',
|
||||||
|
'id' => 'profile_completed',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> candidate['profile_completed'],
|
||||||
|
'params' => [ 'table' => 'globelus_users', 'column_id' => 'id', 'row_id' => $this -> candidate['id'], 'column' => 'profile_completed', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Profil aktywny',
|
||||||
|
'id' => 'status',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> candidate['status'],
|
||||||
|
'params' => [ 'table' => 'globelus_users', 'column_id' => 'id', 'row_id' => $this -> candidate['id'], 'column' => 'status', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Profil widoczny',
|
||||||
|
'id' => 'visible',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> candidate['visible'],
|
||||||
|
'params' => [ 'table' => 'globelus_users', 'column_id' => 'id', 'row_id' => $this -> candidate['id'], 'column' => 'visible', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Imię',
|
||||||
|
'id' => 'name',
|
||||||
|
'value' => $this -> candidate['name'],
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'name',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Nazwisko',
|
||||||
|
'id' => 'surname',
|
||||||
|
'value' => $this -> candidate['surname'],
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'surname',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::form_text(
|
||||||
|
array(
|
||||||
|
'label' => 'Email',
|
||||||
|
'id' => 'email',
|
||||||
|
'text' => $this -> candidate['email']
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Telefon',
|
||||||
|
'id' => 'phone',
|
||||||
|
'value' => $this -> candidate['phone'],
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'phone',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit date-birth',
|
||||||
|
'label' => 'Data urodzenia',
|
||||||
|
'id' => 'date_of_birth',
|
||||||
|
'value' => ( $this -> candidate['date_of_birth'] != '0000-00-00' and $this -> candidate['date_of_birth'] != '' and $this -> candidate['date_of_birth'] != '1970-01-01' ) ? date( 'd.m.Y', strtotime( $this -> candidate['date_of_birth'] ) ) : '',
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'date_of_birth',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Płeć',
|
||||||
|
'id' => 'sex',
|
||||||
|
'values' => [ 0 => 'kobieta', 1 => 'mężczyzna' ],
|
||||||
|
'value' => $this -> candidate['sex'],
|
||||||
|
'empty' => true,
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'sex',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">W jakim zawodzie szuka pracy?:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<div class="form-control-static">
|
||||||
|
<? if ( is_array( $this -> candidate['positions'] ) ):?>
|
||||||
|
<? foreach ( $this -> candidate['positions'] as $position ):?>
|
||||||
|
<div class="mb5">
|
||||||
|
<select class="form-edit form-control positions" placeholder="wybierz stanowisko" style="max-width: 300px; display: inline-block;" table="globelus_candidates_positions" column_id="id" row_id="<?= $position['id'];?>" column="id_position" operation="update">
|
||||||
|
<option value="">--- wybierz ---</option>
|
||||||
|
<? if ( is_array( $this -> positions ) ): foreach ( $this -> positions as $position_single ):?>
|
||||||
|
<option value="<?= $position_single['id']; ?>" <? if ( $position_single['id'] == $position['id_position'] ):?>selected="selected" <? endif; ?>><?= htmlspecialchars( $position_single['name'] );?></option>
|
||||||
|
<? endforeach; endif;?>
|
||||||
|
</select>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit form-control',
|
||||||
|
'id' => 'experience',
|
||||||
|
'values' => array_merge( [ '' => '--- wybierz poziom doświadczenia ---' ], \front\factory\Globelus::positions_experience() ),
|
||||||
|
'value' => $position['experience'],
|
||||||
|
'params' => [
|
||||||
|
'style' => 'max-width: 300px; display: inline-block;',
|
||||||
|
'table' => 'globelus_candidates_positions',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $position['id'],
|
||||||
|
'column' => 'experience',
|
||||||
|
'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<? endforeach;?>
|
||||||
|
<? endif;?>
|
||||||
|
<? for ( $i = 0; $i < 5; $i++ ):?>
|
||||||
|
<div class="mb5">
|
||||||
|
<select class="form-edit form-control positions" placeholder="wybierz stanowisko" style="max-width: 300px; display: inline-block;" table="globelus_candidates_positions" column_id="id" row_id="" column="id_position" operation="insert_update" values="user_id;<?= $this -> candidate['id'];?>" connect="globelus_candidates_positions_<?= $i;?>1">
|
||||||
|
<option value="">--- wybierz ---</option>
|
||||||
|
<? if ( is_array( $this -> positions ) ): foreach ( $this -> positions as $position_single ):?>
|
||||||
|
<option value="<?= $position_single['id']; ?>"><?= htmlspecialchars( $position_single['name'] );?></option>
|
||||||
|
<? endforeach; endif;?>
|
||||||
|
</select>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit form-control globelus_candidates_positions_' . $i . '1',
|
||||||
|
'values' => array_merge( [ '' => '--- wybierz poziom doświadczenia ---' ], \front\factory\Globelus::positions_experience() ),
|
||||||
|
'value' => 0,
|
||||||
|
'params' => [
|
||||||
|
'style' => 'max-width: 300px; display: inline-block;',
|
||||||
|
'table' => 'globelus_candidates_positions',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => '',
|
||||||
|
'column' => 'experience',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id'],
|
||||||
|
'connect' => 'globelus_candidates_positions_' . $i . '0' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<? endfor;?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Czy posiada doświadczenie?',
|
||||||
|
'id' => 'inexperience',
|
||||||
|
'values' => [ 0 => 'tak', 1 => 'nie' ],
|
||||||
|
'value' => $this -> candidate['inexperience'],
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'inexperience',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label form="languages" class="col-lg-3 control-label">W jakiej branży szuka pracy?</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<div class="form-control-static">
|
||||||
|
<?
|
||||||
|
if ( is_array( $this -> categories ) ): foreach ( $this -> categories as $category ):
|
||||||
|
echo '<div class="col-xs-6 col-md-4 col-lg-4">';
|
||||||
|
echo \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'value' => $category['id'],
|
||||||
|
'checked' => in_array( $category['id'], $this -> candidate['categories'] ) ? true : false,
|
||||||
|
'params' => [
|
||||||
|
'style' => 'position: relative; top: 2px; margin-right: 5px;',
|
||||||
|
'table' => 'globelus_candidates_categories',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => null,
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id'] . '|category_id;' . $category['id'],
|
||||||
|
'operation' => 'insert_delete'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo $category['name'];
|
||||||
|
echo '</div>';
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label form="languages" class="col-lg-3 control-label">Znajomość języków</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<div class="form-control-static">
|
||||||
|
<? if ( is_array( $this -> candidate['languages'] ) and !empty( $this -> candidate['languages'] ) ):?>
|
||||||
|
<? foreach ( $this -> candidate['languages'] as $language ):?>
|
||||||
|
<div class="mb5">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit form-control',
|
||||||
|
'value' => $language['language'],
|
||||||
|
'params' => [
|
||||||
|
'style' => 'max-width: 300px; display: inline-block; margin-right: 10px;',
|
||||||
|
'table' => 'globelus_candidates_languages',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $language['id'],
|
||||||
|
'column' => 'language',
|
||||||
|
'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit form-control',
|
||||||
|
'values' => array_merge( [ '0' => '--- wybierz poziom znajomości języka ---' ], \front\factory\Globelus::languages_experience() ),
|
||||||
|
'value' => $language['experience'],
|
||||||
|
'params' => [
|
||||||
|
'style' => 'max-width: 300px; display: inline-block;',
|
||||||
|
'table' => 'globelus_candidates_languages',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $language['id'],
|
||||||
|
'column' => 'experience',
|
||||||
|
'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<? endforeach;?>
|
||||||
|
<? endif;?>
|
||||||
|
<? for ( $i = 0; $i < 5; $i++ ):?>
|
||||||
|
<div class="mb5">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit form-control globelus_candidates_languages_' . $i . '0',
|
||||||
|
'params' => [
|
||||||
|
'style' => 'max-width: 300px; display: inline-block; margin-right: 10px;',
|
||||||
|
'table' => 'globelus_candidates_languages',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => '',
|
||||||
|
'column' => 'language',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id'],
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'connect' => 'globelus_candidates_languages_' . $i . '1'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit form-control globelus_candidates_languages_' . $i . '1',
|
||||||
|
'values' => array_merge( [ '0' => '--- wybierz poziom znajomości języka ---' ], \front\factory\Globelus::languages_experience() ),
|
||||||
|
'value' => 0,
|
||||||
|
'params' => [
|
||||||
|
'style' => 'max-width: 300px; display: inline-block;',
|
||||||
|
'table' => 'globelus_candidates_languages',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => '',
|
||||||
|
'column' => 'experience',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id'],
|
||||||
|
'connect' => 'globelus_candidates_languages_' . $i . '0' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<? endfor;?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label form="languages" class="col-lg-3 control-label">Kraj w jakim szuka pracy?</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<div class="row">
|
||||||
|
<? $countries = \front\factory\Globelus::countries();
|
||||||
|
if ( is_array( $countries ) ): foreach ( $countries as $country ):
|
||||||
|
echo '<div class="col-xs-6 col-md-4 col-lg-2">';
|
||||||
|
echo \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'value' => $country['id'],
|
||||||
|
'checked' => in_array( $country['id'], $this -> candidate['countries'] ) ? true : false,
|
||||||
|
'params' => [
|
||||||
|
'style' => 'position: relative; top: 2px; margin-right: 5px;',
|
||||||
|
'table' => 'globelus_candidates_countries',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => null,
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id'] . '|country_id;' . $country['id'],
|
||||||
|
'operation' => 'insert_delete'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo $country['name'];
|
||||||
|
echo '</div>';
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label form="languages" class="col-lg-3 control-label">Województwo w jakim szuka pracy?</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<div class="row">
|
||||||
|
<? $voivodeships = \front\factory\Globelus::get_voivodeships_list();
|
||||||
|
if ( is_array( $voivodeships ) ): foreach ( $voivodeships as $voivodeship ):
|
||||||
|
echo '<div class="col-xs-6 col-md-4 col-lg-2">';
|
||||||
|
echo \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'value' => $voivodeship['id'],
|
||||||
|
'checked' => in_array( $voivodeship['id'], $this -> candidate['voivodeships'] ) ? true : false,
|
||||||
|
'params' => [
|
||||||
|
'style' => 'position: relative; top: 2px; margin-right: 5px;',
|
||||||
|
'table' => 'globelus_candidates_voivodeships',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => null,
|
||||||
|
'values' => 'id_user;' . $this -> candidate['id'] . '|id_voivodeship;' . $voivodeship['id'],
|
||||||
|
'operation' => 'insert_delete'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo $voivodeship['name'];
|
||||||
|
echo '</div>';
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Dostępność',
|
||||||
|
'id' => 'status_of_availability',
|
||||||
|
'values' => \front\factory\Globelus::availability_status(),
|
||||||
|
'value' => $this -> candidate['status_of_availability'],
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'status_of_availability',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit date',
|
||||||
|
'label' => 'Dostępny od',
|
||||||
|
'id' => 'date_of_availability',
|
||||||
|
'value' => $this -> candidate['date_of_availability'] and $this -> candidate['date_of_availability'] != '0000-00-00' ? $this -> candidate['date_of_availability'] : '',
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'date_of_availability',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Doświadczenie w pracy za granicą',
|
||||||
|
'id' => 'experience_abroad',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> candidate['experience_abroad'],
|
||||||
|
'empty' => true,
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'experience_abroad',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Czy potrzebuje zakwaterowania',
|
||||||
|
'id' => 'accommodation',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> candidate['accommodation'],
|
||||||
|
'empty' => true,
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'accommodation',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Czy posiada prawo jazdy',
|
||||||
|
'id' => 'driving_license',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> candidate['driving_license'],
|
||||||
|
'empty' => true,
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'driving_license',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Czy dysponuje własnym samochodem',
|
||||||
|
'id' => 'own_car',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> candidate['own_car'],
|
||||||
|
'empty' => true,
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'own_car',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?
|
||||||
|
if ( file_exists( '../' . \front\factory\GlobelusCandidates::cv_url( $this -> candidate['id'] ) ) ):
|
||||||
|
$cv = '<a href="../../../cv/' . $this -> candidate['id'] . '/' . \S::get_token() . '/" target="_blank">zobacz CV</a>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
<?= \Html::form_text(
|
||||||
|
array(
|
||||||
|
'label' => 'CV',
|
||||||
|
'id' => 'cv',
|
||||||
|
'text' => $cv
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<hr />
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Dodatkowe informacje',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'name' => 'other_information',
|
||||||
|
'id' => 'other_information',
|
||||||
|
'value' => $this -> candidate['other_information'],
|
||||||
|
'inline' => true,
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'other_information',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<hr />
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Notatka od GLOBELUS.pl',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'name' => 'notes',
|
||||||
|
'id' => 'notes',
|
||||||
|
'value' => $this -> candidate['notes'],
|
||||||
|
'inline' => true,
|
||||||
|
'params' => [
|
||||||
|
'table' => 'globelus_candidates_data',
|
||||||
|
'column_id' => 'id',
|
||||||
|
'row_id' => $this -> candidate['data_id'],
|
||||||
|
'column' => 'notes',
|
||||||
|
'operation' => 'insert_update',
|
||||||
|
'values' => 'user_id;' . $this -> candidate['id']
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'candidate-preview';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Podgląd kandydata';
|
||||||
|
$grid -> actions = [
|
||||||
|
'cancel' => [ 'url' => '/admin/globelus_candidates/main_view/' ]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var old_data = [];
|
||||||
|
$( function()
|
||||||
|
{
|
||||||
|
$( 'input[type="text"].date-birth' ).datetimepicker({
|
||||||
|
format: "DD.MM.YYYY",
|
||||||
|
pickTime: false
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '#other_information, #notes' ).ckeditor( {
|
||||||
|
toolbar : 'MyTool',
|
||||||
|
height:'350'
|
||||||
|
});
|
||||||
|
|
||||||
|
var editor1 = $('#notes').ckeditorGet();
|
||||||
|
editor1.on( 'blur', function( evt ) {
|
||||||
|
var text = evt.editor.getData();
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus/save_to_db/',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
table: 'globelus_candidates_data',
|
||||||
|
column_id: 'user_id',
|
||||||
|
row_id: '<?= $this -> candidate['id'];?>',
|
||||||
|
column: 'notes',
|
||||||
|
operation: 'update',
|
||||||
|
value: text
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var editor = $('#other_information').ckeditorGet();
|
||||||
|
editor.on( 'blur', function( evt ) {
|
||||||
|
var text = evt.editor.getData();
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus/save_to_db/',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
table: 'globelus_candidates_data',
|
||||||
|
column_id: 'user_id',
|
||||||
|
row_id: '<?= $this -> candidate['id'];?>',
|
||||||
|
column: 'other_information',
|
||||||
|
operation: 'update',
|
||||||
|
value: text
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'focus', '.form-edit', function()
|
||||||
|
{
|
||||||
|
old_data[ $( this ).attr( 'name' ) ] = $( this ).val();
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'change', '.form-edit', function()
|
||||||
|
{
|
||||||
|
var input = $( this );
|
||||||
|
var table = $( this ).attr( 'table' );
|
||||||
|
var column_id = $( this ).attr( 'column_id' );
|
||||||
|
var row_id = $( this ).attr( 'row_id' );
|
||||||
|
var column = $( this ).attr( 'column' );
|
||||||
|
var operation = $( this ).attr( 'operation' );
|
||||||
|
var value = $( this ).val();
|
||||||
|
var values = $( this ).attr( 'values' );
|
||||||
|
var connect = $( this ).attr( 'connect' );
|
||||||
|
|
||||||
|
if ( input.attr( 'type' ) === 'checkbox' )
|
||||||
|
{
|
||||||
|
if ( !input.is( ':checked' ) )
|
||||||
|
value = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus/save_to_db/',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
table: table,
|
||||||
|
column_id: column_id,
|
||||||
|
row_id: row_id,
|
||||||
|
column: column,
|
||||||
|
operation: operation,
|
||||||
|
value: value,
|
||||||
|
values: values
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
input.attr( 'readonly', 'readonly' );
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
input.removeAttr( 'readonly' );
|
||||||
|
|
||||||
|
response = jQuery.parseJSON( data );
|
||||||
|
|
||||||
|
if ( response.status !== 'ok' )
|
||||||
|
{
|
||||||
|
if ( input.attr( 'type' ) === 'checkbox' )
|
||||||
|
{
|
||||||
|
if ( input.is( ':checked' ) === false )
|
||||||
|
input.prop( 'checked', true );
|
||||||
|
else
|
||||||
|
input.prop( 'checked', false );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
input.val( old_data[ input.attr( 'name' ) ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $.isNumeric( response.id ) )
|
||||||
|
{
|
||||||
|
input.attr( 'row_id', response.id );
|
||||||
|
$( '.' + connect ).attr( 'row_id', response.id );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'click', '.swith-account-type', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$.alert({
|
||||||
|
title: 'Potwierdź',
|
||||||
|
icon: 'fa fa-exclamation',
|
||||||
|
content: 'Na pewno chcesz zmienić typ wybranego konta?',
|
||||||
|
closeIcon: true,
|
||||||
|
closeIconClass: 'fa fa-close',
|
||||||
|
typeAnimated: true,
|
||||||
|
animation: 'opacity',
|
||||||
|
columnClass: 'large',
|
||||||
|
theme: 'modern',
|
||||||
|
buttons: {
|
||||||
|
cancel: {
|
||||||
|
text: 'zamknij',
|
||||||
|
btnClass: 'btn',
|
||||||
|
keys: ['enter'],
|
||||||
|
action: function() {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
confirm: {
|
||||||
|
text: 'zmień typ konta',
|
||||||
|
btnClass: 'btn-danger',
|
||||||
|
keys: ['enter'],
|
||||||
|
action: function() {
|
||||||
|
document.location.href = '/admin/globelus_candidates/switch_account_type/id=<?= $this -> candidate['id'];?>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'click', '.highlight', function()
|
||||||
|
{
|
||||||
|
$.prompt( 'Na pewno chcesz wyróżnić wybrany profil?',
|
||||||
|
{
|
||||||
|
title: 'Potwierdź?',
|
||||||
|
submit: function(e,v,m,f)
|
||||||
|
{
|
||||||
|
if ( v === true )
|
||||||
|
{
|
||||||
|
document.location.href="/admin/globelus_candidates/candidate_highlight/id=<?= $this -> candidate['id'];?>";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttons: {
|
||||||
|
'tak': true,
|
||||||
|
'nie': false
|
||||||
|
},
|
||||||
|
focus: 0
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style type="text/css">
|
||||||
|
hr {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
#g-edit-save {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.g-container .panel-body {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.avatar {
|
||||||
|
height: 150px;
|
||||||
|
width: 150px;
|
||||||
|
float: right;
|
||||||
|
padding: 3px;
|
||||||
|
background: #FFF;
|
||||||
|
box-shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.2 );
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
.avatar img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
63
admin/templates/globelus-candidates/candidate-visits.php
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_candidates_visits' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gcv.id, date,'
|
||||||
|
. '(SELECT firm_name FROM globelus_firms_data AS gfd WHERE gfd.user_id = gcv.firm_id ) AS firm '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_candidates_visits AS gcv '
|
||||||
|
. 'WHERE '
|
||||||
|
. 'gcv.candidate_id = ' . $this -> candidate_id . ' '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gcv.id, date,'
|
||||||
|
. '(SELECT firm_name FROM globelus_firms_data AS gfd WHERE gfd.user_id = gcv.firm_id ) AS firm '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_candidates_visits AS gcv '
|
||||||
|
. 'WHERE '
|
||||||
|
. 'gcv.candidate_id = ' . $this -> candidate_id . ' '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
$grid -> order = [ 'column' => 'date', 'type' => 'DESC' ];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data',
|
||||||
|
'db' => 'date',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 160px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Firma',
|
||||||
|
'db' => 'firm',
|
||||||
|
'sort' => true
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Wstecz',
|
||||||
|
'url' => '/admin/globelus_candidates/main_view/',
|
||||||
|
'icon' => 'fa-undo',
|
||||||
|
'class' => 'btn btn-dark btn-sm mr5"'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
140
admin/templates/globelus-candidates/main-view.php
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_candidates' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gu.id, CONCAT( surname, \' \', name ) AS candidate_name, hash, phone, email, status, register_date, active_to, gcd.last_refresh, highlight, highlight_to, visits, visible '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_users AS gu '
|
||||||
|
. 'LEFT JOIN globelus_candidates_data AS gcd ON gcd.user_id = gu.id '
|
||||||
|
. 'WHERE '
|
||||||
|
. 'type = 0 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gu.id, CONCAT( surname, \' \', name ) AS candidate_name, hash, phone, email, status, register_date, active_to, gcd.last_refresh, highlight, highlight_to, visits, visible '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_users AS gu '
|
||||||
|
. 'LEFT JOIN globelus_candidates_data AS gcd ON gcd.user_id = gu.id '
|
||||||
|
. 'WHERE '
|
||||||
|
. 'type = 0 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
$grid -> order = [ 'column' => 'register_date', 'type' => 'DESC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Imię i nazwisko', 'db' => 'candidate_name', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'P. widoczny', 'db' => 'visible', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'Telefon', 'db' => 'phone', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Email', 'db' => 'email', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Data rejestracji', 'db' => 'register_date', 'type' => 'date_range' ],
|
||||||
|
[ 'name' => 'Aktywny do', 'db' => 'active_to', 'type' => 'date_range' ],
|
||||||
|
[ 'name' => 'Wyróżniony', 'db' => 'highlight', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Imię i nazwisko',
|
||||||
|
'db' => 'candidate_name',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Email',
|
||||||
|
'db' => 'email',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Telefon',
|
||||||
|
'db' => 'phone',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywny',
|
||||||
|
'db' => 'status',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'P. widoczny',
|
||||||
|
'db' => 'visible',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data rejestracji',
|
||||||
|
'db' => 'register_date',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'echo date( "Y-m-d", strtotime( "[register_date]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywny do',
|
||||||
|
'db' => 'active_to',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Odświeżono',
|
||||||
|
'db' => 'last_refresh',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'echo date( "Y-m-d", strtotime( "[last_refresh]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Wyróżniony',
|
||||||
|
'db' => 'highlight',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'if ( "[highlight]" ) echo \'<span class="text-success">\' . date( "Y-m-d", strtotime( "[highlight_to]" ) ) . \'</span>\';',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Odwiedziny',
|
||||||
|
'db' => 'visits',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'echo "<a href=\'/admin/globelus_candidates/candidate_visits/id=[id]\'>[visits]</a>";',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Akcja',
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 50px;' ],
|
||||||
|
'content' => '<a href="/admin/globelus_candidates/candidate_preview/id=[id]">podgląd</a>'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Akcja',
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 100px;' ],
|
||||||
|
'content' => '<a href="/login-as/[hash]" target="_blank">zaloguj jako</a>'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Usuń',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/globelus_candidates/candidate_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_candidates_unregistered' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gaa.id, CONCAT( surname, \' \', name ) AS candidate_name, phone, email, date_add, cv, cv_extension '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_adverts_answers AS gaa '
|
||||||
|
. 'WHERE '
|
||||||
|
. 'user_id IS NULL '
|
||||||
|
. 'AND '
|
||||||
|
. 'cv IS NOT NULL '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gaa.id, CONCAT( surname, \' \', name ) AS candidate_name, phone, email, cv, cv_extension '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_adverts_answers AS gaa '
|
||||||
|
. 'WHERE '
|
||||||
|
. 'user_id IS NULL '
|
||||||
|
. 'AND '
|
||||||
|
. 'cv IS NOT NULL '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
$grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Imię i nazwisko', 'db' => 'candidate_name', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Telefon', 'db' => 'phone', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Email', 'db' => 'email', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Data', 'db' => 'register_date', 'type' => 'date_range' ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data',
|
||||||
|
'db' => 'register_date',
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 200px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Email',
|
||||||
|
'db' => 'email',
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 300px;' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'CV',
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 300px;' ],
|
||||||
|
'php' => 'if ( "[cv]" and ( file_exists( "../[cv]" ) or file_exists( "../../[cv]" ) ) ) echo "<a href=\'/cv-tmp/[id]/" . \S::get_token() . "\' target=\'blank\'>pobierz cv</a>";'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Telefon',
|
||||||
|
'db' => 'phone',
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 300px;' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Imię i nazwisko',
|
||||||
|
'db' => 'candidate_name',
|
||||||
|
'sort' => true
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
468
admin/templates/globelus-firms/firm-preview.php
Normal file
@@ -0,0 +1,468 @@
|
|||||||
|
<?
|
||||||
|
global $db, $settings;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<div class="logo">
|
||||||
|
<? if ( file_exists( '../' . \front\factory\GlobelusFirms::logo_url( $this -> firm['id'] ) ) ):?>
|
||||||
|
<img src="/logo/<?= $this -> firm['id'];?>/<?= \S::get_token();?>">
|
||||||
|
<? else:?>
|
||||||
|
<img src="/images/no-logo.jpg">
|
||||||
|
<? endif;?>
|
||||||
|
</div>
|
||||||
|
<div class="row mb15">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Profil aktywny',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'status',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> firm['status'],
|
||||||
|
'params' => [ 'table' => 'globelus_users', 'column_id' => 'id', 'row_id' => $this -> firm['id'], 'column' => 'status', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Widoczny na liście',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'firm_list',
|
||||||
|
'values' => [ 0 => 'nie', 1 => 'tak' ],
|
||||||
|
'value' => $this -> firm['firm_list'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'firm_list', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input( [
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Liczba punktów',
|
||||||
|
'id' => 'points',
|
||||||
|
'value' => $this -> firm['points'],
|
||||||
|
'params' => [ 'table' => 'globelus_users', 'column_id' => 'id', 'row_id' => $this -> firm['id'], 'column' => 'points', 'operation' => 'update' ]
|
||||||
|
]
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input( [
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit date',
|
||||||
|
'label' => 'Dostęp do bazy CV do',
|
||||||
|
'id' => 'cv_access_date',
|
||||||
|
'value' => $this -> firm['cv_access_date'],
|
||||||
|
'params' => [ 'table' => 'globelus_users', 'column_id' => 'id', 'row_id' => $this -> firm['id'], 'column' => 'cv_access_date', 'operation' => 'update' ]
|
||||||
|
]
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-2 control-label">Przypisane branże:</label>
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<div class="row">
|
||||||
|
<?
|
||||||
|
$categories[0] = '--- brak przypisanej kategorii ---';
|
||||||
|
if ( is_array( $this -> categories ) and count( $this -> categories ) ): foreach ( $this -> categories as $category ):
|
||||||
|
echo '<div class="col-xs-4">';
|
||||||
|
echo '<input type="checkbox" class="form-edit" table="globelus_firms_categories" operation="insert_delete" column_id="id" row_id="null" values="user_id;' . $this -> firm['id'] . '|category_id;' . $category['id'] . '" value="' . $category['id'] . '"'; if ( in_array( $category['id'], $this -> firm['categories'] ) ) echo ' checked="checked"'; echo '> ';
|
||||||
|
echo $category['name'];
|
||||||
|
echo '</div>';
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Nazwa firmy',
|
||||||
|
'id' => 'firm_name',
|
||||||
|
'value' => $this -> firm['firm_name'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'firm_name', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Nazwa firmy (wyświetlana)',
|
||||||
|
'id' => 'firm_name_profile',
|
||||||
|
'value' => $this -> firm['firm_name_profile'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'firm_name_profile', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='row'>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'NIP',
|
||||||
|
'id' => 'nip_vat',
|
||||||
|
'value' => $this -> firm['nip_vat'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'nip_vat', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Telefon',
|
||||||
|
'id' => 'phone',
|
||||||
|
'value' => $this -> firm['phone'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'phone', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::form_text(
|
||||||
|
array(
|
||||||
|
'label' => 'Adres email',
|
||||||
|
'id' => 'email',
|
||||||
|
'text' => $this -> firm['email']
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Strona www',
|
||||||
|
'id' => 'www',
|
||||||
|
'value' => $this -> firm['www'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'www', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?
|
||||||
|
$countries[0] = '--- brak przypisanego kraju ---';
|
||||||
|
if ( is_array( $this -> countries ) and count( $this -> countries ) ): foreach ( $this -> countries as $country ):
|
||||||
|
$countries[ $country['id'] ] = $country['name'];
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Kraj',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'id' => 'country_id',
|
||||||
|
'values' => $countries,
|
||||||
|
'value' => $this -> firm['country_id'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'country_id', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Region',
|
||||||
|
'id' => 'region',
|
||||||
|
'value' => $this -> firm['region'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'region', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Miasto',
|
||||||
|
'id' => 'city',
|
||||||
|
'value' => $this -> firm['city'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'city', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Kod pocztowy',
|
||||||
|
'id' => 'postal_code',
|
||||||
|
'value' => $this -> firm['postal_code'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'postal_code', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Ulica',
|
||||||
|
'id' => 'street',
|
||||||
|
'value' => $this -> firm['street'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'street', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'label' => 'Nr budynku/lokalu',
|
||||||
|
'id' => 'apartment_number',
|
||||||
|
'value' => $this -> firm['apartment_number'],
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'apartment_number', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Krótki opis firmy',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'name' => 'other_information',
|
||||||
|
'id' => 'other_information',
|
||||||
|
'value' => $this -> firm['other_information'],
|
||||||
|
'inline' => true,
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'other_information', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<hr />
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Klauzula',
|
||||||
|
'class' => 'form-edit',
|
||||||
|
'name' => 'clauses',
|
||||||
|
'id' => 'clauses',
|
||||||
|
'value' => $this -> firm['clauses'],
|
||||||
|
'inline' => true,
|
||||||
|
'params' => [ 'table' => 'globelus_firms_data', 'column_id' => 'user_id', 'row_id' => $this -> firm['id'], 'column' => 'clauses', 'operation' => 'update' ]
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'candidate-preview';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Podgląd pracodawcy';
|
||||||
|
$grid -> actions = [
|
||||||
|
'cancel' => [ 'url' => '/admin/globelus_firms/main_view/' ]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var old_data = [];
|
||||||
|
$( function()
|
||||||
|
{
|
||||||
|
$( '#other_information, #clauses' ).ckeditor( {
|
||||||
|
toolbar : 'MyTool',
|
||||||
|
height:'350'
|
||||||
|
});
|
||||||
|
|
||||||
|
var editor = $( '#clauses' ).ckeditor().editor;
|
||||||
|
editor.on( 'blur', function( evt ) {
|
||||||
|
var text = evt.editor.getData();
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus/save_to_db/',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
table: 'globelus_firms_data',
|
||||||
|
column_id: 'user_id',
|
||||||
|
row_id: '<?= $this -> firm['id'];?>',
|
||||||
|
column: 'clauses',
|
||||||
|
operation: 'update',
|
||||||
|
value: text
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var editor = $('#other_information').ckeditorGet();
|
||||||
|
editor.on( 'blur', function( evt ) {
|
||||||
|
var text = evt.editor.getData();
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus/save_to_db/',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
table: 'globelus_firms_data',
|
||||||
|
column_id: 'user_id',
|
||||||
|
row_id: '<?= $this -> firm['id'];?>',
|
||||||
|
column: 'other_information',
|
||||||
|
operation: 'update',
|
||||||
|
value: text
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'focus', '.form-edit', function()
|
||||||
|
{
|
||||||
|
old_data[ $( this ).attr( 'name' ) ] = $( this ).val();
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'change', '.form-edit', function()
|
||||||
|
{
|
||||||
|
var input = $( this );
|
||||||
|
var table = $( this ).attr( 'table' );
|
||||||
|
var column_id = $( this ).attr( 'column_id' );
|
||||||
|
var row_id = $( this ).attr( 'row_id' );
|
||||||
|
var column = $( this ).attr( 'column' );
|
||||||
|
var operation = $( this ).attr( 'operation' );
|
||||||
|
var value = $( this ).val();
|
||||||
|
var values = $( this ).attr( 'values' );
|
||||||
|
|
||||||
|
if ( input.attr( 'type' ) === 'checkbox' )
|
||||||
|
{
|
||||||
|
if ( !input.is( ':checked' ) )
|
||||||
|
value = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/globelus/save_to_db/',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
table: table,
|
||||||
|
column_id: column_id,
|
||||||
|
row_id: row_id,
|
||||||
|
column: column,
|
||||||
|
operation: operation,
|
||||||
|
value: value,
|
||||||
|
values: values
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
input.attr( 'readonly', 'readonly' );
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
input.removeAttr( 'readonly' );
|
||||||
|
|
||||||
|
response = jQuery.parseJSON( data );
|
||||||
|
|
||||||
|
if ( response.status !== 'ok' )
|
||||||
|
{
|
||||||
|
if ( input.attr( 'type' ) === 'checkbox' )
|
||||||
|
{
|
||||||
|
if ( input.is( ':checked' ) === false )
|
||||||
|
input.prop( 'checked', true );
|
||||||
|
else
|
||||||
|
input.prop( 'checked', false );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
input.val( old_data[ input.attr( 'name' ) ] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'click', '.status', function()
|
||||||
|
{
|
||||||
|
$.prompt( 'Na pewno chcesz aktywować wybrany profil?',
|
||||||
|
{
|
||||||
|
title: 'Potwierdź?',
|
||||||
|
submit: function(e,v,m,f)
|
||||||
|
{
|
||||||
|
if ( v === true )
|
||||||
|
{
|
||||||
|
document.location.href="/admin/globelus_firms/firm_enabled/id=<?= $this -> firm['id'];?>";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttons: {
|
||||||
|
'tak': true,
|
||||||
|
'nie': false
|
||||||
|
},
|
||||||
|
focus: 0
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style type="text/css">
|
||||||
|
hr {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
#g-edit-save {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.g-container .panel-body {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
height: 150px;
|
||||||
|
width: 150px;
|
||||||
|
float: right;
|
||||||
|
padding: 3px;
|
||||||
|
background: #FFF;
|
||||||
|
box-shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.2 );
|
||||||
|
}
|
||||||
|
.logo img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
153
admin/templates/globelus-firms/main-view.php
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_firms' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gu.id, firm_name, phone, email, nip_vat, status, register_date, firm_list, hash, gu.points, cv_access, '
|
||||||
|
. '(SELECT COUNT(0) FROM globelus_adverts AS ga WHERE ga.user_id = gu.id AND visible = 1 ) AS visible_adverts, '
|
||||||
|
. '(SELECT COUNT(0) FROM globelus_adverts AS ga WHERE ga.user_id = gu.id AND visible = 0 ) AS invisible_adverts '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_users AS gu '
|
||||||
|
. 'LEFT JOIN globelus_firms_data AS gfd ON gfd.user_id = gu.id '
|
||||||
|
. 'WHERE '
|
||||||
|
. 'type = 1 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gu.id, firm_name, phone, email, nip_vat, status, register_date, firm_list, hash, gu.points, cv_access, '
|
||||||
|
. '(SELECT COUNT(0) FROM globelus_adverts AS ga WHERE ga.user_id = gu.id AND visible = 1 ) AS visible_adverts, '
|
||||||
|
. '(SELECT COUNT(0) FROM globelus_adverts AS ga WHERE ga.user_id = gu.id AND visible = 0 ) AS invisible_adverts '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_users AS gu '
|
||||||
|
. 'LEFT JOIN globelus_firms_data AS gfd ON gfd.user_id = gu.id '
|
||||||
|
. 'WHERE '
|
||||||
|
. 'type = 1 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
$grid -> order = [ 'column' => 'firm_name', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Nazwa', 'db' => 'firm_name', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'Na liście', 'db' => 'firm_list', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'Telefon', 'db' => 'phone', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Email', 'db' => 'email', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'NIP', 'db' => 'nip', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Data rejestracji', 'db' => 'register_date', 'type' => 'date_range' ],
|
||||||
|
[ 'name' => 'Dostęp do CV', 'db' => 'cv_access', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'firm_name',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Email',
|
||||||
|
'db' => 'email'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Telefon',
|
||||||
|
'db' => 'phone',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywny',
|
||||||
|
'db' => 'status',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Na liście',
|
||||||
|
'db' => 'firm_list',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Data rejestracji',
|
||||||
|
'db' => 'register_date',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||||
|
'php' => 'echo date( "Y-m-d", strtotime( "[register_date]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywny do',
|
||||||
|
'db' => 'active_to',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Odświeżono',
|
||||||
|
'db' => 'last_refresh',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Ogłoszenia aktywne',
|
||||||
|
'db' => 'visible_adverts',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Ogłoszenia nieaktywne',
|
||||||
|
'db' => 'invisible_adverts',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Punkty',
|
||||||
|
'db' => 'points',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 75px;' ],
|
||||||
|
'sort' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Dostęp do CV',
|
||||||
|
'db' => 'cv_access',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 125px;' ],
|
||||||
|
'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Akcja',
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 50px;' ],
|
||||||
|
'content' => '<a href="/admin/globelus_firms/firm_preview/id=[id]">podgląd</a>'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Akcja',
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 100px;' ],
|
||||||
|
'content' => '<a href="/login-as/[hash]" target="_blank">zaloguj jako</a>'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Usuń',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/globelus_firms/firm_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
94
admin/templates/globelus-firms/orders-list.php
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_orders' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'go.id, go.date_order, go.points, go.price, gfd.firm_name, gfd.nip_vat, gfd.street, gfd.postal_code, gfd.apartment_number, gfd.city, gu.email, fvat '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_orders AS go '
|
||||||
|
. 'LEFT JOIN globelus_firms_data AS gfd ON gfd.user_id = go.user_id '
|
||||||
|
. 'LEFT JOIN globelus_users AS gu ON gu.id = go.user_id '
|
||||||
|
. 'WHERE '
|
||||||
|
. 'go.status = 1 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'go.id, go.date_order, go.points, go.price, gfd.firm_name, gfd.nip_vat, gfd.street, gfd.postal_code, gfd.apartment_number, gfd.city, gu.email, fvat '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_orders AS go '
|
||||||
|
. 'LEFT JOIN globelus_firms_data AS gfd ON gfd.user_id = go.user_id '
|
||||||
|
. 'LEFT JOIN globelus_users AS gu ON gu.id = go.user_id '
|
||||||
|
. 'WHERE '
|
||||||
|
. 'go.status = 1 '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
$grid -> order = [ 'column' => 'date_order', 'type' => 'DESC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Firma', 'db' => 'firm_name', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Faktura', 'db' => 'fvat', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Data zamówienia',
|
||||||
|
'db' => 'date_order',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_order]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Punkty',
|
||||||
|
'db' => 'points',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 100px;' ]
|
||||||
|
], [
|
||||||
|
'name' => 'Cena',
|
||||||
|
'db' => 'price',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 100px;' ],
|
||||||
|
'php' => 'echo "[price] zł";'
|
||||||
|
], [
|
||||||
|
'name' => 'Firma',
|
||||||
|
'db' => 'firm_name'
|
||||||
|
], [
|
||||||
|
'name' => 'Email',
|
||||||
|
'db' => 'email',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ]
|
||||||
|
], [
|
||||||
|
'name' => 'NIP',
|
||||||
|
'db' => 'nip_vat'
|
||||||
|
], [
|
||||||
|
'name' => 'Adres',
|
||||||
|
'php' => 'echo "[postal_code] [city], [street] [apartment_number]";'
|
||||||
|
], [
|
||||||
|
'name' => 'Faktura',
|
||||||
|
'db' => 'fvat',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center fvat', 'style' => 'cursor: pointer;' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||||
|
'sort' => true
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery( 'body' ).on( 'click', '.fvat', function()
|
||||||
|
{
|
||||||
|
document.location.href = '/admin/globelus_firms/order_fvat_switch/order-id=' + jQuery( this ).parent( 'tr' ).attr( 'id' );
|
||||||
|
});
|
||||||
|
</script>
|
||||||
159
admin/templates/globelus-firms/points-history.php
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_points_history' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gph.date_event, gph.points, gph.event_type, gfd.firm_name, gfd.nip_vat, gfd.street, gfd.postal_code, gfd.apartment_number, gfd.city, gu.email '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_points_history AS gph '
|
||||||
|
. 'LEFT JOIN globelus_firms_data AS gfd ON gfd.user_id = gph.user_id '
|
||||||
|
. 'LEFT JOIN globelus_users AS gu ON gu.id = gph.user_id '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'gph.date_event, gph.points, gph.event_type, gfd.firm_name, gfd.nip_vat, gfd.street, gfd.postal_code, gfd.apartment_number, gfd.city, gu.email '
|
||||||
|
. 'FROM '
|
||||||
|
. 'globelus_points_history AS gph '
|
||||||
|
. 'LEFT JOIN globelus_firms_data AS gfd ON gfd.user_id = gph.user_id '
|
||||||
|
. 'LEFT JOIN globelus_users AS gu ON gu.id = gph.user_id '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
$grid -> order = [ 'column' => 'date_event', 'type' => 'DESC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[
|
||||||
|
'name' => 'Typ wydarzenia',
|
||||||
|
'db' => 'event_type',
|
||||||
|
'type' => 'select',
|
||||||
|
'replace' => [
|
||||||
|
'array' => [
|
||||||
|
1 => 'wyróżnienie ogłoszenia',
|
||||||
|
2 => 'polecenie ogłoszenia',
|
||||||
|
3 => 'odświeżenie ogłoszenia',
|
||||||
|
4 => 'dodanie ogłoszenia',
|
||||||
|
5 => 'dostęp do bazy kandydatów',
|
||||||
|
6 => 'dodatkowa promocja ogłoszenia'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
], [
|
||||||
|
'name' => 'Nazwa firmy',
|
||||||
|
'db' => 'firm_name',
|
||||||
|
'type' => 'text'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Data wydarzenia',
|
||||||
|
'db' => 'date_event',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||||
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_event]" ) );',
|
||||||
|
'sort' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Punkty',
|
||||||
|
'db' => 'points',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 100px;' ]
|
||||||
|
], [
|
||||||
|
'name' => 'Typ wydarzenia',
|
||||||
|
'db' => 'event_type',
|
||||||
|
'replace' => [
|
||||||
|
'array' => [
|
||||||
|
1 => 'wyróżnienie ogłoszenia',
|
||||||
|
2 => 'polecenie ogłoszenia',
|
||||||
|
3 => 'odświeżenie ogłoszenia',
|
||||||
|
4 => 'dodanie ogłoszenia',
|
||||||
|
5 => 'dostęp do bazy kandydatów',
|
||||||
|
6 => 'dodatkowa promocja ogłoszenia'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
], [
|
||||||
|
'name' => 'Firma',
|
||||||
|
'db' => 'firm_name'
|
||||||
|
], [
|
||||||
|
'name' => 'Email',
|
||||||
|
'db' => 'email',
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ]
|
||||||
|
], [
|
||||||
|
'name' => 'NIP',
|
||||||
|
'db' => 'nip_vat'
|
||||||
|
], [
|
||||||
|
'name' => 'Adres',
|
||||||
|
'php' => 'echo "[postal_code] [city], [street] [apartment_number]";'
|
||||||
|
]
|
||||||
|
// [
|
||||||
|
// 'name' => 'Aktywny',
|
||||||
|
// 'db' => 'status',
|
||||||
|
// 'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
// 'td' => [ 'class' => 'g-center' ],
|
||||||
|
// 'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
// 'sort' => true
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// 'name' => 'Na liście',
|
||||||
|
// 'db' => 'firm_list',
|
||||||
|
// 'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
// 'td' => [ 'class' => 'g-center' ],
|
||||||
|
// 'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
// 'sort' => true
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// 'name' => 'Aktywny do',
|
||||||
|
// 'db' => 'active_to',
|
||||||
|
// 'td' => [ 'class' => 'g-center' ],
|
||||||
|
// 'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
// 'sort' => true
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// 'name' => 'Odświeżono',
|
||||||
|
// 'db' => 'last_refresh',
|
||||||
|
// 'td' => [ 'class' => 'g-center' ],
|
||||||
|
// 'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// 'name' => 'Ogłoszenia aktywne',
|
||||||
|
// 'db' => 'visible_adverts',
|
||||||
|
// 'td' => [ 'class' => 'g-center' ],
|
||||||
|
// 'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ]
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// 'name' => 'Ogłoszenia nieaktywne',
|
||||||
|
// 'db' => 'invisible_adverts',
|
||||||
|
// 'td' => [ 'class' => 'g-center' ],
|
||||||
|
// 'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ]
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// 'name' => 'Akcja',
|
||||||
|
// 'th' => [ 'class' => 'g-center' ],
|
||||||
|
// 'td' => [ 'class' => 'g-center', 'style' => 'width: 50px;' ],
|
||||||
|
// 'content' => '<a href="/admin/globelus_firms/firm_preview/id=[id]">podgląd</a>'
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// 'name' => 'Akcja',
|
||||||
|
// 'th' => [ 'class' => 'g-center' ],
|
||||||
|
// 'td' => [ 'class' => 'g-center', 'style' => 'width: 100px;' ],
|
||||||
|
// 'content' => '<a href="/login-as/[hash]" target="_blank">zaloguj jako</a>'
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// 'name' => 'Usuń',
|
||||||
|
// 'action' => [ 'type' => 'delete', 'url' => '/admin/globelus_firms/firm_delete/id=[id]' ],
|
||||||
|
// 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
// 'td' => [ 'class' => 'g-center' ]
|
||||||
|
// ]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
30
admin/templates/globelus-params/categories-list.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_adverts_categories' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Nazwa', 'db' => 'name', 'type' => 'text' ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> columns_edit = [
|
||||||
|
[
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
'type' => 'text',
|
||||||
|
'require' => true
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> actions = [ 'edit' => true, 'add' => true, 'delete' => true ];
|
||||||
|
echo $grid -> draw();
|
||||||
31
admin/templates/globelus-params/countries-list.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_countries' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Nazwa', 'db' => 'name', 'type' => 'text' ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> columns_edit = [
|
||||||
|
[
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
'type' => 'text',
|
||||||
|
'require' => true
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> actions = [ 'edit' => true, 'add' => true, 'delete' => true ];
|
||||||
|
echo $grid -> draw();
|
||||||
30
admin/templates/globelus-params/positions-list.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_positions' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Nazwa', 'db' => 'name', 'type' => 'text' ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
], [
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> columns_edit = [
|
||||||
|
[
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
'type' => 'text',
|
||||||
|
'require' => true
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> actions = [ 'edit' => true, 'add' => true, 'delete' => true ];
|
||||||
|
echo $grid -> draw();
|
||||||
42
admin/templates/globelus-settings/main-view.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'globelus_settings' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'param', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'param', 'db' => 'text', 'type' => 'text' ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Parametr',
|
||||||
|
'db' => 'param',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Wartośc',
|
||||||
|
'db' => 'value'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> columns_edit = [
|
||||||
|
[
|
||||||
|
'name' => 'Parametr',
|
||||||
|
'db' => 'param',
|
||||||
|
'type' => 'text',
|
||||||
|
'readonly-edit' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Wartość',
|
||||||
|
'db' => 'value',
|
||||||
|
'type' => 'text',
|
||||||
|
'readonly' => true
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> actions = [ 'edit' => true ];
|
||||||
|
echo $grid -> draw();
|
||||||
25
admin/templates/html/button.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?
|
||||||
|
$out = '<a ';
|
||||||
|
$out .= 'class="btn ' . $this -> params['class'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['style'] )
|
||||||
|
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['js'] )
|
||||||
|
$out .= 'onclick="' . htmlspecialchars( $this -> params['js'] ) . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['url'] )
|
||||||
|
$out .= 'href="' . htmlspecialchars( $this -> params['url'] ) . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['id'] )
|
||||||
|
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['title'] )
|
||||||
|
$out .= 'title="' . htmlspecialchars( $this -> params['title'] ) . '" ';
|
||||||
|
$out .= '>';
|
||||||
|
if ( $this -> params['icon'] )
|
||||||
|
$out .= '<i class="fa ' . $this -> params['icon'] . ' mr5"></i>';
|
||||||
|
$out .= $this -> params['text'];
|
||||||
|
$out .= '</a>';
|
||||||
|
|
||||||
|
echo $out;
|
||||||
8
admin/templates/html/form-text.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label"><?= $this -> params['label'];?>:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<p class="form-control-static" id="<?= $this -> params['id'];?>">
|
||||||
|
<?= $this -> params['text'];?>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
70
admin/templates/html/input-icon.php
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
<?
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
{
|
||||||
|
$out .= '<div class="form-group ';
|
||||||
|
if ( $this -> params['inline'] )
|
||||||
|
$out .= 'pl10 pr10';
|
||||||
|
$out .= '">';
|
||||||
|
$out .= '<label class="';
|
||||||
|
if ( !$this -> params['inline'] )
|
||||||
|
$out .= 'col-lg-3 ';
|
||||||
|
if ( $this -> params['inline'] )
|
||||||
|
$out .= 'mb5 ';
|
||||||
|
$out .= 'control-label">' . $this -> params['label'] . ':</label>';
|
||||||
|
$out .= '<div class="';
|
||||||
|
if ( !$this -> params['inline'] )
|
||||||
|
$out .= 'col-lg-9';
|
||||||
|
$out .= '">';
|
||||||
|
}
|
||||||
|
$out .= '<div class="input-group">';
|
||||||
|
$out .= '<input ';
|
||||||
|
$out .= 'type="' . $this -> params['type'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['id'] )
|
||||||
|
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['class'] or $this -> params['label'] )
|
||||||
|
{
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
|
||||||
|
else if ( $this -> params['class'] )
|
||||||
|
$out .= 'class="' . $this -> params['class'] . '" ';
|
||||||
|
}
|
||||||
|
|
||||||
|
$out .= 'name="' . $this -> params['name'] . '" ';
|
||||||
|
$out .= 'value="' . $this -> secureHTML( $this -> params['value'] ) . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['js'] )
|
||||||
|
$out .= 'onchange="' . htmlspecialchars( $this -> params['js'] ) . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['js_key'] )
|
||||||
|
$out .= 'onkeyup="' . htmlspecialchars( $this -> params['js_key'] ) . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['style'] )
|
||||||
|
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['readonly'] )
|
||||||
|
$out .= 'readonly="readonly" ';
|
||||||
|
|
||||||
|
if ( $this -> params['autocomplete'] == 'off' )
|
||||||
|
$out .= 'autocomplete="off" ';
|
||||||
|
|
||||||
|
$out .= ' />';
|
||||||
|
|
||||||
|
$out .= '<span class="input-group-addon btn btn-info ' . $this -> params['icon_class'] . '"';
|
||||||
|
|
||||||
|
if ( $this -> params['icon_js'] )
|
||||||
|
$out .= 'onclick="' . htmlspecialchars( $this -> params['icon_js'] ) . '" ';
|
||||||
|
|
||||||
|
$out .= '>';
|
||||||
|
$out .= $this -> params['icon_content'];
|
||||||
|
$out .= '</span>';
|
||||||
|
$out .= '</div>';
|
||||||
|
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
{
|
||||||
|
$out .= '</div>';
|
||||||
|
$out .= '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $out;
|
||||||
36
admin/templates/html/input-switch.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
{
|
||||||
|
$out .= '<div class="form-group">';
|
||||||
|
$out .= '<label class="col-lg-3 control-label">' . $this -> params['label'] . ':</label>';
|
||||||
|
$out .= '<div class="col-lg-9 pt5">';
|
||||||
|
}
|
||||||
|
|
||||||
|
$out .= '<div class="switch switch-primary round switch-inline">';
|
||||||
|
$out .= '<input ';
|
||||||
|
|
||||||
|
if ( $this -> params['id'] )
|
||||||
|
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||||
|
else
|
||||||
|
$out .= 'id="' . $this -> params['name'] . '" ';
|
||||||
|
$out .= 'name="' . $this -> params['name'] . '" type="checkbox"';
|
||||||
|
|
||||||
|
if ( $this -> params['checked'] )
|
||||||
|
$out .= 'checked="checked" ';
|
||||||
|
|
||||||
|
$out .= '>';
|
||||||
|
$out .= '<label for="';
|
||||||
|
if ( $this -> params['id'] )
|
||||||
|
$out .= $this -> params['id'];
|
||||||
|
else
|
||||||
|
$out .= $this -> params['name'];
|
||||||
|
$out .= '"></label>';
|
||||||
|
$out .= '</div>';
|
||||||
|
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
{
|
||||||
|
$out .= '</div>';
|
||||||
|
$out .= '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $out;
|
||||||
66
admin/templates/html/input.php
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<?
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
{
|
||||||
|
$out .= '<div class="form-group ';
|
||||||
|
if ( $this -> params['inline'] )
|
||||||
|
$out .= 'pl10 pr10';
|
||||||
|
$out .= '">';
|
||||||
|
$out .= '<label class="';
|
||||||
|
if ( !$this -> params['inline'] )
|
||||||
|
$out .= 'col-lg-3 ';
|
||||||
|
if ( $this -> params['inline'] )
|
||||||
|
$out .= 'mb5 ';
|
||||||
|
$out .= 'control-label">' . $this -> params['label'] . ':</label>';
|
||||||
|
$out .= '<div class="';
|
||||||
|
if ( !$this -> params['inline'] )
|
||||||
|
$out .= 'col-lg-9';
|
||||||
|
$out .= '">';
|
||||||
|
}
|
||||||
|
|
||||||
|
$out .= '<input ';
|
||||||
|
$out .= 'type="' . $this -> params['type'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['id'] )
|
||||||
|
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['class'] or $this -> params['label'] )
|
||||||
|
{
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
|
||||||
|
else if ( $this -> params['class'] )
|
||||||
|
$out .= 'class="' . $this -> params['class'] . '" ';
|
||||||
|
}
|
||||||
|
|
||||||
|
$out .= 'name="' . $this -> params['name'] . '" ';
|
||||||
|
$out .= 'value="' . $this -> secureHTML( $this -> params['value'] ) . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['style'] )
|
||||||
|
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['js'] )
|
||||||
|
$out .= 'onchange="' . htmlspecialchars( $this -> params['js'] ) . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['js_key'] )
|
||||||
|
$out .= 'onkeyup="' . htmlspecialchars( $this -> params['js_key'] ) . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['readonly'] )
|
||||||
|
$out .= 'readonly="readonly" ';
|
||||||
|
|
||||||
|
if ( $this -> params['autocomplete'] == 'off' )
|
||||||
|
$out .= 'autocomplete="off" ';
|
||||||
|
|
||||||
|
if ( $this -> params['checked'] == 'checked' )
|
||||||
|
$out .= 'checked="checked" ';
|
||||||
|
|
||||||
|
if ( is_array( $this -> params['params'] ) and count( $this -> params['params'] ) ) foreach ( $this -> params['params'] as $key => $val )
|
||||||
|
$out .= $key . '="' . $val . '" ';
|
||||||
|
|
||||||
|
$out .= ' />';
|
||||||
|
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
{
|
||||||
|
$out .= '</div>';
|
||||||
|
$out .= '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $out;
|
||||||
8
admin/templates/html/panel.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<div class="panel <?= $this -> params['class'];?>">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<span class="panel-title"><?= $this -> params['title'];?></span>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<?= $this -> params['content'];?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
62
admin/templates/html/select.php
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<?
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
{
|
||||||
|
$out .= '<div class="form-group ';
|
||||||
|
if ( $this -> params['inline'] )
|
||||||
|
$out .= 'pl10 pr10';
|
||||||
|
$out .= '">';
|
||||||
|
$out .= '<label class="';
|
||||||
|
if ( !$this -> params['inline'] )
|
||||||
|
$out .= 'col-lg-3 ';
|
||||||
|
if ( $this -> params['inline'] )
|
||||||
|
$out .= 'mb5 ';
|
||||||
|
$out .= 'control-label">' . $this -> params['label'] . ':</label>';
|
||||||
|
$out .= '<div class="';
|
||||||
|
if ( !$this -> params['inline'] )
|
||||||
|
$out .= 'col-lg-9';
|
||||||
|
$out .= '">';
|
||||||
|
}
|
||||||
|
|
||||||
|
$out .= '<select ';
|
||||||
|
|
||||||
|
if ( $this -> params['id'] )
|
||||||
|
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['class'] or $this -> params['label'] )
|
||||||
|
{
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
|
||||||
|
else if ( $this -> params['class'] )
|
||||||
|
$out .= 'class="' . $this -> params['class'] . '" ';
|
||||||
|
}
|
||||||
|
|
||||||
|
$out .= 'name="' . $this -> params['name'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['style'] )
|
||||||
|
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['readonly'] )
|
||||||
|
$out .= 'readonly="readonly" ';
|
||||||
|
|
||||||
|
if ( is_array( $this -> params['params'] ) and count( $this -> params['params'] ) ) foreach ( $this -> params['params'] as $key => $val )
|
||||||
|
$out .= $key . '="' . $val . '" ';
|
||||||
|
|
||||||
|
$out .= '>';
|
||||||
|
|
||||||
|
if ( $this -> params['empty'] )
|
||||||
|
$out .= '<option value="">--- ' . mb_strtolower( $this -> params['label'], 'UTF-8' ) . ' ---</option>';
|
||||||
|
|
||||||
|
if ( is_array( $this -> params['values'] ) ) foreach ( $this -> params['values'] as $key => $val )
|
||||||
|
{
|
||||||
|
$out .= '<option value="' . $key . '"'; if ( $key == $this -> params['value'] and $this -> params['value'] !== null ) $out .= 'selected="selected"'; $out .='>' . $val . '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$out .= '</select>';
|
||||||
|
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
{
|
||||||
|
$out .= '</div>';
|
||||||
|
$out .= '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $out;
|
||||||
52
admin/templates/html/textarea.php
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
{
|
||||||
|
$out .= '<div class="form-group ';
|
||||||
|
if ( $this -> params['inline'] )
|
||||||
|
$out .= 'pl10 pr10';
|
||||||
|
$out .= '">';
|
||||||
|
$out .= '<label class="';
|
||||||
|
if ( !$this -> params['inline'] )
|
||||||
|
$out .= 'col-lg-3 ';
|
||||||
|
if ( $this -> params['inline'] )
|
||||||
|
$out .= 'mb5 ';
|
||||||
|
$out .= 'control-label">' . $this -> params['label'] . ':</label>';
|
||||||
|
$out .= '<div class="';
|
||||||
|
if ( !$this -> params['inline'] )
|
||||||
|
$out .= 'col-lg-9';
|
||||||
|
$out .= '">';
|
||||||
|
}
|
||||||
|
|
||||||
|
$out .= '<textarea ';
|
||||||
|
|
||||||
|
if ( $this -> params['id'] )
|
||||||
|
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['class'] or $this -> params['label'] )
|
||||||
|
{
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
|
||||||
|
else if ( $this -> params['class'] )
|
||||||
|
$out .= 'class="' . $this -> params['class'] . '" ';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $this -> params['js'] )
|
||||||
|
$out .= 'onchange="' . htmlspecialchars( $this -> params['js'] ) . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['js_key'] )
|
||||||
|
$out .= 'onkeyup="' . htmlspecialchars( $this -> params['js_key'] ) . '" ';
|
||||||
|
|
||||||
|
$out .= 'name="' . $this -> params['name'] . '" ';
|
||||||
|
|
||||||
|
if ( $this -> params['style'] )
|
||||||
|
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||||
|
|
||||||
|
$out .= ' rows="' . $this -> params['rows'] . '">' . $this -> secureHTML( $this -> params['value'] ) . '</textarea>';
|
||||||
|
|
||||||
|
if ( $this -> params['label'] )
|
||||||
|
{
|
||||||
|
$out .= '</div>';
|
||||||
|
$out .= '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $out;
|
||||||
98
admin/templates/languages/language-edit.php
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
<?
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
echo \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'hidden',
|
||||||
|
'name' => 'o',
|
||||||
|
'value' => $this -> language['o']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Język',
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => 'require',
|
||||||
|
'name' => 'name',
|
||||||
|
'value' => $this -> language['name']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if ( $this -> language['id'] )
|
||||||
|
{
|
||||||
|
echo \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'hidden',
|
||||||
|
'name' => 'id',
|
||||||
|
'value' => $this -> language['id']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'ID (2 znaki)',
|
||||||
|
'class' => 'require',
|
||||||
|
'type' => 'text',
|
||||||
|
'name' => 'id'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
echo \Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Aktywny',
|
||||||
|
'name' => 'status',
|
||||||
|
'checked' => $this -> language['status'] == 1 ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo \Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Domyślny',
|
||||||
|
'name' => 'start',
|
||||||
|
'checked' => $this -> language['start'] == 1 ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo '<hr />';
|
||||||
|
echo \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Domena',
|
||||||
|
'type' => 'text',
|
||||||
|
'name' => 'domain',
|
||||||
|
'value' => $this -> language['domain']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo \Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Domena domyślna',
|
||||||
|
'name' => 'main_domain',
|
||||||
|
'checked' => $this -> language['main_domain'] == 1 ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'language-edit';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Edycja języka';
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [ 'url' => '/admin/languages/language_save/', 'back_url' => '/admin/languages/view_list/' ],
|
||||||
|
'cancel' => [ 'url' => '/admin/languages/view_list/' ]
|
||||||
|
];
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( function()
|
||||||
|
{
|
||||||
|
disable_menu();
|
||||||
|
|
||||||
|
$( 'input[type="text"].date' ).datetimepicker({
|
||||||
|
format: "YYYY-MM-DD",
|
||||||
|
pickTime: false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
72
admin/templates/languages/languages-list.php
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_langs' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Język', 'db' => 'name', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||||
|
[ 'name' => 'Domyślny', 'db' => 'start', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Domyślny',
|
||||||
|
'db' => 'start',
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'if ( [start] ) echo "<span class=\'text-system\'>tak</span>"; else echo "nie";'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywny',
|
||||||
|
'db' => 'status',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Język',
|
||||||
|
'db' => 'name',
|
||||||
|
'php' => 'echo "<a href=\'/admin/languages/language_edit/id=[id]\'>[name]</a>";',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Domena',
|
||||||
|
'db' => 'domain',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Domena domyślna',
|
||||||
|
'db' => 'main_domain',
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'php' => 'if ( [main_domain] ) echo "<span class=\'text-system\'>tak</span>"; else echo "nie";'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Edytuj',
|
||||||
|
'action' => [ 'type' => 'edit', 'url' => '/admin/languages/language_edit/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Usuń',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/languages/language_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Dodaj język',
|
||||||
|
'url' => '/admin/languages/language_edit/',
|
||||||
|
'icon' => 'fa-plus-circle',
|
||||||
|
'class' => 'btn-success'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
60
admin/templates/languages/translation-edit.php
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<?
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<?
|
||||||
|
echo \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'label' => 'Tekst',
|
||||||
|
'name' => 'text',
|
||||||
|
'class' => 'require',
|
||||||
|
'value' => $this -> translation['text']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $language ):
|
||||||
|
echo \Html::input(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'label' => $language['name'],
|
||||||
|
'name' => $language['id'],
|
||||||
|
'value' => $this -> translation[$language['id']]
|
||||||
|
) );
|
||||||
|
endforeach;
|
||||||
|
endif;
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'translation-edit';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Edycja tłumaczenia';
|
||||||
|
$grid -> fields = [
|
||||||
|
[
|
||||||
|
'db' => 'id',
|
||||||
|
'type' => 'hidden',
|
||||||
|
'value' => $this -> translation['id']
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [ 'url' => '/admin/languages/translation_save/', 'back_url' => '/admin/languages/translation_list/' ],
|
||||||
|
'cancel' => [ 'url' => '/admin/languages/translation_list/' ]
|
||||||
|
];
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function ()
|
||||||
|
{
|
||||||
|
disable_menu();
|
||||||
|
|
||||||
|
$('input[type="text"].date').datetimepicker({
|
||||||
|
format: "YYYY-MM-DD",
|
||||||
|
pickTime: false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
44
admin/templates/languages/translations-list.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_langs_translations' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'text', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Tekst', 'db' => 'text', 'type' => 'text' ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Tekst',
|
||||||
|
'db' => 'text',
|
||||||
|
'php' => 'echo "<a href=\'/admin/languages/translation_edit/id=[id]\'>[text]</a>";',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Edytuj',
|
||||||
|
'action' => [ 'type' => 'edit', 'url' => '/admin/languages/translation_edit/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Usuń',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/languages/translation_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Dodaj tłumaczenie',
|
||||||
|
'url' => '/admin/languages/translation_edit/',
|
||||||
|
'icon' => 'fa-plus-circle',
|
||||||
|
'class' => 'btn-success'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
262
admin/templates/layouts/layout-edit.php
Normal file
@@ -0,0 +1,262 @@
|
|||||||
|
<link rel="stylesheet" href="/libraries/codemirror/lib/codemirror.css" />
|
||||||
|
<link rel="stylesheet" href="/libraries/codemirror/theme/material.css" />
|
||||||
|
<script type="text/javascript" src="/libraries/jquery-nested-sortable/jquery.mjs.nestedSortable.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/lib/codemirror.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/mode/css/css.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/mode/xml/xml.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/mode/javascript/javascript.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/mode/htmlmixed/htmlmixed.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/addon/mode/multiplex.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( function()
|
||||||
|
{
|
||||||
|
var code_html = CodeMirror.fromTextArea( document.getElementById( "html" ),{
|
||||||
|
lineWrapping: true,
|
||||||
|
mode: "text/html"
|
||||||
|
});
|
||||||
|
code_html.on( 'change', function(cm) {
|
||||||
|
$( '#html' ).val( cm.getValue() );
|
||||||
|
});
|
||||||
|
code_html.setOption( "theme", 'material' );
|
||||||
|
|
||||||
|
var code_css = CodeMirror.fromTextArea( document.getElementById( "css" ),{
|
||||||
|
lineWrapping: true,
|
||||||
|
mode: "css"
|
||||||
|
});
|
||||||
|
code_css.on( 'change', function(cm) {
|
||||||
|
$( '#css' ).val( cm.getValue() );
|
||||||
|
});
|
||||||
|
code_css.setOption( "theme", 'material' );
|
||||||
|
|
||||||
|
var code_js = CodeMirror.fromTextArea( document.getElementById( "js" ),{
|
||||||
|
lineWrapping: true,
|
||||||
|
mode: "javascript"
|
||||||
|
});
|
||||||
|
code_js.on( 'change', function(cm) {
|
||||||
|
$( '#js' ).val( cm.getValue() );
|
||||||
|
});
|
||||||
|
code_js.setOption( "theme", 'material' );
|
||||||
|
|
||||||
|
var code_m_html = CodeMirror.fromTextArea( document.getElementById( "m_html" ),{
|
||||||
|
lineWrapping: true,
|
||||||
|
mode: "text/html"
|
||||||
|
});
|
||||||
|
code_m_html.on( 'change', function(cm) {
|
||||||
|
$( '#m_html' ).val( cm.getValue() );
|
||||||
|
});
|
||||||
|
code_m_html.setOption( "theme", 'material' );
|
||||||
|
|
||||||
|
var code_m_css = CodeMirror.fromTextArea( document.getElementById( "m_css" ),{
|
||||||
|
lineWrapping: true,
|
||||||
|
mode: "css"
|
||||||
|
});
|
||||||
|
code_m_css.on( 'change', function(cm) {
|
||||||
|
$( '#m_css' ).val( cm.getValue() );
|
||||||
|
});
|
||||||
|
code_m_css.setOption( "theme", 'material' );
|
||||||
|
|
||||||
|
var code_m_js = CodeMirror.fromTextArea( document.getElementById( "m_js" ),{
|
||||||
|
lineWrapping: true,
|
||||||
|
mode: "javascript"
|
||||||
|
});
|
||||||
|
code_m_js.on( 'change', function(cm) {
|
||||||
|
$( '#m_js' ).val( cm.getValue() );
|
||||||
|
});
|
||||||
|
code_m_js.setOption( "theme", 'material' );
|
||||||
|
|
||||||
|
disable_menu();
|
||||||
|
|
||||||
|
$( '#layout-tabs' ).easyResponsiveTabs(
|
||||||
|
{
|
||||||
|
width: 'auto',
|
||||||
|
fit: true,
|
||||||
|
tabidentify: 'layout-tabs',
|
||||||
|
type: 'vertical'
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'click', '.select-page', function()
|
||||||
|
{
|
||||||
|
$( this ).parent( 'div' ).children( 'div.icheckbox_minimal-blue' ).children( 'input' ).iCheck( 'toggle' );
|
||||||
|
});
|
||||||
|
|
||||||
|
$('ol.sortable').nestedSortable(
|
||||||
|
{
|
||||||
|
forcePlaceholderSize: true,
|
||||||
|
handle: 'div',
|
||||||
|
helper: 'clone',
|
||||||
|
items: 'li',
|
||||||
|
opacity: .6,
|
||||||
|
placeholder: 'placeholder',
|
||||||
|
revert: 250,
|
||||||
|
tabSize: 25,
|
||||||
|
tolerance: 'pointer',
|
||||||
|
toleranceElement: '> div',
|
||||||
|
maxLevels: 3,
|
||||||
|
isTree: true,
|
||||||
|
expandOnHover: 700,
|
||||||
|
isAllowed: function()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '.disclose' ).on( 'click', function()
|
||||||
|
{
|
||||||
|
$( this ).closest( 'li' ).toggleClass( 'sort-collapsed' ).toggleClass( 'sort-expanded' );
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '.disclose' ).mousedown( function(e)
|
||||||
|
{
|
||||||
|
if ( e.which === 1 ) {
|
||||||
|
if ( $( this ).parent( 'div' ).hasClass( 'content_menu' ) )
|
||||||
|
{
|
||||||
|
var menu_id = $( this ).parent( 'div' ).parent( 'li' ).attr( 'menu' );
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data: {
|
||||||
|
a: 'cookie_menus',
|
||||||
|
menu_id: menu_id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var page_id = $( this ).parent( 'div' ).parent( 'li' ).attr( 'id' );
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data: {
|
||||||
|
a: 'cookie_pages',
|
||||||
|
page_id: page_id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$array = unserialize( $_COOKIE[ 'cookie_pages' ] );
|
||||||
|
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||||
|
if ( $val ):
|
||||||
|
?>$( '.<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||||
|
endif;
|
||||||
|
endforeach; endif;
|
||||||
|
|
||||||
|
$array = unserialize( $_COOKIE[ 'cookie_menus' ] );
|
||||||
|
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||||
|
if ( $val ):
|
||||||
|
?>$( '.menu_<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||||
|
endif;
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<div id="layout-tabs">
|
||||||
|
<ul class="resp-tabs-list layout-tabs">
|
||||||
|
<li><i class="fa fa-wrench"></i>Ustawienia</li>
|
||||||
|
<li><i class="fa fa-html5"></i>HTML</li>
|
||||||
|
<li><i class="fa fa-html5"></i>CSS</li>
|
||||||
|
<li><i class="fa fa-html5"></i>JS</li>
|
||||||
|
<li><i class="fa fa-mobile"></i>HTML - mobile</li>
|
||||||
|
<li><i class="fa fa-mobile"></i>CSS - mobile</li>
|
||||||
|
<li><i class="fa fa-mobile"></i>JS - mobile</li>
|
||||||
|
</ul>
|
||||||
|
<div class="resp-tabs-container layout-tabs">
|
||||||
|
<div>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Nazwa',
|
||||||
|
'name' => 'name',
|
||||||
|
'id' => 'name',
|
||||||
|
'value' => $this -> layout['name']
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Szablon domyślny',
|
||||||
|
'name' => 'status',
|
||||||
|
'checked' => $this -> layout['status'] == 1 ? true : false
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Strony:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<?
|
||||||
|
if ( is_array( $this -> menus ) ) foreach ( $this -> menus as $menu )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="menu_sortable">
|
||||||
|
<ol class="sortable" id="sortable_<?= $menu['id'];?>">
|
||||||
|
<li id="list_<?= $menu['id'];?>" class="menu_<?= $menu['id'];?>" menu="<?= $menu['id'];?>">
|
||||||
|
<div class="context_0 content content_menu" <? if ( !$menu['status'] ) echo 'style="color: #cc0000;"';?>>
|
||||||
|
<span class="disclose"><span></span></span>
|
||||||
|
Menu: <b><?= $menu['name'];?></b>
|
||||||
|
</div>
|
||||||
|
<?= \admin\view\Layouts::subpages_list( \admin\factory\Pages::menu_pages( $menu['id'] ), $this -> layout['pages'] );?>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<textarea name="html" id="html" style="width: 100%; height: 500px; border: 0; padding: 10px; margin: -10px 0 -15px; font-size: 12px; box-sizing: border-box;"><?= htmlspecialchars( $this -> layout['html'] );?></textarea>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<textarea name="css" id="css" style="width: 100%; height: 500px; border: 0; padding: 10px; margin: -10px 0 -15px; font-size: 12px; box-sizing: border-box;"><?= htmlspecialchars( $this -> layout['css'] );?></textarea>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<textarea name="js" id="js" style="width: 100%; height: 500px; border: 0; padding: 10px; margin: -10px 0 -15px; font-size: 12px; box-sizing: border-box;"><?= htmlspecialchars( $this -> layout['js'] );?></textarea>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<textarea name="m_html" id="m_html" style="width: 100%; height: 500px; border: 0; padding: 10px; margin: -10px 0 -15px; font-size: 12px; box-sizing: border-box;"><?= htmlspecialchars( $this -> layout['m_html'] );?></textarea>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<textarea name="m_css" id="m_css" style="width: 100%; height: 500px; border: 0; padding: 10px; margin: -10px 0 -15px; font-size: 12px; box-sizing: border-box;"><?= htmlspecialchars( $this -> layout['m_css'] );?></textarea>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<textarea name="m_js" id="m_js" style="width: 100%; height: 500px; border: 0; padding: 10px; margin: -10px 0 -15px; font-size: 12px; box-sizing: border-box;"><?= htmlspecialchars( $this -> layout['m_js'] );?></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'layout-edit';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Edycja szablonu';
|
||||||
|
$grid -> fields = [
|
||||||
|
[
|
||||||
|
'db' => 'id',
|
||||||
|
'type' => 'hidden',
|
||||||
|
'value' => $this -> layout['id']
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [ 'url' => '/admin/layouts/layout_save/', 'back_url' => '/admin/layouts/view_list/' ],
|
||||||
|
'cancel' => [ 'url' => '/admin/layouts/view_list/' ]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
47
admin/templates/layouts/layouts-list.php
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_layouts' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Nazwa', 'db' => 'name', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Szablon domyślny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
'php' => 'echo "<a href=\'/admin/layouts/layout_edit/id=[id]\'>[name]</a>";',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Szablon domyślny',
|
||||||
|
'db' => 'status',
|
||||||
|
'replace' => [ 'array' => [ 0 => 'nie', 1 => '<span class="text-system">tak</span>' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Akcja',
|
||||||
|
'action' => [ 'type' => 'edit', 'url' => '/admin/layouts/layout_edit/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Akcja',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/layouts/layout_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center' ],
|
||||||
|
'td' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> buttons = [
|
||||||
|
[ 'label' => 'Dodaj szablon', 'url' => '/admin/layouts/layout_edit/', 'icon' => 'fa-plus-circle', 'class' => 'btn-success' ]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
16
admin/templates/layouts/subpages-list.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<? if ( is_array( $this -> pages ) ):?>
|
||||||
|
<ol>
|
||||||
|
<? foreach ( $this -> pages as $page ):?>
|
||||||
|
<li id="list_<?= $page['id'];?>" idk="<?= $page['id'];?>" class="list_<?= $page['id'];?>" menu="<?= $page['menu_id'];?>">
|
||||||
|
<div class="content <?= $this -> step < 2 ? $tmp = 'content_page' : $tmp = 'content_page_last_level';?>" <? if ( !$page['status'] ) echo 'style="color: #cc0000;"';?>>
|
||||||
|
<span class="disclose"><span></span></span>
|
||||||
|
<input type="checkbox" class="g-checkbox" name="pages" value="<?= $page['id'];?>" <? if ( is_array( $this -> layout_pages ) and in_array( $page['id'], $this -> layout_pages ) ):?>checked="checked"<? endif;?> /><?= $page['title'];?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
if ( is_array( $page['subpages'] ) )
|
||||||
|
echo \admin\view\Layouts::subpages_list( $page['subpages'], $this -> layout_pages, $page['id'], $this -> step + 1 );
|
||||||
|
?>
|
||||||
|
</li>
|
||||||
|
<? endforeach;?>
|
||||||
|
</ol>
|
||||||
|
<? endif;?>
|
||||||
63
admin/templates/newsletter/email-template-edit.php
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||||
|
<?
|
||||||
|
global $db;
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Nazwa',
|
||||||
|
'name' => 'name',
|
||||||
|
'id' => 'name',
|
||||||
|
'value' => $this -> email_template['name'],
|
||||||
|
'inline' => true,
|
||||||
|
'readonly' => $this -> email_template['is_admin'] ? true : false
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Treść',
|
||||||
|
'name' => 'text',
|
||||||
|
'id' => 'text',
|
||||||
|
'value' => $this ->email_template['text'],
|
||||||
|
'inline' => true
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'email-templates-edit';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Edycja szablonu newslettera';
|
||||||
|
$grid -> fields = [
|
||||||
|
[
|
||||||
|
'db' => 'id',
|
||||||
|
'type' => 'hidden',
|
||||||
|
'value' => $this -> email_template['id']
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [
|
||||||
|
'url' => '/admin/newsletter/template_save/',
|
||||||
|
'back_url' => $this -> email_template['is_admin'] ? '/admin/newsletter/email_templates_admin/' : '/admin/newsletter/email_templates_user/'
|
||||||
|
],
|
||||||
|
'cancel' => [
|
||||||
|
'url' => $this -> email_template['is_admin'] ? '/admin/newsletter/email_templates_admin/' : '/admin/newsletter/email_templates_user/'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( function() {
|
||||||
|
$( '#text' ).ckeditor( {
|
||||||
|
toolbar : 'MyTool',
|
||||||
|
height:'350'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
28
admin/templates/newsletter/email-templates-admin.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_newsletter_templates' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||||
|
$grid -> where = [ 'is_admin' => 1 ];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
'php' => 'echo "<a href=\'/admin/newsletter/email_template_edit/id=[id]\'>[name]</a>";',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Edytuj',
|
||||||
|
'action' => [ 'type' => 'edit', 'url' => '/admin/newsletter/email_template_edit/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
42
admin/templates/newsletter/email-templates-user.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_newsletter_templates' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||||
|
$grid -> where = [ 'is_admin' => 0 ];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
'php' => 'echo "<a href=\'/admin/newsletter/email_template_edit/id=[id]\'>[name]</a>";',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Edytuj',
|
||||||
|
'action' => [ 'type' => 'edit', 'url' => '/admin/newsletter/email_template_edit/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Usuń',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/newsletter/email_template_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Dodaj szablon',
|
||||||
|
'url' => '/admin/newsletter/email_template_edit/',
|
||||||
|
'icon' => 'fa-plus-circle',
|
||||||
|
'class' => 'btn-success'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
30
admin/templates/newsletter/emails-list.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_newsletter' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'email', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Email', 'db' => 'email', 'type' => 'text' ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Email',
|
||||||
|
'db' => 'email',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Potwierdzony',
|
||||||
|
'db' => 'status',
|
||||||
|
'sort' => true,
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> actions = [ 'delete' => true ];
|
||||||
|
echo $grid -> draw();
|
||||||
41
admin/templates/newsletter/import.php
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?
|
||||||
|
global $db;
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Maile (oddzielone nowym wierszem)',
|
||||||
|
'name' => 'emails',
|
||||||
|
'id' => 'emails'
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'emails';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Import adresów mailowych';
|
||||||
|
$grid -> fields = [
|
||||||
|
[
|
||||||
|
'db' => 'id',
|
||||||
|
'type' => 'hidden',
|
||||||
|
'value' => $this -> element['id']
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [
|
||||||
|
'url' => '/admin/newsletter/emails_import/',
|
||||||
|
'back_url' => '/admin/newsletter/emails_list/'
|
||||||
|
],
|
||||||
|
'cancel' => [
|
||||||
|
'url' => '/admin/newsletter/emails_list/'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> persist_edit = false;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
140
admin/templates/newsletter/prepare.php
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
<?
|
||||||
|
global $db;
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Wysyłaj tylko raz:</label>
|
||||||
|
<div class="col-lg-9 pt5">
|
||||||
|
<div class="switch switch-primary round switch-inline">
|
||||||
|
<input id="only_once" name="only_once" type="checkbox">
|
||||||
|
<label for="only_once"></label>
|
||||||
|
<small><i>Dotyczy wysyłki maili z szablonu.</i></small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Zakres dat:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" id="dates" name="dates" data="search-column:date_add;search-type:date_range" class="form-control date-range require" value="">
|
||||||
|
<span class="input-group-addon cursor date-range-icon">
|
||||||
|
<i class="fa fa-calendar"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">lub / i</label>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
$templates[''] = '---- szablon ----';
|
||||||
|
if ( is_array( $this -> templates ) ): foreach ( $this -> templates as $template ):
|
||||||
|
$templates[ $template['id'] ] = $template['name'];
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Szablon',
|
||||||
|
'name' => 'template',
|
||||||
|
'id' => 'template',
|
||||||
|
'values' => $templates,
|
||||||
|
'value' => $this -> templates['id']
|
||||||
|
|
||||||
|
));?>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Podgląd:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<div id="newsletter-preview"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'newsletter-prepare';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Wysyłka newslettera - przygotowanie';
|
||||||
|
$grid -> default_buttons = false;
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Wyślij newsletter',
|
||||||
|
'class' => 'btn-success',
|
||||||
|
'icon' => 'fa-send',
|
||||||
|
'js' => 'send_newsletter();'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function send_newsletter()
|
||||||
|
{
|
||||||
|
var dates = $( '#dates' ).val();
|
||||||
|
var template = $('#template').val();
|
||||||
|
|
||||||
|
if ( !dates && !template )
|
||||||
|
$.prompt( 'Proszę wybrać zakres dat lub szablon.', { title: 'Błąd' } );
|
||||||
|
|
||||||
|
$( '#fg-newsletter-prepare' ).submit();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$( function()
|
||||||
|
{
|
||||||
|
$( '#fg-newsletter-prepare' ).attr( 'action', '/admin/newsletter/send/' );
|
||||||
|
|
||||||
|
$( 'body' ).on( 'change', '#dates', function()
|
||||||
|
{
|
||||||
|
var dates = $( this ).val();
|
||||||
|
var template = $('#template').val();
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data: {
|
||||||
|
a: 'newsletter-preview',
|
||||||
|
dates: dates,
|
||||||
|
template: template
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
$( '#overlay' ).show();
|
||||||
|
},
|
||||||
|
success: function( response )
|
||||||
|
{
|
||||||
|
$( '#overlay' ).hide();
|
||||||
|
$( '#newsletter-preview' ).html( response );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'change', '#template', function()
|
||||||
|
{
|
||||||
|
var dates = $( '#dates' ).val();
|
||||||
|
var template = $( this ).val();
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data: {
|
||||||
|
a: 'newsletter-preview',
|
||||||
|
template: template,
|
||||||
|
dates: dates
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
$( '#overlay' ).show();
|
||||||
|
},
|
||||||
|
success: function( response )
|
||||||
|
{
|
||||||
|
$( '#overlay' ).hide();
|
||||||
|
$( '#newsletter-preview' ).html( response );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
33
admin/templates/newsletter/preview.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?= $this -> settings['newsletter_header'] ? $this -> settings['newsletter_header'] : '<p style="text-align: center;">--- brak zdefiniowanego nagłówka ---</p>';?>
|
||||||
|
<? if ( is_array( $this -> template ) ):?>
|
||||||
|
<?= $this -> template['text']?>
|
||||||
|
<? endif;?>
|
||||||
|
<? if ( is_array( $this -> articles ) ):?>
|
||||||
|
<? foreach ( $this -> articles as $article ):?>
|
||||||
|
<? $article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );?>
|
||||||
|
<div style="padding: 10px; background: #F1F1F1; margin-bottom: 10px">
|
||||||
|
<?
|
||||||
|
$article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );
|
||||||
|
?>
|
||||||
|
<a href="http://<?= $_SERVER['SERVER_NAME'];?>/<?= $url;?>" title="<?= $article['language']['title'];?>" style="margin-bottom: 10px; display: block; font-size: 14px; color: #5b7fb1; font-weight: 600;">
|
||||||
|
<?= $article['language']['title'];?>
|
||||||
|
</a>
|
||||||
|
<div>
|
||||||
|
<?
|
||||||
|
if ( $article['language']['entry'] )
|
||||||
|
echo $article['language']['entry'];
|
||||||
|
else
|
||||||
|
echo $article['language']['text'];
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div style="clear: both;"></div>
|
||||||
|
</div>
|
||||||
|
<? endforeach;?>
|
||||||
|
<? else:?>
|
||||||
|
<? if ( $this -> dates ):?>
|
||||||
|
<div style="padding: 10px; background: #F1F1F1; margin-bottom: 10px; text-align: center;">
|
||||||
|
--- brak artykułów w danym okresie ---
|
||||||
|
</div>
|
||||||
|
<? endif;?>
|
||||||
|
<? endif;?>
|
||||||
|
<?= $this -> settings['newsletter_footer_2'] ? $this -> settings['newsletter_footer_2'] : '<p style="text-align: center;">--- brak zdefiniowanej stopki cz. 2 ---</p>';?>
|
||||||
60
admin/templates/newsletter/settings.php
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( function()
|
||||||
|
{
|
||||||
|
$( 'textarea' ).ckeditor(
|
||||||
|
{
|
||||||
|
toolbar : 'MyTool',
|
||||||
|
height: '150'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
echo \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Nagłówek',
|
||||||
|
'name' => 'newsletter_header',
|
||||||
|
'id' => 'newsletter_header',
|
||||||
|
'value' => $this -> settings['newsletter_header'],
|
||||||
|
'inline' => true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Stopka cz 1. (dołączana zawsze)',
|
||||||
|
'name' => 'newsletter_footer_1',
|
||||||
|
'id' => 'newsletter_footer_1',
|
||||||
|
'value' => $this -> settings['newsletter_footer_1'],
|
||||||
|
'inline' => true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
echo \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Stopka cz 2. (dołączana tylko w przypadku newslettera)',
|
||||||
|
'name' => 'newsletter_footer_2',
|
||||||
|
'id' => 'newsletter_footer_2',
|
||||||
|
'value' => $this -> settings['newsletter_footer_2'],
|
||||||
|
'inline' => true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'settings-edit';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Edycja ustawień';
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [ 'url' => '/admin/newsletter/settings_save/', 'back_url' => '/admin/newsletter/settings/' ],
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>
|
||||||
|
<style type="text/css">#g-edit-cancel { display: none; }</style>
|
||||||
42
admin/templates/pages/menu-edit.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Zapisz menu';
|
||||||
|
$grid -> fields = [
|
||||||
|
[
|
||||||
|
'db' => 'id',
|
||||||
|
'type' => 'hidden',
|
||||||
|
'value' => $this -> menu['id']
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Nazwa',
|
||||||
|
'db' => 'name',
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $this -> menu['name'],
|
||||||
|
'params' => [ 'class' => 'require' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywne',
|
||||||
|
'db' => 'status',
|
||||||
|
'type' => 'input_switch',
|
||||||
|
'checked' => $this -> menu['status'] ? true : false,
|
||||||
|
'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [ 'url' => '/admin/pages/menu_save/', 'back_url' => '/admin/pages/view_list/' ],
|
||||||
|
'cancel' => [ 'url' => '/admin/pages/view_list/' ]
|
||||||
|
];
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( document ).ready( function()
|
||||||
|
{
|
||||||
|
disable_menu();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
89
admin/templates/pages/page-articles.php
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<?
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<ol class="sortable" id="article-list">
|
||||||
|
<?
|
||||||
|
if ( is_array( $this -> articles ) ) foreach ( $this -> articles as $article )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<li id="list_<?= $article['article_id'];?>">
|
||||||
|
<div class="content <? if ( !$article['status'] ) echo 'text-danger';?>"><span class="disclose"><span></span></span> <?= $article['title'];?></div>
|
||||||
|
</li>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ol>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> default_buttons = false;
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> title = 'Lista artykułów';
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Wstecz',
|
||||||
|
'url' => '/admin/pages/view_list/',
|
||||||
|
'icon' => 'fa-reply',
|
||||||
|
'class' => 'btn-dark'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" src="/libraries/jquery-nested-sortable/jquery.mjs.nestedSortable.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( document ).ready( function()
|
||||||
|
{
|
||||||
|
$( 'ol.sortable' ).nestedSortable(
|
||||||
|
{
|
||||||
|
forcePlaceholderSize: true,
|
||||||
|
handle: 'div',
|
||||||
|
helper: 'clone',
|
||||||
|
items: 'li',
|
||||||
|
opacity: .6,
|
||||||
|
placeholder: 'placeholder',
|
||||||
|
revert: 250,
|
||||||
|
tabSize: 25,
|
||||||
|
tolerance: 'pointer',
|
||||||
|
toleranceElement: '> div',
|
||||||
|
maxLevels: 1,
|
||||||
|
isTree: true,
|
||||||
|
expandOnHover: 700,
|
||||||
|
save_articles_order: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function save_articles_order()
|
||||||
|
{
|
||||||
|
articles = $( 'ol.sortable' ).nestedSortable( 'toArray', { startDepthCount: 0 } );
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
a: 'save_articles_order',
|
||||||
|
page_id: <?= $this -> page_id;?>,
|
||||||
|
articles: articles
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
$.prompt( 'Trwa zapisywanie...', { title: 'Proszę czekać' } );
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
$( '.jqibox' ).remove();
|
||||||
|
response = jQuery.parseJSON( data );
|
||||||
|
|
||||||
|
if ( response.status === 'error' )
|
||||||
|
create_error( response.msg );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
514
admin/templates/pages/page-edit.php
Normal file
@@ -0,0 +1,514 @@
|
|||||||
|
<script type="text/javascript">
|
||||||
|
var link_lang = '';
|
||||||
|
$(function ()
|
||||||
|
{
|
||||||
|
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||||
|
google_preview('<?= $lg['id']; ?>', 0);
|
||||||
|
<? endforeach; endif;?>
|
||||||
|
|
||||||
|
disable_menu();
|
||||||
|
|
||||||
|
$('body').on('change', '#page_type', function ()
|
||||||
|
{
|
||||||
|
var page_type = $(this).val();
|
||||||
|
|
||||||
|
if (page_type == 0 || page_type == 1 || page_type == 2)
|
||||||
|
{
|
||||||
|
$('#articles_limit').parents('.form-group').show();
|
||||||
|
$('#link-content').addClass('hide');
|
||||||
|
}
|
||||||
|
else if (page_type == 3)
|
||||||
|
{
|
||||||
|
$('#link-content').removeClass('hide');
|
||||||
|
$('#articles_limit').parents('.form-group').hide();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#articles_limit').parents('.form-group').hide();
|
||||||
|
$('#link-content').addClass('hide');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#settings-tabs').easyResponsiveTabs({
|
||||||
|
width: 'auto',
|
||||||
|
fit: true,
|
||||||
|
tabidentify: 'settings-tabs',
|
||||||
|
type: 'vertical'
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#languages-main').easyResponsiveTabs({
|
||||||
|
width: 'auto',
|
||||||
|
fit: true,
|
||||||
|
tabidentify: 'languages-main'
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#languages-seo').easyResponsiveTabs({
|
||||||
|
width: 'auto',
|
||||||
|
fit: true,
|
||||||
|
tabidentify: 'languages-seo'
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#languages-links').easyResponsiveTabs({
|
||||||
|
width: 'auto',
|
||||||
|
fit: true,
|
||||||
|
tabidentify: 'languages-links'
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#page_type').trigger('change');
|
||||||
|
|
||||||
|
$('body').on('click', '.mfp-close', function (e)
|
||||||
|
{
|
||||||
|
e.preventDefault();
|
||||||
|
$.magnificPopup.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('body').on('click', '.url-select', function ()
|
||||||
|
{
|
||||||
|
$('#link_' + link_lang).val($(this).attr('url'));
|
||||||
|
$.magnificPopup.close();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function generate_seo_links( lang, title, page_id, pid )
|
||||||
|
{
|
||||||
|
var default_language = '<?= \front\factory\Languages::default_language(); ?>';
|
||||||
|
|
||||||
|
if ( title === '' )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
a: 'generate_seo_link',
|
||||||
|
title: title,
|
||||||
|
page_id: page_id,
|
||||||
|
lang: lang,
|
||||||
|
pid: pid
|
||||||
|
},
|
||||||
|
beforeSend: function ()
|
||||||
|
{
|
||||||
|
$('#overlay').show();
|
||||||
|
},
|
||||||
|
success: function (data)
|
||||||
|
{
|
||||||
|
$('#overlay').hide();
|
||||||
|
|
||||||
|
response = jQuery.parseJSON(data);
|
||||||
|
|
||||||
|
if ( response.status === 'ok' )
|
||||||
|
{
|
||||||
|
$('#seo_link_' + lang).val( response.seo_link );
|
||||||
|
google_preview( lang, pid );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
create_error( response.msg );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function google_preview( lang_id, pid )
|
||||||
|
{
|
||||||
|
var default_language = '<?= \front\factory\Languages::default_language(); ?>';
|
||||||
|
var title = $( '#title_' + lang_id ).val();
|
||||||
|
var meta_title = $( '#meta_title_' + lang_id ).val();
|
||||||
|
var seo_link = $( '#seo_link_' + lang_id ).val();
|
||||||
|
var description = $( '#meta_description_' + lang_id ).val();
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
a: 'google_url_preview',
|
||||||
|
title: title,
|
||||||
|
lang_id: lang_id,
|
||||||
|
page_id: $('#id').val(),
|
||||||
|
pid: pid,
|
||||||
|
seo_link: seo_link,
|
||||||
|
default_language: default_language
|
||||||
|
},
|
||||||
|
success: function (data)
|
||||||
|
{
|
||||||
|
$( '#google-preview-' + lang_id + ' .google-url' ).html( '<?= $_SERVER['SERVER_NAME']; ?>/' + data );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (typeof meta_title !== "undefined" && meta_title != '')
|
||||||
|
{
|
||||||
|
if (meta_title.length < 65)
|
||||||
|
$('#google-preview-' + lang_id + ' .google-title').html(meta_title);
|
||||||
|
else if (typeof description !== "undefined")
|
||||||
|
{
|
||||||
|
var space = meta_title.lastIndexOf(" ", 65);
|
||||||
|
$('#google-preview-' + lang_id + ' .google-title').html(meta_title.substring(0, space).concat('...'));
|
||||||
|
}
|
||||||
|
} else if (typeof title !== "undefined" && title != '')
|
||||||
|
{
|
||||||
|
title = title + ' ● <?= $this->settings['firm_name']; ?>';
|
||||||
|
|
||||||
|
if (title.length < 65)
|
||||||
|
$('#google-preview-' + lang_id + ' .google-title').html(title);
|
||||||
|
else if (typeof description !== "undefined")
|
||||||
|
{
|
||||||
|
var space = title.lastIndexOf(" ", 65);
|
||||||
|
$('#google-preview-' + lang_id + ' .google-title').html(title.substring(0, space).concat('...'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof description !== "undefined" && description.length < 153)
|
||||||
|
$('#google-preview-' + lang_id + ' .google-description').html(description);
|
||||||
|
else if (typeof description !== "undefined")
|
||||||
|
{
|
||||||
|
var space = description.lastIndexOf(" ", 153);
|
||||||
|
$('#google-preview-' + lang_id + ' .google-description').html(description.substring(0, space).concat('...'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function pages_url_browser(lang_id)
|
||||||
|
{
|
||||||
|
link_lang = lang_id;
|
||||||
|
|
||||||
|
$.magnificPopup.open({
|
||||||
|
removalDelay: 500,
|
||||||
|
items: {
|
||||||
|
src: '/admin/pages/pages_url_browser/modal=true'
|
||||||
|
},
|
||||||
|
type: 'ajax',
|
||||||
|
overflowY: 'scroll'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<?
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<div id="settings-tabs">
|
||||||
|
<ul class="resp-tabs-list settings-tabs">
|
||||||
|
<li><i class="fa fa-file"></i>Treść</li>
|
||||||
|
<li><i class="fa fa-wrench"></i>Ustawienia</li>
|
||||||
|
<li><i class="fa fa-globe"></i>SEO</li>
|
||||||
|
</ul>
|
||||||
|
<div class="resp-tabs-container settings-tabs">
|
||||||
|
<div>
|
||||||
|
<div id="languages-main">
|
||||||
|
<ul class="resp-tabs-list languages-main">
|
||||||
|
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||||
|
<? if ($lg['status']): ?>
|
||||||
|
<li><? if ($lg['id'] == \front\factory\Languages::default_language()) echo '<i class="fa fa-star fa-lg text-system" title="Język domyślny"></i> '; ?><?= $lg['name']; ?></a></li>
|
||||||
|
<? endif; ?>
|
||||||
|
<? endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</ul>
|
||||||
|
<div class="resp-tabs-container languages-main">
|
||||||
|
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||||
|
<? if ($lg['status']): ?>
|
||||||
|
<div>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Nazwa strony',
|
||||||
|
'name' => 'title',
|
||||||
|
'id' => 'title_' . $lg['id'],
|
||||||
|
'value' => $this->page['languages'][$lg['id']]['title'],
|
||||||
|
'js_key' => 'google_preview( "' . $lg['id'] . '", "' . \S::get('pid') . '" ); return false;'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<? endif; ?>
|
||||||
|
<? endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="padding: 15px;">
|
||||||
|
<?
|
||||||
|
if (is_array($this->menus)): foreach ($this->menus as $menu):
|
||||||
|
$menus[$menu['id']] = $menu['name'];
|
||||||
|
endforeach;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Menu',
|
||||||
|
'name' => 'menu_id',
|
||||||
|
'values' => $menus,
|
||||||
|
'value' => $this->page['id'] ? $this->page['menu_id'] : $this->menu_id
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Typ strony',
|
||||||
|
'name' => 'page_type',
|
||||||
|
'id' => 'page_type',
|
||||||
|
'values' => \admin\factory\Pages::$_page_types,
|
||||||
|
'value' => $this->page['page_type']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<div id="link-content" class="hide">
|
||||||
|
<div id="languages-links">
|
||||||
|
<ul class="resp-tabs-list languages-links">
|
||||||
|
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||||
|
<? if ($lg['status']): ?>
|
||||||
|
<li><? if ($lg['id'] == \front\factory\Languages::default_language()) echo '<i class="fa fa-star fa-lg text-system" title="Język domyślny"></i> '; ?><?= $lg['name']; ?></a></li>
|
||||||
|
<? endif; ?>
|
||||||
|
<? endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</ul>
|
||||||
|
<div class="resp-tabs-container languages-links">
|
||||||
|
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||||
|
<? if ($lg['status']): ?>
|
||||||
|
<div>
|
||||||
|
<?=
|
||||||
|
\Html::input_icon(
|
||||||
|
array(
|
||||||
|
'label' => 'Link',
|
||||||
|
'name' => 'link',
|
||||||
|
'id' => 'link_' . $lg['id'],
|
||||||
|
'value' => $this->page['languages'][$lg['id']]['link'],
|
||||||
|
'icon_class' => 'fa fa-link',
|
||||||
|
'icon_js' => 'pages_url_browser( "' . $lg['id'] . '");'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<? endif; ?>
|
||||||
|
<? endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?=
|
||||||
|
\Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Sortowanie artykułów',
|
||||||
|
'name' => 'sort_type',
|
||||||
|
'id' => 'sort_type',
|
||||||
|
'values' => \admin\factory\Pages::$_sort_types,
|
||||||
|
'value' => $this->page['sort_type']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?
|
||||||
|
$layouts[''] = '---- szablon ----';
|
||||||
|
if (is_array($this->layouts)): foreach ($this->layouts as $layout):
|
||||||
|
$layouts[$layout['id']] = $layout['name'];
|
||||||
|
endforeach;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Szablon',
|
||||||
|
'name' => 'layout_id',
|
||||||
|
'id' => 'layout_id',
|
||||||
|
'values' => $layouts,
|
||||||
|
'value' => $this->page['layout_id']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Liczba artykułów na stronę',
|
||||||
|
'name' => 'articles_limit',
|
||||||
|
'id' => 'articles_limit',
|
||||||
|
'value' => $this->page['articles_limit'] ? $this->page['articles_limit'] : 2
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Pokaż tytuł',
|
||||||
|
'name' => 'show_title',
|
||||||
|
'checked' => $this->page['show_title'] == 1 or ! $this->page['id'] ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?= \Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Aktywna',
|
||||||
|
'name' => 'status',
|
||||||
|
'checked' => $this->page['status'] == 1 or ! $this->page['id'] ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?= Html::input_switch( [
|
||||||
|
'label' => 'Strona startowa',
|
||||||
|
'name' => 'start',
|
||||||
|
'checked' => $this->page['start'] == 1 ? true : false
|
||||||
|
]
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?= Html::input_switch( [
|
||||||
|
'label' => 'Cache (24h)',
|
||||||
|
'name' => 'cache',
|
||||||
|
'checked' => $this -> page['cache'] == 1 ? true : false
|
||||||
|
]
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div id="languages-seo">
|
||||||
|
<ul class="resp-tabs-list languages-seo">
|
||||||
|
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||||
|
<? if ($lg['status']): ?>
|
||||||
|
<li><? if ($lg['id'] == \front\factory\Languages::default_language()) echo '<i class="fa fa-star fa-lg text-system" title="Język domyślny"></i> '; ?><?= $lg['name']; ?></a></li>
|
||||||
|
<? endif; ?>
|
||||||
|
<? endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</ul>
|
||||||
|
<div class="resp-tabs-container languages-seo">
|
||||||
|
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||||
|
<? if ($lg['status']): ?>
|
||||||
|
<div>
|
||||||
|
<?=
|
||||||
|
\Html::input_icon(
|
||||||
|
array(
|
||||||
|
'label' => 'Link SEO',
|
||||||
|
'name' => 'seo_link',
|
||||||
|
'id' => 'seo_link_' . $lg['id'],
|
||||||
|
'value' => $this->page['languages'][$lg['id']]['seo_link'],
|
||||||
|
'icon_content' => 'generuj',
|
||||||
|
'icon_js' => 'generate_seo_links( "' . $lg['id'] . '", $( "#title_' . $lg['id'] . '" ).val(), ' . (int) $this->page['id'] . ', ' . \S::get('pid') . ' );',
|
||||||
|
'js_key' => 'google_preview( "' . $lg['id'] . '", "' . \S::get('pid') . '" ); return false;'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Tytuł strony (h1)',
|
||||||
|
'name' => 'site_title',
|
||||||
|
'id' => 'site_title_' . $lg['id'],
|
||||||
|
'value' => $this->page['languages'][$lg['id']]['site_title']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Meta title',
|
||||||
|
'name' => 'meta_title',
|
||||||
|
'id' => 'meta_title_' . $lg['id'],
|
||||||
|
'value' => $this->page['languages'][$lg['id']]['meta_title'],
|
||||||
|
'js_key' => 'google_preview( "' . $lg['id'] . '" ); return false;'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Meta description',
|
||||||
|
'name' => 'meta_description',
|
||||||
|
'id' => 'meta_description_' . $lg['id'],
|
||||||
|
'value' => $this->page['languages'][$lg['id']]['meta_description'],
|
||||||
|
'js_key' => 'google_preview( "' . $lg['id'] . '" ); return false;'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Meta keywords',
|
||||||
|
'name' => 'meta_keywords',
|
||||||
|
'id' => 'meta_keywords_' . $lg['id'],
|
||||||
|
'value' => $this->page['languages'][$lg['id']]['meta_keywords']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="col-lg-3 control-label">Podgląd google:</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<div id="google-preview-<?= $lg['id']; ?>">
|
||||||
|
<div class="google-title"></div>
|
||||||
|
<div class="google-url"></div>
|
||||||
|
<div class="google-description"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?=
|
||||||
|
\Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Blokuj indeksację',
|
||||||
|
'name' => "noindex",
|
||||||
|
'id' => 'noindex_' . $lg['id'],
|
||||||
|
'values' => array(
|
||||||
|
0 => 'nie', 1 => 'tak'
|
||||||
|
),
|
||||||
|
'value' => $this->page['languages'][$lg['id']]['noindex'] == 1 ? 1 : 0
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?= \Html::select(
|
||||||
|
array(
|
||||||
|
'label' => 'Blokuj bezpośredni dostęp',
|
||||||
|
'name' => "block_direct_access",
|
||||||
|
'id' => 'block_direct_access_' . $lg['id'],
|
||||||
|
'values' => array(
|
||||||
|
0 => 'nie', 1 => 'tak'
|
||||||
|
),
|
||||||
|
'value' => $this -> page['languages'][ $lg['id'] ]['block_direct_access'] == 1 ? 1 : 0
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Rel canonical',
|
||||||
|
'name' => 'canonical',
|
||||||
|
'id' => 'canonical_' . $lg['id'],
|
||||||
|
'value' => $this->page['languages'][$lg['id']]['canonical']
|
||||||
|
) );?>
|
||||||
|
</div>
|
||||||
|
<? endif; ?>
|
||||||
|
<? endforeach;
|
||||||
|
endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid->id = 'page-edit';
|
||||||
|
$grid->gdb_opt = $gdb;
|
||||||
|
$grid->include_plugins = true;
|
||||||
|
$grid->title = 'Edycja strony';
|
||||||
|
$grid->fields = [
|
||||||
|
[
|
||||||
|
'db' => 'id',
|
||||||
|
'type' => 'hidden',
|
||||||
|
'value' => $this->page['id']
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'db' => 'parent_id',
|
||||||
|
'type' => 'hidden',
|
||||||
|
'value' => $this->page['id'] ? $this->page['parent_id'] : $this->parent_id
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid->actions = [
|
||||||
|
'save' => ['url' => '/admin/pages/page_save/', 'back_url' => '/admin/pages/view_list/'],
|
||||||
|
'cancel' => ['url' => '/admin/pages/view_list/']
|
||||||
|
];
|
||||||
|
$grid->external_code = $out;
|
||||||
|
$grid->persist_edit = true;
|
||||||
|
$grid->id_param = 'id';
|
||||||
|
|
||||||
|
echo $grid->draw();
|
||||||
|
?>
|
||||||
162
admin/templates/pages/pages-browse-list.php
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
<?
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
if ( is_array( $this -> menus ) ) foreach ( $this -> menus as $menu )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="menu_sortable">
|
||||||
|
<ol class="sortable" id="sortable_<?= $menu['id'];?>" menu-id="<?= $menu['id'];?>">
|
||||||
|
<li id="list_<?= $menu['id'];?>" class="menu_<?= $menu['id'];?>" menu="<?= $menu['id'];?>">
|
||||||
|
<div class="context_0 content content_menu">
|
||||||
|
<span class="disclose"><span></span></span>
|
||||||
|
<? if ( !$menu['status'] ) echo '<i class="fa fa-ban fa-lg text-danger" title="Menu nieaktywne"></i>';?>
|
||||||
|
Menu: <b><?= $menu['name'];?></b>
|
||||||
|
</div>
|
||||||
|
<?= \admin\view\Pages::subpages_browse_list( \admin\factory\Pages::menu_pages( $menu['id'] ) );?>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'pages-list';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Lista stron';
|
||||||
|
$grid -> default_buttons = false;
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
<? if ( $this -> modal ): echo '.mfp-container'; endif;?> body.sb-top.sb-top-sm .navbar.navbar-fixed-top + #sidebar_left + #content_wrapper {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
<? if ( $this -> modal ): echo '.mfp-container'; endif;?> #content {
|
||||||
|
padding: 27px 0 0;
|
||||||
|
}
|
||||||
|
<? if ( $this -> modal ): echo '.mfp-container'; endif;?> #content > .row {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
<? if ( $this -> modal ): echo '.mfp-container'; endif;?> #content > .row > .col-lg-9 {
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript" src="/libraries/jquery-nested-sortable/jquery.mjs.nestedSortable.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var menu_id = 0;
|
||||||
|
|
||||||
|
function getUrlParam(paramName)
|
||||||
|
{
|
||||||
|
var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i');
|
||||||
|
var match = window.location.search.match(reParam);
|
||||||
|
|
||||||
|
return (match && match.length > 1) ? match[1] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$( document ).ready( function()
|
||||||
|
{
|
||||||
|
<? if ( !$this -> modal ):?>
|
||||||
|
$( '#sidebar_left, .navbar-fixed-top' ).hide();
|
||||||
|
<? endif;?>
|
||||||
|
|
||||||
|
var funcNum = getUrlParam('CKEditorFuncNum');
|
||||||
|
|
||||||
|
$( 'body' ).on( 'click', '.button', function()
|
||||||
|
{
|
||||||
|
if ( funcNum )
|
||||||
|
{
|
||||||
|
window.opener.CKEDITOR.tools.callFunction(funcNum, $( this ).attr( 'url' ) );
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'ol.sortable' ).nestedSortable(
|
||||||
|
{
|
||||||
|
forcePlaceholderSize: true,
|
||||||
|
handle: 'div',
|
||||||
|
helper: 'clone',
|
||||||
|
items: 'li',
|
||||||
|
opacity: .9,
|
||||||
|
placeholder: 'placeholder',
|
||||||
|
revert: 250,
|
||||||
|
tabSize: 45,
|
||||||
|
tolerance: 'pointer',
|
||||||
|
toleranceElement: '> div',
|
||||||
|
maxLevels: 3,
|
||||||
|
isTree: true,
|
||||||
|
expandOnHover: 700,
|
||||||
|
stop: function() {
|
||||||
|
save_pages_order();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '.disclose' ).on( 'click', function()
|
||||||
|
{
|
||||||
|
$( this ).closest( 'li' ).toggleClass( 'sort-collapsed' ).toggleClass( 'sort-expanded' );
|
||||||
|
});
|
||||||
|
|
||||||
|
$( ".sortable *" ).mousedown( function(e)
|
||||||
|
{
|
||||||
|
menu_id = $( this ).parents( 'ol.sortable' ).attr( 'menu-id' );
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '.disclose' ).mousedown( function(e)
|
||||||
|
{
|
||||||
|
if ( e.which === 1 ) {
|
||||||
|
if ( $( this ).parent( 'div' ).hasClass( 'content_menu' ) )
|
||||||
|
{
|
||||||
|
var menu_id = $( this ).parent( 'div' ).parent( 'li' ).attr( 'menu' );
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data: {
|
||||||
|
a: 'cookie_menus',
|
||||||
|
menu_id: menu_id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var page_id = $( this ).parent( 'div' ).parent( 'li' ).attr( 'id' );
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data: {
|
||||||
|
a: 'cookie_pages',
|
||||||
|
page_id: page_id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$array = unserialize( $_COOKIE[ 'cookie_pages' ] );
|
||||||
|
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||||
|
if ( $val ):
|
||||||
|
?>$( '.<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||||
|
endif;
|
||||||
|
endforeach; endif;
|
||||||
|
|
||||||
|
$array = unserialize( $_COOKIE[ 'cookie_menus' ] );
|
||||||
|
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||||
|
if ( $val ):
|
||||||
|
?>$( '.menu_<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||||
|
endif;
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
});
|
||||||
|
</script>
|
||||||
204
admin/templates/pages/pages-list.php
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
<?
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
if ( is_array( $this -> menus ) ) foreach ( $this -> menus as $menu )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="menu_sortable">
|
||||||
|
<ol class="sortable" id="sortable_<?= $menu['id'];?>" menu-id="<?= $menu['id'];?>">
|
||||||
|
<li id="list_<?= $menu['id'];?>" class="menu_<?= $menu['id'];?>" menu="<?= $menu['id'];?>">
|
||||||
|
<div class="context_0 content content_menu">
|
||||||
|
<span class="disclose"><span></span></span>
|
||||||
|
<? if ( !$menu['status'] ) echo '<i class="fa fa-ban fa-lg text-danger" title="Menu nieaktywne"></i>';?>
|
||||||
|
Menu: <b><?= $menu['name'];?></b>
|
||||||
|
<div class="btn-group ml20 pull-right">
|
||||||
|
<a href="/admin/pages/menu_edit/id=<?= $menu['id'];?>" title="Edytuj menu" class="btn btn-sm btn-system">
|
||||||
|
<i class="fa fa-file-text"></i> <span class="hidden-xs">Edytuj menu</span>
|
||||||
|
</a>
|
||||||
|
<a href="#" title="Usuń menu" class="btn btn-sm btn-danger menu-delete" menu-id="<?= $menu['id'];?>">
|
||||||
|
<i class="fa fa-trash"></i> <span class="hidden-xs">Usuń menu</span>
|
||||||
|
</a>
|
||||||
|
<a href="/admin/pages/page_edit/pid=0&menu_id=<?= $menu['id'];?>" title="Dodaj stronę" class="btn btn-sm btn-success">
|
||||||
|
<i class="fa fa-plus-circle"></i> <span class="hidden-xs">Dodaj stronę</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?= \admin\view\Pages::subpages_list( \admin\factory\Pages::menu_pages( $menu['id'] ) );?>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'pages-list';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Lista stron';
|
||||||
|
$grid -> default_buttons = false;
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Dodaj menu',
|
||||||
|
'url' => '/admin/pages/menu_edit/',
|
||||||
|
'icon' => 'fa-plus-circle',
|
||||||
|
'class' => 'btn-success'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" src="/libraries/jquery-nested-sortable/jquery.mjs.nestedSortable.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var menu_id = 0;
|
||||||
|
|
||||||
|
$( document ).ready( function()
|
||||||
|
{
|
||||||
|
$( 'body' ).on( 'click', '.menu-delete', function()
|
||||||
|
{
|
||||||
|
var menu_id = $( this ).attr( 'menu-id' );
|
||||||
|
|
||||||
|
$.prompt( "Na pewno chcesz usunąć wybrane menu?",
|
||||||
|
{
|
||||||
|
title: "Potwierdź?",
|
||||||
|
buttons: { "Tak": true, "Nie": false },
|
||||||
|
submit: function( e, v, m, f )
|
||||||
|
{
|
||||||
|
if ( v === true )
|
||||||
|
document.location.href = '/admin/pages/menu_delete/id=' + menu_id;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'body' ).on( 'click', '.page-delete', function()
|
||||||
|
{
|
||||||
|
var page_id = $( this ).attr( 'page-id' );
|
||||||
|
|
||||||
|
$.prompt( "Na pewno chcesz usunąć wybraną stronę?",
|
||||||
|
{
|
||||||
|
title: "Potwierdź?",
|
||||||
|
buttons: { "Tak": true, "Nie": false },
|
||||||
|
submit: function( e, v, m, f )
|
||||||
|
{
|
||||||
|
if ( v === true )
|
||||||
|
document.location.href = '/admin/pages/page_delete/id=' + page_id;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$( 'ol.sortable' ).nestedSortable(
|
||||||
|
{
|
||||||
|
forcePlaceholderSize: true,
|
||||||
|
handle: 'div',
|
||||||
|
helper: 'clone',
|
||||||
|
items: 'li',
|
||||||
|
opacity: .9,
|
||||||
|
placeholder: 'placeholder',
|
||||||
|
revert: 250,
|
||||||
|
tabSize: 45,
|
||||||
|
tolerance: 'pointer',
|
||||||
|
toleranceElement: '> div',
|
||||||
|
maxLevels: 4,
|
||||||
|
isTree: true,
|
||||||
|
expandOnHover: 700,
|
||||||
|
stop: function() {
|
||||||
|
save_pages_order();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '.disclose' ).on( 'click', function()
|
||||||
|
{
|
||||||
|
$( this ).closest( 'li' ).toggleClass( 'sort-collapsed' ).toggleClass( 'sort-expanded' );
|
||||||
|
});
|
||||||
|
|
||||||
|
$( ".sortable *" ).mousedown( function(e)
|
||||||
|
{
|
||||||
|
menu_id = $( this ).parents( 'ol.sortable' ).attr( 'menu-id' );
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '.disclose' ).mousedown( function(e)
|
||||||
|
{
|
||||||
|
if ( e.which === 1 ) {
|
||||||
|
if ( $( this ).parent( 'div' ).hasClass( 'content_menu' ) )
|
||||||
|
{
|
||||||
|
var menu_id = $( this ).parent( 'div' ).parent( 'li' ).attr( 'menu' );
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data: {
|
||||||
|
a: 'cookie_menus',
|
||||||
|
menu_id: menu_id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var page_id = $( this ).parent( 'div' ).parent( 'li' ).attr( 'id' );
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data: {
|
||||||
|
a: 'cookie_pages',
|
||||||
|
page_id: page_id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$array = unserialize( $_COOKIE[ 'cookie_pages' ] );
|
||||||
|
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||||
|
if ( $val ):
|
||||||
|
?>$( '.<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||||
|
endif;
|
||||||
|
endforeach; endif;
|
||||||
|
|
||||||
|
$array = unserialize( $_COOKIE[ 'cookie_menus' ] );
|
||||||
|
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||||
|
if ( $val ):
|
||||||
|
?>$( '.menu_<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||||
|
endif;
|
||||||
|
endforeach; endif;
|
||||||
|
?>
|
||||||
|
});
|
||||||
|
|
||||||
|
function save_pages_order( )
|
||||||
|
{
|
||||||
|
pages = $( '#sortable_' + menu_id ).nestedSortable( 'toArray', { startDepthCount: 0 } );
|
||||||
|
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: 'POST',
|
||||||
|
cache: false,
|
||||||
|
url: '/admin/ajax.php',
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
a: 'save_pages_order',
|
||||||
|
menu_id: menu_id,
|
||||||
|
pages: pages
|
||||||
|
},
|
||||||
|
beforeSend: function()
|
||||||
|
{
|
||||||
|
$.prompt( 'Trwa zapisywanie...', { title: 'Proszę czekać' } );
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
$( '.jqibox' ).remove();
|
||||||
|
response = jQuery.parseJSON( data );
|
||||||
|
|
||||||
|
if ( response.status === 'error' )
|
||||||
|
create_error( response.msg );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
70
admin/templates/pages/subpages-browse-list.php
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
<? if (is_array($this->pages)): ?>
|
||||||
|
<?
|
||||||
|
$settings = \front\factory\Settings::settings_details();
|
||||||
|
?>
|
||||||
|
<ol>
|
||||||
|
<? foreach ($this->pages as $page): ?>
|
||||||
|
<li id="list_<?= $page['id']; ?>" idk="<?= $page['id']; ?>" class="list_<?= $page['id']; ?>" menu="<?= $page['menu_id']; ?>">
|
||||||
|
<div class="content">
|
||||||
|
<span class="disclose"><span></span></span>
|
||||||
|
<?
|
||||||
|
if (!$page['status'])
|
||||||
|
echo '<i class="fa fa-ban fa-lg text-danger" title="Strona nieaktywna"></i>';
|
||||||
|
|
||||||
|
if ($page['start'])
|
||||||
|
echo '<i class="fa fa-star fa-lg text-system" title="Strona startowa"></i>';
|
||||||
|
|
||||||
|
echo $page['title'];
|
||||||
|
|
||||||
|
if (is_array($page['languages'])):
|
||||||
|
echo '<div class="btn-group flags" style="display: inline-block;">';
|
||||||
|
foreach ($page['languages'] as $lg)
|
||||||
|
echo '<img src="/admin/css/lang-' . $lg['lang_id'] . '.jpg" />';
|
||||||
|
echo '</div>';
|
||||||
|
endif;
|
||||||
|
|
||||||
|
$default_language = \front\factory\Languages::default_language();
|
||||||
|
if (is_array($page['languages'])):
|
||||||
|
foreach ($page['languages'] as $lg):
|
||||||
|
echo '<div class="btn-group ml20 pull-right">';
|
||||||
|
echo '<a href="#" title="Wybierz stronę" class="btn btn-sm btn-system button url-select" url="';
|
||||||
|
|
||||||
|
if ($settings['links_structure']) {
|
||||||
|
if ($lg['seo_link']) {
|
||||||
|
$seo = '/'.\admin\factory\Pages::google_url_preview($page['id'], $lg['title'], $lg['lang_id'], 0, 0, $lg['seo_link']);
|
||||||
|
echo $seo;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$seo = '/'. \admin\factory\Pages::google_url_preview($page['id'], $lg['title'], $lg['lang_id'], 0, 0, 0);
|
||||||
|
echo $seo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($lg['seo_link']) {
|
||||||
|
if ($default_language != $lg['lang_id'])
|
||||||
|
echo '/' . $lg['lang_id'];
|
||||||
|
echo '/' . $lg['seo_link'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ($default_language != $lg['lang_id'])
|
||||||
|
echo '/' . $lg['lang_id'];
|
||||||
|
echo '/s-' . $page['id'] . '-' . \S::seo($lg['title']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '">';
|
||||||
|
echo '<i class="fa fa-check"></i> <span class="hidden-xs">' . strtoupper($lg['lang_id']) . '</span>';
|
||||||
|
echo '</a>';
|
||||||
|
echo '</div>';
|
||||||
|
endforeach;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
if (is_array($page['subpages']))
|
||||||
|
echo \admin\view\Pages::subpages_browse_list($page['subpages'], $page['id'], $this->step + 1);
|
||||||
|
?>
|
||||||
|
</li>
|
||||||
|
<? endforeach; ?>
|
||||||
|
</ol>
|
||||||
|
<? endif; ?>
|
||||||
54
admin/templates/pages/subpages-list.php
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<? if ( is_array( $this -> pages ) ):?>
|
||||||
|
<ol>
|
||||||
|
<? foreach ( $this -> pages as $page ):?>
|
||||||
|
<li id="list_<?= $page['id'];?>" idk="<?= $page['id'];?>" class="list_<?= $page['id'];?>" menu="<?= $page['menu_id'];?>">
|
||||||
|
<div class="content">
|
||||||
|
<span class="disclose"><span></span></span>
|
||||||
|
<? if ( !$page['status'] ) echo '<i class="fa fa-ban fa-lg text-danger" title="Strona nieaktywna"></i>';?>
|
||||||
|
<? if ( $page['start'] ) echo '<i class="fa fa-star fa-lg text-system" title="Strona startowa"></i>';?>
|
||||||
|
<?= mb_substr( $page['title'], 0, 75, 'UTF-8' );?><? if ( mb_strlen( $page['title'], 'utf-8' ) > 75 ) echo '...';?>
|
||||||
|
<?
|
||||||
|
if ( is_array( $page['languages'] ) ):
|
||||||
|
echo '<div class="btn-group flags" style="display: inline-block;">';
|
||||||
|
foreach ( $page['languages'] as $lg )
|
||||||
|
echo '<img src="/admin/css/lang-' . $lg['lang_id'] . '.jpg" />';
|
||||||
|
echo '</div>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
<? if ( $this -> step < 3 ):?>
|
||||||
|
<div class="btn-group ml20 pull-right">
|
||||||
|
<a href="/admin/pages/page_edit/id=<?= $page['id'];?>&menu_id=<?= $page['menu_id'];?>" title="Edytuj stronę" class="btn btn-sm btn-system">
|
||||||
|
<i class="fa fa-file-text"></i> <span class="hidden-xs">Edytuj stronę</span>
|
||||||
|
</a>
|
||||||
|
<a href="#" title="Usuń stronę" class="btn btn-sm btn-danger page-delete" page-id="<?= $page['id'];?>">
|
||||||
|
<i class="fa fa-trash"></i> <span class="hidden-xs">Usuń stronę</span>
|
||||||
|
</a>
|
||||||
|
<a href="/admin/pages/page_articles/id=<?= $page['id'];?>" title="Lista artykułów" class="btn btn-sm btn-info" page-id="<?= $page['id'];?>">
|
||||||
|
<i class="fa fa-bars"></i> <span class="hidden-xs">Lista artykułów</span>
|
||||||
|
</a>
|
||||||
|
<a href="/admin/pages/page_edit/pid=<?= $page['id'];?>&menu_id=<?= $page['menu_id'];?>" title="Dodaj podstronę" class="btn btn-sm btn-success">
|
||||||
|
<i class="fa fa-plus-circle"></i> <span class="hidden-xs">Dodaj podstronę</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<? else:?>
|
||||||
|
<div class="btn-group ml20 pull-right">
|
||||||
|
<a href="/admin/pages/page_edit/id=<?= $page['id'];?>&menu_id=<?= $page['menu_id'];?>" title="Edytuj stronę" class="btn btn-sm btn-system">
|
||||||
|
<i class="fa fa-file-text"></i> <span class="hidden-xs">Edytuj stronę</span>
|
||||||
|
</a>
|
||||||
|
<a href="#" title="Usuń stronę" class="btn btn-sm btn-danger page-delete" page-id="<?= $page['id'];?>">
|
||||||
|
<i class="fa fa-trash"></i> <span class="hidden-xs">Usuń stronę</span>
|
||||||
|
</a>
|
||||||
|
<a href="/admin/pages/page_articles/id=<?= $page['id'];?>" title="Lista artykułów" class="btn btn-sm btn-info" page-id="<?= $page['id'];?>">
|
||||||
|
<i class="fa fa-bars"></i> <span class="hidden-xs">Lista artykułów</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<? endif;?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
if ( is_array( $page['subpages'] ) )
|
||||||
|
echo \admin\view\Pages::subpages_list( $page['subpages'], $page['id'], $this -> step + 1 );
|
||||||
|
?>
|
||||||
|
</li>
|
||||||
|
<? endforeach;?>
|
||||||
|
</ol>
|
||||||
|
<? endif;?>
|
||||||
166
admin/templates/scontainers/container-edit.php
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
<link rel="stylesheet" href="/libraries/codemirror/lib/codemirror.css" />
|
||||||
|
<link rel="stylesheet" href="/libraries/codemirror/theme/material.css" />
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/lib/codemirror.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/mode/css/css.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/mode/xml/xml.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/mode/javascript/javascript.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/mode/htmlmixed/htmlmixed.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/codemirror/addon/mode/multiplex.js"></script>
|
||||||
|
<?
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<div id="settings-tabs">
|
||||||
|
<ul class="resp-tabs-list settings-tabs">
|
||||||
|
<li><i class="fa fa-file"></i>Treść</li>
|
||||||
|
<li><i class="fa fa-wrench"></i>Ustawienia</li>
|
||||||
|
</ul>
|
||||||
|
<div class="resp-tabs-container settings-tabs">
|
||||||
|
<div>
|
||||||
|
<div id="languages-main">
|
||||||
|
<ul class="resp-tabs-list languages-main">
|
||||||
|
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||||
|
<? if ( $lg['status'] ):?>
|
||||||
|
<li><?= $lg['name'];?></a></li>
|
||||||
|
<? endif;?>
|
||||||
|
<? endforeach; endif;?>
|
||||||
|
</ul>
|
||||||
|
<div class="resp-tabs-container languages-main">
|
||||||
|
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||||
|
<? if ( $lg['status'] ):?>
|
||||||
|
<div>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Tytuł',
|
||||||
|
'name' => 'title',
|
||||||
|
'id' => 'title_' . $lg['id'],
|
||||||
|
'value' => $this -> container['languages'][ $lg['id'] ]['title'],
|
||||||
|
'inline' => true
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Treść',
|
||||||
|
'name' => 'text',
|
||||||
|
'id' => 'text_' . $lg['id'],
|
||||||
|
'value' => $this -> container['languages'][ $lg['id'] ]['text'],
|
||||||
|
'inline' => true
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Kod HTML',
|
||||||
|
'name' => 'html',
|
||||||
|
'id' => 'html_' . $lg['id'],
|
||||||
|
'value' => $this -> container['languages'][ $lg['id'] ]['html'],
|
||||||
|
'inline' => true
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( function()
|
||||||
|
{
|
||||||
|
$( '#text_<?= $lg['id'];?>' ).ckeditor(
|
||||||
|
{
|
||||||
|
toolbar : 'MyToolbar',
|
||||||
|
height:'300'
|
||||||
|
});
|
||||||
|
var code_html = CodeMirror.fromTextArea( document.getElementById( "html_<?= $lg['id'];?>" ),{
|
||||||
|
lineWrapping: true,
|
||||||
|
mode: "text/html"
|
||||||
|
});
|
||||||
|
code_html.on( 'change', function(cm) {
|
||||||
|
$( '#html_<?= $lg['id'];?>' ).val( cm.getValue() );
|
||||||
|
});
|
||||||
|
code_html.setOption( "theme", 'material' );
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<? endif;?>
|
||||||
|
<? endforeach; endif;?>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<?= \Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Aktywny',
|
||||||
|
'name' => 'status',
|
||||||
|
'checked' => $this -> container['status'] == 1 or !$this -> container['id'] ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?= \Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Pokaż tytuł',
|
||||||
|
'name' => 'show_title',
|
||||||
|
'checked' => $this -> container['show_title'] == 1 ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?= \Html::input_icon(
|
||||||
|
array(
|
||||||
|
'label' => 'Tło kontenera',
|
||||||
|
'name' => 'src',
|
||||||
|
'id' => 'src',
|
||||||
|
'value' => $this->container['src'],
|
||||||
|
'icon_content' => 'przeglądaj',
|
||||||
|
'icon_js' => "window.open ( 'http://" . $_SERVER['SERVER_NAME'] . "/libraries/filemanager-9.14.0/dialog.php?type=1&popup=1&field_id=src&akey=c3cb2537d25c0efc9e573d059d79c3b8', 'mywindow', 'location=1,status=1,scrollbars=1, width=1100,height=700');"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'container-edit';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Edycja kontenera statycznego';
|
||||||
|
$grid -> fields = [
|
||||||
|
[
|
||||||
|
'db' => 'id',
|
||||||
|
'type' => 'hidden',
|
||||||
|
'value' => $this -> container['id']
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [ 'url' => '/admin/scontainers/container_save/', 'back_url' => '/admin/scontainers/view_list/' ],
|
||||||
|
'cancel' => [ 'url' => '/admin/scontainers/view_list/' ]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( function()
|
||||||
|
{
|
||||||
|
disable_menu();
|
||||||
|
|
||||||
|
$( '#settings-tabs' ).easyResponsiveTabs({
|
||||||
|
width: 'auto',
|
||||||
|
fit: true,
|
||||||
|
tabidentify: 'settings-tabs',
|
||||||
|
type: 'vertical'
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '#languages-main' ).easyResponsiveTabs({
|
||||||
|
width: 'auto',
|
||||||
|
fit: true,
|
||||||
|
tabidentify: 'languages-main'
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '#g-menu' ).attr( 'data-spy', 'affix' );
|
||||||
|
$( '#g-menu' ).attr( 'data-offset-top', '135' );
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>
|
||||||
79
admin/templates/scontainers/containers-list.php
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_scontainers' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> sql = 'SELECT *'
|
||||||
|
. 'FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'id, status, '
|
||||||
|
. '( SELECT title FROM pp_scontainers_langs AS psl, pp_langs AS pl WHERE lang_id = pl.id AND container_id = ps.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title '
|
||||||
|
. 'FROM '
|
||||||
|
. 'pp_scontainers AS ps '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] '
|
||||||
|
. 'ORDER BY '
|
||||||
|
. '[order_p1] [order_p2]';
|
||||||
|
$grid -> sql_count = 'SELECT '
|
||||||
|
. 'COUNT(0) FROM ( '
|
||||||
|
. 'SELECT '
|
||||||
|
. 'id, status, '
|
||||||
|
. '( SELECT title FROM pp_scontainers_langs AS psl, pp_langs AS pl WHERE lang_id = pl.id AND container_id = ps.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title '
|
||||||
|
. 'FROM '
|
||||||
|
. 'pp_scontainers AS ps '
|
||||||
|
. ') AS q1 '
|
||||||
|
. 'WHERE '
|
||||||
|
. '1=1 [where] ';
|
||||||
|
$grid -> debug = true;
|
||||||
|
$grid -> order = [ 'column' => 'title', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Tytuł', 'db' => 'title', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Tytuł',
|
||||||
|
'db' => 'title',
|
||||||
|
'php' => 'echo "<a href=\'/admin/scontainers/container_edit/id=[id]\'>[title]</a>";',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Kod',
|
||||||
|
'php' => 'echo "[KONTENER:[id]]";'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywny',
|
||||||
|
'db' => 'status',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Edytuj',
|
||||||
|
'action' => [ 'type' => 'edit', 'url' => '/admin/scontainers/container_edit/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Usuń',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/scontainers/container_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Dodaj kontener',
|
||||||
|
'url' => '/admin/scontainers/container_edit/',
|
||||||
|
'icon' => 'fa-plus-circle',
|
||||||
|
'class' => 'btn-success'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
95
admin/templates/seo-additional/element-edit.php
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||||
|
<?
|
||||||
|
global $db;
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Url',
|
||||||
|
'class' => 'required',
|
||||||
|
'name' => 'url',
|
||||||
|
'id' => 'url',
|
||||||
|
'value' => $this -> element['url']
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Aktywny',
|
||||||
|
'name' => 'status',
|
||||||
|
'checked' => $this -> element['status'] == 1 or !$this -> element['id'] ? true : false
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Meta title',
|
||||||
|
'class' => 'title',
|
||||||
|
'name' => 'title',
|
||||||
|
'id' => 'title',
|
||||||
|
'value' => $this -> element['title']
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Meta keywords',
|
||||||
|
'class' => 'keywords',
|
||||||
|
'name' => 'keywords',
|
||||||
|
'id' => 'keywords',
|
||||||
|
'value' => $this -> element['keywords']
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Meta description',
|
||||||
|
'class' => 'description',
|
||||||
|
'name' => 'description',
|
||||||
|
'id' => 'description',
|
||||||
|
'value' => $this -> element['description']
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
<?= \Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Dodatkowa treść',
|
||||||
|
'name' => 'text',
|
||||||
|
'id' => 'text',
|
||||||
|
'value' => $this ->element['text']
|
||||||
|
)
|
||||||
|
);?>
|
||||||
|
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'seo-element-edit';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Edycja elementu SEO';
|
||||||
|
$grid -> fields = [
|
||||||
|
[
|
||||||
|
'db' => 'id',
|
||||||
|
'type' => 'hidden',
|
||||||
|
'value' => $this -> element['id']
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [
|
||||||
|
'url' => '/admin/seo_additional/element_save/',
|
||||||
|
'back_url' => '/admin/seo_additional/main_view/'
|
||||||
|
],
|
||||||
|
'cancel' => [
|
||||||
|
'url' => '/admin/seo_additional/main_view/'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> persist_edit = true;
|
||||||
|
$grid -> id_param = 'id';
|
||||||
|
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( function() {
|
||||||
|
$( '#text' ).ckeditor( {
|
||||||
|
toolbar : 'MyTool',
|
||||||
|
height:'350'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
58
admin/templates/seo-additional/main-view.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
global $gdb;
|
||||||
|
|
||||||
|
$grid = new \grid( 'pp_seo_additional' );
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> order = [ 'column' => 'url', 'type' => 'ASC' ];
|
||||||
|
$grid -> search = [
|
||||||
|
[ 'name' => 'Url', 'db' => 'url', 'type' => 'text' ],
|
||||||
|
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
||||||
|
];
|
||||||
|
$grid -> columns_view = [
|
||||||
|
[
|
||||||
|
'name' => 'Lp.',
|
||||||
|
'th' => [ 'class' => 'g-lp' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'autoincrement' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Url',
|
||||||
|
'db' => 'url',
|
||||||
|
'php' => 'echo "<a href=\'/admin/seo_additional/element_edit/id=[id]\'>[url]</a>";',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Title',
|
||||||
|
'db' => 'title',
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Aktywny',
|
||||||
|
'db' => 'status',
|
||||||
|
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||||
|
'td' => [ 'class' => 'g-center' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||||
|
'sort' => true
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Edytuj',
|
||||||
|
'action' => [ 'type' => 'edit', 'url' => '/admin/seo_additional/element_edit/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Usuń',
|
||||||
|
'action' => [ 'type' => 'delete', 'url' => '/admin/seo_additional/element_delete/id=[id]' ],
|
||||||
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||||
|
'td' => [ 'class' => 'g-center' ]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> buttons = [
|
||||||
|
[
|
||||||
|
'label' => 'Dodaj element',
|
||||||
|
'url' => '/admin/seo_additional/element_edit/',
|
||||||
|
'icon' => 'fa-plus-circle',
|
||||||
|
'class' => 'btn-success'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
echo $grid -> draw();
|
||||||
396
admin/templates/settings/settings.php
Normal file
@@ -0,0 +1,396 @@
|
|||||||
|
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function ()
|
||||||
|
{
|
||||||
|
$('#settings-tabs').easyResponsiveTabs(
|
||||||
|
{
|
||||||
|
width: 'auto',
|
||||||
|
fit: true,
|
||||||
|
tabidentify: 'settings-tabs',
|
||||||
|
type: 'vertical'
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#additional_info').ckeditor(
|
||||||
|
{
|
||||||
|
toolbar: 'MyTool',
|
||||||
|
height: '150'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<div id="settings-tabs">
|
||||||
|
<ul class="resp-tabs-list settings-tabs">
|
||||||
|
<li><i class="fa fa-paper-plane"></i>Dane kontaktowe</li>
|
||||||
|
<li><i class="fa fa-envelope"></i>Poczta</li>
|
||||||
|
<li><i class="fa fa-bars"></i>Dodatkowe ustawienia</li>
|
||||||
|
<li><i class="fa fa-code"></i>Kody (m.in. statystyk)</li>
|
||||||
|
<li><i class="fa fa-cog"></i>System</li>
|
||||||
|
<li><i class="fa fa-refresh"></i>Aktualizacje</li>
|
||||||
|
</ul>
|
||||||
|
<div class="resp-tabs-container settings-tabs">
|
||||||
|
<div>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Nazwa firmy',
|
||||||
|
'name' => 'firm_name',
|
||||||
|
'id' => 'firm_name',
|
||||||
|
'value' => $this -> settings['firm_name']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Dodatkowe informacje',
|
||||||
|
'name' => 'additional_info',
|
||||||
|
'id' => 'additional_info',
|
||||||
|
'value' => $this -> settings['additional_info']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Mapa',
|
||||||
|
'name' => 'google_maps',
|
||||||
|
'checked' => $this -> settings['google_maps'] == 1 ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Mapa - adres',
|
||||||
|
'name' => 'firm_adress',
|
||||||
|
'id' => 'firm_adress',
|
||||||
|
'value' => $this -> settings['firm_adress']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Widget "Telefon"',
|
||||||
|
'name' => 'widget_phone',
|
||||||
|
'checked' => $this -> settings['widget_phone'] == 1 ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<?=
|
||||||
|
\Html::input_switch(
|
||||||
|
array(
|
||||||
|
'label' => 'Formularz kontaktowy',
|
||||||
|
'name' => 'contact_form',
|
||||||
|
'checked' => $this -> settings['contact_form'] == 1 ? true : false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Email kontaktowy',
|
||||||
|
'name' => 'contact_email',
|
||||||
|
'id' => 'contact_email',
|
||||||
|
'value' => $this -> settings['contact_email']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Email - host',
|
||||||
|
'name' => 'email_host',
|
||||||
|
'id' => 'email_host',
|
||||||
|
'value' => $this -> settings['email_host']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Email - port',
|
||||||
|
'name' => 'email_port',
|
||||||
|
'id' => 'email_port',
|
||||||
|
'value' => $this -> settings['email_port']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Email - login',
|
||||||
|
'name' => 'email_login',
|
||||||
|
'id' => 'email_login',
|
||||||
|
'value' => $this -> settings['email_login']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Email - hasło',
|
||||||
|
'name' => 'email_password',
|
||||||
|
'id' => 'email_password',
|
||||||
|
'value' => $this -> settings['email_password'],
|
||||||
|
'type' => 'text'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Ilość aktualności
|
||||||
|
<div class="popo">
|
||||||
|
<i class="popover-btn" data-container="body" data-toggle="popover" data-placement="top" data-content="Ilość wyświetlanych aktulanośći w boxie [NEWS] ">?</i>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<input class="form-control" type="text" name="news_limit" id="news_limit" value="<?= $this -> settings['news_limit']?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Licznik odwiedzin
|
||||||
|
<div class="popo">
|
||||||
|
<i class="popover-btn" data-container="body" data-toggle="popover" data-placement="top" data-content="Włączenie licznika odwiedzin na stronie">?</i>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<div class="col-lg-9 pt5">
|
||||||
|
<div class="switch switch-primary round switch-inline">
|
||||||
|
<input type="checkbox" name="visit_counter" id="visit_counter" <? if ( $this -> settings['visit_counter'] ):?>checked="checked"<? endif;?>>
|
||||||
|
<label for="visit_counter"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Kalendarz
|
||||||
|
<div class="popo">
|
||||||
|
<i class="popover-btn" data-container="body" data-toggle="popover" data-placement="top" data-content="Włączenie kalendarza dla artykułów">?</i>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<div class="col-lg-9 pt5">
|
||||||
|
<div class="switch switch-primary round switch-inline">
|
||||||
|
<input type="checkbox" name="calendar" id="calendar" <? if ( $this -> settings['calendar'] ):?>checked="checked"<? endif;?>>
|
||||||
|
<label for="calendar"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Tagi
|
||||||
|
<div class="popo">
|
||||||
|
<i class="popover-btn" data-container="body" data-toggle="popover" data-placement="top" data-content="Włączenie tagów dla artykułów">?</i>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<div class="col-lg-9 pt5">
|
||||||
|
<div class="switch switch-primary round switch-inline">
|
||||||
|
<input type="checkbox" name="tags" id="tags" <? if ( $this -> settings['tags'] ):?>checked="checked"<? endif;?>>
|
||||||
|
<label for="tags"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?= \Html::input( [
|
||||||
|
'label' => 'Maksmalna wielkość zdjęcia (px)',
|
||||||
|
'name' => 'image_px',
|
||||||
|
'id' => 'image_px',
|
||||||
|
'value' => $this -> settings['image_px']
|
||||||
|
] );
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Klucz Google Search Console',
|
||||||
|
'name' => 'google_search_console',
|
||||||
|
'id' => 'google_search_console',
|
||||||
|
'value' => $this -> settings['google_search_console']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Facebook link',
|
||||||
|
'name' => 'facebook_link',
|
||||||
|
'id' => 'facebook_link',
|
||||||
|
'value' => $this -> settings['facebook_link']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Kod statystyk',
|
||||||
|
'name' => 'statistic_code',
|
||||||
|
'id' => 'statistic_code',
|
||||||
|
'value' => $this -> settings['statistic_code'],
|
||||||
|
'rows' => 10
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Własne reguły htacess',
|
||||||
|
'name' => 'htaccess',
|
||||||
|
'id' => 'htaccess',
|
||||||
|
'value' => $this -> settings['htaccess'],
|
||||||
|
'rows' => 10
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?=
|
||||||
|
\Html::textarea(
|
||||||
|
array(
|
||||||
|
'label' => 'Własne reguły robots.txt',
|
||||||
|
'name' => 'robots',
|
||||||
|
'id' => 'robots',
|
||||||
|
'value' => $this -> settings['robots'],
|
||||||
|
'rows' => 10
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Strona konstrukcyjna
|
||||||
|
<div class="popo">
|
||||||
|
<i class="popover-btn" data-container="body" data-toggle="popover" data-placement="top" data-content="Włączenie strony konstrukcyjnej do tworzenia szablonów">?</i>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<div class="col-lg-9 pt5">
|
||||||
|
<div class="switch switch-primary round switch-inline">
|
||||||
|
<input type="checkbox" name="devel" id="devel" <? if ( $this -> settings['devel'] ):?>checked="checked"<? endif;?>>
|
||||||
|
<label for="devel"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Wersja https://
|
||||||
|
<div class="popo">
|
||||||
|
<i class="popover-btn" data-container="body" data-toggle="popover" data-placement="top" data-content="Włączenie wersji https:// strony">?</i>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<div class="col-lg-9 pt5">
|
||||||
|
<div class="switch switch-primary round switch-inline">
|
||||||
|
<input type="checkbox" name="ssl" id="ssl" <? if ( $this -> settings['ssl'] ):?>checked="checked"<? endif;?>>
|
||||||
|
<label for="ssl"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">MySQL Debug
|
||||||
|
<div class="popo">
|
||||||
|
<i class="popover-btn" data-container="body" data-toggle="popover" data-placement="top" data-content="Umożliwienie zapisu zapytań sql do plików">?</i>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<div class="col-lg-9 pt5">
|
||||||
|
<div class="switch switch-primary round switch-inline">
|
||||||
|
<input type="checkbox" name="mysql_debug" id="mysql_debug" <? if ( $this -> settings['mysql_debug'] ):?>checked="checked"<? endif;?>>
|
||||||
|
<label for="mysql_debug"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Htaccess cache
|
||||||
|
<div class="popo">
|
||||||
|
<i class="popover-btn" data-container="body" data-toggle="popover" data-placement="top" data-content="Aktywny - dla stron rzadko aktualizowanych,<br> Niekatywny - dla stron często aktualizowanych">?</i>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<div class="col-lg-9 pt5">
|
||||||
|
<div class="switch switch-primary round switch-inline">
|
||||||
|
<input type="checkbox" name="htaccess_cache" id="htaccess_cache" <? if ( $this -> settings['htaccess_cache'] ):?>checked="checked"<? endif;?>>
|
||||||
|
<label for="htaccess_cache"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<?= \Html::select( [
|
||||||
|
'label' => "Struktura linków",
|
||||||
|
'name' => "links_structure",
|
||||||
|
'values' => [ 0 => 'skrócona', 1 => 'rozwinięta' ],
|
||||||
|
'value' => $this -> settings['links_structure'] ? 1 : 0
|
||||||
|
] );?>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<?= \Html::select( [
|
||||||
|
'label' => "Wersja strony",
|
||||||
|
'name' => "link_version",
|
||||||
|
'values' => [ 0 => 'bez www', 1 => 'z www' ],
|
||||||
|
'value' => $this -> settings['link_version'] ? 1 : 0
|
||||||
|
] );?>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<?= \Html::select( [
|
||||||
|
'label' => "Newsletter",
|
||||||
|
'name' => "newsletter_cron",
|
||||||
|
'values' => [ 0 => 'wysyłka za pomocą cron i strony', 1 => 'wysyłka za pomocą cron' ],
|
||||||
|
'value' => $this -> settings['newsletter_cron'] ? 1 : 0
|
||||||
|
] );?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-lg-3 control-label">Aktualizacja
|
||||||
|
<div class="popo">
|
||||||
|
<i class="popover-btn " data-container="body" data-toggle="popover" data-placement="top" data-content="Wyświetlanie informacji o pojawiającej się nowej aktualizacji">?</i>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<div class="col-lg-9 pt5">
|
||||||
|
<div class="switch switch-primary round switch-inline">
|
||||||
|
<input type="checkbox" name="update" id="update" <? if ( $this -> settings['update'] ):?>checked="checked"<? endif;?>>
|
||||||
|
<label for="update"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?= Html::input(
|
||||||
|
array(
|
||||||
|
'label' => 'Numer licencji',
|
||||||
|
'name' => 'update_key',
|
||||||
|
'id' => 'update_key',
|
||||||
|
'value' => $this -> settings['update_key']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<?
|
||||||
|
$out = ob_get_clean();
|
||||||
|
|
||||||
|
$grid = new \gridEdit;
|
||||||
|
$grid -> id = 'settings-edit';
|
||||||
|
$grid -> gdb_opt = $gdb;
|
||||||
|
$grid -> include_plugins = true;
|
||||||
|
$grid -> title = 'Edycja ustawień';
|
||||||
|
$grid -> actions = [
|
||||||
|
'save' => [
|
||||||
|
'url' => '/admin/settings/settings_save/',
|
||||||
|
'back_url' => '/admin/settings/view/'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$grid -> external_code = $out;
|
||||||
|
echo $grid -> draw();
|
||||||
|
?>
|
||||||
|
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('.popover-btn').popover(
|
||||||
|
{
|
||||||
|
trigger: 'hover',
|
||||||
|
html: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
#g-edit-save.btn-system{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style type="text/css">#g-edit-cancel { display: none; }</style>
|
||||||