commit 5c3329238bb4a1eff01bb9c10a10eefab6409d5a Author: Alan <@> Date: Sat Feb 14 19:34:54 2026 +0300 Init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4ae69f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,86 @@ +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +files/ +feedback/images/ +simpla/files/ +design/ +lib/ +images/ +compiled/ \ No newline at end of file diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..019e626 --- /dev/null +++ b/.htaccess @@ -0,0 +1,771 @@ +AddDefaultCharset UTF-8 +ErrorDocument 404 /404 +ErrorDocument 401 /password.php +RewriteEngine on + +php_flag display_startup_errors off +php_flag display_errors off +php_flag html_errors off + +php_value memory_limit 128M + +RewriteCond %{THE_REQUEST} // + # Проверяем, повторяется ли слеш (//) более двух раз. +RewriteCond %{QUERY_STRING} !http(s|):// + # Убедимся что это не урл в GET +RewriteRule .* /$0 [R=301,L] + # Исключаем все лишние слеши. + +RewriteCond %{HTTPS} off +RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] + +#RewriteCond %{REQUEST_FILENAME} !-f +#RewriteCond %{REQUEST_URI} !(.*)/$ +#RewriteRule ^(.*[^/])$ $1/ [L,R=301] + +RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] +RewriteRule ^(.*)$ https://%1/$1 [R=301,L] + + +RewriteRule ^index.html$ / [L,R=301] + +RewriteRule ^aktsii/(.*)$ /actions/$1 [L,R=301] + +#RewriteRule ^sitemap/?$ site_map.php [L,QSA] +# RewriteRule ^/nashi-raboty/mercedes-benz/cls%d0%ba%d0%bb%d0%b0%d1%81%d1%81/$ /nashi-raboty/mercedes-benz/clsclass/ [L,R=301] +RewriteRule ^brands/ / [L,R=301] +RewriteRule ^vozvrat-tovara/ / [L,R=301] +RewriteRule ^sotrudnichestvo-s-servisami/ / [L,R=301] +RewriteRule ^garantiya-na-tovar/ / [L,R=301] +RewriteRule ^dostavka/ / [L,R=301] +RewriteRule ^catalog(.*)$ / [L,R=301] +RewriteRule ^products(.*)$ / [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-audi-q5/$ /catalog/ [L,R=301] +RewriteRule ^nashi-raboty/mercedes-benz/clsкласс/$ /nashi-raboty/mercedes-benz/clsclass/ [L,R=301] +RewriteRule ^nashi-raboty/mercedes-benz/claкласс/$ /nashi-raboty/mercedes-benz/claclass/ [L,R=301] +RewriteRule ^catalog/angelskie-glazki-na-mazda/mazda/$ /catalog/angelskie-glazki-na-mazda/ [L,R=301] +RewriteRule ^catalog/angelskie-glazki-na-renault/renault/$ /catalog/angelskie-glazki-na-renault/ [L,R=301] +RewriteRule ^catalog/angelskie-glazki-na-volkswagen/volkswagen/$ /catalog/angelskie-glazki-na-volkswagen/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-volkswagen/volkswagen/$ /catalog/shtatnye-hodovye-ogni-volkswagen/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-renault/renault/$ /catalog/shtatnye-hodovye-ogni-renault/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-hyundai/hyundai/$ /catalog/shtatnye-hodovye-ogni-hyundai/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-audi/AUDI/$ /catalog/shtatnye-hodovye-ogni-audi/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-mazda/mazda/$ /catalog/shtatnye-hodovye-ogni-mazda/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-mercedes-benz/mercedes-benz/$ /catalog/shtatnye-hodovye-ogni-mercedes-benz/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-toyota/toyota/$ /catalog/shtatnye-hodovye-ogni-toyota/ [L,R=301] +RewriteRule ^catalog/biksenonovye-linzy/AUDI/$ /catalog/biksenonovye-linzy/ [L,R=301] +RewriteRule ^catalog/nakladki-na-porogi-metallicheskie-kia/kia/$ /catalog/nakladki-na-porogi-metallicheskie-kia/ [L,R=301] +RewriteRule ^catalog/nakladki-na-porogi-s-podsvetkoj-citroen/citroen/$ /catalog/nakladki-na-porogi-s-podsvetkoj-citroen/ [L,R=301] +RewriteRule ^catalog/angelskie-glazki-na-subaru/subaru/$ /catalog/angelskie-glazki-na-subaru/ [L,R=301] +RewriteRule ^catalog/nakladki-na-porogi-s-podsvetkoj-opel/opel/$ /catalog/nakladki-na-porogi-s-podsvetkoj-opel/ [L,R=301] +RewriteRule ^articles/tehinfo/shtatnye-dnevnye-hodovye-ogni/$ /tehinfo/shtatnye-dnevnye-hodovye-ogni/ [L,R=301] +RewriteRule ^tehinfo/ustranenie-zapotevaniya-far/$ /tehinfo/poteet-fara/ [L,R=301] +RewriteRule ^article/catalog/dopolnitelnoe-oborudovanie/$ /catalog/dopolnitelnoe-oborudovanie/ [L,R=301] +RewriteRule ^brendy/$ /brands/ [L,R=301] +RewriteRule ^nashi-raboty/filter-podsvetka-salona-i-kuzova-avtomobilja/$ /nashi-raboty/ [L,R=301] +RewriteRule ^products/biksenonovye-linzy-hella-intemo-4r/$ /catalog/biksenonovye-linzy-hella/ [L,R=301] +RewriteRule ^products/biksenonovye-linzy-hella-2r-s-matovym-steklom/$ /catalog/biksenonovye-linzy-hella/ [L,R=301] +RewriteRule ^products/-biksenonovye-linzy-hella-2r/$ /catalog/biksenonovye-linzy-hella/ [L,R=301] +RewriteRule ^products/biksenonovye-linzy-hella-r/$ /catalog/biksenonovye-linzy-hella/ [L,R=301] +RewriteRule ^products/biksenonovye-linzy-hella-evox-r/$ /catalog/biksenonovye-linzy-hella/ [L,R=301] +RewriteRule ^products/svetodiodnye-linzy-bi-led-gtr-mini-5500k/$ /catalog/svetodiodnye-linzy/ [L,R=301] +RewriteRule ^products/svetodiodnye-linzy-bi-led-gtr-mini/$ /catalog/svetodiodnye-linzy/ [L,R=301] +RewriteRule ^products/svetodiodnye-linzy-optima-premium-bi-led-adaptive-series/$ /catalog/svetodiodnye-linzy/ [L,R=301] +RewriteRule ^products/svetodiodnye-linzy-optima-premium-bi-led-lens-professional/$ /catalog/svetodiodnye-linzy/ [L,R=301] +RewriteRule ^products/svetodiodnye-linzy-morimoto-m-bi-led/$ /catalog/svetodiodnye-linzy/ [L,R=301] +RewriteRule ^products/stekla-dlya-far-audi-a6-c5-restajling-2001-2005-gv/$ /catalog/stekla-dlya-far-audi/ [L,R=301] +RewriteRule ^products/stekla-dlya-far-bmw-3-series-e46-restajling-2002---2006-gv/$ /catalog/stekla-dlya-far-bmw/ [L,R=301] +RewriteRule ^products/vosstanovlennye-otrazhateli-linz-valeo-2-new/$ /catalog/linzy-dlja-far/ [L,R=301] +RewriteRule ^products/vosstanovlennye-otrazhateli-dlya-linz-hella-2-classic/$ /catalog/linzy-dlja-far/ [L,R=301] +RewriteRule ^products/vosstanovlennye-otrazhateli-dlya-bi-ksenonovyh-linz-hella-2-classic/$ /catalog/linzy-dlja-far/ [L,R=301] +RewriteRule ^products/vosstanovlennye-otrazhateli-dlya-linz-al-bosch/$ /catalog/linzy-dlja-far/ [L,R=301] +RewriteRule ^catalog/vosstanovlennye-otrazhateli-linz/$ /catalog/linzy-dlja-far/ [L,R=301] +RewriteRule ^products/originalnye-bi-ksenonovye-linzy-morimoto-mini-h1-70-25-dyujma/$ /catalog/linzy-dlja-far/ [L,R=301] +RewriteRule ^products/originalnye-bi-ksenonovye-linzy-morimoto-matchbox-20-dyujma/$ /catalog/linzy-dlja-far/ [L,R=301] +RewriteRule ^products/-biksenonovye-linzy-morimoto-mini-h1-3-dyujma/$ /catalog/linzy-dlja-far/ [L,R=301] +RewriteRule ^products/biksenonovye-linzy-morimoto-mini-h1-d2s-25/$ /catalog/linzy-dlja-far/ [L,R=301] +RewriteRule ^products/-biksenonovye-linzy-morimoto-mini-h1-g5-25/$ /catalog/linzy-dlja-far/ [L,R=301] +RewriteRule ^catalog/universalnye-linzy/$ /catalog/linzy-dlja-far/ [L,R=301] +RewriteRule ^products/biksenonovye-linzy-koito-q5-h4-d2s-30-/$ /catalog/ksenonovye-linzy/ [L,R=301] +RewriteRule ^products/biksenonovye-linzy-koito-q5-d1s-d2s-d3s-d4s-30/$ /catalog/ksenonovye-linzy/ [L,R=301] +RewriteRule ^products/-biksenonovye-linzy-koito-q5-square-h4-d2s-30/$ /catalog/ksenonovye-linzy/ [L,R=301] +RewriteRule ^products/biksenonovye-linzy-koito-fx-r-d2s-25-dyujma/$ /catalog/ksenonovye-linzy/ [L,R=301] +RewriteRule ^catalog/biksenonovye-linzy-koito/$ /catalog/ksenonovye-linzy/ [L,R=301] +RewriteRule ^products/stekla-dlya-far-chevrolet-lacetti-sedan-2004-2013-gv/$ /catalog/stekla-dlya-far/ [L,R=301] +RewriteRule ^products/stekla-dlya-far-chevrolet-cruze-2008-2015-gv/$ /catalog/stekla-dlya-far/ [L,R=301] +RewriteRule ^products/stekla-dlya-far-chevrolet-epica-2006-2012-gv/$ /catalog/stekla-dlya-far/ [L,R=301] +RewriteRule ^products/stekla-dlya-far-chevrolet-aveo-t300-2012-ng/$ /catalog/stekla-dlya-far/ [L,R=301] +RewriteRule ^catalog/stekla-dlya-far-chevrolet-lacetti/$ /catalog/stekla-dlya-far/ [L,R=301] +RewriteRule ^catalog/stekla-dlya-far-chevrolet-aveo/$ /catalog/stekla-dlya-far/ [L,R=301] +RewriteRule ^catalog/stekla-dlya-far-chevrolet-cruze/$ /catalog/stekla-dlya-far/ [L,R=301] +RewriteRule ^catalog/stekla-dlya-far-chevrolet-epica/$ /catalog/stekla-dlya-far/ [L,R=301] +RewriteRule ^catalog/stekla-dlya-far-chevrolet/$ /catalog/stekla-dlya-far/ [L,R=301] +RewriteRule ^products/naklejka-dlya-far-hella/$ /catalog/komplektuyuschie/ [L,R=301] +RewriteRule ^products/klishe-dlya-naneseniya-klejma-na-korpus-fary/$ /catalog/komplektuyuschie/ [L,R=301] +RewriteRule ^catalog/markirovka-dlya-far/$ /catalog/komplektuyuschie/ [L,R=301] +RewriteRule ^products/biksenonovye-fary-russlight-bmw-5-e60-s-dnevnymi-hodovymi-ognyami/$ /catalog/ [L,R=301] +RewriteRule ^products/biksenonovye-fary-russlight-lexus-ls570-s-dnevnymi-hodovymi-ognyami/$ /catalog/ [L,R=301] +RewriteRule ^products/biksenonovye-fary-russlight-volkswagen-amarok-s-dnevnymi-hodovymi-ognyami/$ /catalog/ [L,R=301] +RewriteRule ^products/-biksenonovye-fary-russlight-bmw-x5-e53-s-dnevnymi-hodovymi-ognyami/$ /catalog/ [L,R=301] +RewriteRule ^products/biksenonovye-fary-russlight-lada-priora-s-dnevnymi-hodovymi-ognyami/$ /catalog/ [L,R=301] +RewriteRule ^catalog/komplekty-far/$ /catalog/ [L,R=301] +RewriteRule ^catalog/komplekty-far-bmw/$ /catalog/ [L,R=301] +RewriteRule ^catalog/komplekty-far-lada/$ /catalog/ [L,R=301] +RewriteRule ^catalog/komplekty-far-lexus/$ /catalog/ [L,R=301] +RewriteRule ^catalog/komplekty-far-volkswagen/$ /catalog/ [L,R=301] +RewriteRule ^catalog/kamery-audi/$ /catalog/ [L,R=301] +RewriteRule ^catalog/angelskie-glazki/$ /catalog/ [L,R=301] +RewriteRule ^catalog/komplekty-angelskih-glazok-po-markam-avto/$ /catalog/ [L,R=301] +RewriteRule ^catalog/svetodiodnye-koltsa-rgb-halos-style/$ /catalog/ [L,R=301] +RewriteRule ^products/angelskie-glazki-led-marker-bmw-e90e91-32w/$ /catalog/ [L,R=301] +RewriteRule ^products/-angelskie-glazki-led-marker-bmw-e90e91-20w-cree/$ /catalog/ [L,R=301] +RewriteRule ^products/-angelskie-glazki-led-marker-bmw-e60-lci-40w/$ /catalog/ [L,R=301] +RewriteRule ^products/angelskie-glazki-led-marker-bmw-e92-h8-64w/$ /catalog/ [L,R=301] +RewriteRule ^products/angelskie-glazki-led-marker-bmw-e92-h8-40w/$ /catalog/ [L,R=301] +RewriteRule ^products/angelskie-glazki-led-marker-bmw-e92-h8-32w/$ /catalog/ [L,R=301] +RewriteRule ^products/angelskie-glazki-led-marker-bmw-e92-h8-20w/$ /catalog/ [L,R=301] +RewriteRule ^products/angelskie-glazki-led-marker-bmw-e39-32w/$ /catalog/ [L,R=301] +RewriteRule ^products/angelskie-glazki-bmw-f-style-80mm/$ /catalog/ [L,R=301] +RewriteRule ^products/angelskie-glazki-bmw-f-style-90mm/$ /catalog/ [L,R=301] +RewriteRule ^products/angelskie-glazki-bmw-f-style-95mm/$ /catalog/ [L,R=301] +RewriteRule ^products/-angelskie-glazki-bmw-f-style-100mm/$ /catalog/ [L,R=301] +RewriteRule ^products/-angelskie-glazki-bmw-f-style-110mm/$ /catalog/ [L,R=301] +RewriteRule ^products/angelskie-glazki-bmw-f-style-115mm/$ /catalog/ [L,R=301] +RewriteRule ^products/-angelskie-glazki-bmw-f-style-125mm/$ /catalog/ [L,R=301] +RewriteRule ^products/angelskie-glazki-bmw-f-style-120-h-100mm/$ /catalog/ [L,R=301] +RewriteRule ^products/-angelskie-glazki-bmw-f-style-115-h-105mm/$ /catalog/ [L,R=301] +RewriteRule ^catalog/shtatnye-bmw-led-markery/$ /catalog/ [L,R=301] +RewriteRule ^catalog/svetodiodnye-koltsa-bmw-style/$ /catalog/ [L,R=301] +RewriteRule ^products/blackvue-power-magic-pro/$ /catalog/ [L,R=301] +RewriteRule ^products/videoregistrator-blackvue-dr590-1ch/$ /catalog/ [L,R=301] +RewriteRule ^products/videoregistrator-blackvue-dr490-2ch/$ /catalog/ [L,R=301] +RewriteRule ^products/videoregistrator-blackvue-dr590-2ch/$ /catalog/ [L,R=301] +RewriteRule ^products/videoregistrator-blackvue-dr750s-1ch-16gb/$ /catalog/ [L,R=301] +RewriteRule ^products/videoregistrator-blackvue-dr650s-2ch-ir/$ /catalog/ [L,R=301] +RewriteRule ^products/videoregistrator-blackvue-dr750s-2ch-16gb/$ /catalog/ [L,R=301] +RewriteRule ^products/videoregistrator-blackvue-dr650gw-2ch-truck/$ /catalog/ [L,R=301] +RewriteRule ^catalog/videoregistratory-blackvue/$ /catalog/ [L,R=301] +RewriteRule ^products/ksenonovaya-lampa-h11-zumato/$ /catalog/ksenonovye-lampy/ [L,R=301] +RewriteRule ^products/ksenonovaya-lampa-h27-zumato/$ /catalog/ksenonovye-lampy/ [L,R=301] +RewriteRule ^products/ksenonovaya-lampa-hb3-9005-zumato/$ /catalog/ksenonovye-lampy/ [L,R=301] +RewriteRule ^products/ksenonovaya-lampa-hb4-9006-zumato/$ /catalog/ksenonovye-lampy/ [L,R=301] +RewriteRule ^products/ksenonovaya-lampa-h7-zumato/$ /catalog/ksenonovye-lampy/ [L,R=301] +RewriteRule ^products/bi-ksenonovaya-lampa-n4-zumato/$ /catalog/ksenonovye-lampy/ [L,R=301] +RewriteRule ^products/ksenonovaya-lampa-h4-zumato/$ /catalog/ksenonovye-lampy/ [L,R=301] +RewriteRule ^products/ksenonovaya-lampa-h3-zumato/$ /catalog/ksenonovye-lampy/ [L,R=301] +RewriteRule products/ksenonovaya-lampa-zumato-d2h/$ /catalog/ksenonovye-lampy/ [L,R=301] +RewriteRule ^products/-ksenonovaya-lampa-morimoto-xb-d2h/$ /catalog/ksenonovye-lampy/ [L,R=301] +RewriteRule ^catalog/neshtatnye-ksenonovye-lampy/$ /catalog/ksenonovye-lampy/ [L,R=301] +RewriteRule ^products/blok-rozzhiga-zumato-slim-long/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-rozzhiga-zumato-can-slim/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-rozzhiga-zumato-can/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-rozzhiga-zumato/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-rozzhiga-zumato-d2sd2r/$ /catalog/ [L,R=301] +RewriteRule ^products/-shtatnyj-blok-rozzhiga-koito-denso-d2/$ /catalog/ [L,R=301] +RewriteRule ^products/-shtatnyj-blok-rozzhiga-valeo-6g-4l0907391/$ /catalog/ [L,R=301] +RewriteRule ^products/-blok-rozzhiga-valeo-7g-green-89089352/$ /catalog/ [L,R=301] +RewriteRule ^products/shtatnyj-blok-rozzhiga-dlya-hodovyh-ognej-drl-valeo-l90035854/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-rozzhiga-morimoto-xb35/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-rozzhiga-morimoto-xb55/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-mercedes-benz-c-klasse-w204-2011-2014-restajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-mercedes-benz-c-klasse-w205-2014-2018-dorestajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-mercedes-benz-gla-klasse-x156-2013-2017-dorestajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-rozzhiga-ksenona-mercedes-benz-glk-x204-2007-2011-dorestajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-mercedes-benz-ml-gl-w166-x166-2011-2016/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-bmw-1-series-f20-2011-2015-dorestajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-bmw-3-series-f30-2015-2019-restajling-full-led/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-povorotom-levyj-bmw-3-series-f30-2015-2019-restajling-full-led/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-povorotom-pravyj-bmw-3-series-f30-2015-2019-restajling-full-led/$ /catalog/ [L,R=301] +RewriteRule ^products/komplekt-blokov-podsvetki-kolets-bmw-3-series-f30-2015-2019-restajling-full-led/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-bmw-3-series-f30-2011-2015-dorestajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-bmw-5-series-f10-2009-2013-dorestajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-bmw-5-series-f10-2013-2016-restajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-bmw-5-series-gt-f07-gran-tourismo-2009-2013-dorestajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-bmw-7-series-f01-2008-2012-dorestajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-bmw-x3-f25-2010-2014-dorestajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-bmw-x3-f25-2014-2017-restajling/$ /catalog/ [L,R=301] +RewriteRule ^products/blok-upravleniya-faroj-bmw-x4-f26-2013-2017/$ /catalog/ [L,R=301] +RewriteRule ^catalog/shtatnye-bloki-rozzhiga/$ /catalog/ [L,R=301] +RewriteRule ^catalog/neshtatnye-bloki-rozzhiga/$ /catalog/ [L,R=301] +RewriteRule ^catalog/bloki-rozzhiga/page-2/$ /catalog/ [L,R=301] +RewriteRule ^catalog/bloki-rozzhiga/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-audi-q5-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-audi-q7-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-audi-a5-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-audi-a5-bez-sistemy-adaptivnogo-osvescheniya-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-audi-q5-bez-sistemy-adaptivnogo-osvescheniya-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-audi-q7-bez-sistemy-adaptivnogo-osvescheniya--modul-hella-3--hella-3r-/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-audi-a6-c6-2004-2011gv-modul-bosch-3r-bosch-3/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-audi-q5-bez-sistemy-adaptivnogo-osvescheniya-modul-bi-led-gtr-bi-led-optima/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-audi-q7-bez-sistemy-adaptivnogo-osvescheniya-modul-bi-led-gtr-bi-led-optima/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-audi-a5-bez-sistemy-adaptivnogo-osvescheniya-modul-bi-led-gtr-bi-led-optima/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-bmw-x5-e70-2010-2013-gv-restajling-modul-hella-3r-hella-3/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-bmw-1-dlja-adaptivnyh-far-modul-hella-3r-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-bmw-x1-dlya-adaptivnyh-far-modul-hella-3r-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-bmw-3-e90-2005-2008-gv-modul-hella-3r-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-bmw-x5-e53-1999-2004-gv-dorestajling-modul-hella-3r-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-bmw-7-f01-f02-2008-2015-gv-bez-sistemy-adaptivnogo-osvescheniya-modul-hella-3r-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-bmw-3-e46-2003-2006-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-chevrolet-captiva-2011-2016-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-chevrolet-tahoe-2015-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-chevrolet-tahoe-2015-nv-svetodiodnyj-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-chrysler-300c-2004-2010-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-citroen-c-crosser-2007-n-v-modul-hella-3r-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-citroen-c-crosser-2007-2013-svetodiodnyj-modul-bi-led-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-perehodnye-ramki-dodge-ram-2013-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-explorer-v-2010-2015-gv-modul-al-bosch/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-explorer-v-2010-2015-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-explorer-v-2010-2015-gv-modul-koito-fx-r-30-/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-explorer-v-2010-2015-gv-modul-hella-r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-explorer-v-2010-2015-gv-bi-diodnyj-modul-koito-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-explorer-v-2010-2015-gv-bi-diodnyj-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-focus-3-2011-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-focus-2-2008-2010-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-focus-2-2008-2010-gv-modul-stanley/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-focus-2-2008-2010-gv-modul-hella-4/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-mondeo-iii-2000-2007-gv-modul-hella-3-hella3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ford-mondeo-iv-2007-2015-gv-modul-hella-r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-honda-cr-v-iv-2012-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-honda-accord-2003-2007-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-honda-cr-v-iii-2007-2011-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-honda-civic-vii-2004-2006-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-genesis-coupe-2013-2016-gv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-genesis-coupe-2013-2016-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-i40-2011-nv-modul-hella-4r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-ix35-2009-2013-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-ix35-2009-2013-gv-modul-hella-r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-ix55-2006-2012-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-nf-2004-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-solaris-2013-2015-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-solaris-2014-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-solaris-2014-nv-modul-morimoto-mini/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-santa-fe-2006-2012-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-santa-fe-2012--nv-modul-hella-qr/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-sonata-2004-2009-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-sonata-2004-2009-gv-modul-hella-r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-hyundai-sonata-2004-2009-gv-modul-morimoto-mini/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-infiniti-fx-2003-2008-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-infiniti-g-2006-2011-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-infiniti-ex-afl-2007-2014-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-infiniti-ex-afl-2007-2014-gv-dlya-adaptivnyh-far-modul-stanley/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-infiniti-fx-2009-2013-gvdlya-adaptivnyh-far-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-infiniti-fx-2009-2013-gv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-infiniti-fx-2009-2013-gv-dlya-adaptivnyh-far-modul-stanley/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-infiniti-qx-2013-2017-gv-dlya-adaptivnyh-far-modul-stanley/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-infiniti-qx-2013-2017-gv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-infiniti-qx-2013-2017-gvdlya-adaptivnyh-far-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-ceed-fl-2010-2012-gv-modul-hella-3hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-ceed-jd-2012--nv-modul-hella-3hella-3r-hella-4r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-cerato-iii-2013-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-magentis-ii-2005-2010-gv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-magentis-ii-2005-2010-gv-modul-hella-3hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-mohave-2008-2017-gv-modul-hella-3hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-sorento-2-2009-2013-gv-modul-hella-3hella-3r-/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-sorento-2-2013-2015-gv-dlya-adaptivnyh-far-modul-hella-3r-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-sorento-2-2013-2015-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-sportage-3-2010-2015-v-modul-hella-3-hella-3r-morimoto/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-sportage-3-2010-2015-v-modul-morimoto-mini/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-sportage-4-2015-nv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-sportage-4-2015-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-kia-sportage-4-2015-nv-modul-hella-3r-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-land-rover-discovery-3-2004-2009-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-land-rover-discovery-4-2013--nv-dlya-adaptivnyh-far-modul-hella-3-hella-3r-/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-land-rover-vogue-2013--nv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-land-rover-evogue-2011-nv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-land-rover-range-rover-4-2013-nv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-land-rover-range-rover-sport-2010-nv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-land-rover-freelander-ii-2006-2012-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-gs-300-2005-2012-gv-dlya-adaptivnyh-far-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-gs-300-2005-2012-gv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-gx470-2002-2009-gv-modul-hella-4-intemo/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-is-2005-2013-gv-dlya-adaptivnyh-far-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/-perehodnye-ramki-lexus-lx470-2001-2007-gv-modul-hella-3hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-lx470-2001-2007-gv-modul-hella-4-intemohella-r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-lx570-2007-2012-gv-dlya-adaptivnyh-far-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-lx570-2007-2012-gv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-rx-2003-2010-gv-bez-sistemy-adaptivnogo-osvescheniyamodul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-rx-2003-2010-gv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-ex-afl-2007-2013-gv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-rx-2003-2010-gv-dlya-adaptivnyh-far-modul-stanley/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-lexus-ex-afl-2007-2013-gv-dlya-adaptivnyh-far-modul-stanley/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-3-2003-2009-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-3-2009-2013-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2002-2008-modul-hella-r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2002-2008-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2002-2008-gv-modul-koito-fx-ral-25-al-bosch-koito-g-3/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2002-2008-gv-modul-fx-r-25-3/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2002-2008-gv-modul-hella-ff-de-60/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2002-2008-gv-modul-morimoto-matchbox-20/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2002-2008-gv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2009-2011-gv-modul-koito-fx-r-3/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2009-2011-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2010-2013-gv-restajling-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2013-2015-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-6-2013-2015-gv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-cx-5-2011-2014-gv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-cx-5-2011-2014-gv-modul-hella-3-hella-3r-hella-3r-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-cx-7-2006-2012-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-cx-7-2006-2012-gv-modul-stanley-25/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mazda-cx-9-2007-2012-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mercedes-benz-gelenvagen-w460-w461-w463-1979-nv-modul-hella-3hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mercedes-benz-e-class-w211-2002-2006-gv-modul-hella-3hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mercedes-benz-glk-x204-2009-2015-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mercedes-benz-sl-r129-1989-2001-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mitsubishi-pajero-iv-2006-2014-gv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mitsubishi-pajero-iv-2006-2014-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mitsubishi-pajero-iv-2006-2014-gv-modul-hella-4-intemo/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mitsubishi-pajero-iv-2014-nv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-mitsubishi-pajero-iv-2014-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-murano-z50-2002-2009-gv-modul-koito-fx-r-40/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-murano-z50-2002-2009-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-murano-z50-2002-2009-gv-modul-hella-r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-murano-z50-2002-2009-gv-modul-stanley-25/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-murano-z51-2009--nv-modul-koito-fx-r-40-/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-murano-z51-2009-2014-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-murano-z51-2009-2014-gv-modul-hella-r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-murano-z51-2009-2014-gv-modul-stanley-25/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-patrol-y62-2010-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-qashqai-ii-2013-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-teana-ii-2011-2014-gv-restajling-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-teana-iii-2014--nv-modul-hella-r-/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-x-trail-t31-2007-2011-gv-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-nissan-x-trail-t31-2010-nv-restajling-modul-hella-4/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-opel-antara-2010-nv-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-porsche-cayenne-2002-2007-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-saab-9-5-2002-2005-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ssang-yong-actyon-2013-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ssang-yong-rexton-2012-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ssang-yong-actyon-2013-nv-modul-morimoto-mini-h1-3/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ssang-yong-rexton-2012-nv-modul-morimoto-mini-h1-3/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-ssang-yong-kyron-2005-nv-modul-morimoto-mini-h1-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-suzuki-grand-vitara-2015-gv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-suzuki-grand-vitara-2015-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2007-2009-gv-restajling-modul-hella-ff-de-60mm/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2003-2007-gv-modul-hella-ff-de-60mm/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2003-2007-gv-modul-koito/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2003-2007-gv-modul-stanley-25/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2007-2009-gv-restajling-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2007-2009-gv-restajling-modul-hella-r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2007-2009-gv-restajling-modul-koito/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2007-2009-gv-restajling-modul-morimoto-mini-h1-25/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2007-2009-gv-restajling-modul-morimoto-mini-d2s-25/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2007-2009-gv-restajling-modul-stanley-25/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2007-2009-gv-restajling-modul-valeo-2/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-ii-2007-2009-gv-restajling-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-avensis-iii-2009-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-camry-v40-2009-2011-gv-restajling-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-camry-v40-2006-2009-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-camry-v40-2006-2009-gv-modul-stanley-25/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-camry-v40-2009-2011-gv-restajling-modul-stanley-25/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-camry-v40-2009-2011-gv-restajling-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-camry-v40-2006-2009-gv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-camry-v50-2011-2015-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-camry-v50-2011-2015-gv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-highlander-ii-2007-2014-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-highlander-ii-2007-2014-gv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-land-cruiser-200-2013-2015-gv-restajling-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-land-cruiser-200-2013-2015-gv-restajling-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-land-cruiser-200-2013-2015-gv-restajling-modul-koito-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-land-cruiser-200-2015--nv-restajling-modul-koito-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-land-cruiser-prado-150-2009-2015-gv-modul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-land-cruiser-prado-150-2009-2015-gv-restajling-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-land-cruiser-prado-150-2009-2015-gv-4-bi-ksenonovyh-modulya-hella/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-land-cruiser-prado-150-2009-nv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-land-cruiser-prado-150-2009-nv-dlya-adaptivnyh-far-modul-hella-3-hella-3r-hella-r-hella-4/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-rav4-ca30w-2005-2010-gv-modul-hella-4-intemo/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-rav4-2010-2013-gv-modul-hella-r-hella-4-intemo/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-solara-ii-2004-2008-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-toyota-venza-2008-2013-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volkswagen-passat-b6-2005-2008-gv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volkswagen-passat-b6-2005-2008-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volkswagen-touareg-2002-2005-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volkswagen-touareg-2002-2007-gv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volkswagen-tiguan-2007-2011-gv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volkswagen-passat-cc-2008-2011-gv-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volkswagen-passat-b7-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volkswagen-passat-b6-restajling-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volkswagen-golf-vii-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volvo-xc70-2007-2015-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volvo-s80-2007-2015-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-volvo-xc90-dlya-adaptivnyh-far-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-subaru-legasyoutback-iv-b13-2006-2009-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-subaru-legasyoutback-v-2003-20062009-nvmodul-gtr-mini-bi-led/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-subaru-legasyoutback-v-2003-20062009-nv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-subaru-legasyoutback-v-2003-20062009-nv-modul-stanley-25/$ /catalog/ [L,R=301] +RewriteRule ^products/perehodnye-ramki-subaru-tribeca-b9-2006-2007-gv-modul-hella-3-hella-3r/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki/page-9/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki/page-8/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki/page-7/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki/page-6/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki/page-5/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki/page-4/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki/page-3/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki/page-2/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-audi-q5/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-audi-q7/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-audi-a5/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-audi-a6/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-audi/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-bmw-3/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-bmw-7/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-bmw-1/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-bmw-x1/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-bmw-x5-/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-bmw/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-chevrolet-captiva/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-chevrolet-tahoe/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-chevrolet/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-chrysler-300c-/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-chrysler/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-citroen-c-crosser/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-citroen/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dodge-ram-/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-dodge/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-ford-explorer/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-ford-focus/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-ford-mondeo/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-ford/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-honda-accord/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-honda-civic/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-honda-crv/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-honda/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-hyundai-genesis/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-hyundai-ix55/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-hyundai-sonata/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-hyundai-i40/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-hyundai-solaris/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-hyundai-nf/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-hyundai-ix35/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-hyundai-santa-fe/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-hyundai/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnaya-ramka-infiniti-g/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-infiniti-fx/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnaya-ramka-infiniti-ex/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnaya-ramka-infiniti-qx/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-infiniti/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnaya-ramka-kia-ceed/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnaya-ramka-kia-mohave/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnaya-ramka-kia-sorento/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnaya-ramka-kia-cerato/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnaya-ramka-kia-magentis/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-kia-sportage/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-kia/$ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-land-rover-discovery/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-land-rover-freelander/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-land-rover-range-rover/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-land-rover-vogue/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-land-rover-evogue/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-land-rover/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-lexus-gs/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-lexus-lx/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-lexus-gx/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-lexus-rx/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-lexus-ex/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-lexus-is/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-lexus/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-mazda-3/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-mazda-cx-7/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-mazda-cx-9/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-mazda-cx5/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-mazda/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-mercedes-benz-gelenvagen/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-mercedes-benz-c-class/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-mercedes-benz-e-class/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-mercedes-benz-gelenvagen/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-mercedes-benz-sl/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-mercedes-benz/$ /catalog/ [L,R=301] +RewriteRule ^catalog/-perehodnye-ramki-mitsubishi-pajero/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-mitsubishi/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-nissan-murano-/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-nissan-teana/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-nissan-patrol-/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-nissan-x-trail/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-nissan-qashqai/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-nissan/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-opel-antara/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-opel/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-porsche-cayenne-/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-porsche/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-saab-9-5/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-saab/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-ssang-yong-actyon-/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-ssang-yong-rexton/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-ssang-yong-kyron/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-ssangyong/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-subaru-outback/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-subaru-tribeca/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-subaru/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-suzuki-grand-vitara/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-suzuki/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-toyota-avensis/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-toyota-rav-4/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-toyota-venza/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-toyota-camry/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-toyota-solara/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-toyota-land-cruiser/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-toyota-highlander/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-toyota/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-volkswagen-touareg/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-volkswagen-passat/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-volkswagen-golf/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-volkswagen-tiguan/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-volkswagen/$ /catalog/ [L,R=301] +RewriteRule ^catalog/-perehodnye-ramki-volvo-xc70/$ /catalog/ [L,R=301] +RewriteRule ^catalog/-perehodnye-ramki-volvo-s80/$ /catalog/ [L,R=301] +RewriteRule ^catalog/-perehodnye-ramki-volvo-xc90/$ /catalog/ [L,R=301] +RewriteRule ^catalog/perehodnye-ramki-dlya-volvo/$ /catalog/ [L,R=301] +RewriteRule ^/tuning-centr/remont-far-po-markam-avto/ /tuning-centr/remont-far/ [L,R=301] +RewriteRule ^tuning-centr/video-rabot/$ /video-rabot/ [L,R=301] +RewriteRule ^tuning-centr/elektronika/$ /tuning-centr/dopolnitelnoe-oborudovanie/ [L,R=301] +RewriteRule ^tuning-centr/vizualnyj-tuning/?$ /tuning-centr/ehksterernye-raboty/ [L,R=301] +RewriteRule ^tuning-centr/podsvetka-salona-i-kuzova-avtomobilja/?$ /tuning-centr/podsvetka-salona-avtomobilja/ [L,R=301] + +RewriteRule ^tuning-centr/remont-far-audi/$ /tuning-centr/remont-far/audi/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-bentley/$ /tuning-centr/remont-far/bentley/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-bmw/$ /tuning-centr/remont-far/bmw/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-cadillac/$ /tuning-centr/remont-far/cadillac/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-chevrolet/$ /tuning-centr/remont-far/chevrolet/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-chrysler/$ /tuning-centr/remont-far/chrysler/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-citroen/$ /tuning-centr/remont-far/citroen/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-dodge/$ /tuning-centr/remont-far/dodge/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-ferrari/$ /tuning-centr/remont-far/ferrari/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-fiat/$ /tuning-centr/remont-far/fiat/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-geely/$ /tuning-centr/remont-far/geely/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-haval/$ /tuning-centr/remont-far/haval/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-honda/$ /tuning-centr/remont-far/honda/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-hummer/$ /tuning-centr/remont-far/hummer/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-hyundai/$ /tuning-centr/remont-far/hyundai/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-infiniti/$ /tuning-centr/remont-far/infiniti/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-jaguar/$ /tuning-centr/remont-far/jaguar/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-jeep/$ /tuning-centr/remont-far/jeep/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-kia/$ /tuning-centr/remont-far/kia/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-lexus/$ /tuning-centr/remont-far/lexus/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-mazda/$ /tuning-centr/remont-far/mazda/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-mercedes-benz/$ /tuning-centr/remont-far/mercedes-benz/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-mini/$ /tuning-centr/remont-far/mini/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-mitsubishi/$ /tuning-centr/remont-far/mitsubishi/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-nissan/$ /tuning-centr/remont-far/nissan/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-opel/$ /tuning-centr/remont-far/opel/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-peugeot/$ /tuning-centr/remont-far/peugeot/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-porsche/$ /tuning-centr/remont-far/porsche/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-renault/$ /tuning-centr/remont-far/renault/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-scania/$ /tuning-centr/remont-far/scania/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-skoda/$ /tuning-centr/remont-far/skoda/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-smart/$ /tuning-centr/remont-far/smart/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-subaru/$ /tuning-centr/remont-far/subaru/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-suzuki/$ /tuning-centr/remont-far/suzuki/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-tesla/$ /tuning-centr/remont-far/tesla/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-toyota/$ /tuning-centr/remont-far/toyota/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-volkswagen/$ /tuning-centr/remont-far/volkswagen/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-volvo/$ /tuning-centr/remont-far/volvo/ [L,R=301] +RewriteRule ^tuning-centr/remont-far-ford/$ /tuning-centr/remont-far/ford/ [L,R=301] + +RewriteRule ^tuning-centr/polirovka-far-audi/$ /tuning-centr/polirovka-far/audi/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-bmw/$ /tuning-centr/polirovka-far/bmw/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-chevrolet/$ /tuning-centr/polirovka-far/chevrolet/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-honda/$ /tuning-centr/polirovka-far/honda/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-hyundai/$ /tuning-centr/polirovka-far/hyundai/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-kia/$ /tuning-centr/polirovka-far/kia/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-mazda/$ /tuning-centr/polirovka-far/mazda/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-mercedes-benz/$ /tuning-centr/polirovka-far/mercedes-benz/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-nissan/$ /tuning-centr/polirovka-far/nissan/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-opel/$ /tuning-centr/polirovka-far/opel/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-peugeot/$ /tuning-centr/polirovka-far/peugeot/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-renault/$ /tuning-centr/polirovka-far/renault/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-skoda/$ /tuning-centr/polirovka-far/skoda/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-toyota/$ /tuning-centr/polirovka-far/toyota/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-volkswagen/$ /tuning-centr/polirovka-far/volkswagen/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-volvo/$ /tuning-centr/polirovka-far/volvo/ [L,R=301] +RewriteRule ^tuning-centr/polirovka-far-ford/$ /tuning-centr/polirovka-far/ford/ [L,R=301] + +RewriteRule ^/tuning-centr/shumoizolyatsiya-audi/$ /tuning-centr/shumoizoljacija-avto/audi/ [L,R=301] +RewriteRule ^/tuning-centr/shumoizolyatsiya-toyota/$ /tuning-centr/shumoizoljacija-avto/toyota/ [L,R=301] + +RewriteRule ^tuning-centr/oklejka-elementov-salona-plenkoj/$ /tuning-centr/oklejka-vnutrennih-elementov-salona-poliuretanovoj-plenkoj/ [L,R=301] + +# Убираем знак вопроса в конце URL (/?) +RewriteCond %{THE_REQUEST} ^[^\s]+\s+[^?]*?\? +RewriteCond %{QUERY_STRING} ^$ +RewriteRule .? %{REQUEST_URI}? [R=301,L] + + +RewriteRule ^products/page-([0-9]+)/$ /products/?page=$1 [L,QSA] +RewriteRule ^brands/(.*)/page-(.*)/$ /brands/$1/?page=$2 [L,QSA] +RewriteRule ^catalog/(.*)/page-(.*)/$ /catalog/$1/?page=$2 [L,QSA] +RewriteRule ^otzyvy/page-(.*)/$ /otzyvy/?page=$1 [L,QSA] +RewriteRule ^articles/(.*)/page-(.*)/$ /articles/$1/?page=$2 [L,QSA] + +# Каталог товаров +RewriteRule ^catalog/([^/]+)/?$ index.php?module=ProductsView&category=$1 [L,QSA] +RewriteRule ^catalog/([^/]+)/([^/]+)/?$ index.php?module=ProductsView&category=$1&brand=$2 [L,QSA] + +RewriteRule ^products/([^/]+)/?$ index.php?module=ProductView&product_url=$1 [L,QSA] +RewriteRule ^products/?$ index.php?module=ProductsView [L,QSA] + +RewriteRule ^brands/([^/]+)/?$ index.php?module=ProductsView&brand=$1 [L,QSA] +RewriteRule ^brands/([^/]+)/page_([^/]+)/?$ index.php?module=ProductsView&brand=$1&page=$2 [L,QSA] + +# Поиск товаров +#RewriteRule ^search/([^/]+)/?$ index.php?module=ProductsView&keyword=$1 [L,QSA] +#RewriteRule ^search/?$ index.php?module=ProductsView [L,QSA] +RewriteRule ^search/([^/]+)/?$ index.php?module=SearchView&keyword=$1 [L,QSA] +RewriteRule ^search/?$ index.php?module=SearchView [L,QSA] + +# Блог +RewriteRule ^actions/([^/]+)/?$ index.php?module=ActionsView&url=$1 [L,QSA] +RewriteRule ^actions/?$ index.php?module=ActionsView [L,QSA] + +RewriteRule blog/([^/]+)/?$ /tehinfo/$1 [L,R=301] + +RewriteRule ^tehinfo/([^/]+)/?$ index.php?module=BlogView&url=$1 [L,QSA] +RewriteRule ^tehinfo/?$ index.php?module=BlogView [L,QSA] + + +# Статьи +#RewriteRule ^articles/([^/]+)/?$ index.php?module=ArticlesView&category=$1 [L,QSA] +#RewriteRule ^articles/?$ index.php?module=ArticlesView [L,QSA] +#RewriteRule ^article/([^/]+)/?$ index.php?module=ArticlesView&article_url=$1 [L,QSA] + +RewriteRule ^nashi-raboty/nashi-raboty/?$ /nashi-raboty/ [L,R=301] +RewriteRule ^articles/nashi-raboty/?$ /nashi-raboty/ [L,R=301] +RewriteRule ^article/([^/]+)/?$ /nashi-raboty/$1/ [L,R=301] +RewriteRule ^articles/([^/]+)/?$ /nashi-raboty/$1/ [L,R=301] +RewriteRule ^nashi-raboty/hyundai-santa-fe-ustanovka-4-biled-linz-ot-mtf/ /nashi-raboty/hyundai/santa_fe/ [L,R=301] + + +RewriteRule ^nashi-raboty/?$ index.php?module=ArticlesView&url=nashi-raboty [L,QSA] +RewriteRule ^nashi-raboty/page-([0-9]+)/?$ index.php?module=ArticlesView&url=nashi-raboty&page=$1 [L,QSA] + +RewriteRule ^nashi-raboty/filter-([^/]+)/page-([0-9]+)/?$ index.php?module=ArticlesView&url=nashi-raboty&filter=$1&page=$2 [L,QSA] +RewriteRule ^nashi-raboty/filter-([^/]+)/?$ index.php?module=ArticlesView&url=nashi-raboty&filter=$1 [L,QSA] + + + +RewriteRule ^nashi-raboty/([^/]+)/?$ index.php?module=ArticlesView&url=$1 [L,QSA] +RewriteRule ^nashi-raboty/([^/]+)/filter-([^/]+)/?$ index.php?module=ArticlesView&url=$1&filter=$2 [L,QSA] + +RewriteRule ^nashi-raboty/([^/]+)/([^/]+)/?$ index.php?module=ArticlesView&url=$1&model=$2 [L,QSA] +RewriteRule ^nashi-raboty/([^/]+)/([^/]+)/filter-([^/]+)/?$ index.php?module=ArticlesView&url=$1&model=$2&filter=$3 [L,QSA] + +# Услуги +RewriteRule ^tuning-centr/(.+)?$ index.php?module=ServiceView&page_url=$1 [L,QSA] + +# Страницы +RewriteRule ^pages/.+/([^/]+)/?$ index.php?module=PageView&page_url=$1 [L,QSA] +RewriteRule ^pages/([^/]+)/?$ index.php?module=PageView&page_url=$1 [L,QSA] +RewriteRule ^pages/?$ index.php?module=PageView&page_url=$1 [L,QSA] + +# Корзина и заказы +RewriteRule ^cart/?$ index.php?module=CartView [L,QSA] +RewriteRule ^cart/([^/]+)/?$ index.php?module=CartView&add_variant=$1 [L,QSA] +RewriteRule ^cart/remove/([^/]+)/?$ index.php?module=CartView&delete_variant=$1 [L,QSA] +RewriteRule ^order/([^/]+)/?$ index.php?module=OrderView&url=$1 [L,QSA] +RewriteRule ^order/?$ index.php?module=OrderView [L,QSA] + +# Для пользователей +RewriteRule ^user/login/?$ index.php?module=LoginView [L,QSA] +RewriteRule ^user/register/?$ index.php?module=RegisterView [L,QSA] +RewriteRule ^user/logout/?$ index.php?module=LoginView&action=logout [L,QSA] +RewriteRule ^user/password_remind/?$ index.php?module=LoginView&action=password_remind [L,QSA] +RewriteRule ^user/password_remind/([0-9a-z]+)/?$ index.php?module=LoginView&action=password_remind&code=$1 [L,QSA] +RewriteRule ^user/?$ index.php?module=UserView [L,QSA] + +# Google sitemap +# RewriteRule ^sitemap.xml?$ sitemap.php [L,QSA] + +# XML +RewriteRule ^yandex.yml?$ yandex.php [L,QSA] + +# feedback +# RewriteRule ^contact/?$ index.php?module=FeedbackView [L,QSA] + +# rss +RewriteRule ^rss/?$ index.php?module=RssView [L,QSA] + +#downloads +RewriteRule ^order/([^/]+)/([^/]+)/?$ index.php?module=OrderView&url=$1&file=$2 [L,QSA] + +# Статические страницы +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^([^/]*)/?$ index.php?module=PageView&page_url=$1 [L,QSA] +RewriteRule ^/?$ index.php?module=MainView&page_url= [L,QSA] + +# Ресайз картинок на лету +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME} !-f + + +#RewriteCond %{THE_REQUEST} ^GET\ (.*)files/products/(.*)\?([A-z0-9]*) +#RewriteRule ^files/products/(.+) resize/resize.php?file=%2&token=%3 [L,NE] + +RewriteRule ^files/products/(.+) resize/resize.php?file=$1&token=%{QUERY_STRING} +RewriteRule ^files/post/(.+) resize/resizepost.php?file=$1&token=%{QUERY_STRING} + + +#RewriteRule ^files/page/(.+) resize/resizepage.php?file=$1&token=%{QUERY_STRING} +RewriteRule ^files/page/(.+) resize/resizepage.php?file=$1&%{QUERY_STRING} + +#RewriteRule ^files/categories/([0-9]+)x([0-9]+)/(.+) resize/resizecat.php?w=$1&h=$2&file=$3 +#RewriteRule ^files/categories/(.+) resize/resizecat.php?file=$1&%{QUERY_STRING} + +RewriteRule ^files/brands/(.+) resize/resize_brands.php?file=$1&token=%{QUERY_STRING} + +# Включаем кэш в браузерах посетителей + + # Все html и htm файлы будут храниться в кэше браузера один день + + # Header set Cache-Control "max-age=60" + + # Все css, javascript и текстовые файлы будут храниться в кэше браузера одну неделю one year + + #Header set Cache-Control "max-age=604800" + Header set Cache-Control "max-age=31536000" + + # Все флэш файлы и изображения будут храниться в кэше браузера один year + + Header set Cache-Control "max-age=31536000" + + # Отключаем кеширование php и других служебных файлов + + Header unset Cache-Control + + + + + ExpiresActive On + #по умолчанию кеш в 5 секунд + ExpiresDefault "access plus 5 seconds" + # Включаем кэширование изображений и флэш на месяц + + ExpiresByType application/vnd.ms-fontobject "access plus 1 year" + ExpiresByType application/x-font-ttf "access plus 1 year" + ExpiresByType application/x-font-opentype "access plus 1 year" + ExpiresByType application/x-font-woff "access plus 1 year" + + + ExpiresByType image/x-icon "access plus 1 month" + ExpiresByType image/jpeg "access plus 4 weeks" + ExpiresByType image/png "access plus 30 days" + ExpiresByType image/gif "access plus 43829 minutes" + ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds" + # Включаем кэширование css, javascript и текстовых файлоф на одну неделю + ExpiresByType text/css "access plus 604800 seconds" + ExpiresByType text/javascript "access plus 604800 seconds" + ExpiresByType application/javascript "access plus 604800 seconds" + ExpiresByType application/x-javascript "access plus 604800 seconds" + # Включаем кэширование html и htm файлов на один день + #ExpiresByType text/html "access plus 60 seconds" + # Включаем кэширование xml файлов на десять минут + ExpiresByType application/xhtml+xml "access plus 600 seconds" + + + + +AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript + + +#Redirect url +Redirect 301 /products/biksenonovye-linzy-hella-evox-r/ https://atomicgarage.ru/catalog/biksenonovye-linzy-hella/ + diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/atomic_old.iml b/.idea/atomic_old.iml new file mode 100644 index 0000000..00af5e5 --- /dev/null +++ b/.idea/atomic_old.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask2agent.xml b/.idea/copilot.data.migration.ask2agent.xml new file mode 100644 index 0000000..1f2ea11 --- /dev/null +++ b/.idea/copilot.data.migration.ask2agent.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..201865c --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..8e445c2 --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/phpunit.xml b/.idea/phpunit.xml new file mode 100644 index 0000000..10c171c --- /dev/null +++ b/.idea/phpunit.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..d843f34 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/404.php b/404.php new file mode 100644 index 0000000..3966431 --- /dev/null +++ b/404.php @@ -0,0 +1,2 @@ + + + 1A2FFFA00808196F99977B6C050AA784 + \ No newline at end of file diff --git a/Smarty/.htaccess b/Smarty/.htaccess new file mode 100644 index 0000000..075509d --- /dev/null +++ b/Smarty/.htaccess @@ -0,0 +1,245 @@ +AddDefaultCharset UTF-8 +ErrorDocument 404 /404 +ErrorDocument 401 /password.php +RewriteEngine on + +php_flag display_startup_errors off +php_flag display_errors off +php_flag html_errors off + +php_value memory_limit 128M + +RewriteCond %{THE_REQUEST} // + # Проверяем, повторяется ли слеш (//) более двух раз. +RewriteCond %{QUERY_STRING} !http(s|):// + # Убедимся что это не урл в GET +RewriteRule .* /$0 [R=301,L] + # Исключаем все лишние слеши. + +RewriteCond %{HTTPS} off +RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] + +#RewriteCond %{REQUEST_FILENAME} !-f +#RewriteCond %{REQUEST_URI} !(.*)/$ +#RewriteRule ^(.*[^/])$ $1/ [L,R=301] + +RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] +RewriteRule ^(.*)$ https://%1/$1 [R=301,L] + +RewriteCond %{HTTP_HOST} !atomicgarage\.ru [NC] +RewriteRule ^(.*)$ https://atomicgarage.ru/$1 [L,R=301] + +RewriteRule ^index.html$ / [L,R=301] + +RewriteRule ^aktsii/(.*)$ /actions/$1 [L,R=301] + + +#RewriteRule ^sitemap/?$ site_map.php [L,QSA] +# RewriteRule ^/nashi-raboty/mercedes-benz/cls%d0%ba%d0%bb%d0%b0%d1%81%d1%81/$ /nashi-raboty/mercedes-benz/clsclass/ [L,R=301] +RewriteRule ^nashi-raboty/mercedes-benz/clsкласс/$ /nashi-raboty/mercedes-benz/clsclass/ [L,R=301] +RewriteRule ^nashi-raboty/mercedes-benz/claкласс/$ /nashi-raboty/mercedes-benz/claclass/ [L,R=301] +RewriteRule ^catalog/angelskie-glazki-na-mazda/mazda/$ /catalog/angelskie-glazki-na-mazda/ [L,R=301] +RewriteRule ^catalog/angelskie-glazki-na-renault/renault/$ /catalog/angelskie-glazki-na-renault/ [L,R=301] +RewriteRule ^catalog/angelskie-glazki-na-volkswagen/volkswagen/$ /catalog/angelskie-glazki-na-volkswagen/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-volkswagen/volkswagen/$ /catalog/shtatnye-hodovye-ogni-volkswagen/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-renault/renault/$ /catalog/shtatnye-hodovye-ogni-renault/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-hyundai/hyundai/$ /catalog/shtatnye-hodovye-ogni-hyundai/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-audi/AUDI/$ /catalog/shtatnye-hodovye-ogni-audi/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-mazda/mazda/$ /catalog/shtatnye-hodovye-ogni-mazda/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-mercedes-benz/mercedes-benz/$ /catalog/shtatnye-hodovye-ogni-mercedes-benz/ [L,R=301] +RewriteRule ^catalog/shtatnye-hodovye-ogni-toyota/toyota/$ /catalog/shtatnye-hodovye-ogni-toyota/ [L,R=301] +RewriteRule ^catalog/biksenonovye-linzy/AUDI/$ /catalog/biksenonovye-linzy/ [L,R=301] +RewriteRule ^catalog/nakladki-na-porogi-metallicheskie-kia/kia/$ /catalog/nakladki-na-porogi-metallicheskie-kia/ [L,R=301] +RewriteRule ^catalog/nakladki-na-porogi-s-podsvetkoj-citroen/citroen/$ /catalog/nakladki-na-porogi-s-podsvetkoj-citroen/ [L,R=301] +RewriteRule ^catalog/angelskie-glazki-na-subaru/subaru/$ /catalog/angelskie-glazki-na-subaru/ [L,R=301] +RewriteRule ^catalog/nakladki-na-porogi-s-podsvetkoj-opel/opel/$ /catalog/nakladki-na-porogi-s-podsvetkoj-opel/ [L,R=301] +RewriteRule ^articles/tehinfo/shtatnye-dnevnye-hodovye-ogni/$ /tehinfo/shtatnye-dnevnye-hodovye-ogni/ [L,R=301] +RewriteRule ^tehinfo/ustranenie-zapotevaniya-far/$ /tehinfo/poteet-fara/ [L,R=301] +RewriteRule ^article/catalog/dopolnitelnoe-oborudovanie/$ /catalog/dopolnitelnoe-oborudovanie/ [L,R=301] +RewriteRule ^brendy/$ /brands/ [L,R=301] + +RewriteRule ^products/page-([0-9]+)/$ /products/?page=$1 [L,QSA] +RewriteRule ^brands/(.*)/page-(.*)/$ /brands/$1/?page=$2 [L,QSA] +RewriteRule ^catalog/(.*)/page-(.*)/$ /catalog/$1/?page=$2 [L,QSA] +RewriteRule ^otzyvy/page-(.*)/$ /otzyvy/?page=$1 [L,QSA] +RewriteRule ^articles/(.*)/page-(.*)/$ /articles/$1/?page=$2 [L,QSA] + +# Каталог товаров +RewriteRule ^catalog/([^/]+)/?$ index.php?module=ProductsView&category=$1 [L,QSA] +RewriteRule ^catalog/([^/]+)/([^/]+)/?$ index.php?module=ProductsView&category=$1&brand=$2 [L,QSA] + +RewriteRule ^products/([^/]+)/?$ index.php?module=ProductView&product_url=$1 [L,QSA] +RewriteRule ^products/?$ index.php?module=ProductsView [L,QSA] + +RewriteRule ^brands/([^/]+)/?$ index.php?module=ProductsView&brand=$1 [L,QSA] +RewriteRule ^brands/([^/]+)/page_([^/]+)/?$ index.php?module=ProductsView&brand=$1&page=$2 [L,QSA] + +# Поиск товаров +#RewriteRule ^search/([^/]+)/?$ index.php?module=ProductsView&keyword=$1 [L,QSA] +#RewriteRule ^search/?$ index.php?module=ProductsView [L,QSA] +RewriteRule ^search/([^/]+)/?$ index.php?module=SearchView&keyword=$1 [L,QSA] +RewriteRule ^search/?$ index.php?module=SearchView [L,QSA] + +# Блог +RewriteRule ^actions/([^/]+)/?$ index.php?module=ActionsView&url=$1 [L,QSA] +RewriteRule ^actions/?$ index.php?module=ActionsView [L,QSA] + +RewriteRule blog/([^/]+)/?$ /tehinfo/$1 [L,R=301] + +RewriteRule ^tehinfo/([^/]+)/?$ index.php?module=BlogView&url=$1 [L,QSA] +RewriteRule ^tehinfo/?$ index.php?module=BlogView [L,QSA] + + + +# Статьи +#RewriteRule ^articles/([^/]+)/?$ index.php?module=ArticlesView&category=$1 [L,QSA] +#RewriteRule ^articles/?$ index.php?module=ArticlesView [L,QSA] +#RewriteRule ^article/([^/]+)/?$ index.php?module=ArticlesView&article_url=$1 [L,QSA] + +RewriteRule ^nashi-raboty/nashi-raboty/?$ /nashi-raboty/ [L,R=301] +RewriteRule ^articles/nashi-raboty/?$ /nashi-raboty/ [L,R=301] +RewriteRule ^article/([^/]+)/?$ /nashi-raboty/$1/ [L,R=301] +RewriteRule ^articles/([^/]+)/?$ /nashi-raboty/$1/ [L,R=301] + + +RewriteRule ^nashi-raboty/?$ index.php?module=ArticlesView&url=nashi-raboty [L,QSA] +RewriteRule ^nashi-raboty/page-([0-9]+)/?$ index.php?module=ArticlesView&url=nashi-raboty&page=$1 [L,QSA] + +RewriteRule ^nashi-raboty/filter-([^/]+)/page-([0-9]+)/?$ index.php?module=ArticlesView&url=nashi-raboty&filter=$1&page=$2 [L,QSA] +RewriteRule ^nashi-raboty/filter-([^/]+)/?$ index.php?module=ArticlesView&url=nashi-raboty&filter=$1 [L,QSA] + + + +RewriteRule ^nashi-raboty/([^/]+)/?$ index.php?module=ArticlesView&url=$1 [L,QSA] +RewriteRule ^nashi-raboty/([^/]+)/filter-([^/]+)/?$ index.php?module=ArticlesView&url=$1&filter=$2 [L,QSA] + +RewriteRule ^nashi-raboty/([^/]+)/([^/]+)/?$ index.php?module=ArticlesView&url=$1&model=$2 [L,QSA] +RewriteRule ^nashi-raboty/([^/]+)/([^/]+)/filter-([^/]+)/?$ index.php?module=ArticlesView&url=$1&model=$2&filter=$3 [L,QSA] + + + +# Услуги +RewriteRule ^tuning-centr/tuning-centr/?$ /tuning-centr/ [L,R=301] +RewriteRule ^tuning-centr/.+/([^/]+)/?$ index.php?module=PageView&page_url=$1 [L,QSA] +RewriteRule ^tuning-centr/([^/]+)/?$ index.php?module=PageView&page_url=$1 [L,QSA] +RewriteRule ^tuning-centr/?$ index.php?module=PageView&page_url=tuning-centr [L,QSA] + +# Страницы +RewriteRule ^pages/.+/([^/]+)/?$ index.php?module=PageView&page_url=$1 [L,QSA] +RewriteRule ^pages/([^/]+)/?$ index.php?module=PageView&page_url=$1 [L,QSA] +RewriteRule ^pages/?$ index.php?module=PageView&page_url=$1 [L,QSA] + +# Корзина и заказы +RewriteRule ^cart/?$ index.php?module=CartView [L,QSA] +RewriteRule ^cart/([^/]+)/?$ index.php?module=CartView&add_variant=$1 [L,QSA] +RewriteRule ^cart/remove/([^/]+)/?$ index.php?module=CartView&delete_variant=$1 [L,QSA] +RewriteRule ^order/([^/]+)/?$ index.php?module=OrderView&url=$1 [L,QSA] +RewriteRule ^order/?$ index.php?module=OrderView [L,QSA] + +# Для пользователей +RewriteRule ^user/login/?$ index.php?module=LoginView [L,QSA] +RewriteRule ^user/register/?$ index.php?module=RegisterView [L,QSA] +RewriteRule ^user/logout/?$ index.php?module=LoginView&action=logout [L,QSA] +RewriteRule ^user/password_remind/?$ index.php?module=LoginView&action=password_remind [L,QSA] +RewriteRule ^user/password_remind/([0-9a-z]+)/?$ index.php?module=LoginView&action=password_remind&code=$1 [L,QSA] +RewriteRule ^user/?$ index.php?module=UserView [L,QSA] + +# Google sitemap +RewriteRule ^sitemap.xml?$ sitemap.php [L,QSA] + +# XML +RewriteRule ^yandex.yml?$ yandex.php [L,QSA] + +# feedback +# RewriteRule ^contact/?$ index.php?module=FeedbackView [L,QSA] + +# rss +RewriteRule ^rss/?$ index.php?module=RssView [L,QSA] + +#downloads +RewriteRule ^order/([^/]+)/([^/]+)/?$ index.php?module=OrderView&url=$1&file=$2 [L,QSA] + +# Статические страницы +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^([^/]*)/?$ index.php?module=PageView&page_url=$1 [L,QSA] +RewriteRule ^/?$ index.php?module=MainView&page_url= [L,QSA] + +# Ресайз картинок на лету +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME} !-f + + +#RewriteCond %{THE_REQUEST} ^GET\ (.*)files/products/(.*)\?([A-z0-9]*) +#RewriteRule ^files/products/(.+) resize/resize.php?file=%2&token=%3 [L,NE] + +RewriteRule ^files/products/(.+) resize/resize.php?file=$1&token=%{QUERY_STRING} +RewriteRule ^files/post/(.+) resize/resizepost.php?file=$1&token=%{QUERY_STRING} + + +#RewriteRule ^files/page/(.+) resize/resizepage.php?file=$1&token=%{QUERY_STRING} +RewriteRule ^files/page/(.+) resize/resizepage.php?file=$1&%{QUERY_STRING} + +#RewriteRule ^files/categories/([0-9]+)x([0-9]+)/(.+) resize/resizecat.php?w=$1&h=$2&file=$3 +#RewriteRule ^files/categories/(.+) resize/resizecat.php?file=$1&%{QUERY_STRING} + +RewriteRule ^files/brands/(.+) resize/resize_brands.php?file=$1&token=%{QUERY_STRING} + + + +# Включаем кэш в браузерах посетителей + + # Все html и htm файлы будут храниться в кэше браузера один день + + # Header set Cache-Control "max-age=60" + + # Все css, javascript и текстовые файлы будут храниться в кэше браузера одну неделю one year + + #Header set Cache-Control "max-age=604800" + Header set Cache-Control "max-age=31536000" + + # Все флэш файлы и изображения будут храниться в кэше браузера один year + + Header set Cache-Control "max-age=31536000" + + # Отключаем кеширование php и других служебных файлов + + Header unset Cache-Control + + + + + ExpiresActive On + #по умолчанию кеш в 5 секунд + ExpiresDefault "access plus 5 seconds" + # Включаем кэширование изображений и флэш на месяц + + ExpiresByType application/vnd.ms-fontobject "access plus 1 year" + ExpiresByType application/x-font-ttf "access plus 1 year" + ExpiresByType application/x-font-opentype "access plus 1 year" + ExpiresByType application/x-font-woff "access plus 1 year" + + + ExpiresByType image/x-icon "access plus 1 month" + ExpiresByType image/jpeg "access plus 4 weeks" + ExpiresByType image/png "access plus 30 days" + ExpiresByType image/gif "access plus 43829 minutes" + ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds" + # Включаем кэширование css, javascript и текстовых файлоф на одну неделю + ExpiresByType text/css "access plus 604800 seconds" + ExpiresByType text/javascript "access plus 604800 seconds" + ExpiresByType application/javascript "access plus 604800 seconds" + ExpiresByType application/x-javascript "access plus 604800 seconds" + # Включаем кэширование html и htm файлов на один день + #ExpiresByType text/html "access plus 60 seconds" + # Включаем кэширование xml файлов на десять минут + ExpiresByType application/xhtml+xml "access plus 600 seconds" + + + + +AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript + + +#Redirect url +Redirect 301 /products/biksenonovye-linzy-hella-evox-r/ /catalog/biksenonovye-linzy-hella/ \ No newline at end of file diff --git a/Smarty/COPYING.lib b/Smarty/COPYING.lib new file mode 100644 index 0000000..02bbb60 --- /dev/null +++ b/Smarty/COPYING.lib @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. \ No newline at end of file diff --git a/Smarty/README b/Smarty/README new file mode 100644 index 0000000..28b652e --- /dev/null +++ b/Smarty/README @@ -0,0 +1,574 @@ +Smarty 3.0.7 + +Author: Monte Ohrt +Author: Uwe Tews + +AN INTRODUCTION TO SMARTY 3 + +NOTICE for 3.0.7 release: + +Mostly bug fixes, performance improvements and one security patch regarding arbitrary file access with security enabled. + +NOTICE for 3.0.5 release: + +Smarty now follows the PHP error_reporting level by default. If PHP does not mask E_NOTICE and you try to access an unset template variable, you will now get an E_NOTICE warning. To revert to the old behavior: + +$smarty->error_reporting = E_ALL & ~E_NOTICE; + +NOTICE for 3.0 release: + +IMPORTANT: Some API adjustments have been made between the RC4 and 3.0 release. +We felt it is better to make these now instead of after a 3.0 release, then have to +immediately deprecate APIs in 3.1. Online documentation has been updated +to reflect these changes. Specifically: + +---- API CHANGES RC4 -> 3.0 ---- + +$smarty->register->* +$smarty->unregister->* +$smarty->utility->* +$samrty->cache->* + +Have all been changed to local method calls such as: + +$smarty->clearAllCache() +$smarty->registerFoo() +$smarty->unregisterFoo() +$smarty->testInstall() +etc. + +Registration of function, block, compiler, and modifier plugins have been +consolidated under two API calls: + +$smarty->registerPlugin(...) +$smarty->unregisterPlugin(...) + +Registration of pre, post, output and variable filters have been +consolidated under two API calls: + +$smarty->registerFilter(...) +$smarty->unregisterFilter(...) + +Please refer to the online documentation for all specific changes: + +http://www.smarty.net/documentation + +---- + +The Smarty 3 API has been refactored to a syntax geared +for consistency and modularity. The Smarty 2 API syntax is still supported, but +will throw a deprecation notice. You can disable the notices, but it is highly +recommended to adjust your syntax to Smarty 3, as the Smarty 2 syntax must run +through an extra rerouting wrapper. + +Basically, all Smarty methods now follow the "fooBarBaz" camel case syntax. Also, +all Smarty properties now have getters and setters. So for example, the property +$smarty->cache_dir can be set with $smarty->setCacheDir('foo/') and can be +retrieved with $smarty->getCacheDir(). + +Some of the Smarty 3 APIs have been revoked such as the "is*" methods that were +just duplicate functions of the now available "get*" methods. + +Here is a rundown of the Smarty 3 API: + +$smarty->fetch($template, $cache_id = null, $compile_id = null, $parent = null) +$smarty->display($template, $cache_id = null, $compile_id = null, $parent = null) +$smarty->isCached($template, $cache_id = null, $compile_id = null) +$smarty->createData($parent = null) +$smarty->createTemplate($template, $cache_id = null, $compile_id = null, $parent = null) +$smarty->enableSecurity() +$smarty->disableSecurity() +$smarty->setTemplateDir($template_dir) +$smarty->addTemplateDir($template_dir) +$smarty->templateExists($resource_name) +$smarty->loadPlugin($plugin_name, $check = true) +$smarty->loadFilter($type, $name) +$smarty->setExceptionHandler($handler) +$smarty->addPluginsDir($plugins_dir) +$smarty->getGlobal($varname = null) +$smarty->getRegisteredObject($name) +$smarty->getDebugTemplate() +$smarty->setDebugTemplate($tpl_name) +$smarty->assign($tpl_var, $value = null, $nocache = false) +$smarty->assignGlobal($varname, $value = null, $nocache = false) +$smarty->assignByRef($tpl_var, &$value, $nocache = false) +$smarty->append($tpl_var, $value = null, $merge = false, $nocache = false) +$smarty->appendByRef($tpl_var, &$value, $merge = false) +$smarty->clearAssign($tpl_var) +$smarty->clearAllAssign() +$smarty->configLoad($config_file, $sections = null) +$smarty->getVariable($variable, $_ptr = null, $search_parents = true, $error_enable = true) +$smarty->getConfigVariable($variable) +$smarty->getStreamVariable($variable) +$smarty->getConfigVars($varname = null) +$smarty->clearConfig($varname = null) +$smarty->getTemplateVars($varname = null, $_ptr = null, $search_parents = true) +$smarty->clearAllCache($exp_time = null, $type = null) +$smarty->clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) + +$smarty->registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = array()) + +$smarty->registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) + +$smarty->registerFilter($type, $function_name) +$smarty->registerResource($resource_type, $function_names) +$smarty->registerDefaultPluginHandler($function_name) +$smarty->registerDefaultTemplateHandler($function_name) + +$smarty->unregisterPlugin($type, $tag) +$smarty->unregisterObject($object_name) +$smarty->unregisterFilter($type, $function_name) +$smarty->unregisterResource($resource_type) + +$smarty->compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null) +$smarty->clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null) +$smarty->testInstall() + +// then all the getters/setters, available for all properties. Here are a few: + +$caching = $smarty->getCaching(); // get $smarty->caching +$smarty->setCaching(true); // set $smarty->caching +$smarty->setDeprecationNotices(false); // set $smarty->deprecation_notices +$smarty->setCacheId($id); // set $smarty->cache_id +$debugging = $smarty->getDebugging(); // get $smarty->debugging + + +FILE STRUCTURE + +The Smarty 3 file structure is similar to Smarty 2: + +/libs/ + Smarty.class.php +/libs/sysplugins/ + internal.* +/libs/plugins/ + function.mailto.php + modifier.escape.php + ... + +A lot of Smarty 3 core functionality lies in the sysplugins directory; you do +not need to change any files here. The /libs/plugins/ folder is where Smarty +plugins are located. You can add your own here, or create a separate plugin +directory, just the same as Smarty 2. You will still need to create your own +/cache/, /templates/, /templates_c/, /configs/ folders. Be sure /cache/ and +/templates_c/ are writable. + +The typical way to use Smarty 3 should also look familiar: + +require('Smarty.class.php'); +$smarty = new Smarty; +$smarty->assign('foo','bar'); +$smarty->display('index.tpl'); + + +However, Smarty 3 works completely different on the inside. Smarty 3 is mostly +backward compatible with Smarty 2, except for the following items: + +*) Smarty 3 is PHP 5 only. It will not work with PHP 4. +*) The {php} tag is disabled by default. Enable with $smarty->allow_php_tag=true. +*) Delimiters surrounded by whitespace are no longer treated as Smarty tags. + Therefore, { foo } will not compile as a tag, you must use {foo}. This change + Makes Javascript/CSS easier to work with, eliminating the need for {literal}. + This can be disabled by setting $smarty->auto_literal = false; +*) The Smarty 3 API is a bit different. Many Smarty 2 API calls are deprecated + but still work. You will want to update your calls to Smarty 3 for maximum + efficiency. + + +There are many things that are new to Smarty 3. Here are the notable items: + +LEXER/PARSER +============ + +Smarty 3 now uses a lexing tokenizer for its parser/compiler. Basically, this +means Smarty has some syntax additions that make life easier such as in-template +math, shorter/intuitive function parameter options, infinite function recursion, +more accurate error handling, etc. + + +WHAT IS NEW IN SMARTY TEMPLATE SYNTAX +===================================== + +Smarty 3 allows expressions almost anywhere. Expressions can include PHP +functions as long as they are not disabled by the security policy, object +methods and properties, etc. The {math} plugin is no longer necessary but +is still supported for BC. + +Examples: +{$x+$y} will output the sum of x and y. +{$foo = strlen($bar)} function in assignment +{assign var=foo value= $x+$y} in attributes +{$foo = myfunct( ($x+$y)*3 )} as function parameter +{$foo[$x+3]} as array index + +Smarty tags can be used as values within other tags. +Example: {$foo={counter}+3} + +Smarty tags can also be used inside double quoted strings. +Example: {$foo="this is message {counter}"} + +You can define arrays within templates. +Examples: +{assign var=foo value=[1,2,3]} +{assign var=foo value=['y'=>'yellow','b'=>'blue']} +Arrays can be nested. +{assign var=foo value=[1,[9,8],3]} + +There is a new short syntax supported for assigning variables. +Example: {$foo=$bar+2} + +You can assign a value to a specific array element. If the variable exists but +is not an array, it is converted to an array before the new values are assigned. +Examples: +{$foo['bar']=1} +{$foo['bar']['blar']=1} + +You can append values to an array. If the variable exists but is not an array, +it is converted to an array before the new values are assigned. +Example: {$foo[]=1} + +You can use a PHP-like syntax for accessing array elements, as well as the +original "dot" notation. +Examples: +{$foo[1]} normal access +{$foo['bar']} +{$foo['bar'][1]} +{$foo[$x+$x]} index may contain any expression +{$foo[$bar[1]]} nested index +{$foo[section_name]} smarty section access, not array access! + +The original "dot" notation stays, and with improvements. +Examples: +{$foo.a.b.c} => $foo['a']['b']['c'] +{$foo.a.$b.c} => $foo['a'][$b]['c'] with variable index +{$foo.a.{$b+4}.c} => $foo['a'][$b+4]['c'] with expression as index +{$foo.a.{$b.c}} => $foo['a'][$b['c']] with nested index + +note that { and } are used to address ambiguties when nesting the dot syntax. + +Variable names themselves can be variable and contain expressions. +Examples: +$foo normal variable +$foo_{$bar} variable name containing other variable +$foo_{$x+$y} variable name containing expressions +$foo_{$bar}_buh_{$blar} variable name with multiple segments +{$foo_{$x}} will output the variable $foo_1 if $x has a value of 1. + +Object method chaining is implemented. +Example: {$object->method1($x)->method2($y)} + +{for} tag added for looping (replacement for {section} tag): +{for $x=0, $y=count($foo); $x<$y; $x++} .... {/for} +Any number of statements can be used separated by comma as the first +inital expression at {for}. + +{for $x = $start to $end step $step} ... {/for}is in the SVN now . +You can use also +{for $x = $start to $end} ... {/for} +In this case the step value will be automaticall 1 or -1 depending on the start and end values. +Instead of $start and $end you can use any valid expression. +Inside the loop the following special vars can be accessed: +$x@iteration = number of iteration +$x@total = total number of iterations +$x@first = true on first iteration +$x@last = true on last iteration + + +The Smarty 2 {section} syntax is still supported. + +New shorter {foreach} syntax to loop over an array. +Example: {foreach $myarray as $var}...{/foreach} + +Within the foreach loop, properties are access via: + +$var@key foreach $var array key +$var@iteration foreach current iteration count (1,2,3...) +$var@index foreach current index count (0,1,2...) +$var@total foreach $var array total +$var@first true on first iteration +$var@last true on last iteration + +The Smarty 2 {foreach} tag syntax is still supported. + +NOTE: {$bar[foo]} still indicates a variable inside of a {section} named foo. +If you want to access an array element with index foo, you must use quotes +such as {$bar['foo']}, or use the dot syntax {$bar.foo}. + +while block tag is now implemented: +{while $foo}...{/while} +{while $x lt 10}...{/while} + +Direct access to PHP functions: +Just as you can use PHP functions as modifiers directly, you can now access +PHP functions directly, provided they are permitted by security settings: +{time()} + +There is a new {function}...{/function} block tag to implement a template function. +This enables reuse of code sequences like a plugin function. It can call itself recursively. +Template function must be called with the new {call name=foo...} tag. + +Example: + +Template file: +{function name=menu level=0} + +{/function} + +{$menu = ['item1','item2','item3' => ['item3-1','item3-2','item3-3' => + ['item3-3-1','item3-3-2']],'item4']} + +{call name=menu data=$menu} + + +Generated output: + * item1 + * item2 + * item3 + o item3-1 + o item3-2 + o item3-3 + + item3-3-1 + + item3-3-2 + * item4 + +The function tag itself must have the "name" attribute. This name is the tag +name when calling the function. The function tag may have any number of +additional attributes. These will be default settings for local variables. + +New {nocache} block function: +{nocache}...{/nocache} will declare a section of the template to be non-cached +when template caching is enabled. + +New nocache attribute: +You can declare variable/function output as non-cached with the nocache attribute. +Examples: + +{$foo nocache=true} +{$foo nocache} /* same */ + +{foo bar="baz" nocache=true} +{foo bar="baz" nocache} /* same */ + +{time() nocache=true} +{time() nocache} /* same */ + +Or you can also assign the variable in your script as nocache: +$smarty->assign('foo',$something,true); // third param is nocache setting +{$foo} /* non-cached */ + +$smarty.current_dir returns the directory name of the current template. + +You can use strings directly as templates with the "string" resource type. +Examples: +$smarty->display('string:This is my template, {$foo}!'); // php +{include file="string:This is my template, {$foo}!"} // template + + + +VARIABLE SCOPE / VARIABLE STORAGE +================================= + +In Smarty 2, all assigned variables were stored within the Smarty object. +Therefore, all variables assigned in PHP were accessible by all subsequent +fetch and display template calls. + +In Smarty 3, we have the choice to assign variables to the main Smarty object, +to user-created data objects, and to user-created template objects. +These objects can be chained. The object at the end of a chain can access all +variables belonging to that template and all variables within the parent objects. +The Smarty object can only be the root of a chain, but a chain can be isolated +from the Smarty object. + +All known Smarty assignment interfaces will work on the data and template objects. + +Besides the above mentioned objects, there is also a special storage area for +global variables. + +A Smarty data object can be created as follows: +$data = $smarty->createData(); // create root data object +$data->assign('foo','bar'); // assign variables as usual +$data->config_load('my.conf'); // load config file + +$data= $smarty->createData($smarty); // create data object having a parent link to +the Smarty object + +$data2= $smarty->createData($data); // create data object having a parent link to +the $data data object + +A template object can be created by using the createTemplate method. It has the +same parameter assignments as the fetch() or display() method. +Function definition: +function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null) + +The first parameter can be a template name, a smarty object or a data object. + +Examples: +$tpl = $smarty->createTemplate('mytpl.tpl'); // create template object not linked to any parent +$tpl->assign('foo','bar'); // directly assign variables +$tpl->config_load('my.conf'); // load config file + +$tpl = $smarty->createTemplate('mytpl.tpl',$smarty); // create template having a parent link to the Smarty object +$tpl = $smarty->createTemplate('mytpl.tpl',$data); // create template having a parent link to the $data object + +The standard fetch() and display() methods will implicitly create a template object. +If the $parent parameter is not specified in these method calls, the template object +is will link back to the Smarty object as it's parent. + +If a template is called by an {include...} tag from another template, the +subtemplate links back to the calling template as it's parent. + +All variables assigned locally or from a parent template are accessible. If the +template creates or modifies a variable by using the {assign var=foo...} or +{$foo=...} tags, these new values are only known locally (local scope). When the +template exits, none of the new variables or modifications can be seen in the +parent template(s). This is same behavior as in Smarty 2. + +With Smarty 3, we can assign variables with a scope attribute which allows the +availablility of these new variables or modifications globally (ie in the parent +templates.) + +Possible scopes are local, parent, root and global. +Examples: +{assign var=foo value='bar'} // no scope is specified, the default 'local' +{$foo='bar'} // same, local scope +{assign var=foo value='bar' scope='local'} // same, local scope + +{assign var=foo value='bar' scope='parent'} // Values will be available to the parent object +{$foo='bar' scope='parent'} // (normally the calling template) + +{assign var=foo value='bar' scope='root'} // Values will be exported up to the root object, so they can +{$foo='bar' scope='root'} // be seen from all templates using the same root. + +{assign var=foo value='bar' scope='global'} // Values will be exported to global variable storage, +{$foo='bar' scope='global'} // they are available to any and all templates. + + +The scope attribute can also be attached to the {include...} tag. In this case, +the specified scope will be the default scope for all assignments within the +included template. + + +PLUGINS +======= + +Smarty3 are following the same coding rules as in Smarty2. +The only difference is that the template object is passed as additional third parameter. + +smarty_plugintype_name (array $params, object $smarty, object $template) + +The Smarty 2 plugins are still compatible as long as they do not make use of specific Smarty2 internals. + + +TEMPLATE INHERITANCE: +===================== + +With template inheritance you can define blocks, which are areas that can be +overriden by child templates, so your templates could look like this: + +parent.tpl: + + + {block name='title'}My site name{/block} + + +

{block name='page-title'}Default page title{/block}

+
+ {block name='content'} + Default content + {/block} +
+ + + +child.tpl: +{extends file='parent.tpl'} +{block name='title'} +Child title +{/block} + +grandchild.tpl: +{extends file='child.tpl'} +{block name='title'}Home - {$smarty.block.parent}{/block} +{block name='page-title'}My home{/block} +{block name='content'} + {foreach $images as $img} + {$img.description} + {/foreach} +{/block} + +We redefined all the blocks here, however in the title block we used {$smarty.block.parent}, +which tells Smarty to insert the default content from the parent template in its place. +The content block was overriden to display the image files, and page-title has also be +overriden to display a completely different title. + +If we render grandchild.tpl we will get this: + + + Home - Child title + + +

My home

+
+ image + image + image +
+ + + +NOTE: In the child templates everything outside the {extends} or {block} tag sections +is ignored. + +The inheritance tree can be as big as you want (meaning you can extend a file that +extends another one that extends another one and so on..), but be aware that all files +have to be checked for modifications at runtime so the more inheritance the more overhead you add. + +Instead of defining the parent/child relationships with the {extends} tag in the child template you +can use the resource as follow: + +$smarty->display('extends:parent.tpl|child.tpl|grandchild.tpl'); + +Child {block} tags may optionally have a append or prepend attribute. In this case the parent block content +is appended or prepended to the child block content. + +{block name='title' append} My title {/block} + + +PHP STREAMS: +============ + +(see online documentation) + +VARIBLE FILTERS: +================ + +(see online documentation) + + +STATIC CLASS ACCESS AND NAMESPACE SUPPORT +========================================= + +You can register a class with optional namespace for the use in the template like: + +$smarty->register->templateClass('foo','name\name2\myclass'); + +In the template you can use it like this: +{foo::method()} etc. + + +======================= + +Please look through it and send any questions/suggestions/etc to the forums. + +http://www.phpinsider.com/smarty-forum/viewtopic.php?t=14168 + +Monte and Uwe diff --git a/Smarty/SMARTY2_BC_NOTES b/Smarty/SMARTY2_BC_NOTES new file mode 100644 index 0000000..79a2cb1 --- /dev/null +++ b/Smarty/SMARTY2_BC_NOTES @@ -0,0 +1,109 @@ += Known incompatibilities with Smarty 2 = + +== Syntax == + +Smarty 3 API has a new syntax. Much of the Smarty 2 syntax is supported +by a wrapper but deprecated. See the README that comes with Smarty 3 for more +information. + +The {$array|@mod} syntax has always been a bit confusing, where an "@" is required +to apply a modifier to an array instead of the individual elements. Normally you +always want the modifier to apply to the variable regardless of its type. In Smarty 3, +{$array|mod} and {$array|@mod} behave identical. It is safe to drop the "@" and the +modifier will still apply to the array. If you really want the modifier to apply to +each array element, you must loop the array in-template, or use a custom modifier that +supports array iteration. Most smarty functions already escape values where necessary +such as {html_options} + +== PHP Version == +Smarty 3 is PHP 5 only. It will not work with PHP 4. + +== {php} Tag == +The {php} tag is disabled by default. The use of {php} tags is +deprecated. It can be enabled with $smarty->allow_php_tag=true. + +But if you scatter PHP code which belongs together into several +{php} tags it may not work any longer. + +== Delimiters and whitespace == +Delimiters surrounded by whitespace are no longer treated as Smarty tags. +Therefore, { foo } will not compile as a tag, you must use {foo}. This change +Makes Javascript/CSS easier to work with, eliminating the need for {literal}. +This can be disabled by setting $smarty->auto_literal = false; + +== Unquoted Strings == +Smarty 2 was a bit more forgiving (and ambiguous) when it comes to unquoted strings +in parameters. Smarty3 is more restrictive. You can still pass strings without quotes +so long as they contain no special characters. (anything outside of A-Za-z0-9_) + +For example filename strings must be quoted + +{include file='path/foo.tpl'} + + +== Extending the Smarty class == +Smarty 3 makes use of the __construct method for initialization. If you are extending +the Smarty class, its constructor is not called implicitly if the your child class defines +its own constructor. In order to run Smarty's constructor, a call to parent::__construct() +within your child constructor is required. + + +class MySmarty extends Smarty { + function __construct() { + parent::__construct(); + + // your initialization code goes here + + } +} + + +== Autoloader == +Smarty 3 does register its own autoloader with spl_autoload_register. If your code has +an existing __autoload function then this function must be explicitly registered on +the __autoload stack. See http://us3.php.net/manual/en/function.spl-autoload-register.php +for further details. + +== Plugin Filenames == +Smarty 3 optionally supports the PHP spl_autoloader. The autoloader requires filenames +to be lower case. Because of this, Smarty plugin file names must also be lowercase. +In Smarty 2, mixed case file names did work. + +== Scope of Special Smarty Variables == +In Smarty 2 the special Smarty variables $smarty.section... and $smarty.foreach... +had global scope. If you had loops with the same name in subtemplates you could accidentally +overwrite values of parent template. + +In Smarty 3 these special Smarty variable have only local scope in the template which +is defining the loop. If you need their value in a subtemplate you have to pass them +as parameter. + +{include file='path/foo.tpl' index=$smarty.section.foo.index} + + +== SMARTY_RESOURCE_CHAR_SET == +Smarty 3 sets the constant SMARTY_RESOURCE_CHAR_SET to utf-8 as default template charset. +This is now used also on modifiers like escape as default charset. If your templates use +other charsets make sure that you define the constant accordingly. Otherwise you may not +get any output. + +== newline at {if} tags == +A \n was added to the compiled code of the {if},{else},{elseif},{/if} tags to get output of newlines as expected by the template source. +If one of the {if} tags is at the line end you will now get a newline in the HTML output. + +== trigger_error() == +The API function trigger_error() has been removed because it did just map to PHP trigger_error. +However it's still included in the Smarty2 API wrapper. + +== Smarty constants == +The constants +SMARTY_PHP_PASSTHRU +SMARTY_PHP_QUOTE +SMARTY_PHP_REMOVE +SMARTY_PHP_ALLOW +have been replaced with class constants +Smarty::PHP_PASSTHRU +Smarty::PHP_QUOTE +Smarty::PHP_REMOVE +Smarty::PHP_ALLOW + diff --git a/Smarty/libs/Smarty.class.php b/Smarty/libs/Smarty.class.php new file mode 100644 index 0000000..feb8817 --- /dev/null +++ b/Smarty/libs/Smarty.class.php @@ -0,0 +1,815 @@ + + * @author Uwe Tews + * @package Smarty + * @version 3.0.7 + */ + +/** + * define shorthand directory separator constant + */ +if (!defined('DS')) { + define('DS', DIRECTORY_SEPARATOR); +} + +/** + * set SMARTY_DIR to absolute path to Smarty library files. + * Sets SMARTY_DIR only if user application has not already defined it. + */ +if (!defined('SMARTY_DIR')) { + define('SMARTY_DIR', dirname(__FILE__) . DS); +} + +/** + * set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins. + * Sets SMARTY_SYSPLUGINS_DIR only if user application has not already defined it. + */ +if (!defined('SMARTY_SYSPLUGINS_DIR')) { + define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DS); +} +if (!defined('SMARTY_PLUGINS_DIR')) { + define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DS); +} +if (!defined('SMARTY_RESOURCE_CHAR_SET')) { + define('SMARTY_RESOURCE_CHAR_SET', 'UTF-8'); +} +if (!defined('SMARTY_RESOURCE_DATE_FORMAT')) { + define('SMARTY_RESOURCE_DATE_FORMAT', '%b %e, %Y'); +} + +/** + * register the class autoloader + */ +if (!defined('SMARTY_SPL_AUTOLOAD')) { + define('SMARTY_SPL_AUTOLOAD', 0); +} + +if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false) { + $registeredAutoLoadFunctions = spl_autoload_functions(); + if (!isset($registeredAutoLoadFunctions['spl_autoload'])) { + spl_autoload_register(); + } +} else { + spl_autoload_register('smartyAutoload'); +} + +/** + * This is the main Smarty class + */ +class Smarty extends Smarty_Internal_Data { + /** + * constant definitions + */ + // smarty version + const SMARTY_VERSION = 'Smarty-3.0.7'; + //define variable scopes + const SCOPE_LOCAL = 0; + const SCOPE_PARENT = 1; + const SCOPE_ROOT = 2; + const SCOPE_GLOBAL = 3; + // define caching modes + const CACHING_OFF = 0; + const CACHING_LIFETIME_CURRENT = 1; + const CACHING_LIFETIME_SAVED = 2; + /** modes for handling of "" tags in templates. **/ + const PHP_PASSTHRU = 0; //-> print tags as plain text + const PHP_QUOTE = 1; //-> escape tags as entities + const PHP_REMOVE = 2; //-> escape tags as entities + const PHP_ALLOW = 3; //-> escape tags as entities + // filter types + const FILTER_POST = 'post'; + const FILTER_PRE = 'pre'; + const FILTER_OUTPUT = 'output'; + const FILTER_VARIABLE = 'variable'; + // plugin types + const PLUGIN_FUNCTION = 'function'; + const PLUGIN_BLOCK = 'block'; + const PLUGIN_COMPILER = 'compiler'; + const PLUGIN_MODIFIER = 'modifier'; + + /** + * static variables + */ + // assigned global tpl vars + static $global_tpl_vars = array(); + + /** + * variables + */ + // auto literal on delimiters with whitspace + public $auto_literal = true; + // display error on not assigned variables + public $error_unassigned = false; + // template directory + public $template_dir = null; + // default template handler + public $default_template_handler_func = null; + // compile directory + public $compile_dir = null; + // plugins directory + public $plugins_dir = null; + // cache directory + public $cache_dir = null; + // config directory + public $config_dir = null; + // force template compiling? + public $force_compile = false; + // check template for modifications? + public $compile_check = true; + // locking concurrent compiles + public $compile_locking = true; + // use sub dirs for compiled/cached files? + public $use_sub_dirs = false; + // compile_error? + public $compile_error = false; + // caching enabled + public $caching = false; + // merge compiled includes + public $merge_compiled_includes = false; + // cache lifetime + public $cache_lifetime = 3600; + // force cache file creation + public $force_cache = false; + // cache_id + public $cache_id = null; + // compile_id + public $compile_id = null; + // template delimiters + public $left_delimiter = "{"; + public $right_delimiter = "}"; + // security + public $security_class = 'Smarty_Security'; + public $security_policy = null; + public $php_handling = self::PHP_PASSTHRU; + public $allow_php_tag = false; + public $allow_php_templates = false; + public $direct_access_security = true; + public $trusted_dir = array(); + // debug mode + public $debugging = false; + public $debugging_ctrl = 'NONE'; + public $smarty_debug_id = 'SMARTY_DEBUG'; + public $debug_tpl = null; + // When set, smarty does uses this value as error_reporting-level. + public $error_reporting = null; + // config var settings + public $config_overwrite = true; //Controls whether variables with the same name overwrite each other. + public $config_booleanize = true; //Controls whether config values of on/true/yes and off/false/no get converted to boolean + public $config_read_hidden = false; //Controls whether hidden config sections/vars are read from the file. + // config vars + public $config_vars = array(); + // assigned tpl vars + public $tpl_vars = array(); + // dummy parent object + public $parent = null; + // global template functions + public $template_functions = array(); + // resource type used if none given + public $default_resource_type = 'file'; + // caching type + public $caching_type = 'file'; + // internal cache resource types + public $cache_resource_types = array('file'); + // internal config properties + public $properties = array(); + // config type + public $default_config_type = 'file'; + // cached template objects + public $template_objects = null; + // check If-Modified-Since headers + public $cache_modified_check = false; + // registered plugins + public $registered_plugins = array(); + // plugin search order + public $plugin_search_order = array('function', 'block', 'compiler', 'class'); + // registered objects + public $registered_objects = array(); + // registered classes + public $registered_classes = array(); + // registered filters + public $registered_filters = array(); + // registered resources + public $registered_resources = array(); + // autoload filter + public $autoload_filters = array(); + // status of filter on variable output + public $variable_filter = true; + // default modifier + public $default_modifiers = array(); + // global internal smarty vars + static $_smarty_vars = array(); + // start time for execution time calculation + public $start_time = 0; + // default file permissions + public $_file_perms = 0644; + // default dir permissions + public $_dir_perms = 0771; + // block tag hierarchy + public $_tag_stack = array(); + // flag if {block} tag is compiled for template inheritance + public $inheritance = false; + // generate deprecated function call notices? + public $deprecation_notices = true; + // Smarty 2 BC + public $_version = self::SMARTY_VERSION; + // self pointer to Smarty object + public $smarty; + + /** + * Class constructor, initializes basic smarty properties + */ + public function __construct() + { + // selfpointer need by some other class methods + $this->smarty = $this; + if (is_callable('mb_internal_encoding')) { + mb_internal_encoding(SMARTY_RESOURCE_CHAR_SET); + } + $this->start_time = microtime(true); + // set default dirs + $this->template_dir = array('.' . DS . 'templates' . DS); + $this->compile_dir = '.' . DS . 'templates_c' . DS; + $this->plugins_dir = array(SMARTY_PLUGINS_DIR); + $this->cache_dir = '.' . DS . 'cache' . DS; + $this->config_dir = '.' . DS . 'configs' . DS; + $this->debug_tpl = SMARTY_DIR . 'debug.tpl'; + if (isset($_SERVER['SCRIPT_NAME'])) { + $this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']); + } + } + + /** + * Class destructor + */ + public function __destruct() + { + } + + /** + * fetches a rendered Smarty template + * + * @param string $template the resource handle of the template file or template object + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $ |null $parent next higher level of Smarty variables + * @return string rendered template output + */ + public function fetch($template, $cache_id = null, $compile_id = null, $parent = null, $display = false) + { + if (!empty($cache_id) && is_object($cache_id)) { + $parent = $cache_id; + $cache_id = null; + } + if ($parent === null) { + // get default Smarty data object + $parent = $this; + } + // create template object if necessary + ($template instanceof $this->template_class)? $_template = $template : + $_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent, false); + if (isset($this->error_reporting)) { + $_smarty_old_error_level = error_reporting($this->error_reporting); + } + // check URL debugging control + if (!$this->debugging && $this->debugging_ctrl == 'URL') { + if (isset($_SERVER['QUERY_STRING'])) { + $_query_string = $_SERVER['QUERY_STRING']; + } else { + $_query_string = ''; + } + if (false !== strpos($_query_string, $this->smarty_debug_id)) { + if (false !== strpos($_query_string, $this->smarty_debug_id . '=on')) { + // enable debugging for this browser session + setcookie('SMARTY_DEBUG', true); + $this->debugging = true; + } elseif (false !== strpos($_query_string, $this->smarty_debug_id . '=off')) { + // disable debugging for this browser session + setcookie('SMARTY_DEBUG', false); + $this->debugging = false; + } else { + // enable debugging for this page + $this->debugging = true; + } + } else { + if (isset($_COOKIE['SMARTY_DEBUG'])) { + $this->debugging = true; + } + } + } + // obtain data for cache modified check + if ($this->cache_modified_check && $this->caching && $display) { + $_isCached = $_template->isCached() && !$_template->has_nocache_code; + if ($_isCached) { + $_gmt_mtime = gmdate('D, d M Y H:i:s', $_template->getCachedTimestamp()) . ' GMT'; + } else { + $_gmt_mtime = ''; + } + } + // return rendered template + if ((!$this->caching || $_template->resource_object->isEvaluated) && (isset($this->autoload_filters['output']) || isset($this->registered_filters['output']))) { + $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_template->getRenderedTemplate(), $_template); + } else { + $_output = $_template->getRenderedTemplate(); + } + $_template->rendered_content = null; + if (isset($this->error_reporting)) { + error_reporting($_smarty_old_error_level); + } + // display or fetch + if ($display) { + if ($this->caching && $this->cache_modified_check) { + $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3); + if ($_isCached && $_gmt_mtime == $_last_modified_date) { + if (php_sapi_name() == 'cgi') + header('Status: 304 Not Modified'); + else + header('HTTP/1.1 304 Not Modified'); + } else { + header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->getCachedTimestamp()) . ' GMT'); + echo $_output; + } + } else { + echo $_output; + } + // debug output + if ($this->debugging) { + Smarty_Internal_Debug::display_debug($this); + } + return; + } else { + // return fetched content + return $_output; + } + } + + /** + * displays a Smarty template + * + * @param string $ |object $template the resource handle of the template file or template object + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $parent next higher level of Smarty variables + */ + public function display($template, $cache_id = null, $compile_id = null, $parent = null) + { + // display template + $this->fetch ($template, $cache_id, $compile_id, $parent, true); + } + + /** + * test if cache i valid + * + * @param string $ |object $template the resource handle of the template file or template object + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $parent next higher level of Smarty variables + * @return boolean cache status + */ + public function isCached($template, $cache_id = null, $compile_id = null, $parent = null) + { + if ($parent === null) { + $parent = $this; + } + if (!($template instanceof $this->template_class)) { + $template = $this->createTemplate ($template, $cache_id, $compile_id, $parent, false); + } + // return cache status of template + return $template->isCached(); + } + + /** + * creates a data object + * + * @param object $parent next higher level of Smarty variables + * @returns object data object + */ + public function createData($parent = null) + { + return new Smarty_Data($parent, $this); + } + + /** + * creates a template object + * + * @param string $template the resource handle of the template file + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $parent next higher level of Smarty variables + * @param boolean $do_clone flag is Smarty object shall be cloned + * @returns object template object + */ + public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true) + { + if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) { + $parent = $cache_id; + $cache_id = null; + } + if (!empty($parent) && is_array($parent)) { + $data = $parent; + $parent = null; + } else { + $data = null; + } + if (!is_object($template)) { + // we got a template resource + // already in template cache? + $_templateId = sha1($template . $cache_id . $compile_id); + if (isset($this->template_objects[$_templateId]) && $this->caching) { + // return cached template object + $tpl = $this->template_objects[$_templateId]; + } else { + // create new template object + if ($do_clone) { + $tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id); + } else { + $tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id); + } + } + } else { + // just return a copy of template class + $tpl = $template; + } + // fill data if present + if (!empty($data) && is_array($data)) { + // set up variable values + foreach ($data as $_key => $_val) { + $tpl->tpl_vars[$_key] = new Smarty_variable($_val); + } + } + return $tpl; + } + + + + /** + * Check if a template resource exists + * + * @param string $resource_name template name + * @return boolean status + */ + function templateExists($resource_name) + { + // create template object + $save = $this->template_objects; + $tpl = new $this->template_class($resource_name, $this); + // check if it does exists + $result = $tpl->isExisting(); + $this->template_objects = $save; + return $result; + } + + /** + * Returns a single or all global variables + * + * @param object $smarty + * @param string $varname variable name or null + * @return string variable value or or array of variables + */ + function getGlobal($varname = null) + { + if (isset($varname)) { + if (isset(self::$global_tpl_vars[$varname])) { + return self::$global_tpl_vars[$varname]->value; + } else { + return ''; + } + } else { + $_result = array(); + foreach (self::$global_tpl_vars AS $key => $var) { + $_result[$key] = $var->value; + } + return $_result; + } + } + + /** + * Empty cache folder + * + * @param integer $exp_time expiration time + * @param string $type resource type + * @return integer number of cache files deleted + */ + function clearAllCache($exp_time = null, $type = null) + { + // load cache resource and call clearAll + return $this->loadCacheResource($type)->clearAll($exp_time); + } + + /** + * Empty cache for a specific template + * + * @param string $template_name template name + * @param string $cache_id cache id + * @param string $compile_id compile id + * @param integer $exp_time expiration time + * @param string $type resource type + * @return integer number of cache files deleted + */ + function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) + { + // load cache resource and call clear + return $this->loadCacheResource($type)->clear($template_name, $cache_id, $compile_id, $exp_time); + } + + /** + * Loads security class and enables security + */ + public function enableSecurity($security_class = null) + { + if ($security_class instanceof Smarty_Security) { + $this->security_policy = $security_class; + return; + } + if ($security_class == null) { + $security_class = $this->security_class; + } + if (class_exists($security_class)) { + $this->security_policy = new $security_class($this); + } else { + throw new SmartyException("Security class '$security_class' is not defined"); + } + } + + /** + * Disable security + */ + public function disableSecurity() + { + $this->security_policy = null; + } + + /** + * Loads cache resource. + * + * @param string $type cache resource type + * @return object of cache resource + */ + public function loadCacheResource($type = null) { + if (!isset($type)) { + $type = $this->caching_type; + } + if (in_array($type, $this->cache_resource_types)) { + $cache_resource_class = 'Smarty_Internal_CacheResource_' . ucfirst($type); + return new $cache_resource_class($this); + } + else { + // try plugins dir + $cache_resource_class = 'Smarty_CacheResource_' . ucfirst($type); + if ($this->loadPlugin($cache_resource_class)) { + return new $cache_resource_class($this); + } + else { + throw new SmartyException("Unable to load cache resource '{$type}'"); + } + } + } + + + /** + * Set template directory + * + * @param string $ |array $template_dir folder(s) of template sorces + */ + public function setTemplateDir($template_dir) + { + $this->template_dir = (array)$template_dir; + return; + } + + /** + * Adds template directory(s) to existing ones + * + * @param string $ |array $template_dir folder(s) of template sources + */ + public function addTemplateDir($template_dir) + { + $this->template_dir = array_unique(array_merge((array)$this->template_dir, (array)$template_dir)); + return; + } + + /** + * Adds directory of plugin files + * + * @param object $smarty + * @param string $ |array $ plugins folder + * @return + */ + function addPluginsDir($plugins_dir) + { + $this->plugins_dir = array_unique(array_merge((array)$this->plugins_dir, (array)$plugins_dir)); + return; + } + + + /** + * return a reference to a registered object + * + * @param string $name object name + * @return object + */ + function getRegisteredObject($name) + { + if (!isset($this->registered_objects[$name])) + throw new SmartyException("'$name' is not a registered object"); + + if (!is_object($this->registered_objects[$name][0])) + throw new SmartyException("registered '$name' is not an object"); + + return $this->registered_objects[$name][0]; + } + + + /** + * return name of debugging template + * + * @return string + */ + function getDebugTemplate() + { + return $this->debug_tpl; + } + + /** + * set the debug template + * + * @param string $tpl_name + * @return bool + */ + function setDebugTemplate($tpl_name) + { + return $this->debug_tpl = $tpl_name; + } + + /** + * Takes unknown classes and loads plugin files for them + * class name format: Smarty_PluginType_PluginName + * plugin filename format: plugintype.pluginname.php + * + * @param string $plugin_name class plugin name to load + * @return string |boolean filepath of loaded file or false + */ + public function loadPlugin($plugin_name, $check = true) + { + // if function or class exists, exit silently (already loaded) + if ($check && (is_callable($plugin_name) || class_exists($plugin_name, false))) + return true; + // Plugin name is expected to be: Smarty_[Type]_[Name] + $_plugin_name = strtolower($plugin_name); + $_name_parts = explode('_', $_plugin_name, 3); + // class name must have three parts to be valid plugin + if (count($_name_parts) < 3 || $_name_parts[0] !== 'smarty') { + throw new SmartyException("plugin {$plugin_name} is not a valid name format"); + return false; + } + // if type is "internal", get plugin from sysplugins + if ($_name_parts[1] == 'internal') { + $file = SMARTY_SYSPLUGINS_DIR . $_plugin_name . '.php'; + if (file_exists($file)) { + require_once($file); + return $file; + } else { + return false; + } + } + // plugin filename is expected to be: [type].[name].php + $_plugin_filename = "{$_name_parts[1]}.{$_name_parts[2]}.php"; + // loop through plugin dirs and find the plugin + foreach((array)$this->plugins_dir as $_plugin_dir) { + if (strpos('/\\', substr($_plugin_dir, -1)) === false) { + $_plugin_dir .= DS; + } + $file = $_plugin_dir . $_plugin_filename; + if (file_exists($file)) { + require_once($file); + return $file; + } + } + // no plugin loaded + return false; + } + + /** + * clean up properties on cloned object + */ + public function __clone() + { + // clear config vars + $this->config_vars = array(); + // clear assigned tpl vars + $this->tpl_vars = array(); + // clear objects for external methods + unset($this->register); + unset($this->filter); + } + + + /** + * Handle unknown class methods + * + * @param string $name unknown methode name + * @param array $args aurgument array + */ + public function __call($name, $args) + { + static $camel_func; + if (!isset($camel_func)) + $camel_func = create_function('$c', 'return "_" . strtolower($c[1]);'); + // see if this is a set/get for a property + $first3 = strtolower(substr($name, 0, 3)); + if (in_array($first3, array('set', 'get')) && substr($name, 3, 1) !== '_') { + // try to keep case correct for future PHP 6.0 case-sensitive class methods + // lcfirst() not available < PHP 5.3.0, so improvise + $property_name = strtolower(substr($name, 3, 1)) . substr($name, 4); + // convert camel case to underscored name + $property_name = preg_replace_callback('/([A-Z])/', $camel_func, $property_name); + if (!property_exists($this, $property_name)) { + throw new SmartyException("property '$property_name' does not exist."); + return false; + } + if ($first3 == 'get') + return $this->$property_name; + else + return $this->$property_name = $args[0]; + } + // Smarty Backward Compatible wrapper + if (strpos($name,'_') !== false) { + if (!isset($this->wrapper)) { + $this->wrapper = new Smarty_Internal_Wrapper($this); + } + return $this->wrapper->convert($name, $args); + } + // external Smarty methods ? + foreach(array('filter','register') as $external) { + if (method_exists("Smarty_Internal_{$external}",$name)) { + if (!isset($this->$external)) { + $class = "Smarty_Internal_{$external}"; + $this->$external = new $class($this); + } + return call_user_func_array(array($this->$external,$name), $args); + } + } + if (in_array($name,array('clearCompiledTemplate','compileAllTemplates','compileAllConfig','testInstall','getTags'))) { + if (!isset($this->utility)) { + $this->utility = new Smarty_Internal_Utility($this); + } + return call_user_func_array(array($this->utility,$name), $args); + } + // PHP4 call to constructor? + if (strtolower($name) == 'smarty') { + throw new SmartyException('Please use parent::__construct() to call parent constuctor'); + return false; + } + throw new SmartyException("Call of unknown function '$name'."); + } +} + +/** + * Autoloader + */ +function smartyAutoload($class) +{ + $_class = strtolower($class); + if (substr($_class, 0, 16) === 'smarty_internal_' || $_class == 'smarty_security') { + include SMARTY_SYSPLUGINS_DIR . $_class . '.php'; + } +} + +/** + * Smarty exception class + */ +Class SmartyException extends Exception { +} + +/** + * Smarty compiler exception class + */ +Class SmartyCompilerException extends SmartyException { +} + +?> diff --git a/Smarty/libs/debug.tpl b/Smarty/libs/debug.tpl new file mode 100644 index 0000000..058c5b2 --- /dev/null +++ b/Smarty/libs/debug.tpl @@ -0,0 +1,133 @@ +{capture name='_smarty_debug' assign=debug_output} + + + + Smarty Debug Console + + + + +

Smarty Debug Console - {if isset($template_name)}{$template_name|debug_print_var}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}

+ +{if !empty($template_data)} +

included templates & config files (load time in seconds)

+ +
+{foreach $template_data as $template} + {$template.name} + + (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"}) + +
+{/foreach} +
+{/if} + +

assigned template variables

+ + + {foreach $assigned_vars as $vars} + + + + {/foreach} +
${$vars@key|escape:'html'}{$vars|debug_print_var}
+ +

assigned config file variables (outer template scope)

+ + + {foreach $config_vars as $vars} + + + + {/foreach} + +
{$vars@key|escape:'html'}{$vars|debug_print_var}
+ + +{/capture} + diff --git a/Smarty/libs/plugins/block.php.php b/Smarty/libs/plugins/block.php.php new file mode 100644 index 0000000..8fedd8b --- /dev/null +++ b/Smarty/libs/plugins/block.php.php @@ -0,0 +1,27 @@ +allow_php_tag) { + throw new SmartyException("{php} is deprecated, set allow_php_tag = true to enable"); + } + eval($content); + return ''; +} + +?> \ No newline at end of file diff --git a/Smarty/libs/plugins/block.textformat.php b/Smarty/libs/plugins/block.textformat.php new file mode 100644 index 0000000..517fd62 --- /dev/null +++ b/Smarty/libs/plugins/block.textformat.php @@ -0,0 +1,102 @@ + + * Name: textformat
+ * Purpose: format text a certain way with preset styles + * or custom wrap/indent settings
+ * + * @link http://smarty.php.net/manual/en/language.function.textformat.php {textformat} + * (Smarty online manual) + * @param array $params parameters + *
+ * Params:   style: string (email)
+ *            indent: integer (0)
+ *            wrap: integer (80)
+ *            wrap_char string ("\n")
+ *            indent_char: string (" ")
+ *            wrap_boundary: boolean (true)
+ * 
+ * @author Monte Ohrt + * @param string $content contents of the block + * @param object $template template object + * @param boolean &$repeat repeat flag + * @return string content re-formatted + */ +function smarty_block_textformat($params, $content, $template, &$repeat) +{ + if (is_null($content)) { + return; + } + + $style = null; + $indent = 0; + $indent_first = 0; + $indent_char = ' '; + $wrap = 80; + $wrap_char = "\n"; + $wrap_cut = false; + $assign = null; + + foreach ($params as $_key => $_val) { + switch ($_key) { + case 'style': + case 'indent_char': + case 'wrap_char': + case 'assign': + $$_key = (string)$_val; + break; + + case 'indent': + case 'indent_first': + case 'wrap': + $$_key = (int)$_val; + break; + + case 'wrap_cut': + $$_key = (bool)$_val; + break; + + default: + trigger_error("textformat: unknown attribute '$_key'"); + } + } + + if ($style == 'email') { + $wrap = 72; + } + // split into paragraphs + $_paragraphs = preg_split('![\r\n][\r\n]!', $content); + $_output = ''; + + for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) { + if ($_paragraphs[$_x] == '') { + continue; + } + // convert mult. spaces & special chars to single space + $_paragraphs[$_x] = preg_replace(array('!\s+!', '!(^\s+)|(\s+$)!'), array(' ', ''), $_paragraphs[$_x]); + // indent first line + if ($indent_first > 0) { + $_paragraphs[$_x] = str_repeat($indent_char, $indent_first) . $_paragraphs[$_x]; + } + // wordwrap sentences + $_paragraphs[$_x] = wordwrap($_paragraphs[$_x], $wrap - $indent, $wrap_char, $wrap_cut); + // indent lines + if ($indent > 0) { + $_paragraphs[$_x] = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraphs[$_x]); + } + } + $_output = implode($wrap_char . $wrap_char, $_paragraphs); + + return $assign ? $template->assign($assign, $_output) : $_output; +} + +?> \ No newline at end of file diff --git a/Smarty/libs/plugins/function.counter.php b/Smarty/libs/plugins/function.counter.php new file mode 100644 index 0000000..7c50bd4 --- /dev/null +++ b/Smarty/libs/plugins/function.counter.php @@ -0,0 +1,78 @@ + + * Name: counter
+ * Purpose: print out a counter value + * @author Monte Ohrt + * @link http://smarty.php.net/manual/en/language.function.counter.php {counter} + * (Smarty online manual) + * @param array parameters + * @param Smarty + * @param object $template template object + * @return string|null + */ +function smarty_function_counter($params, $template) +{ + static $counters = array(); + + $name = (isset($params['name'])) ? $params['name'] : 'default'; + if (!isset($counters[$name])) { + $counters[$name] = array( + 'start'=>1, + 'skip'=>1, + 'direction'=>'up', + 'count'=>1 + ); + } + $counter =& $counters[$name]; + + if (isset($params['start'])) { + $counter['start'] = $counter['count'] = (int)$params['start']; + } + + if (!empty($params['assign'])) { + $counter['assign'] = $params['assign']; + } + + if (isset($counter['assign'])) { + $template->assign($counter['assign'], $counter['count']); + } + + if (isset($params['print'])) { + $print = (bool)$params['print']; + } else { + $print = empty($counter['assign']); + } + + if ($print) { + $retval = $counter['count']; + } else { + $retval = null; + } + + if (isset($params['skip'])) { + $counter['skip'] = $params['skip']; + } + + if (isset($params['direction'])) { + $counter['direction'] = $params['direction']; + } + + if ($counter['direction'] == "down") + $counter['count'] -= $counter['skip']; + else + $counter['count'] += $counter['skip']; + + return $retval; + +} + +?> \ No newline at end of file diff --git a/Smarty/libs/plugins/function.cycle.php b/Smarty/libs/plugins/function.cycle.php new file mode 100644 index 0000000..98e3e28 --- /dev/null +++ b/Smarty/libs/plugins/function.cycle.php @@ -0,0 +1,106 @@ + + * Name: cycle
+ * Date: May 3, 2002
+ * Purpose: cycle through given values
+ * Input: + * - name = name of cycle (optional) + * - values = comma separated list of values to cycle, + * or an array of values to cycle + * (this can be left out for subsequent calls) + * - reset = boolean - resets given var to true + * - print = boolean - print var or not. default is true + * - advance = boolean - whether or not to advance the cycle + * - delimiter = the value delimiter, default is "," + * - assign = boolean, assigns to template var instead of + * printed. + * + * Examples:
+ *
+ * {cycle values="#eeeeee,#d0d0d0d"}
+ * {cycle name=row values="one,two,three" reset=true}
+ * {cycle name=row}
+ * 
+ * @link http://smarty.php.net/manual/en/language.function.cycle.php {cycle} + * (Smarty online manual) + * @author Monte Ohrt + * @author credit to Mark Priatel + * @author credit to Gerard + * @author credit to Jason Sweat + * @version 1.3 + * @param array + * @param object $template template object + * @return string|null + */ + +function smarty_function_cycle($params, $template) +{ + static $cycle_vars; + + $name = (empty($params['name'])) ? 'default' : $params['name']; + $print = (isset($params['print'])) ? (bool)$params['print'] : true; + $advance = (isset($params['advance'])) ? (bool)$params['advance'] : true; + $reset = (isset($params['reset'])) ? (bool)$params['reset'] : false; + + if (!in_array('values', array_keys($params))) { + if(!isset($cycle_vars[$name]['values'])) { + trigger_error("cycle: missing 'values' parameter"); + return; + } + } else { + if(isset($cycle_vars[$name]['values']) + && $cycle_vars[$name]['values'] != $params['values'] ) { + $cycle_vars[$name]['index'] = 0; + } + $cycle_vars[$name]['values'] = $params['values']; + } + + if (isset($params['delimiter'])) { + $cycle_vars[$name]['delimiter'] = $params['delimiter']; + } elseif (!isset($cycle_vars[$name]['delimiter'])) { + $cycle_vars[$name]['delimiter'] = ','; + } + + if(is_array($cycle_vars[$name]['values'])) { + $cycle_array = $cycle_vars[$name]['values']; + } else { + $cycle_array = explode($cycle_vars[$name]['delimiter'],$cycle_vars[$name]['values']); + } + + if(!isset($cycle_vars[$name]['index']) || $reset ) { + $cycle_vars[$name]['index'] = 0; + } + + if (isset($params['assign'])) { + $print = false; + $template->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]); + } + + if($print) { + $retval = $cycle_array[$cycle_vars[$name]['index']]; + } else { + $retval = null; + } + + if($advance) { + if ( $cycle_vars[$name]['index'] >= count($cycle_array) -1 ) { + $cycle_vars[$name]['index'] = 0; + } else { + $cycle_vars[$name]['index']++; + } + } + + return $retval; +} + +?> \ No newline at end of file diff --git a/Smarty/libs/plugins/function.fetch.php b/Smarty/libs/plugins/function.fetch.php new file mode 100644 index 0000000..2b09fb9 --- /dev/null +++ b/Smarty/libs/plugins/function.fetch.php @@ -0,0 +1,216 @@ + + * Name: fetch
+ * Purpose: fetch file, web or ftp data and display results + * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch} + * (Smarty online manual) + * @author Monte Ohrt + * @param array $params parameters + * @param object $template template object + * @return string|null if the assign parameter is passed, Smarty assigns the + * result to a template variable + */ +function smarty_function_fetch($params, $template) +{ + if (empty($params['file'])) { + trigger_error("[plugin] fetch parameter 'file' cannot be empty",E_USER_NOTICE); + return; + } + + $content = ''; + if (isset($template->security_policy) && !preg_match('!^(http|ftp)://!i', $params['file'])) { + if(!$template->security_policy->isTrustedResourceDir($params['file'])) { + return; + } + + // fetch the file + if($fp = @fopen($params['file'],'r')) { + while(!feof($fp)) { + $content .= fgets ($fp,4096); + } + fclose($fp); + } else { + trigger_error('[plugin] fetch cannot read file \'' . $params['file'] . '\'',E_USER_NOTICE); + return; + } + } else { + // not a local file + if(preg_match('!^http://!i',$params['file'])) { + // http fetch + if($uri_parts = parse_url($params['file'])) { + // set defaults + $host = $server_name = $uri_parts['host']; + $timeout = 30; + $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; + $agent = "Smarty Template Engine ".$template->_version; + $referer = ""; + $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/'; + $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : ''; + $_is_proxy = false; + if(empty($uri_parts['port'])) { + $port = 80; + } else { + $port = $uri_parts['port']; + } + if(!empty($uri_parts['user'])) { + $user = $uri_parts['user']; + } + if(!empty($uri_parts['pass'])) { + $pass = $uri_parts['pass']; + } + // loop through parameters, setup headers + foreach($params as $param_key => $param_value) { + switch($param_key) { + case "file": + case "assign": + case "assign_headers": + break; + case "user": + if(!empty($param_value)) { + $user = $param_value; + } + break; + case "pass": + if(!empty($param_value)) { + $pass = $param_value; + } + break; + case "accept": + if(!empty($param_value)) { + $accept = $param_value; + } + break; + case "header": + if(!empty($param_value)) { + if(!preg_match('![\w\d-]+: .+!',$param_value)) { + trigger_error("[plugin] invalid header format '".$param_value."'",E_USER_NOTICE); + return; + } else { + $extra_headers[] = $param_value; + } + } + break; + case "proxy_host": + if(!empty($param_value)) { + $proxy_host = $param_value; + } + break; + case "proxy_port": + if(!preg_match('!\D!', $param_value)) { + $proxy_port = (int) $param_value; + } else { + trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE); + return; + } + break; + case "agent": + if(!empty($param_value)) { + $agent = $param_value; + } + break; + case "referer": + if(!empty($param_value)) { + $referer = $param_value; + } + break; + case "timeout": + if(!preg_match('!\D!', $param_value)) { + $timeout = (int) $param_value; + } else { + trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE); + return; + } + break; + default: + trigger_error("[plugin] unrecognized attribute '".$param_key."'",E_USER_NOTICE); + return; + } + } + if(!empty($proxy_host) && !empty($proxy_port)) { + $_is_proxy = true; + $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout); + } else { + $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout); + } + + if(!$fp) { + trigger_error("[plugin] unable to fetch: $errstr ($errno)",E_USER_NOTICE); + return; + } else { + if($_is_proxy) { + fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n"); + } else { + fputs($fp, "GET $uri HTTP/1.0\r\n"); + } + if(!empty($host)) { + fputs($fp, "Host: $host\r\n"); + } + if(!empty($accept)) { + fputs($fp, "Accept: $accept\r\n"); + } + if(!empty($agent)) { + fputs($fp, "User-Agent: $agent\r\n"); + } + if(!empty($referer)) { + fputs($fp, "Referer: $referer\r\n"); + } + if(isset($extra_headers) && is_array($extra_headers)) { + foreach($extra_headers as $curr_header) { + fputs($fp, $curr_header."\r\n"); + } + } + if(!empty($user) && !empty($pass)) { + fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n"); + } + + fputs($fp, "\r\n"); + while(!feof($fp)) { + $content .= fgets($fp,4096); + } + fclose($fp); + $csplit = preg_split("!\r\n\r\n!",$content,2); + + $content = $csplit[1]; + + if(!empty($params['assign_headers'])) { + $template->assign($params['assign_headers'],preg_split("!\r\n!",$csplit[0])); + } + } + } else { + trigger_error("[plugin fetch] unable to parse URL, check syntax",E_USER_NOTICE); + return; + } + } else { + // ftp fetch + if($fp = @fopen($params['file'],'r')) { + while(!feof($fp)) { + $content .= fgets ($fp,4096); + } + fclose($fp); + } else { + trigger_error('[plugin] fetch cannot read file \'' . $params['file'] .'\'',E_USER_NOTICE); + return; + } + } + + } + + + if (!empty($params['assign'])) { + $template->assign($params['assign'],$content); + } else { + return $content; + } +} + +?> \ No newline at end of file diff --git a/Smarty/libs/plugins/function.html_checkboxes.php b/Smarty/libs/plugins/function.html_checkboxes.php new file mode 100644 index 0000000..6a1a3ff --- /dev/null +++ b/Smarty/libs/plugins/function.html_checkboxes.php @@ -0,0 +1,143 @@ + + * Type: function
+ * Name: html_checkboxes
+ * Date: 24.Feb.2003
+ * Purpose: Prints out a list of checkbox input types
+ * Examples: + *
+ * {html_checkboxes values=$ids output=$names}
+ * {html_checkboxes values=$ids name='box' separator='
' output=$names} + * {html_checkboxes values=$ids checked=$checked separator='
' output=$names} + *
+ * @link http://smarty.php.net/manual/en/language.function.html.checkboxes.php {html_checkboxes} + * (Smarty online manual) + * @author Christopher Kvarme + * @author credits to Monte Ohrt + * @version 1.0 + * @param array $params parameters + * Input:
+ * - name (optional) - string default "checkbox" + * - values (required) - array + * - options (optional) - associative array + * - checked (optional) - array default not set + * - separator (optional) - ie
or   + * - output (optional) - the output next to each checkbox + * - assign (optional) - assign the output as an array to this variable + * @param object $template template object + * @return string + * @uses smarty_function_escape_special_chars() + */ +function smarty_function_html_checkboxes($params, $template) +{ + require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'); + + $name = 'checkbox'; + $values = null; + $options = null; + $selected = null; + $separator = ''; + $labels = true; + $output = null; + + $extra = ''; + + foreach($params as $_key => $_val) { + switch($_key) { + case 'name': + case 'separator': + $$_key = $_val; + break; + + case 'labels': + $$_key = (bool)$_val; + break; + + case 'options': + $$_key = (array)$_val; + break; + + case 'values': + case 'output': + $$_key = array_values((array)$_val); + break; + + case 'checked': + case 'selected': + $selected = array_map('strval', array_values((array)$_val)); + break; + + case 'checkboxes': + trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING); + $options = (array)$_val; + break; + + case 'assign': + break; + + default: + if(!is_array($_val)) { + $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"'; + } else { + trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE); + } + break; + } + } + + if (!isset($options) && !isset($values)) + return ''; /* raise error here? */ + + settype($selected, 'array'); + $_html_result = array(); + + if (isset($options)) { + + foreach ($options as $_key=>$_val) + $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels); + + + } else { + foreach ($values as $_i=>$_key) { + $_val = isset($output[$_i]) ? $output[$_i] : ''; + $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels); + } + + } + + if(!empty($params['assign'])) { + $template->assign($params['assign'], $_html_result); + } else { + return implode("\n",$_html_result); + } + +} + +function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels) { + $_output = ''; + if ($labels) $_output .= ''; + $_output .= $separator; + + return $_output; +} + +?> \ No newline at end of file diff --git a/Smarty/libs/plugins/function.html_image.php b/Smarty/libs/plugins/function.html_image.php new file mode 100644 index 0000000..abb7b57 --- /dev/null +++ b/Smarty/libs/plugins/function.html_image.php @@ -0,0 +1,137 @@ + + * Name: html_image
+ * Date: Feb 24, 2003
+ * Purpose: format HTML tags for the image
+ * Examples: {html_image file="/images/masthead.gif"} + * Output: + * + * @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image} + * (Smarty online manual) + * @author Monte Ohrt + * @author credits to Duda + * @version 1.0 + * @param array $params parameters + * Input:
+ * - file = file (and path) of image (required) + * - height = image height (optional, default actual height) + * - width = image width (optional, default actual width) + * - basedir = base directory for absolute paths, default + * is environment variable DOCUMENT_ROOT + * - path_prefix = prefix for path output (optional, default empty) + * @param object $template template object + * @return string + * @uses smarty_function_escape_special_chars() + */ +function smarty_function_html_image($params, $template) +{ + require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'); + + $alt = ''; + $file = ''; + $height = ''; + $width = ''; + $extra = ''; + $prefix = ''; + $suffix = ''; + $path_prefix = ''; + $server_vars = $_SERVER; + $basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : ''; + foreach($params as $_key => $_val) { + switch ($_key) { + case 'file': + case 'height': + case 'width': + case 'dpi': + case 'path_prefix': + case 'basedir': + $$_key = $_val; + break; + + case 'alt': + if (!is_array($_val)) { + $$_key = smarty_function_escape_special_chars($_val); + } else { + throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE); + } + break; + + case 'link': + case 'href': + $prefix = ''; + $suffix = ''; + break; + + default: + if (!is_array($_val)) { + $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"'; + } else { + throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE); + } + break; + } + } + + if (empty($file)) { + trigger_error("html_image: missing 'file' parameter", E_USER_NOTICE); + return; + } + + if (substr($file, 0, 1) == '/') { + $_image_path = $basedir . $file; + } else { + $_image_path = $file; + } + + if (!isset($params['width']) || !isset($params['height'])) { + if (!$_image_data = @getimagesize($_image_path)) { + if (!file_exists($_image_path)) { + trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE); + return; + } else if (!is_readable($_image_path)) { + trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE); + return; + } else { + trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE); + return; + } + } + if (isset($template->security_policy)) { + if (!$template->security_policy->isTrustedResourceDir($_image_path)) { + return; + } + } + + if (!isset($params['width'])) { + $width = $_image_data[0]; + } + if (!isset($params['height'])) { + $height = $_image_data[1]; + } + } + + if (isset($params['dpi'])) { + if (strstr($server_vars['HTTP_USER_AGENT'], 'Mac')) { + $dpi_default = 72; + } else { + $dpi_default = 96; + } + $_resize = $dpi_default / $params['dpi']; + $width = round($width * $_resize); + $height = round($height * $_resize); + } + + return $prefix . '' . $alt . '' . $suffix; +} + +?> \ No newline at end of file diff --git a/Smarty/libs/plugins/function.html_options.php b/Smarty/libs/plugins/function.html_options.php new file mode 100644 index 0000000..7ac0390 --- /dev/null +++ b/Smarty/libs/plugins/function.html_options.php @@ -0,0 +1,133 @@ + + * Name: html_options
+ * Purpose: Prints the list of