From 4253cbec26bd4a4f64cdcd4b4883f59f62d8e7c6 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 11 Aug 2016 16:17:59 +0300 Subject: [PATCH] first commit --- .bowerrc | 3 +++ .gitignore | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ .htaccess | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE.md | 32 ++++++++++++++++++++++++++++++++ README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/assets/AdminLteAsset.php | 35 +++++++++++++++++++++++++++++++++++ backend/assets/AppAsset.php | 31 +++++++++++++++++++++++++++++++ backend/assets/FontAwesomeAsset.php | 14 ++++++++++++++ backend/config/.gitignore | 2 ++ backend/config/bootstrap.php | 9 +++++++++ backend/config/main.php | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/config/params.php | 4 ++++ backend/controllers/ArticlesController.php | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/BannerController.php | 157 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/BgController.php | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/BlogController.php | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/BrandController.php | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/CategoryController.php | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/CommentController.php | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/CustomerController.php | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/EventController.php | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/OrdersController.php | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/PageController.php | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/SeoCategoryController.php | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/SeoController.php | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/SeoDynamicController.php | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/ServiceController.php | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/SiteController.php | 706 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/SliderController.php | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/SliderImageController.php | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/SubscribeController.php | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/controllers/UserController.php | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/models/.gitkeep | 1 + backend/models/CommentSearch.php | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/models/Label.php | 25 +++++++++++++++++++++++++ backend/models/LoginForm.php | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/models/Orders.php | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/models/OrdersProducts.php | 38 ++++++++++++++++++++++++++++++++++++++ backend/models/OrdersSearch.php | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/models/User.php | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/models/UserSearch.php | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/articles/_form.php | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/articles/_search.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ backend/views/articles/create.php | 21 +++++++++++++++++++++ backend/views/articles/index.php | 41 +++++++++++++++++++++++++++++++++++++++++ backend/views/articles/update.php | 21 +++++++++++++++++++++ backend/views/articles/view.php | 42 ++++++++++++++++++++++++++++++++++++++++++ backend/views/banner/_form.php | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/banner/_search.php | 38 ++++++++++++++++++++++++++++++++++++++ backend/views/banner/create.php | 21 +++++++++++++++++++++ backend/views/banner/index.php | 37 +++++++++++++++++++++++++++++++++++++ backend/views/banner/update.php | 23 +++++++++++++++++++++++ backend/views/banner/view.php | 40 ++++++++++++++++++++++++++++++++++++++++ backend/views/bg/_form.php | 27 +++++++++++++++++++++++++++ backend/views/bg/_search.php | 33 +++++++++++++++++++++++++++++++++ backend/views/bg/create.php | 21 +++++++++++++++++++++ backend/views/bg/index.php | 35 +++++++++++++++++++++++++++++++++++ backend/views/bg/update.php | 21 +++++++++++++++++++++ backend/views/bg/view.php | 38 ++++++++++++++++++++++++++++++++++++++ backend/views/blog/_form.php | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/blog/_search.php | 43 +++++++++++++++++++++++++++++++++++++++++++ backend/views/blog/create.php | 21 +++++++++++++++++++++ backend/views/blog/index.php | 40 ++++++++++++++++++++++++++++++++++++++++ backend/views/blog/update.php | 21 +++++++++++++++++++++ backend/views/blog/view.php | 43 +++++++++++++++++++++++++++++++++++++++++++ backend/views/brand/_form.php | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/brand/_search.php | 41 +++++++++++++++++++++++++++++++++++++++++ backend/views/brand/create.php | 21 +++++++++++++++++++++ backend/views/brand/index.php | 40 ++++++++++++++++++++++++++++++++++++++++ backend/views/brand/update.php | 23 +++++++++++++++++++++++ backend/views/brand/view.php | 42 ++++++++++++++++++++++++++++++++++++++++++ backend/views/category/_form.php | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/category/_search.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/category/create.php | 22 ++++++++++++++++++++++ backend/views/category/index.php | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/category/update.php | 24 ++++++++++++++++++++++++ backend/views/category/view.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/comment/_form.php | 33 +++++++++++++++++++++++++++++++++ backend/views/comment/_search.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/comment/index.php | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/comment/update.php | 21 +++++++++++++++++++++ backend/views/comment/view.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ backend/views/customer/_form.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ backend/views/customer/_search.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/customer/create.php | 21 +++++++++++++++++++++ backend/views/customer/index.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ backend/views/customer/update.php | 21 +++++++++++++++++++++ backend/views/customer/view.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ backend/views/event/_form.php | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/event/_search.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/event/create.php | 21 +++++++++++++++++++++ backend/views/event/index.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ backend/views/event/update.php | 23 +++++++++++++++++++++++ backend/views/event/view.php | 40 ++++++++++++++++++++++++++++++++++++++++ backend/views/layouts/admin.php | 34 ++++++++++++++++++++++++++++++++++ backend/views/layouts/control-sidebar.php | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/layouts/footer.php | 3 +++ backend/views/layouts/header.php | 35 +++++++++++++++++++++++++++++++++++ backend/views/layouts/main-sidebar.php | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/layouts/main.php | 34 ++++++++++++++++++++++++++++++++++ backend/views/layouts/none.php | 9 +++++++++ backend/views/orders/_form.php | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/orders/add.php | 30 ++++++++++++++++++++++++++++++ backend/views/orders/create.php | 19 +++++++++++++++++++ backend/views/orders/index.php | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/orders/show.php | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/orders/update.php | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/page/_form.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ backend/views/page/_search.php | 43 +++++++++++++++++++++++++++++++++++++++++++ backend/views/page/create.php | 21 +++++++++++++++++++++ backend/views/page/index.php | 39 +++++++++++++++++++++++++++++++++++++++ backend/views/page/update.php | 21 +++++++++++++++++++++ backend/views/page/view.php | 43 +++++++++++++++++++++++++++++++++++++++++++ backend/views/seo-category/_form.php | 27 +++++++++++++++++++++++++++ backend/views/seo-category/_search.php | 33 +++++++++++++++++++++++++++++++++ backend/views/seo-category/create.php | 21 +++++++++++++++++++++ backend/views/seo-category/index.php | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/seo-category/update.php | 23 +++++++++++++++++++++++ backend/views/seo-category/view.php | 38 ++++++++++++++++++++++++++++++++++++++ backend/views/seo-dynamic/_form.php | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/seo-dynamic/_search.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ backend/views/seo-dynamic/create.php | 22 ++++++++++++++++++++++ backend/views/seo-dynamic/index.php | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/seo-dynamic/update.php | 24 ++++++++++++++++++++++++ backend/views/seo-dynamic/view.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ backend/views/seo/_form.php | 41 +++++++++++++++++++++++++++++++++++++++++ backend/views/seo/_search.php | 39 +++++++++++++++++++++++++++++++++++++++ backend/views/seo/create.php | 21 +++++++++++++++++++++ backend/views/seo/index.php | 36 ++++++++++++++++++++++++++++++++++++ backend/views/seo/update.php | 23 +++++++++++++++++++++++ backend/views/seo/view.php | 41 +++++++++++++++++++++++++++++++++++++++++ backend/views/service/_form.php | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/service/_search.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ backend/views/service/create.php | 21 +++++++++++++++++++++ backend/views/service/index.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ backend/views/service/update.php | 23 +++++++++++++++++++++++ backend/views/service/view.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ backend/views/site/error.php | 27 +++++++++++++++++++++++++++ backend/views/site/index.php | 0 backend/views/site/login.php | 41 +++++++++++++++++++++++++++++++++++++++++ backend/views/slider-image/_form.php | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/slider-image/_search.php | 41 +++++++++++++++++++++++++++++++++++++++++ backend/views/slider-image/create.php | 25 +++++++++++++++++++++++++ backend/views/slider-image/index.php | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/slider-image/update.php | 27 +++++++++++++++++++++++++++ backend/views/slider-image/view.php | 43 +++++++++++++++++++++++++++++++++++++++++++ backend/views/slider/_form.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ backend/views/slider/_search.php | 36 ++++++++++++++++++++++++++++++++++++ backend/views/slider/create.php | 21 +++++++++++++++++++++ backend/views/slider/index.php | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/views/slider/update.php | 23 +++++++++++++++++++++++ backend/views/slider/view.php | 39 +++++++++++++++++++++++++++++++++++++++ backend/views/subscribe/_form.php | 25 +++++++++++++++++++++++++ backend/views/subscribe/_search.php | 33 +++++++++++++++++++++++++++++++++ backend/views/subscribe/create.php | 21 +++++++++++++++++++++ backend/views/subscribe/index.php | 35 +++++++++++++++++++++++++++++++++++ backend/views/subscribe/update.php | 21 +++++++++++++++++++++ backend/views/subscribe/view.php | 38 ++++++++++++++++++++++++++++++++++++++ backend/views/user/_form.php | 29 +++++++++++++++++++++++++++++ backend/views/user/_search.php | 37 +++++++++++++++++++++++++++++++++++++ backend/views/user/create.php | 21 +++++++++++++++++++++ backend/views/user/index.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ backend/views/user/update.php | 23 +++++++++++++++++++++++ backend/views/user/view.php | 40 ++++++++++++++++++++++++++++++++++++++++ backend/web/.gitignore | 2 ++ backend/web/css/site.css | 209 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/web/favicon.ico | Bin 0 -> 318 bytes backend/web/js/fieldWidget.js | 24 ++++++++++++++++++++++++ backend/web/js/site.js | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ backend/web/robots.txt | 2 ++ codeception.yml | 21 +++++++++++++++++++++ common/behaviors/ArtBoxAccessBehavior.php | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/behaviors/NotifyBehavior.php | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/behaviors/RatingBehavior.php | 42 ++++++++++++++++++++++++++++++++++++++++++ common/behaviors/RuSlug.php | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/behaviors/ShowImage.php | 43 +++++++++++++++++++++++++++++++++++++++++++ common/behaviors/Slug.php | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/components/Request.php | 41 +++++++++++++++++++++++++++++++++++++++++ common/components/SmsSender.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ common/components/artboximage/ArtboxImage.php | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/components/artboximage/ArtboxImageBehavior.php | 10 ++++++++++ common/components/artboximage/ArtboxImageHelper.php | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/components/artboxtree/ArtboxTreeBehavior.php | 445 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/components/artboxtree/ArtboxTreeHelper.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ common/components/artboxtree/ArtboxTreeQueryTrait.php | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/components/artboxtree/ArtboxTreeWidget.php | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/components/artboxtree/treegrid/TreeGridColumn.php | 250 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/components/artboxtree/treegrid/TreeGridWidget.php | 277 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/components/artboxtree/treelist/TreeListWidget.php | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/components/artboxtree/treemenu/TreeMenuWidget.php | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/components/urlManager/.htaccess | 10 ++++++++++ common/components/urlManager/LangRequest.php | 17 +++++++++++++++++ common/components/urlManager/LangUrlManager.php | 30 ++++++++++++++++++++++++++++++ common/components/urlManager/LangUrlRule.php | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/config/.gitignore | 2 ++ common/config/bootstrap.php | 9 +++++++++ common/config/main.php | 364 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/config/params.php | 6 ++++++ common/mail/layouts/html.php | 22 ++++++++++++++++++++++ common/mail/layouts/text.php | 12 ++++++++++++ common/mail/passwordResetToken-html.php | 15 +++++++++++++++ common/mail/passwordResetToken-text.php | 12 ++++++++++++ common/models/ArticleToRating.php | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Articles.php | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/ArticlesSearch.php | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Banner.php | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/BannerSearch.php | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Bg.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ common/models/BgSearch.php | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Blog.php | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/BlogSearch.php | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Customer.php | 262 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/CustomerSearch.php | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Delivery.php | 12 ++++++++++++ common/models/Event.php | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/EventSearch.php | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Fields.php | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/LoginForm.php | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Orders.php | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/OrdersProducts.php | 40 ++++++++++++++++++++++++++++++++++++++++ common/models/OrdersSearch.php | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Page.php | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/PageSearch.php | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/ProductToRating.php | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Seo.php | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/SeoCategory.php | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/SeoCategorySearch.php | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/SeoDynamic.php | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/SeoDynamicSearch.php | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/SeoSearch.php | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Service.php | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/ServiceSearch.php | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Share.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ common/models/Slider.php | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/SliderImage.php | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/SliderImageSearch.php | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/SliderSearch.php | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/Subscribe.php | 28 ++++++++++++++++++++++++++++ common/models/SubscribeSearch.php | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/TemplateLocation.php | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/TemplateLocationSearch.php | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/models/User.php | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/artboxfile/Module.php | 24 ++++++++++++++++++++++++ common/modules/artboxfile/config.php | 3 +++ common/modules/artboxfile/controllers/ActionController.php | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/artboxfile/models/File.php | 34 ++++++++++++++++++++++++++++++++++ common/modules/blog/Module.php | 15 +++++++++++++++ common/modules/blog/behaviors/Autocomplete.php | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/config.php | 9 +++++++++ common/modules/blog/controllers/AjaxController.php | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/controllers/ArticleController.php | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/controllers/CategoryController.php | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/controllers/DefaultController.php | 12 ++++++++++++ common/modules/blog/controllers/MediaController.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/controllers/TestController.php | 17 +++++++++++++++++ common/modules/blog/models/Article.php | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/models/ArticleCategory.php | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/models/ArticleCategoryLang.php | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/models/ArticleCategoryMedia.php | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/models/ArticleLang.php | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/models/ArticleMedia.php | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/models/ArticleToCategory.php | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/views/ajax/_article_form.php | 38 ++++++++++++++++++++++++++++++++++++++ common/modules/blog/views/ajax/_article_form_test.php | 38 ++++++++++++++++++++++++++++++++++++++ common/modules/blog/views/ajax/_article_media_form.php | 17 +++++++++++++++++ common/modules/blog/views/ajax/_category_form.php | 33 +++++++++++++++++++++++++++++++++ common/modules/blog/views/article/_form.php | 172 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/views/article/create.php | 19 +++++++++++++++++++ common/modules/blog/views/article/index.php | 32 ++++++++++++++++++++++++++++++++ common/modules/blog/views/article/update.php | 18 ++++++++++++++++++ common/modules/blog/views/category/_form.php | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/blog/views/category/create.php | 19 +++++++++++++++++++ common/modules/blog/views/category/index.php | 26 ++++++++++++++++++++++++++ common/modules/blog/views/category/update.php | 18 ++++++++++++++++++ common/modules/blog/views/default/index.php | 7 +++++++ common/modules/blog/views/media/index.php | 37 +++++++++++++++++++++++++++++++++++++ common/modules/blog/views/test/index.php | 11 +++++++++++ common/modules/comment/Module.php | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/assets/CommentAsset.php | 41 +++++++++++++++++++++++++++++++++++++++++ common/modules/comment/behaviors/ParentBehavior.php | 37 +++++++++++++++++++++++++++++++++++++ common/modules/comment/controllers/DefaultController.php | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/controllers/ManageController.php | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/messages/config.php | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/messages/en/artbox-comment.php | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/messages/ru/artbox-comment.php | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/migrations/m160724_162347_artbox_comment.php | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/migrations/m160726_092634_add_entity_fields.php | 18 ++++++++++++++++++ common/modules/comment/migrations/m160726_211227_create_artbox_comment_rating.php | 31 +++++++++++++++++++++++++++++++ common/modules/comment/models/CommentModel.php | 245 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/models/CommentModelSearch.php | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/models/LikeModel.php | 14 ++++++++++++++ common/modules/comment/models/RatingModel.php | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/models/interfaces/CommentInterface.php | 23 +++++++++++++++++++++++ common/modules/comment/resources/artbox_comment.css | 319 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/resources/artbox_comment.js | 318 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/resources/delete.gif | Bin 0 -> 752 bytes common/modules/comment/resources/jquery.rateit.min.js | 7 +++++++ common/modules/comment/resources/rateit.css | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/resources/star.gif | Bin 0 -> 2460 bytes common/modules/comment/todo | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/views/artbox_comment_form.php | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/views/artbox_comment_item.php | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/views/artbox_comment_list.php | 30 ++++++++++++++++++++++++++++++ common/modules/comment/views/artbox_comment_reply.php | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/views/manage/index.php | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/comment/views/manage/update.php | 18 ++++++++++++++++++ common/modules/comment/widgets/CommentWidget.php | 367 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/FileUploadAsset.php | 43 +++++++++++++++++++++++++++++++++++++++++++ common/modules/file/Module.php | 15 +++++++++++++++ common/modules/file/assets/css/fileupload/style.css | 7 +++++++ common/modules/file/assets/css/jquery.fileupload-noscript.css | 22 ++++++++++++++++++++++ common/modules/file/assets/css/jquery.fileupload-ui-noscript.css | 17 +++++++++++++++++ common/modules/file/assets/css/jquery.fileupload-ui.css | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/css/jquery.fileupload.css | 37 +++++++++++++++++++++++++++++++++++++ common/modules/file/assets/img/loading.gif | Bin 0 -> 3897 bytes common/modules/file/assets/img/progressbar.gif | Bin 0 -> 3323 bytes common/modules/file/assets/js/cors/jquery.postmessage-transport.js | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/cors/jquery.xdr-transport.js | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/jquery.fileupload-angular.js | 425 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/jquery.fileupload-audio.js | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/jquery.fileupload-image.js | 321 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/jquery.fileupload-jquery-ui.js | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/jquery.fileupload-process.js | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/jquery.fileupload-ui.js | 710 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/jquery.fileupload-validate.js | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/jquery.fileupload-video.js | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/jquery.fileupload.js | 1477 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/jquery.iframe-transport.js | 217 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/assets/js/vendor/jquery.ui.widget.js | 572 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/config.php | 3 +++ common/modules/file/controllers/UploaderController.php | 257 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/models/ImageSizerForm.php | 38 ++++++++++++++++++++++++++++++++++++++ common/modules/file/views/_gallery_item.php | 9 +++++++++ common/modules/file/views/_one_item.php | 17 +++++++++++++++++ common/modules/file/widgets/ImageUploader.php | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/file/widgets/views/image_sizer.php | 203 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/CatalogUrlManager.php | 253 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/Module.php | 24 ++++++++++++++++++++++++ common/modules/product/behaviors/FilterBehavior.php | 24 ++++++++++++++++++++++++ common/modules/product/config.php | 8 ++++++++ common/modules/product/controllers/DefaultController.php | 20 ++++++++++++++++++++ common/modules/product/controllers/ManageController.php | 276 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/controllers/ProductUnitController.php | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/controllers/ProductVariantTypeController.php | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/controllers/VariantController.php | 247 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/helpers/FilterHelper.php | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/helpers/ProductHelper.php | 303 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/Brand.php | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/BrandName.php | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/BrandQuery.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/BrandSearch.php | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/Category.php | 281 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/CategoryName.php | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/CategoryQuery.php | 39 +++++++++++++++++++++++++++++++++++++++ common/modules/product/models/CategorySearch.php | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/Export.php | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/Import.php | 564 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/Product.php | 441 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductCategory.php | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductImage.php | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductImageQuery.php | 35 +++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductOption.php | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductQuery.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductSearch.php | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductStock.php | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductUnit.php | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductUnitSearch.php | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductVariant.php | 315 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductVariantListSearch.php | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductVariantOption.php | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductVariantQuery.php | 34 ++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductVariantSearch.php | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductVariantType.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/ProductVariantTypeSearch.php | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/Stock.php | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/models/StockQuery.php | 34 ++++++++++++++++++++++++++++++++++ common/modules/product/views/default/index.php | 12 ++++++++++++ common/modules/product/views/manage/_form.php | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/views/manage/_search.php | 31 +++++++++++++++++++++++++++++++ common/modules/product/views/manage/create.php | 21 +++++++++++++++++++++ common/modules/product/views/manage/import-process.php | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/views/manage/import.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/views/manage/index.php | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/views/manage/update.php | 24 ++++++++++++++++++++++++ common/modules/product/views/manage/view.php | 40 ++++++++++++++++++++++++++++++++++++++++ common/modules/product/views/product-unit/_form.php | 27 +++++++++++++++++++++++++++ common/modules/product/views/product-unit/_search.php | 33 +++++++++++++++++++++++++++++++++ common/modules/product/views/product-unit/create.php | 21 +++++++++++++++++++++ common/modules/product/views/product-unit/index.php | 34 ++++++++++++++++++++++++++++++++++ common/modules/product/views/product-unit/update.php | 23 +++++++++++++++++++++++ common/modules/product/views/product-unit/view.php | 38 ++++++++++++++++++++++++++++++++++++++ common/modules/product/views/product-variant-type/_form.php | 25 +++++++++++++++++++++++++ common/modules/product/views/product-variant-type/_search.php | 31 +++++++++++++++++++++++++++++++ common/modules/product/views/product-variant-type/create.php | 21 +++++++++++++++++++++ common/modules/product/views/product-variant-type/index.php | 32 ++++++++++++++++++++++++++++++++ common/modules/product/views/product-variant-type/update.php | 23 +++++++++++++++++++++++ common/modules/product/views/product-variant-type/view.php | 37 +++++++++++++++++++++++++++++++++++++ common/modules/product/views/variant/_form.php | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/views/variant/_search.php | 31 +++++++++++++++++++++++++++++++ common/modules/product/views/variant/create.php | 23 +++++++++++++++++++++++ common/modules/product/views/variant/index.php | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/views/variant/update.php | 27 +++++++++++++++++++++++++++ common/modules/product/views/variant/view.php | 42 ++++++++++++++++++++++++++++++++++++++++++ common/modules/product/widgets/brandsCarouselWidget.php | 21 +++++++++++++++++++++ common/modules/product/widgets/catalogSubmenuWidget.php | 36 ++++++++++++++++++++++++++++++++++++ common/modules/product/widgets/lastProducts.php | 22 ++++++++++++++++++++++ common/modules/product/widgets/similarProducts.php | 35 +++++++++++++++++++++++++++++++++++ common/modules/product/widgets/specialProducts.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/widgets/views/brandsCarousel.php | 11 +++++++++++ common/modules/product/widgets/views/product_smart.php | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/product/widgets/views/products_block.php | 31 +++++++++++++++++++++++++++++++ common/modules/product/widgets/views/submenu.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/relation/Module.php | 40 ++++++++++++++++++++++++++++++++++++++++ common/modules/relation/controllers/DefaultController.php | 20 ++++++++++++++++++++ common/modules/relation/controllers/ManageController.php | 238 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/relation/models/Relation.php | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/relation/models/RelationQuery.php | 35 +++++++++++++++++++++++++++++++++++ common/modules/relation/relationBehavior.php | 243 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/relation/relationHelper.php | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/relation/relationObject.php | 29 +++++++++++++++++++++++++++++ common/modules/relation/relationQueryTrait.php | 33 +++++++++++++++++++++++++++++++++ common/modules/relation/views/default/index.php | 12 ++++++++++++ common/modules/relation/views/manage/_form.php | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/relation/views/manage/create.php | 22 ++++++++++++++++++++++ common/modules/relation/views/manage/pars.php | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/relation/views/manage/relations.php | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/relation/views/manage/update.php | 25 +++++++++++++++++++++++++ common/modules/rubrication/Module.php | 26 ++++++++++++++++++++++++++ common/modules/rubrication/behaviors/ArtboxSynonymBehavior.php | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/controllers/DefaultController.php | 20 ++++++++++++++++++++ common/modules/rubrication/controllers/TaxGroupController.php | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/controllers/TaxOptionController.php | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/helpers/RubricationHelper.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/models/TaxGroup.php | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/models/TaxGroupToGroup.php | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/models/TaxOption.php | 245 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/models/TaxOptionQuery.php | 39 +++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/models/TaxOptionRelation.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/models/TaxOptionSearch.php | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/models/TaxValueFloat.php | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/models/TaxValueInt.php | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/models/TaxValueLink.php | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/models/TaxValueString.php | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/views/default/index.php | 12 ++++++++++++ common/modules/rubrication/views/tax-group/_form.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/views/tax-group/create.php | 21 +++++++++++++++++++++ common/modules/rubrication/views/tax-group/index.php | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/views/tax-group/relations.php | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/views/tax-group/update.php | 23 +++++++++++++++++++++++ common/modules/rubrication/views/tax-group/view.php | 43 +++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/views/tax-option/_form.php | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/views/tax-option/_search.php | 37 +++++++++++++++++++++++++++++++++++++ common/modules/rubrication/views/tax-option/create.php | 25 +++++++++++++++++++++++++ common/modules/rubrication/views/tax-option/index.php | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/modules/rubrication/views/tax-option/update.php | 26 ++++++++++++++++++++++++++ common/modules/rubrication/views/tax-option/value/_fields_float.php | 1 + common/modules/rubrication/views/tax-option/value/_fields_int.php | 1 + common/modules/rubrication/views/tax-option/value/_fields_link.php | 2 ++ common/modules/rubrication/views/tax-option/value/_fields_string.php | 1 + common/modules/rubrication/views/tax-option/view.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ common/translation/ru/app.php | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/translation/ru/product.php | 32 ++++++++++++++++++++++++++++++++ common/widgets/Alert.php | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/widgets/BasketHead.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ common/widgets/BasketModal.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ common/widgets/FieldEditor.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ common/widgets/Mailer.php | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/widgets/views/basket_head.php | 10 ++++++++++ common/widgets/views/basket_modal.php | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ common/widgets/views/comment_notify.php | 39 +++++++++++++++++++++++++++++++++++++++ common/widgets/views/education_field.php | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/widgets/views/order.php | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/widgets/views/password.php | 16 ++++++++++++++++ common/widgets/views/registration.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ common/widgets/views/test.php | 1 + composer.json | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ console/config/.gitignore | 2 ++ console/config/bootstrap.php | 9 +++++++++ console/config/main.php | 25 +++++++++++++++++++++++++ console/config/params.php | 4 ++++ console/controllers/.gitkeep | 0 console/controllers/ImportController.php | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ console/controllers/RbacController.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m130524_201442_init.php | 33 +++++++++++++++++++++++++++++++++ console/migrations/m160126_071717_rubrication.php | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160128_101543_fields.php | 29 +++++++++++++++++++++++++++++ console/migrations/m160208_111900_blog.php | 30 ++++++++++++++++++++++++++++++ console/migrations/m160304_054017_realtion.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160304_065108_product.php | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160320_174258_customer.php | 35 +++++++++++++++++++++++++++++++++++ console/migrations/m160321_232402_orders1.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160323_234304_product_image.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160324_075409_product_option.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160324_114404_orders_items_items_fk.php | 21 +++++++++++++++++++++ console/migrations/m160331_132149_slider.php | 26 ++++++++++++++++++++++++++ console/migrations/m160404_081649_banner.php | 26 ++++++++++++++++++++++++++ console/migrations/m160405_101056_create_slider_images.php | 37 +++++++++++++++++++++++++++++++++++++ console/migrations/m160406_221846_create_page.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160407_185510_create_event.php | 38 ++++++++++++++++++++++++++++++++++++++ console/migrations/m160411_211053_create_service.php | 37 +++++++++++++++++++++++++++++++++++++ console/migrations/m160411_215739_create_seo.php | 33 +++++++++++++++++++++++++++++++++ console/migrations/m160412_133944_create_seo_category.php | 30 ++++++++++++++++++++++++++++++ console/migrations/m160413_112158_create_seo_dynamic.php | 39 +++++++++++++++++++++++++++++++++++++++ console/migrations/m160414_101644_add_param_to_seo_dynamic.php | 26 ++++++++++++++++++++++++++ console/migrations/m160414_214745_add_key_to_seo_dynamic.php | 26 ++++++++++++++++++++++++++ console/migrations/m160414_214746_add_level_to_tax_group.php | 26 ++++++++++++++++++++++++++ console/migrations/m160505_202248_bg.php | 23 +++++++++++++++++++++++ console/migrations/m160505_235100_page.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160509_121023_articles.php | 40 ++++++++++++++++++++++++++++++++++++++++ console/migrations/m160509_214535_customer.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160509_231345_auth_assignment.php | 33 +++++++++++++++++++++++++++++++++ console/migrations/m160512_153443_subscribe.php | 24 ++++++++++++++++++++++++ console/migrations/m160516_222821_orders.php | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ console/migrations/m160516_234753_orders_delivery.php | 38 ++++++++++++++++++++++++++++++++++++++ console/migrations/m160517_072059_delete_product_fk.php | 30 ++++++++++++++++++++++++++++++ console/migrations/m160517_073502_orders_label.php | 31 +++++++++++++++++++++++++++++++ console/migrations/m160518_185644_change_order.php | 29 +++++++++++++++++++++++++++++ console/migrations/m160721_152001_create_product_to_rating.php | 23 +++++++++++++++++++++++ console/migrations/m160722_150101_remove_product_option_option_fkey.php | 19 +++++++++++++++++++ console/migrations/m160722_150611_remove_product_variant_option_id.php | 27 +++++++++++++++++++++++++++ console/migrations/m160722_150612_remove_option_product_variant_id.php | 27 +++++++++++++++++++++++++++ console/migrations/m160725_154511_remove_product_option_product_fkey.php | 27 +++++++++++++++++++++++++++ console/migrations/m160725_155127_remove_product_stock_product_variant_id_fkey.php | 27 +++++++++++++++++++++++++++ console/migrations/m160804_100209_create_article_to_rating.php | 23 +++++++++++++++++++++++ console/migrations/m160810_074009_add_tax_option_sort.php | 16 ++++++++++++++++ console/migrations/m160810_081231_add_tax_option_display.php | 16 ++++++++++++++++ console/models/.gitkeep | 1 + console/runtime/.gitignore | 2 ++ environments/dev/backend/config/main-local.php | 25 +++++++++++++++++++++++++ environments/dev/backend/config/params-local.php | 3 +++ environments/dev/backend/web/index-test.php | 19 +++++++++++++++++++ environments/dev/backend/web/index.php | 18 ++++++++++++++++++ environments/dev/common/config/main-local.php | 20 ++++++++++++++++++++ environments/dev/common/config/params-local.php | 3 +++ environments/dev/console/config/main-local.php | 7 +++++++ environments/dev/console/config/params-local.php | 3 +++ environments/dev/frontend/config/main-local.php | 24 ++++++++++++++++++++++++ environments/dev/frontend/config/params-local.php | 3 +++ environments/dev/frontend/web/index-test.php | 18 ++++++++++++++++++ environments/dev/frontend/web/index.php | 18 ++++++++++++++++++ environments/dev/yii | 28 ++++++++++++++++++++++++++++ environments/index.php | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ environments/prod/backend/config/main-local.php | 9 +++++++++ environments/prod/backend/config/params-local.php | 3 +++ environments/prod/backend/web/index.php | 18 ++++++++++++++++++ environments/prod/common/config/main-local.php | 16 ++++++++++++++++ environments/prod/common/config/params-local.php | 3 +++ environments/prod/console/config/main-local.php | 3 +++ environments/prod/console/config/params-local.php | 3 +++ environments/prod/frontend/config/main-local.php | 9 +++++++++ environments/prod/frontend/config/params-local.php | 3 +++ environments/prod/frontend/web/index.php | 18 ++++++++++++++++++ environments/prod/yii | 28 ++++++++++++++++++++++++++++ frontend/assets/AppAsset.php | 38 ++++++++++++++++++++++++++++++++++++++ frontend/assets/IeAsset.php | 26 ++++++++++++++++++++++++++ frontend/components/BgWidget.php | 30 ++++++++++++++++++++++++++++++ frontend/components/HreflangWidget.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/components/SeoComponent.php | 37 +++++++++++++++++++++++++++++++++++++ frontend/components/Text.php | 16 ++++++++++++++++ frontend/config/.gitignore | 2 ++ frontend/config/bootstrap.php | 1 + frontend/config/main.php | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/config/params.php | 4 ++++ frontend/controllers/ArticlesController.php | 42 ++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/BasketController.php | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/CabinetController.php | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/CallController.php | 33 +++++++++++++++++++++++++++++++++ frontend/controllers/CatalogController.php | 229 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/EventController.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/IamController.php | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/LoginController.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/NewsController.php | 41 +++++++++++++++++++++++++++++++++++++++++ frontend/controllers/PageController.php | 20 ++++++++++++++++++++ frontend/controllers/PostController.php | 20 ++++++++++++++++++++ frontend/controllers/ProductsController.php | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/RegController.php | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/SearchController.php | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/ServiceController.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/SiteController.php | 193 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/controllers/SubscribeController.php | 34 ++++++++++++++++++++++++++++++++++ frontend/controllers/TextController.php | 24 ++++++++++++++++++++++++ frontend/controllers/error_log | 1 + frontend/helpers/TextHelper.php | 24 ++++++++++++++++++++++++ frontend/models/ContactForm.php | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/models/LoginForm.php | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/models/PasswordResetRequestForm.php | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/models/ProductFrontendSearch.php | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/models/ResetPasswordForm.php | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/models/SignupForm.php | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/page/show.php | 4 ++++ frontend/views/articles/index.php | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/articles/show.php | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/basket/_popup.php | 29 +++++++++++++++++++++++++++++ frontend/views/basket/ajax_info.php | 5 +++++ frontend/views/basket/ajax_items.php | 33 +++++++++++++++++++++++++++++++++ frontend/views/basket/index.php | 193 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/basket/success.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/cabinet/bookmarks.php | 24 ++++++++++++++++++++++++ frontend/views/cabinet/index.php | 18 ++++++++++++++++++ frontend/views/cabinet/my-orders.php | 24 ++++++++++++++++++++++++ frontend/views/cabinet/update.php | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/call/index.php | 34 ++++++++++++++++++++++++++++++++++ frontend/views/call/success.php | 32 ++++++++++++++++++++++++++++++++ frontend/views/catalog/_catalog_box.php | 20 ++++++++++++++++++++ frontend/views/catalog/all.php | 39 +++++++++++++++++++++++++++++++++++++++ frontend/views/catalog/brand.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/catalog/brands.php | 28 ++++++++++++++++++++++++++++ frontend/views/catalog/catalog.php | 21 +++++++++++++++++++++ frontend/views/catalog/categories.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ frontend/views/catalog/index.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ frontend/views/catalog/product.php | 316 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/catalog/product_item.php | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/catalog/products.php | 233 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/event/_objects.php | 13 +++++++++++++ frontend/views/event/index.php | 42 ++++++++++++++++++++++++++++++++++++++++++ frontend/views/event/show.php | 30 ++++++++++++++++++++++++++++++ frontend/views/iam/1person.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/iam/_tabs.php | 6 ++++++ frontend/views/iam/admin.php | 1 + frontend/views/iam/company.php | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/iam/customer.php | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/iam/edit_company.php | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/iam/edit_customer.php | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/iam/edit_person.php | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/iam/myorders.php | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/iam/person.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/iam/price.php | 40 ++++++++++++++++++++++++++++++++++++++++ frontend/views/iam/share.php | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/iam/show_order.php | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/layouts/main-menu.php | 12 ++++++++++++ frontend/views/layouts/main.php | 477 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/login/error_log | 1 + frontend/views/login/forgot.php | 38 ++++++++++++++++++++++++++++++++++++++ frontend/views/login/index.php | 36 ++++++++++++++++++++++++++++++++++++ frontend/views/modal/consultation_modal.php | 19 +++++++++++++++++++ frontend/views/modal/forgot_password_form_model_window.php | 15 +++++++++++++++ frontend/views/modal/login_window_model_window.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/modal/registration_window_model_window.php | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/news/index.php | 42 ++++++++++++++++++++++++++++++++++++++++++ frontend/views/news/show.php | 30 ++++++++++++++++++++++++++++++ frontend/views/orders/basket-step-01.php | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/orders/basket-step-02.php | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/orders/basket-step-03.php | 10 ++++++++++ frontend/views/page/show.php | 7 +++++++ frontend/views/reg/company.php | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/reg/customer.php | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/reg/person.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/search/index.php | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/service/_objects.php | 35 +++++++++++++++++++++++++++++++++++ frontend/views/service/index.php | 13 +++++++++++++ frontend/views/service/view.php | 20 ++++++++++++++++++++ frontend/views/site/_index.php | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/site/about.php | 16 ++++++++++++++++ frontend/views/site/contact.php | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/site/error.php | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/site/error_log | 1 + frontend/views/site/index.php | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/site/login.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ frontend/views/site/requestPasswordResetToken.php | 31 +++++++++++++++++++++++++++++++ frontend/views/site/resetPassword.php | 31 +++++++++++++++++++++++++++++++ frontend/views/site/signup.php | 35 +++++++++++++++++++++++++++++++++++ frontend/views/subscribe/index.php | 37 +++++++++++++++++++++++++++++++++++++ frontend/views/text/index.php | 19 +++++++++++++++++++ frontend/web/.gitignore | 2 ++ frontend/web/css/begunok.css | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/css/comments.css | 1 + frontend/web/css/ion.rangeSlider.css | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/css/ion.rangeSlider.skinHTML5.css | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/css/style.css | 1 + frontend/web/css/style.dev.css | 1641 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/favicon.ico | Bin 0 -> 318 bytes frontend/web/files/.tmb/l1_c2l0ZV9leHRyZW1fbmV3X25ld3NfYnV0dG9uXzIuanBn1437031556.png | Bin 0 -> 2567 bytes frontend/web/files/site_extrem_new_news_button_2.jpg | Bin 0 -> 956009 bytes frontend/web/img/404.png | Bin 0 -> 16575 bytes frontend/web/img/_logo.png | Bin 0 -> 3647 bytes frontend/web/img/arrow-next.png | Bin 0 -> 1808 bytes frontend/web/img/arrow-prev.png | Bin 0 -> 1790 bytes frontend/web/img/arrow_sort_asc_desc.png | Bin 0 -> 995 bytes frontend/web/img/arrows_blocks.png | Bin 0 -> 1209 bytes frontend/web/img/artweb.png | Bin 0 -> 1497 bytes frontend/web/img/banner1.jpg | Bin 0 -> 141358 bytes frontend/web/img/banner_akciya.jpg | Bin 0 -> 51619 bytes frontend/web/img/begunok_slider.png | Bin 0 -> 1372 bytes frontend/web/img/buy.png | Bin 0 -> 1120 bytes frontend/web/img/children_sub.jpg | Bin 0 -> 36785 bytes frontend/web/img/close_modal.jpg | Bin 0 -> 527 bytes frontend/web/img/del.png | Bin 0 -> 1049 bytes frontend/web/img/favicon.ico | Bin 0 -> 932 bytes frontend/web/img/help.png | Bin 0 -> 1211 bytes frontend/web/img/ico1.png | Bin 0 -> 7900 bytes frontend/web/img/ico2.png | Bin 0 -> 6833 bytes frontend/web/img/ico3.png | Bin 0 -> 4481 bytes frontend/web/img/ico4.png | Bin 0 -> 7070 bytes frontend/web/img/ico5.png | Bin 0 -> 4334 bytes frontend/web/img/ico_close.png | Bin 0 -> 26655 bytes frontend/web/img/ico_close2.png | Bin 0 -> 26655 bytes frontend/web/img/ico_pic.jpg | Bin 0 -> 21928 bytes frontend/web/img/ico_pic2.jpg | Bin 0 -> 23953 bytes frontend/web/img/icon_100_original_01.png | Bin 0 -> 5584 bytes frontend/web/img/icon_100_quaranty_01.png | Bin 0 -> 5524 bytes frontend/web/img/li1.png | Bin 0 -> 1153 bytes frontend/web/img/li2.png | Bin 0 -> 1150 bytes frontend/web/img/li3.png | Bin 0 -> 1125 bytes frontend/web/img/li_minus.png | Bin 0 -> 1086 bytes frontend/web/img/li_plus.png | Bin 0 -> 1109 bytes frontend/web/img/login.png | Bin 0 -> 1086 bytes frontend/web/img/logo-why.png | Bin 0 -> 4521 bytes frontend/web/img/logo.png | Bin 0 -> 4367 bytes frontend/web/img/lupa_sub.png | Bin 0 -> 1206 bytes frontend/web/img/man_sub.jpg | Bin 0 -> 36503 bytes frontend/web/img/map.jpg | Bin 0 -> 21459 bytes frontend/web/img/map.png | Bin 0 -> 1223 bytes frontend/web/img/minus.png | Bin 0 -> 26407 bytes frontend/web/img/more.png | Bin 0 -> 1018 bytes frontend/web/img/new_arrows_.png | Bin 0 -> 27629 bytes frontend/web/img/new_coll.png | Bin 0 -> 2132 bytes frontend/web/img/no_photo.png | Bin 0 -> 23954 bytes frontend/web/img/no_photo_big.png | Bin 0 -> 9430 bytes frontend/web/img/notpic.gif | Bin 0 -> 14525 bytes frontend/web/img/pagination.png | Bin 0 -> 1080 bytes frontend/web/img/phone.png | Bin 0 -> 1202 bytes frontend/web/img/pic.jpg | Bin 0 -> 57565 bytes frontend/web/img/plus.png | Bin 0 -> 26450 bytes frontend/web/img/pro.png | Bin 0 -> 1437 bytes frontend/web/img/radio_new-active.png | Bin 0 -> 1339 bytes frontend/web/img/radio_new.png | Bin 0 -> 1251 bytes frontend/web/img/sale30.jpg | Bin 0 -> 63754 bytes frontend/web/img/slider.jpg | Bin 0 -> 126298 bytes frontend/web/img/social-ico-two.png | Bin 0 -> 3757 bytes frontend/web/img/social-ico.png | Bin 0 -> 2739 bytes frontend/web/img/user-noimage.png | Bin 0 -> 3166 bytes frontend/web/img/v_next.png | Bin 0 -> 1055 bytes frontend/web/img/v_next2.png | Bin 0 -> 1030 bytes frontend/web/img/v_prev.png | Bin 0 -> 1039 bytes frontend/web/img/v_prev2.png | Bin 0 -> 1030 bytes frontend/web/img/why.png | Bin 0 -> 4428 bytes frontend/web/img/why_item1.png | Bin 0 -> 4028 bytes frontend/web/img/why_item2.png | Bin 0 -> 3391 bytes frontend/web/img/why_item3.png | Bin 0 -> 4277 bytes frontend/web/img/why_item4.png | Bin 0 -> 3795 bytes frontend/web/img/why_item5.png | Bin 0 -> 4429 bytes frontend/web/img/why_item6.png | Bin 0 -> 3289 bytes frontend/web/img/woman_sub.jpg | Bin 0 -> 40290 bytes frontend/web/js/basket.js | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/basket2.js | 193 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/begunok.js | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/call.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/fix_height.js | 45 +++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/ion.rangeSlider.js | 2317 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jCarousel/jCarousel.js | 4 ++++ frontend/web/js/jcarousel/jcarousel.min.js | 4 ++++ frontend/web/js/jcarousel/skins/HOME_SLIDER/arrows_left.png | Bin 0 -> 3045 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/arrows_right.png | Bin 0 -> 3041 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/credits.txt | 1 + frontend/web/js/jcarousel/skins/HOME_SLIDER/next-horizontal.png | Bin 0 -> 4375 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/next-vertical.png | Bin 0 -> 3817 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/next.jpg | Bin 0 -> 710 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/next.png | Bin 0 -> 755 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/prev-horizontal.png | Bin 0 -> 4322 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/prev-vertical.png | Bin 0 -> 3962 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/prev.jpg | Bin 0 -> 689 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/prev.png | Bin 0 -> 769 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/skin.css | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jcarousel/skins/HOME_SLIDER/skin2.css | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jcarousel/skins/HOME_SLIDER/v_next.png | Bin 0 -> 1055 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/v_next2.png | Bin 0 -> 1030 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/v_prev.png | Bin 0 -> 1039 bytes frontend/web/js/jcarousel/skins/HOME_SLIDER/v_prev2.png | Bin 0 -> 1030 bytes frontend/web/js/jcarousel/skins/ie7/credits.txt | 1 + frontend/web/js/jcarousel/skins/ie7/loading-small.gif | Bin 0 -> 3236 bytes frontend/web/js/jcarousel/skins/ie7/loading.gif | Bin 0 -> 8266 bytes frontend/web/js/jcarousel/skins/ie7/loading_small.gif | Bin 0 -> 3208 bytes frontend/web/js/jcarousel/skins/ie7/next-horizontal.gif | Bin 0 -> 3530 bytes frontend/web/js/jcarousel/skins/ie7/prev-horizontal.gif | Bin 0 -> 3517 bytes frontend/web/js/jcarousel/skins/ie7/skin.css | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jcarousel/skins/tango/arrows_left.png | Bin 0 -> 3045 bytes frontend/web/js/jcarousel/skins/tango/arrows_right.png | Bin 0 -> 3041 bytes frontend/web/js/jcarousel/skins/tango/credits.txt | 1 + frontend/web/js/jcarousel/skins/tango/next-horizontal.png | Bin 0 -> 4375 bytes frontend/web/js/jcarousel/skins/tango/next-vertical.png | Bin 0 -> 3817 bytes frontend/web/js/jcarousel/skins/tango/next.jpg | Bin 0 -> 710 bytes frontend/web/js/jcarousel/skins/tango/next.png | Bin 0 -> 755 bytes frontend/web/js/jcarousel/skins/tango/prev-horizontal.png | Bin 0 -> 4322 bytes frontend/web/js/jcarousel/skins/tango/prev-vertical.png | Bin 0 -> 3962 bytes frontend/web/js/jcarousel/skins/tango/prev.jpg | Bin 0 -> 689 bytes frontend/web/js/jcarousel/skins/tango/prev.png | Bin 0 -> 769 bytes frontend/web/js/jcarousel/skins/tango/skin.css | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jcarousel/skins/tango/skin2.css | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jcarousel/skins/tango/v_next.png | Bin 0 -> 1055 bytes frontend/web/js/jcarousel/skins/tango/v_next2.png | Bin 0 -> 1030 bytes frontend/web/js/jcarousel/skins/tango/v_prev.png | Bin 0 -> 1039 bytes frontend/web/js/jcarousel/skins/tango/v_prev2.png | Bin 0 -> 1030 bytes frontend/web/js/jquery-1.5.min.js | 16 ++++++++++++++++ frontend/web/js/jquery.mask.js | 463 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jquery.min.js | 6 ++++++ frontend/web/js/jquery.ui-slider.js | 10 ++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/README | 7 +++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/changelog.html | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_ajax.html | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_ajax.txt | 10 ++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_ajax_php.html | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_ajax_php.php | 43 +++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_flickr_api.html | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_flickr_api.php | 29 +++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_flickr_feed.html | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_flickr_feed.php | 14 ++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_javascript.html | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/images/arrow-down.gif | Bin 0 -> 55 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/examples/images/arrow-up.gif | Bin 0 -> 832 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/examples/images/loading-small.gif | Bin 0 -> 3236 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/examples/images/loading-thickbox.gif | Bin 0 -> 5886 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/examples/images/loading.gif | Bin 0 -> 8266 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/examples/special_easing.html | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/special_flexible.html | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/special_textscroller.html | 192 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/special_textscroller.php | 15 +++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/special_thickbox.html | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_auto.html | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_callbacks.html | 235 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_circular.html | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_controls.html | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_multiple.html | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_simple.html | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_start.html | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_vertical.html | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/thickbox/thickbox.css | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/examples/thickbox/thickbox.js | 296 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/index.html | 516 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery-1.4.2.min.js | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.js | 1057 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.min.js | 16 ++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/credits.txt | 1 + frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/loading-small.gif | Bin 0 -> 3236 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/loading.gif | Bin 0 -> 8266 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/loading_small.gif | Bin 0 -> 3208 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/next-horizontal.gif | Bin 0 -> 3530 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/prev-horizontal.gif | Bin 0 -> 3517 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/skin.css | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/arrows_left.png | Bin 0 -> 3045 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/arrows_right.png | Bin 0 -> 3041 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/credits.txt | 1 + frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/next-horizontal.png | Bin 0 -> 4375 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/next-vertical.png | Bin 0 -> 3817 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/next.jpg | Bin 0 -> 710 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/next.png | Bin 0 -> 755 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/prev-horizontal.png | Bin 0 -> 4322 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/prev-vertical.png | Bin 0 -> 3962 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/prev.jpg | Bin 0 -> 689 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/prev.png | Bin 0 -> 769 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/skin.css | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/skin2.css | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/v_next.png | Bin 0 -> 1055 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/v_next2.png | Bin 0 -> 1030 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/v_prev.png | Bin 0 -> 1039 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/v_prev2.png | Bin 0 -> 1030 bytes frontend/web/js/jsor-jcarousel-7bb2e0a/style.css | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/main.js | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/shadowbox-3.0.3/LICENSE | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/shadowbox-3.0.3/README | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/shadowbox-3.0.3/_shadowbox.css | 30 ++++++++++++++++++++++++++++++ frontend/web/js/shadowbox-3.0.3/close.png | Bin 0 -> 255 bytes frontend/web/js/shadowbox-3.0.3/loading.gif | Bin 0 -> 2545 bytes frontend/web/js/shadowbox-3.0.3/next.png | Bin 0 -> 248 bytes frontend/web/js/shadowbox-3.0.3/pause.png | Bin 0 -> 155 bytes frontend/web/js/shadowbox-3.0.3/play.png | Bin 0 -> 211 bytes frontend/web/js/shadowbox-3.0.3/previous.png | Bin 0 -> 237 bytes frontend/web/js/shadowbox-3.0.3/shadowbox.css | 30 ++++++++++++++++++++++++++++++ frontend/web/js/shadowbox-3.0.3/shadowbox.js | 17 +++++++++++++++++ frontend/web/js/slides.min.jquery.js | 20 ++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/README | 7 +++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/changelog.html | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax.html | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax.txt | 10 ++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax_php.html | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax_php.php | 43 +++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_api.html | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_api.php | 29 +++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_feed.html | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_feed.php | 14 ++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_javascript.html | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/arrow-down.gif | Bin 0 -> 55 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/arrow-up.gif | Bin 0 -> 832 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading-small.gif | Bin 0 -> 3236 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading-thickbox.gif | Bin 0 -> 5886 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading.gif | Bin 0 -> 8266 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_easing.html | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_flexible.html | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_textscroller.html | 192 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_textscroller.php | 15 +++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_thickbox.html | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_auto.html | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_callbacks.html | 235 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_circular.html | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_controls.html | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_multiple.html | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_simple.html | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_start.html | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_vertical.html | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/thickbox/thickbox.css | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/examples/thickbox/thickbox.js | 296 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/img/a12.png | Bin 0 -> 2483 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/img/a14.png | Bin 0 -> 3536 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/img/a19.png | Bin 0 -> 4179 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/img/b05.png | Bin 0 -> 1415 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/img/b12.png | Bin 0 -> 891 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/img/b21.png | Bin 0 -> 864 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/img/pagination.png | Bin 0 -> 1080 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/index.html | 516 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/arrows_left.png | Bin 0 -> 3045 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/arrows_right.png | Bin 0 -> 3041 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/credits.txt | 1 + frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next-horizontal.png | Bin 0 -> 4375 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next-vertical.png | Bin 0 -> 3817 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next.jpg | Bin 0 -> 710 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next.png | Bin 0 -> 755 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev-horizontal.png | Bin 0 -> 4322 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev-vertical.png | Bin 0 -> 3962 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev.jpg | Bin 0 -> 689 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev.png | Bin 0 -> 769 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/skin.css | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/skin2.css | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_next.png | Bin 0 -> 1055 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_next2.png | Bin 0 -> 1030 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_prev.png | Bin 0 -> 1039 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_prev2.png | Bin 0 -> 1030 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/credits.txt | 1 + frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading-small.gif | Bin 0 -> 3236 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading.gif | Bin 0 -> 8266 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading_small.gif | Bin 0 -> 3208 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/next-horizontal.gif | Bin 0 -> 3530 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/prev-horizontal.gif | Bin 0 -> 3517 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/skin.css | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/arrows_left.png | Bin 0 -> 3045 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/arrows_right.png | Bin 0 -> 3041 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/credits.txt | 1 + frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next-horizontal.png | Bin 0 -> 4375 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next-vertical.png | Bin 0 -> 3817 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next.jpg | Bin 0 -> 710 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next.png | Bin 0 -> 755 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev-horizontal.png | Bin 0 -> 4322 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev-vertical.png | Bin 0 -> 3962 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev.jpg | Bin 0 -> 689 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev.png | Bin 0 -> 769 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/skin.css | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/skin2.css | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_next.png | Bin 0 -> 1055 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_next2.png | Bin 0 -> 1030 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_prev.png | Bin 0 -> 1039 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_prev2.png | Bin 0 -> 1030 bytes frontend/web/js/widget-carousel/FILTER_SLIDER/style.css | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/FILTER_SLIDER/style.js | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/README | 7 +++++++ frontend/web/js/widget-carousel/HOME_SLIDER/changelog.html | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax.html | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax.txt | 10 ++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax_php.html | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax_php.php | 43 +++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_api.html | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_api.php | 29 +++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_feed.html | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_feed.php | 14 ++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_javascript.html | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/arrow-down.gif | Bin 0 -> 55 bytes frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/arrow-up.gif | Bin 0 -> 832 bytes frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading-small.gif | Bin 0 -> 3236 bytes frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading-thickbox.gif | Bin 0 -> 5886 bytes frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading.gif | Bin 0 -> 8266 bytes frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_easing.html | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_flexible.html | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_textscroller.html | 192 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_textscroller.php | 15 +++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_thickbox.html | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_auto.html | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_callbacks.html | 235 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_circular.html | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_controls.html | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_multiple.html | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_simple.html | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_start.html | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_vertical.html | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/thickbox/thickbox.css | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/examples/thickbox/thickbox.js | 296 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/img/a12.png | Bin 0 -> 2483 bytes frontend/web/js/widget-carousel/HOME_SLIDER/img/a14.png | Bin 0 -> 3536 bytes frontend/web/js/widget-carousel/HOME_SLIDER/img/a19.png | Bin 0 -> 4179 bytes frontend/web/js/widget-carousel/HOME_SLIDER/img/b05.png | Bin 0 -> 1415 bytes frontend/web/js/widget-carousel/HOME_SLIDER/img/b12.png | Bin 0 -> 891 bytes frontend/web/js/widget-carousel/HOME_SLIDER/img/b21.png | Bin 0 -> 864 bytes frontend/web/js/widget-carousel/HOME_SLIDER/img/pagination.png | Bin 0 -> 1080 bytes frontend/web/js/widget-carousel/HOME_SLIDER/index.html | 516 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/arrows_left.png | Bin 0 -> 3045 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/arrows_right.png | Bin 0 -> 3041 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/credits.txt | 1 + frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next-horizontal.png | Bin 0 -> 4375 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next-vertical.png | Bin 0 -> 3817 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next.jpg | Bin 0 -> 710 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next.png | Bin 0 -> 755 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev-horizontal.png | Bin 0 -> 4322 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev-vertical.png | Bin 0 -> 3962 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev.jpg | Bin 0 -> 689 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev.png | Bin 0 -> 769 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/skin.css | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/skin2.css | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_next.png | Bin 0 -> 1055 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_next2.png | Bin 0 -> 1030 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_prev.png | Bin 0 -> 1039 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_prev2.png | Bin 0 -> 1030 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/credits.txt | 1 + frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading-small.gif | Bin 0 -> 3236 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading.gif | Bin 0 -> 8266 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading_small.gif | Bin 0 -> 3208 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/next-horizontal.gif | Bin 0 -> 3530 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/prev-horizontal.gif | Bin 0 -> 3517 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/skin.css | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/arrows_left.png | Bin 0 -> 3045 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/arrows_right.png | Bin 0 -> 3041 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/credits.txt | 1 + frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next-horizontal.png | Bin 0 -> 4375 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next-vertical.png | Bin 0 -> 3817 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next.jpg | Bin 0 -> 710 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next.png | Bin 0 -> 755 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev-horizontal.png | Bin 0 -> 4322 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev-vertical.png | Bin 0 -> 3962 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev.jpg | Bin 0 -> 689 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev.png | Bin 0 -> 769 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/skin.css | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/skin2.css | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_next.png | Bin 0 -> 1055 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_next2.png | Bin 0 -> 1030 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_prev.png | Bin 0 -> 1039 bytes frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_prev2.png | Bin 0 -> 1030 bytes frontend/web/js/widget-carousel/HOME_SLIDER/style.css | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/HOME_SLIDER/style.js | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/lib/jquery-1.4.2.min.js | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/lib/jquery.jcarousel.js | 1057 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/js/widget-carousel/lib/jquery.jcarousel.min.js | 2 ++ frontend/web/libraries/aaa.php | 7 +++++++ frontend/web/libraries/ion/css/ion.rangeSlider.skinFlat.css | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/libraries/ion/css/ion.rangeSlider.skinModern.css | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/libraries/ion/css/ion.rangeSlider.skinNice.css | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/libraries/ion/css/ion.rangeSlider.skinSimple.css | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/libraries/ion/css/normalize.css | 427 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/libraries/ion/img/sprite-skin-flat.png | Bin 0 -> 304 bytes frontend/web/libraries/ion/img/sprite-skin-modern.png | Bin 0 -> 505 bytes frontend/web/libraries/ion/img/sprite-skin-nice.png | Bin 0 -> 694 bytes frontend/web/libraries/ion/img/sprite-skin-simple.png | Bin 0 -> 358 bytes frontend/web/libraries/ion/js/ion.rangeSlider.min.js | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/robots.txt | 15 +++++++++++++++ frontend/web/updatemods/counter.txt | 1 + frontend/web/updatemods/cr.php | 279 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/web/updatemods/mysql.class.php | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/widgets/BannerWidget.php | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/widgets/Rubrics.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/widgets/Seo.php | 384 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/widgets/Slider.php | 30 ++++++++++++++++++++++++++++++ frontend/widgets/SliderWidget.php | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ frontend/widgets/views/rubrics.php | 15 +++++++++++++++ frontend/widgets/views/slider.php | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/.htaccess | 6 ++++++ generator/changelog.txt | 281 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/data/.htaccess | 6 ++++++ generator/data/crawl_dump.log | Bin 0 -> 457959 bytes generator/data/generator.conf | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/data/placeholder.txt | 1 + generator/data/sess_bprm9p4fl503nhno9tstadlbq1 | 1 + generator/default.conf | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/documentation.html | 330 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/howto-install.pdf | Bin 0 -> 419122 bytes generator/index.php | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/license.html | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/class.gping.inc.php | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/class.grab.inc.php | 2189 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/class.html-creator.inc.php | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/class.http.inc.php | 218 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/class.mail.inc.php | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/class.templates.inc.php | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/class.utils.inc.php | 203 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/class.xml-creator.inc.php | 532 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/mods/extra_embedplayer.inc.php | 40 ++++++++++++++++++++++++++++++++++++++++ generator/pages/mods/extra_flvplayer.inc.php | 34 ++++++++++++++++++++++++++++++++++ generator/pages/mods/extra_srcvideo.inc.php | 30 ++++++++++++++++++++++++++++++ generator/pages/mods/extra_swfobject.inc.php | 32 ++++++++++++++++++++++++++++++++ generator/pages/mods/extra_swfplayer.inc.php | 32 ++++++++++++++++++++++++++++++++ generator/pages/mods/extra_videoplayer.inc.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/mods/extra_xmlphp.inc.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/mods/mobile.inc.php | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/mods/sitemap.xsl | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/mods/sitemap_base_tpl.xml | 14 ++++++++++++++ generator/pages/mods/sitemap_index_tpl.xml | 14 ++++++++++++++ generator/pages/mods/sitemap_mob_tpl.xml | 11 +++++++++++ generator/pages/mods/sitemap_nb.xsl | 199 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/mods/sitemap_notify.txt | 42 ++++++++++++++++++++++++++++++++++++++++++ generator/pages/mods/sitemap_ping.txt | 6 ++++++ generator/pages/mods/sitemap_ror_tpl.xml | 17 +++++++++++++++++ generator/pages/mods/sitemap_rss_tpl.xml | 23 +++++++++++++++++++++++ generator/pages/mods/sitemap_tpl.html | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/mods/sitemap_xml_tpl.xml | 45 +++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-analyze.inc.php | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-bottom.inc.php | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-chlog.inc.php | 279 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-config.inc.php | 639 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-configinit.inc.php | 209 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-crawl.inc.php | 282 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-crawlproc.inc.php | 311 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-ext.inc.php | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-generator.inc.php | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-l404.inc.php | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-login.inc.php | 225 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-reflinks.inc.php | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-sitemap-detail.inc.php | 264 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-top.inc.php | 248 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/page-view.inc.php | 220 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/style.css | 210 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/pages/xmlsitemaps-logo.gif | Bin 0 -> 1802 bytes generator/runcrawl.php | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ init | 213 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ init.bat | 20 ++++++++++++++++++++ requirements.php | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ror.xml | 0 sitemap.xml | 0 test.php | 2 ++ test.txt | 1 + tests/README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/_bootstrap.php | 2 ++ tests/_data/dump.sql | 1 + tests/_output/.gitignore | 2 ++ tests/_support/AcceptanceTester.php | 26 ++++++++++++++++++++++++++ tests/_support/FunctionalTester.php | 26 ++++++++++++++++++++++++++ tests/_support/Helper/Acceptance.php | 10 ++++++++++ tests/_support/Helper/Functional.php | 10 ++++++++++ tests/_support/Helper/Unit.php | 10 ++++++++++ tests/_support/UnitTester.php | 26 ++++++++++++++++++++++++++ tests/_support/_generated/AcceptanceTesterActions.php | 2686 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/_support/_generated/FunctionalTesterActions.php | 18 ++++++++++++++++++ tests/_support/_generated/UnitTesterActions.php | 344 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/acceptance.suite.yml | 13 +++++++++++++ tests/acceptance/SmokeTestCept.php | 22 ++++++++++++++++++++++ tests/acceptance/_bootstrap.php | 2 ++ tests/codeception.yml | 11 +++++++++++ tests/codeception/_output/.gitignore | 2 ++ tests/codeception/backend/.gitignore | 4 ++++ tests/codeception/backend/_bootstrap.php | 23 +++++++++++++++++++++++ tests/codeception/backend/_output/.gitignore | 2 ++ tests/codeception/backend/acceptance.suite.yml | 28 ++++++++++++++++++++++++++++ tests/codeception/backend/acceptance/LoginCept.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ tests/codeception/backend/acceptance/_bootstrap.php | 2 ++ tests/codeception/backend/codeception.yml | 17 +++++++++++++++++ tests/codeception/backend/functional.suite.yml | 17 +++++++++++++++++ tests/codeception/backend/functional/LoginCept.php | 30 ++++++++++++++++++++++++++++++ tests/codeception/backend/functional/_bootstrap.php | 2 ++ tests/codeception/backend/unit.suite.yml | 6 ++++++ tests/codeception/backend/unit/DbTestCase.php | 8 ++++++++ tests/codeception/backend/unit/TestCase.php | 8 ++++++++ tests/codeception/backend/unit/_bootstrap.php | 2 ++ tests/codeception/backend/unit/fixtures/data/.gitkeep | 0 tests/codeception/bin/_bootstrap.php | 19 +++++++++++++++++++ tests/codeception/bin/yii | 23 +++++++++++++++++++++++ tests/codeception/bin/yii.bat | 20 ++++++++++++++++++++ tests/codeception/common/.gitignore | 4 ++++ tests/codeception/common/_bootstrap.php | 15 +++++++++++++++ tests/codeception/common/_output/.gitignore | 2 ++ tests/codeception/common/_pages/LoginPage.php | 25 +++++++++++++++++++++++++ tests/codeception/common/_support/FixtureHelper.php | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/codeception/common/codeception.yml | 13 +++++++++++++ tests/codeception/common/fixtures/UserFixture.php | 13 +++++++++++++ tests/codeception/common/fixtures/data/init_login.php | 14 ++++++++++++++ tests/codeception/common/templates/fixtures/user.php | 17 +++++++++++++++++ tests/codeception/common/unit.suite.yml | 6 ++++++ tests/codeception/common/unit/DbTestCase.php | 11 +++++++++++ tests/codeception/common/unit/TestCase.php | 11 +++++++++++ tests/codeception/common/unit/_bootstrap.php | 2 ++ tests/codeception/common/unit/fixtures/data/models/user.php | 14 ++++++++++++++ tests/codeception/common/unit/models/LoginFormTest.php | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/codeception/config/acceptance.php | 7 +++++++ tests/codeception/config/backend/acceptance.php | 17 +++++++++++++++++ tests/codeception/config/backend/config.php | 5 +++++ tests/codeception/config/backend/functional.php | 18 ++++++++++++++++++ tests/codeception/config/backend/unit.php | 16 ++++++++++++++++ tests/codeception/config/common/unit.php | 14 ++++++++++++++ tests/codeception/config/config.php | 26 ++++++++++++++++++++++++++ tests/codeception/config/console/unit.php | 14 ++++++++++++++ tests/codeception/config/frontend/acceptance.php | 17 +++++++++++++++++ tests/codeception/config/frontend/config.php | 5 +++++ tests/codeception/config/frontend/functional.php | 18 ++++++++++++++++++ tests/codeception/config/frontend/unit.php | 16 ++++++++++++++++ tests/codeception/config/functional.php | 18 ++++++++++++++++++ tests/codeception/config/unit.php | 7 +++++++ tests/codeception/console/.gitignore | 2 ++ tests/codeception/console/_bootstrap.php | 16 ++++++++++++++++ tests/codeception/console/_output/.gitignore | 2 ++ tests/codeception/console/codeception.yml | 13 +++++++++++++ tests/codeception/console/unit.suite.yml | 6 ++++++ tests/codeception/console/unit/DbTestCase.php | 11 +++++++++++ tests/codeception/console/unit/TestCase.php | 11 +++++++++++ tests/codeception/console/unit/_bootstrap.php | 2 ++ tests/codeception/console/unit/fixtures/data/.gitkeep | 0 tests/codeception/frontend/.gitignore | 4 ++++ tests/codeception/frontend/_bootstrap.php | 23 +++++++++++++++++++++++ tests/codeception/frontend/_output/.gitignore | 2 ++ tests/codeception/frontend/_pages/AboutPage.php | 14 ++++++++++++++ tests/codeception/frontend/_pages/ContactPage.php | 26 ++++++++++++++++++++++++++ tests/codeception/frontend/_pages/SignupPage.php | 27 +++++++++++++++++++++++++++ tests/codeception/frontend/acceptance.suite.yml | 28 ++++++++++++++++++++++++++++ tests/codeception/frontend/acceptance/AboutCept.php | 10 ++++++++++ tests/codeception/frontend/acceptance/ContactCept.php | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/codeception/frontend/acceptance/HomeCept.php | 12 ++++++++++++ tests/codeception/frontend/acceptance/LoginCept.php | 34 ++++++++++++++++++++++++++++++++++ tests/codeception/frontend/acceptance/SignupCest.php | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/codeception/frontend/acceptance/_bootstrap.php | 2 ++ tests/codeception/frontend/codeception.yml | 17 +++++++++++++++++ tests/codeception/frontend/functional.suite.yml | 17 +++++++++++++++++ tests/codeception/frontend/functional/AboutCept.php | 10 ++++++++++ tests/codeception/frontend/functional/ContactCept.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ tests/codeception/frontend/functional/HomeCept.php | 12 ++++++++++++ tests/codeception/frontend/functional/LoginCept.php | 29 +++++++++++++++++++++++++++++ tests/codeception/frontend/functional/SignupCest.php | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/codeception/frontend/functional/_bootstrap.php | 3 +++ tests/codeception/frontend/unit.suite.yml | 6 ++++++ tests/codeception/frontend/unit/DbTestCase.php | 11 +++++++++++ tests/codeception/frontend/unit/TestCase.php | 11 +++++++++++ tests/codeception/frontend/unit/_bootstrap.php | 2 ++ tests/codeception/frontend/unit/fixtures/data/models/user.php | 23 +++++++++++++++++++++++ tests/codeception/frontend/unit/models/ContactFormTest.php | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/codeception/frontend/unit/models/PasswordResetRequestFormTest.php | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/codeception/frontend/unit/models/ResetPasswordFormTest.php | 43 +++++++++++++++++++++++++++++++++++++++++++ tests/codeception/frontend/unit/models/SignupFormTest.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/functional.suite.yml | 11 +++++++++++ tests/functional/_bootstrap.php | 2 ++ tests/unit.suite.yml | 9 +++++++++ tests/unit/SmokeTestCept.php | 3 +++ tests/unit/_bootstrap.php | 2 ++ yii.bat | 20 ++++++++++++++++++++ 1232 files changed, 85997 insertions(+), 0 deletions(-) create mode 100755 .bowerrc create mode 100755 .gitignore create mode 100755 .htaccess create mode 100755 LICENSE.md create mode 100755 README.md create mode 100755 backend/assets/AdminLteAsset.php create mode 100755 backend/assets/AppAsset.php create mode 100755 backend/assets/FontAwesomeAsset.php create mode 100755 backend/config/.gitignore create mode 100755 backend/config/bootstrap.php create mode 100755 backend/config/main.php create mode 100755 backend/config/params.php create mode 100755 backend/controllers/ArticlesController.php create mode 100755 backend/controllers/BannerController.php create mode 100755 backend/controllers/BgController.php create mode 100755 backend/controllers/BlogController.php create mode 100755 backend/controllers/BrandController.php create mode 100755 backend/controllers/CategoryController.php create mode 100755 backend/controllers/CommentController.php create mode 100755 backend/controllers/CustomerController.php create mode 100755 backend/controllers/EventController.php create mode 100755 backend/controllers/OrdersController.php create mode 100755 backend/controllers/PageController.php create mode 100755 backend/controllers/SeoCategoryController.php create mode 100755 backend/controllers/SeoController.php create mode 100755 backend/controllers/SeoDynamicController.php create mode 100755 backend/controllers/ServiceController.php create mode 100755 backend/controllers/SiteController.php create mode 100755 backend/controllers/SliderController.php create mode 100755 backend/controllers/SliderImageController.php create mode 100755 backend/controllers/SubscribeController.php create mode 100755 backend/controllers/UserController.php create mode 100755 backend/models/.gitkeep create mode 100755 backend/models/CommentSearch.php create mode 100755 backend/models/Label.php create mode 100755 backend/models/LoginForm.php create mode 100755 backend/models/Orders.php create mode 100755 backend/models/OrdersProducts.php create mode 100755 backend/models/OrdersSearch.php create mode 100755 backend/models/User.php create mode 100755 backend/models/UserSearch.php create mode 100755 backend/views/articles/_form.php create mode 100755 backend/views/articles/_search.php create mode 100755 backend/views/articles/create.php create mode 100755 backend/views/articles/index.php create mode 100755 backend/views/articles/update.php create mode 100755 backend/views/articles/view.php create mode 100755 backend/views/banner/_form.php create mode 100755 backend/views/banner/_search.php create mode 100755 backend/views/banner/create.php create mode 100755 backend/views/banner/index.php create mode 100755 backend/views/banner/update.php create mode 100755 backend/views/banner/view.php create mode 100755 backend/views/bg/_form.php create mode 100755 backend/views/bg/_search.php create mode 100755 backend/views/bg/create.php create mode 100755 backend/views/bg/index.php create mode 100755 backend/views/bg/update.php create mode 100755 backend/views/bg/view.php create mode 100755 backend/views/blog/_form.php create mode 100755 backend/views/blog/_search.php create mode 100755 backend/views/blog/create.php create mode 100755 backend/views/blog/index.php create mode 100755 backend/views/blog/update.php create mode 100755 backend/views/blog/view.php create mode 100755 backend/views/brand/_form.php create mode 100755 backend/views/brand/_search.php create mode 100755 backend/views/brand/create.php create mode 100755 backend/views/brand/index.php create mode 100755 backend/views/brand/update.php create mode 100755 backend/views/brand/view.php create mode 100755 backend/views/category/_form.php create mode 100755 backend/views/category/_search.php create mode 100755 backend/views/category/create.php create mode 100755 backend/views/category/index.php create mode 100755 backend/views/category/update.php create mode 100755 backend/views/category/view.php create mode 100755 backend/views/comment/_form.php create mode 100755 backend/views/comment/_search.php create mode 100755 backend/views/comment/index.php create mode 100755 backend/views/comment/update.php create mode 100755 backend/views/comment/view.php create mode 100755 backend/views/customer/_form.php create mode 100755 backend/views/customer/_search.php create mode 100755 backend/views/customer/create.php create mode 100755 backend/views/customer/index.php create mode 100755 backend/views/customer/update.php create mode 100755 backend/views/customer/view.php create mode 100755 backend/views/event/_form.php create mode 100755 backend/views/event/_search.php create mode 100755 backend/views/event/create.php create mode 100755 backend/views/event/index.php create mode 100755 backend/views/event/update.php create mode 100755 backend/views/event/view.php create mode 100755 backend/views/layouts/admin.php create mode 100755 backend/views/layouts/control-sidebar.php create mode 100755 backend/views/layouts/footer.php create mode 100755 backend/views/layouts/header.php create mode 100755 backend/views/layouts/main-sidebar.php create mode 100755 backend/views/layouts/main.php create mode 100755 backend/views/layouts/none.php create mode 100755 backend/views/orders/_form.php create mode 100755 backend/views/orders/add.php create mode 100755 backend/views/orders/create.php create mode 100755 backend/views/orders/index.php create mode 100755 backend/views/orders/show.php create mode 100755 backend/views/orders/update.php create mode 100755 backend/views/page/_form.php create mode 100755 backend/views/page/_search.php create mode 100755 backend/views/page/create.php create mode 100755 backend/views/page/index.php create mode 100755 backend/views/page/update.php create mode 100755 backend/views/page/view.php create mode 100755 backend/views/seo-category/_form.php create mode 100755 backend/views/seo-category/_search.php create mode 100755 backend/views/seo-category/create.php create mode 100755 backend/views/seo-category/index.php create mode 100755 backend/views/seo-category/update.php create mode 100755 backend/views/seo-category/view.php create mode 100755 backend/views/seo-dynamic/_form.php create mode 100755 backend/views/seo-dynamic/_search.php create mode 100755 backend/views/seo-dynamic/create.php create mode 100755 backend/views/seo-dynamic/index.php create mode 100755 backend/views/seo-dynamic/update.php create mode 100755 backend/views/seo-dynamic/view.php create mode 100755 backend/views/seo/_form.php create mode 100755 backend/views/seo/_search.php create mode 100755 backend/views/seo/create.php create mode 100755 backend/views/seo/index.php create mode 100755 backend/views/seo/update.php create mode 100755 backend/views/seo/view.php create mode 100755 backend/views/service/_form.php create mode 100755 backend/views/service/_search.php create mode 100755 backend/views/service/create.php create mode 100755 backend/views/service/index.php create mode 100755 backend/views/service/update.php create mode 100755 backend/views/service/view.php create mode 100755 backend/views/site/error.php create mode 100755 backend/views/site/index.php create mode 100755 backend/views/site/login.php create mode 100755 backend/views/slider-image/_form.php create mode 100755 backend/views/slider-image/_search.php create mode 100755 backend/views/slider-image/create.php create mode 100755 backend/views/slider-image/index.php create mode 100755 backend/views/slider-image/update.php create mode 100755 backend/views/slider-image/view.php create mode 100755 backend/views/slider/_form.php create mode 100755 backend/views/slider/_search.php create mode 100755 backend/views/slider/create.php create mode 100755 backend/views/slider/index.php create mode 100755 backend/views/slider/update.php create mode 100755 backend/views/slider/view.php create mode 100755 backend/views/subscribe/_form.php create mode 100755 backend/views/subscribe/_search.php create mode 100755 backend/views/subscribe/create.php create mode 100755 backend/views/subscribe/index.php create mode 100755 backend/views/subscribe/update.php create mode 100755 backend/views/subscribe/view.php create mode 100755 backend/views/user/_form.php create mode 100755 backend/views/user/_search.php create mode 100755 backend/views/user/create.php create mode 100755 backend/views/user/index.php create mode 100755 backend/views/user/update.php create mode 100755 backend/views/user/view.php create mode 100755 backend/web/.gitignore create mode 100755 backend/web/css/site.css create mode 100755 backend/web/favicon.ico create mode 100755 backend/web/js/fieldWidget.js create mode 100755 backend/web/js/site.js create mode 100755 backend/web/robots.txt create mode 100755 codeception.yml create mode 100755 common/behaviors/ArtBoxAccessBehavior.php create mode 100755 common/behaviors/NotifyBehavior.php create mode 100755 common/behaviors/RatingBehavior.php create mode 100755 common/behaviors/RuSlug.php create mode 100755 common/behaviors/ShowImage.php create mode 100755 common/behaviors/Slug.php create mode 100755 common/components/Request.php create mode 100755 common/components/SmsSender.php create mode 100755 common/components/artboximage/ArtboxImage.php create mode 100755 common/components/artboximage/ArtboxImageBehavior.php create mode 100755 common/components/artboximage/ArtboxImageHelper.php create mode 100755 common/components/artboxtree/ArtboxTreeBehavior.php create mode 100755 common/components/artboxtree/ArtboxTreeHelper.php create mode 100755 common/components/artboxtree/ArtboxTreeQueryTrait.php create mode 100755 common/components/artboxtree/ArtboxTreeWidget.php create mode 100755 common/components/artboxtree/treegrid/TreeGridColumn.php create mode 100755 common/components/artboxtree/treegrid/TreeGridWidget.php create mode 100755 common/components/artboxtree/treelist/TreeListWidget.php create mode 100755 common/components/artboxtree/treemenu/TreeMenuWidget.php create mode 100755 common/components/urlManager/.htaccess create mode 100755 common/components/urlManager/LangRequest.php create mode 100755 common/components/urlManager/LangUrlManager.php create mode 100755 common/components/urlManager/LangUrlRule.php create mode 100755 common/config/.gitignore create mode 100755 common/config/bootstrap.php create mode 100755 common/config/main.php create mode 100755 common/config/params.php create mode 100755 common/mail/layouts/html.php create mode 100755 common/mail/layouts/text.php create mode 100755 common/mail/passwordResetToken-html.php create mode 100755 common/mail/passwordResetToken-text.php create mode 100755 common/models/ArticleToRating.php create mode 100755 common/models/Articles.php create mode 100755 common/models/ArticlesSearch.php create mode 100755 common/models/Banner.php create mode 100755 common/models/BannerSearch.php create mode 100755 common/models/Bg.php create mode 100755 common/models/BgSearch.php create mode 100755 common/models/Blog.php create mode 100755 common/models/BlogSearch.php create mode 100755 common/models/Customer.php create mode 100755 common/models/CustomerSearch.php create mode 100755 common/models/Delivery.php create mode 100755 common/models/Event.php create mode 100755 common/models/EventSearch.php create mode 100755 common/models/Fields.php create mode 100755 common/models/LoginForm.php create mode 100755 common/models/Orders.php create mode 100755 common/models/OrdersProducts.php create mode 100755 common/models/OrdersSearch.php create mode 100755 common/models/Page.php create mode 100755 common/models/PageSearch.php create mode 100755 common/models/ProductToRating.php create mode 100755 common/models/Seo.php create mode 100755 common/models/SeoCategory.php create mode 100755 common/models/SeoCategorySearch.php create mode 100755 common/models/SeoDynamic.php create mode 100755 common/models/SeoDynamicSearch.php create mode 100755 common/models/SeoSearch.php create mode 100755 common/models/Service.php create mode 100755 common/models/ServiceSearch.php create mode 100755 common/models/Share.php create mode 100755 common/models/Slider.php create mode 100755 common/models/SliderImage.php create mode 100755 common/models/SliderImageSearch.php create mode 100755 common/models/SliderSearch.php create mode 100755 common/models/Subscribe.php create mode 100755 common/models/SubscribeSearch.php create mode 100755 common/models/TemplateLocation.php create mode 100755 common/models/TemplateLocationSearch.php create mode 100755 common/models/User.php create mode 100755 common/modules/artboxfile/Module.php create mode 100755 common/modules/artboxfile/config.php create mode 100755 common/modules/artboxfile/controllers/ActionController.php create mode 100755 common/modules/artboxfile/models/File.php create mode 100755 common/modules/blog/Module.php create mode 100755 common/modules/blog/behaviors/Autocomplete.php create mode 100755 common/modules/blog/config.php create mode 100755 common/modules/blog/controllers/AjaxController.php create mode 100755 common/modules/blog/controllers/ArticleController.php create mode 100755 common/modules/blog/controllers/CategoryController.php create mode 100755 common/modules/blog/controllers/DefaultController.php create mode 100755 common/modules/blog/controllers/MediaController.php create mode 100755 common/modules/blog/controllers/TestController.php create mode 100755 common/modules/blog/models/Article.php create mode 100755 common/modules/blog/models/ArticleCategory.php create mode 100755 common/modules/blog/models/ArticleCategoryLang.php create mode 100755 common/modules/blog/models/ArticleCategoryMedia.php create mode 100755 common/modules/blog/models/ArticleLang.php create mode 100755 common/modules/blog/models/ArticleMedia.php create mode 100755 common/modules/blog/models/ArticleToCategory.php create mode 100755 common/modules/blog/views/ajax/_article_form.php create mode 100755 common/modules/blog/views/ajax/_article_form_test.php create mode 100755 common/modules/blog/views/ajax/_article_media_form.php create mode 100755 common/modules/blog/views/ajax/_category_form.php create mode 100755 common/modules/blog/views/article/_form.php create mode 100755 common/modules/blog/views/article/create.php create mode 100755 common/modules/blog/views/article/index.php create mode 100755 common/modules/blog/views/article/update.php create mode 100755 common/modules/blog/views/category/_form.php create mode 100755 common/modules/blog/views/category/create.php create mode 100755 common/modules/blog/views/category/index.php create mode 100755 common/modules/blog/views/category/update.php create mode 100755 common/modules/blog/views/default/index.php create mode 100755 common/modules/blog/views/media/index.php create mode 100755 common/modules/blog/views/test/index.php create mode 100755 common/modules/comment/Module.php create mode 100755 common/modules/comment/assets/CommentAsset.php create mode 100755 common/modules/comment/behaviors/ParentBehavior.php create mode 100755 common/modules/comment/controllers/DefaultController.php create mode 100755 common/modules/comment/controllers/ManageController.php create mode 100755 common/modules/comment/messages/config.php create mode 100755 common/modules/comment/messages/en/artbox-comment.php create mode 100755 common/modules/comment/messages/ru/artbox-comment.php create mode 100755 common/modules/comment/migrations/m160724_162347_artbox_comment.php create mode 100755 common/modules/comment/migrations/m160726_092634_add_entity_fields.php create mode 100755 common/modules/comment/migrations/m160726_211227_create_artbox_comment_rating.php create mode 100755 common/modules/comment/models/CommentModel.php create mode 100755 common/modules/comment/models/CommentModelSearch.php create mode 100755 common/modules/comment/models/LikeModel.php create mode 100755 common/modules/comment/models/RatingModel.php create mode 100755 common/modules/comment/models/interfaces/CommentInterface.php create mode 100755 common/modules/comment/resources/artbox_comment.css create mode 100755 common/modules/comment/resources/artbox_comment.js create mode 100755 common/modules/comment/resources/delete.gif create mode 100755 common/modules/comment/resources/jquery.rateit.min.js create mode 100755 common/modules/comment/resources/rateit.css create mode 100755 common/modules/comment/resources/star.gif create mode 100755 common/modules/comment/todo create mode 100755 common/modules/comment/views/artbox_comment_form.php create mode 100755 common/modules/comment/views/artbox_comment_item.php create mode 100755 common/modules/comment/views/artbox_comment_list.php create mode 100755 common/modules/comment/views/artbox_comment_reply.php create mode 100755 common/modules/comment/views/manage/index.php create mode 100755 common/modules/comment/views/manage/update.php create mode 100755 common/modules/comment/widgets/CommentWidget.php create mode 100755 common/modules/file/FileUploadAsset.php create mode 100755 common/modules/file/Module.php create mode 100755 common/modules/file/assets/css/fileupload/style.css create mode 100755 common/modules/file/assets/css/jquery.fileupload-noscript.css create mode 100755 common/modules/file/assets/css/jquery.fileupload-ui-noscript.css create mode 100755 common/modules/file/assets/css/jquery.fileupload-ui.css create mode 100755 common/modules/file/assets/css/jquery.fileupload.css create mode 100755 common/modules/file/assets/img/loading.gif create mode 100755 common/modules/file/assets/img/progressbar.gif create mode 100755 common/modules/file/assets/js/cors/jquery.postmessage-transport.js create mode 100755 common/modules/file/assets/js/cors/jquery.xdr-transport.js create mode 100755 common/modules/file/assets/js/jquery.fileupload-angular.js create mode 100755 common/modules/file/assets/js/jquery.fileupload-audio.js create mode 100755 common/modules/file/assets/js/jquery.fileupload-image.js create mode 100755 common/modules/file/assets/js/jquery.fileupload-jquery-ui.js create mode 100755 common/modules/file/assets/js/jquery.fileupload-process.js create mode 100755 common/modules/file/assets/js/jquery.fileupload-ui.js create mode 100755 common/modules/file/assets/js/jquery.fileupload-validate.js create mode 100755 common/modules/file/assets/js/jquery.fileupload-video.js create mode 100755 common/modules/file/assets/js/jquery.fileupload.js create mode 100755 common/modules/file/assets/js/jquery.iframe-transport.js create mode 100755 common/modules/file/assets/js/vendor/jquery.ui.widget.js create mode 100755 common/modules/file/config.php create mode 100755 common/modules/file/controllers/UploaderController.php create mode 100755 common/modules/file/models/ImageSizerForm.php create mode 100755 common/modules/file/views/_gallery_item.php create mode 100755 common/modules/file/views/_one_item.php create mode 100755 common/modules/file/widgets/ImageUploader.php create mode 100755 common/modules/file/widgets/views/image_sizer.php create mode 100755 common/modules/product/CatalogUrlManager.php create mode 100755 common/modules/product/Module.php create mode 100755 common/modules/product/behaviors/FilterBehavior.php create mode 100755 common/modules/product/config.php create mode 100755 common/modules/product/controllers/DefaultController.php create mode 100755 common/modules/product/controllers/ManageController.php create mode 100755 common/modules/product/controllers/ProductUnitController.php create mode 100755 common/modules/product/controllers/ProductVariantTypeController.php create mode 100755 common/modules/product/controllers/VariantController.php create mode 100755 common/modules/product/helpers/FilterHelper.php create mode 100755 common/modules/product/helpers/ProductHelper.php create mode 100755 common/modules/product/models/Brand.php create mode 100755 common/modules/product/models/BrandName.php create mode 100755 common/modules/product/models/BrandQuery.php create mode 100755 common/modules/product/models/BrandSearch.php create mode 100755 common/modules/product/models/Category.php create mode 100755 common/modules/product/models/CategoryName.php create mode 100755 common/modules/product/models/CategoryQuery.php create mode 100755 common/modules/product/models/CategorySearch.php create mode 100755 common/modules/product/models/Export.php create mode 100755 common/modules/product/models/Import.php create mode 100755 common/modules/product/models/Product.php create mode 100755 common/modules/product/models/ProductCategory.php create mode 100755 common/modules/product/models/ProductImage.php create mode 100755 common/modules/product/models/ProductImageQuery.php create mode 100755 common/modules/product/models/ProductOption.php create mode 100755 common/modules/product/models/ProductQuery.php create mode 100755 common/modules/product/models/ProductSearch.php create mode 100755 common/modules/product/models/ProductStock.php create mode 100755 common/modules/product/models/ProductUnit.php create mode 100755 common/modules/product/models/ProductUnitSearch.php create mode 100755 common/modules/product/models/ProductVariant.php create mode 100755 common/modules/product/models/ProductVariantListSearch.php create mode 100755 common/modules/product/models/ProductVariantOption.php create mode 100755 common/modules/product/models/ProductVariantQuery.php create mode 100755 common/modules/product/models/ProductVariantSearch.php create mode 100755 common/modules/product/models/ProductVariantType.php create mode 100755 common/modules/product/models/ProductVariantTypeSearch.php create mode 100755 common/modules/product/models/Stock.php create mode 100755 common/modules/product/models/StockQuery.php create mode 100755 common/modules/product/views/default/index.php create mode 100755 common/modules/product/views/manage/_form.php create mode 100755 common/modules/product/views/manage/_search.php create mode 100755 common/modules/product/views/manage/create.php create mode 100755 common/modules/product/views/manage/import-process.php create mode 100755 common/modules/product/views/manage/import.php create mode 100755 common/modules/product/views/manage/index.php create mode 100755 common/modules/product/views/manage/update.php create mode 100755 common/modules/product/views/manage/view.php create mode 100755 common/modules/product/views/product-unit/_form.php create mode 100755 common/modules/product/views/product-unit/_search.php create mode 100755 common/modules/product/views/product-unit/create.php create mode 100755 common/modules/product/views/product-unit/index.php create mode 100755 common/modules/product/views/product-unit/update.php create mode 100755 common/modules/product/views/product-unit/view.php create mode 100755 common/modules/product/views/product-variant-type/_form.php create mode 100755 common/modules/product/views/product-variant-type/_search.php create mode 100755 common/modules/product/views/product-variant-type/create.php create mode 100755 common/modules/product/views/product-variant-type/index.php create mode 100755 common/modules/product/views/product-variant-type/update.php create mode 100755 common/modules/product/views/product-variant-type/view.php create mode 100755 common/modules/product/views/variant/_form.php create mode 100755 common/modules/product/views/variant/_search.php create mode 100755 common/modules/product/views/variant/create.php create mode 100755 common/modules/product/views/variant/index.php create mode 100755 common/modules/product/views/variant/update.php create mode 100755 common/modules/product/views/variant/view.php create mode 100755 common/modules/product/widgets/brandsCarouselWidget.php create mode 100755 common/modules/product/widgets/catalogSubmenuWidget.php create mode 100755 common/modules/product/widgets/lastProducts.php create mode 100755 common/modules/product/widgets/similarProducts.php create mode 100755 common/modules/product/widgets/specialProducts.php create mode 100755 common/modules/product/widgets/views/brandsCarousel.php create mode 100755 common/modules/product/widgets/views/product_smart.php create mode 100755 common/modules/product/widgets/views/products_block.php create mode 100755 common/modules/product/widgets/views/submenu.php create mode 100755 common/modules/relation/Module.php create mode 100755 common/modules/relation/controllers/DefaultController.php create mode 100755 common/modules/relation/controllers/ManageController.php create mode 100755 common/modules/relation/models/Relation.php create mode 100755 common/modules/relation/models/RelationQuery.php create mode 100755 common/modules/relation/relationBehavior.php create mode 100755 common/modules/relation/relationHelper.php create mode 100755 common/modules/relation/relationObject.php create mode 100755 common/modules/relation/relationQueryTrait.php create mode 100755 common/modules/relation/views/default/index.php create mode 100755 common/modules/relation/views/manage/_form.php create mode 100755 common/modules/relation/views/manage/create.php create mode 100755 common/modules/relation/views/manage/pars.php create mode 100755 common/modules/relation/views/manage/relations.php create mode 100755 common/modules/relation/views/manage/update.php create mode 100755 common/modules/rubrication/Module.php create mode 100755 common/modules/rubrication/behaviors/ArtboxSynonymBehavior.php create mode 100755 common/modules/rubrication/controllers/DefaultController.php create mode 100755 common/modules/rubrication/controllers/TaxGroupController.php create mode 100755 common/modules/rubrication/controllers/TaxOptionController.php create mode 100755 common/modules/rubrication/helpers/RubricationHelper.php create mode 100755 common/modules/rubrication/models/TaxGroup.php create mode 100755 common/modules/rubrication/models/TaxGroupToGroup.php create mode 100755 common/modules/rubrication/models/TaxOption.php create mode 100755 common/modules/rubrication/models/TaxOptionQuery.php create mode 100755 common/modules/rubrication/models/TaxOptionRelation.php create mode 100755 common/modules/rubrication/models/TaxOptionSearch.php create mode 100755 common/modules/rubrication/models/TaxValueFloat.php create mode 100755 common/modules/rubrication/models/TaxValueInt.php create mode 100755 common/modules/rubrication/models/TaxValueLink.php create mode 100755 common/modules/rubrication/models/TaxValueString.php create mode 100755 common/modules/rubrication/views/default/index.php create mode 100755 common/modules/rubrication/views/tax-group/_form.php create mode 100755 common/modules/rubrication/views/tax-group/create.php create mode 100755 common/modules/rubrication/views/tax-group/index.php create mode 100755 common/modules/rubrication/views/tax-group/relations.php create mode 100755 common/modules/rubrication/views/tax-group/update.php create mode 100755 common/modules/rubrication/views/tax-group/view.php create mode 100755 common/modules/rubrication/views/tax-option/_form.php create mode 100755 common/modules/rubrication/views/tax-option/_search.php create mode 100755 common/modules/rubrication/views/tax-option/create.php create mode 100755 common/modules/rubrication/views/tax-option/index.php create mode 100755 common/modules/rubrication/views/tax-option/update.php create mode 100755 common/modules/rubrication/views/tax-option/value/_fields_float.php create mode 100755 common/modules/rubrication/views/tax-option/value/_fields_int.php create mode 100755 common/modules/rubrication/views/tax-option/value/_fields_link.php create mode 100755 common/modules/rubrication/views/tax-option/value/_fields_string.php create mode 100755 common/modules/rubrication/views/tax-option/view.php create mode 100755 common/translation/ru/app.php create mode 100755 common/translation/ru/product.php create mode 100755 common/widgets/Alert.php create mode 100755 common/widgets/BasketHead.php create mode 100755 common/widgets/BasketModal.php create mode 100755 common/widgets/FieldEditor.php create mode 100755 common/widgets/Mailer.php create mode 100755 common/widgets/views/basket_head.php create mode 100755 common/widgets/views/basket_modal.php create mode 100755 common/widgets/views/comment_notify.php create mode 100755 common/widgets/views/education_field.php create mode 100755 common/widgets/views/order.php create mode 100755 common/widgets/views/password.php create mode 100755 common/widgets/views/registration.php create mode 100755 common/widgets/views/test.php create mode 100755 composer.json create mode 100755 console/config/.gitignore create mode 100755 console/config/bootstrap.php create mode 100755 console/config/main.php create mode 100755 console/config/params.php create mode 100755 console/controllers/.gitkeep create mode 100755 console/controllers/ImportController.php create mode 100755 console/controllers/RbacController.php create mode 100755 console/migrations/m130524_201442_init.php create mode 100755 console/migrations/m160126_071717_rubrication.php create mode 100755 console/migrations/m160128_101543_fields.php create mode 100755 console/migrations/m160208_111900_blog.php create mode 100755 console/migrations/m160304_054017_realtion.php create mode 100755 console/migrations/m160304_065108_product.php create mode 100755 console/migrations/m160320_174258_customer.php create mode 100755 console/migrations/m160321_232402_orders1.php create mode 100755 console/migrations/m160323_234304_product_image.php create mode 100755 console/migrations/m160324_075409_product_option.php create mode 100755 console/migrations/m160324_114404_orders_items_items_fk.php create mode 100755 console/migrations/m160331_132149_slider.php create mode 100755 console/migrations/m160404_081649_banner.php create mode 100755 console/migrations/m160405_101056_create_slider_images.php create mode 100755 console/migrations/m160406_221846_create_page.php create mode 100755 console/migrations/m160407_185510_create_event.php create mode 100755 console/migrations/m160411_211053_create_service.php create mode 100755 console/migrations/m160411_215739_create_seo.php create mode 100755 console/migrations/m160412_133944_create_seo_category.php create mode 100755 console/migrations/m160413_112158_create_seo_dynamic.php create mode 100755 console/migrations/m160414_101644_add_param_to_seo_dynamic.php create mode 100755 console/migrations/m160414_214745_add_key_to_seo_dynamic.php create mode 100755 console/migrations/m160414_214746_add_level_to_tax_group.php create mode 100755 console/migrations/m160505_202248_bg.php create mode 100755 console/migrations/m160505_235100_page.php create mode 100755 console/migrations/m160509_121023_articles.php create mode 100755 console/migrations/m160509_214535_customer.php create mode 100755 console/migrations/m160509_231345_auth_assignment.php create mode 100755 console/migrations/m160512_153443_subscribe.php create mode 100755 console/migrations/m160516_222821_orders.php create mode 100755 console/migrations/m160516_234753_orders_delivery.php create mode 100755 console/migrations/m160517_072059_delete_product_fk.php create mode 100755 console/migrations/m160517_073502_orders_label.php create mode 100755 console/migrations/m160518_185644_change_order.php create mode 100755 console/migrations/m160721_152001_create_product_to_rating.php create mode 100755 console/migrations/m160722_150101_remove_product_option_option_fkey.php create mode 100755 console/migrations/m160722_150611_remove_product_variant_option_id.php create mode 100755 console/migrations/m160722_150612_remove_option_product_variant_id.php create mode 100755 console/migrations/m160725_154511_remove_product_option_product_fkey.php create mode 100755 console/migrations/m160725_155127_remove_product_stock_product_variant_id_fkey.php create mode 100755 console/migrations/m160804_100209_create_article_to_rating.php create mode 100755 console/migrations/m160810_074009_add_tax_option_sort.php create mode 100755 console/migrations/m160810_081231_add_tax_option_display.php create mode 100755 console/models/.gitkeep create mode 100755 console/runtime/.gitignore create mode 100755 environments/dev/backend/config/main-local.php create mode 100755 environments/dev/backend/config/params-local.php create mode 100755 environments/dev/backend/web/index-test.php create mode 100755 environments/dev/backend/web/index.php create mode 100755 environments/dev/common/config/main-local.php create mode 100755 environments/dev/common/config/params-local.php create mode 100755 environments/dev/console/config/main-local.php create mode 100755 environments/dev/console/config/params-local.php create mode 100755 environments/dev/frontend/config/main-local.php create mode 100755 environments/dev/frontend/config/params-local.php create mode 100755 environments/dev/frontend/web/index-test.php create mode 100755 environments/dev/frontend/web/index.php create mode 100755 environments/dev/yii create mode 100755 environments/index.php create mode 100755 environments/prod/backend/config/main-local.php create mode 100755 environments/prod/backend/config/params-local.php create mode 100755 environments/prod/backend/web/index.php create mode 100755 environments/prod/common/config/main-local.php create mode 100755 environments/prod/common/config/params-local.php create mode 100755 environments/prod/console/config/main-local.php create mode 100755 environments/prod/console/config/params-local.php create mode 100755 environments/prod/frontend/config/main-local.php create mode 100755 environments/prod/frontend/config/params-local.php create mode 100755 environments/prod/frontend/web/index.php create mode 100755 environments/prod/yii create mode 100755 frontend/assets/AppAsset.php create mode 100755 frontend/assets/IeAsset.php create mode 100755 frontend/components/BgWidget.php create mode 100755 frontend/components/HreflangWidget.php create mode 100755 frontend/components/SeoComponent.php create mode 100755 frontend/components/Text.php create mode 100755 frontend/config/.gitignore create mode 100755 frontend/config/bootstrap.php create mode 100755 frontend/config/main.php create mode 100755 frontend/config/params.php create mode 100755 frontend/controllers/ArticlesController.php create mode 100755 frontend/controllers/BasketController.php create mode 100755 frontend/controllers/CabinetController.php create mode 100755 frontend/controllers/CallController.php create mode 100755 frontend/controllers/CatalogController.php create mode 100755 frontend/controllers/EventController.php create mode 100755 frontend/controllers/IamController.php create mode 100755 frontend/controllers/LoginController.php create mode 100755 frontend/controllers/NewsController.php create mode 100755 frontend/controllers/PageController.php create mode 100755 frontend/controllers/PostController.php create mode 100755 frontend/controllers/ProductsController.php create mode 100755 frontend/controllers/RegController.php create mode 100755 frontend/controllers/SearchController.php create mode 100755 frontend/controllers/ServiceController.php create mode 100755 frontend/controllers/SiteController.php create mode 100755 frontend/controllers/SubscribeController.php create mode 100755 frontend/controllers/TextController.php create mode 100755 frontend/controllers/error_log create mode 100755 frontend/helpers/TextHelper.php create mode 100755 frontend/models/ContactForm.php create mode 100755 frontend/models/LoginForm.php create mode 100755 frontend/models/PasswordResetRequestForm.php create mode 100755 frontend/models/ProductFrontendSearch.php create mode 100755 frontend/models/ResetPasswordForm.php create mode 100755 frontend/models/SignupForm.php create mode 100755 frontend/page/show.php create mode 100755 frontend/views/articles/index.php create mode 100755 frontend/views/articles/show.php create mode 100755 frontend/views/basket/_popup.php create mode 100755 frontend/views/basket/ajax_info.php create mode 100755 frontend/views/basket/ajax_items.php create mode 100755 frontend/views/basket/index.php create mode 100755 frontend/views/basket/success.php create mode 100755 frontend/views/cabinet/bookmarks.php create mode 100755 frontend/views/cabinet/index.php create mode 100755 frontend/views/cabinet/my-orders.php create mode 100755 frontend/views/cabinet/update.php create mode 100755 frontend/views/call/index.php create mode 100755 frontend/views/call/success.php create mode 100755 frontend/views/catalog/_catalog_box.php create mode 100755 frontend/views/catalog/all.php create mode 100755 frontend/views/catalog/brand.php create mode 100755 frontend/views/catalog/brands.php create mode 100755 frontend/views/catalog/catalog.php create mode 100755 frontend/views/catalog/categories.php create mode 100755 frontend/views/catalog/index.php create mode 100755 frontend/views/catalog/product.php create mode 100755 frontend/views/catalog/product_item.php create mode 100755 frontend/views/catalog/products.php create mode 100755 frontend/views/event/_objects.php create mode 100755 frontend/views/event/index.php create mode 100755 frontend/views/event/show.php create mode 100755 frontend/views/iam/1person.php create mode 100755 frontend/views/iam/_tabs.php create mode 100755 frontend/views/iam/admin.php create mode 100755 frontend/views/iam/company.php create mode 100755 frontend/views/iam/customer.php create mode 100755 frontend/views/iam/edit_company.php create mode 100755 frontend/views/iam/edit_customer.php create mode 100755 frontend/views/iam/edit_person.php create mode 100755 frontend/views/iam/myorders.php create mode 100755 frontend/views/iam/person.php create mode 100755 frontend/views/iam/price.php create mode 100755 frontend/views/iam/share.php create mode 100755 frontend/views/iam/show_order.php create mode 100755 frontend/views/layouts/main-menu.php create mode 100755 frontend/views/layouts/main.php create mode 100755 frontend/views/login/error_log create mode 100755 frontend/views/login/forgot.php create mode 100755 frontend/views/login/index.php create mode 100755 frontend/views/modal/consultation_modal.php create mode 100755 frontend/views/modal/forgot_password_form_model_window.php create mode 100755 frontend/views/modal/login_window_model_window.php create mode 100755 frontend/views/modal/registration_window_model_window.php create mode 100755 frontend/views/news/index.php create mode 100755 frontend/views/news/show.php create mode 100755 frontend/views/orders/basket-step-01.php create mode 100755 frontend/views/orders/basket-step-02.php create mode 100755 frontend/views/orders/basket-step-03.php create mode 100755 frontend/views/page/show.php create mode 100755 frontend/views/reg/company.php create mode 100755 frontend/views/reg/customer.php create mode 100755 frontend/views/reg/person.php create mode 100755 frontend/views/search/index.php create mode 100755 frontend/views/service/_objects.php create mode 100755 frontend/views/service/index.php create mode 100755 frontend/views/service/view.php create mode 100755 frontend/views/site/_index.php create mode 100755 frontend/views/site/about.php create mode 100755 frontend/views/site/contact.php create mode 100755 frontend/views/site/error.php create mode 100755 frontend/views/site/error_log create mode 100755 frontend/views/site/index.php create mode 100755 frontend/views/site/login.php create mode 100755 frontend/views/site/requestPasswordResetToken.php create mode 100755 frontend/views/site/resetPassword.php create mode 100755 frontend/views/site/signup.php create mode 100755 frontend/views/subscribe/index.php create mode 100755 frontend/views/text/index.php create mode 100755 frontend/web/.gitignore create mode 100755 frontend/web/css/begunok.css create mode 100755 frontend/web/css/comments.css create mode 100755 frontend/web/css/ion.rangeSlider.css create mode 100755 frontend/web/css/ion.rangeSlider.skinHTML5.css create mode 100755 frontend/web/css/style.css create mode 100755 frontend/web/css/style.dev.css create mode 100755 frontend/web/favicon.ico create mode 100755 frontend/web/files/.tmb/l1_c2l0ZV9leHRyZW1fbmV3X25ld3NfYnV0dG9uXzIuanBn1437031556.png create mode 100755 frontend/web/files/site_extrem_new_news_button_2.jpg create mode 100755 frontend/web/img/404.png create mode 100755 frontend/web/img/_logo.png create mode 100755 frontend/web/img/arrow-next.png create mode 100755 frontend/web/img/arrow-prev.png create mode 100755 frontend/web/img/arrow_sort_asc_desc.png create mode 100755 frontend/web/img/arrows_blocks.png create mode 100755 frontend/web/img/artweb.png create mode 100755 frontend/web/img/banner1.jpg create mode 100755 frontend/web/img/banner_akciya.jpg create mode 100755 frontend/web/img/begunok_slider.png create mode 100755 frontend/web/img/buy.png create mode 100755 frontend/web/img/children_sub.jpg create mode 100755 frontend/web/img/close_modal.jpg create mode 100755 frontend/web/img/del.png create mode 100755 frontend/web/img/favicon.ico create mode 100755 frontend/web/img/help.png create mode 100755 frontend/web/img/ico1.png create mode 100755 frontend/web/img/ico2.png create mode 100755 frontend/web/img/ico3.png create mode 100755 frontend/web/img/ico4.png create mode 100755 frontend/web/img/ico5.png create mode 100755 frontend/web/img/ico_close.png create mode 100755 frontend/web/img/ico_close2.png create mode 100755 frontend/web/img/ico_pic.jpg create mode 100755 frontend/web/img/ico_pic2.jpg create mode 100755 frontend/web/img/icon_100_original_01.png create mode 100755 frontend/web/img/icon_100_quaranty_01.png create mode 100755 frontend/web/img/li1.png create mode 100755 frontend/web/img/li2.png create mode 100755 frontend/web/img/li3.png create mode 100755 frontend/web/img/li_minus.png create mode 100755 frontend/web/img/li_plus.png create mode 100755 frontend/web/img/login.png create mode 100755 frontend/web/img/logo-why.png create mode 100755 frontend/web/img/logo.png create mode 100755 frontend/web/img/lupa_sub.png create mode 100755 frontend/web/img/man_sub.jpg create mode 100755 frontend/web/img/map.jpg create mode 100755 frontend/web/img/map.png create mode 100755 frontend/web/img/minus.png create mode 100755 frontend/web/img/more.png create mode 100755 frontend/web/img/new_arrows_.png create mode 100755 frontend/web/img/new_coll.png create mode 100755 frontend/web/img/no_photo.png create mode 100755 frontend/web/img/no_photo_big.png create mode 100755 frontend/web/img/notpic.gif create mode 100755 frontend/web/img/pagination.png create mode 100755 frontend/web/img/phone.png create mode 100755 frontend/web/img/pic.jpg create mode 100755 frontend/web/img/plus.png create mode 100755 frontend/web/img/pro.png create mode 100755 frontend/web/img/radio_new-active.png create mode 100755 frontend/web/img/radio_new.png create mode 100755 frontend/web/img/sale30.jpg create mode 100755 frontend/web/img/slider.jpg create mode 100755 frontend/web/img/social-ico-two.png create mode 100755 frontend/web/img/social-ico.png create mode 100755 frontend/web/img/user-noimage.png create mode 100755 frontend/web/img/v_next.png create mode 100755 frontend/web/img/v_next2.png create mode 100755 frontend/web/img/v_prev.png create mode 100755 frontend/web/img/v_prev2.png create mode 100755 frontend/web/img/why.png create mode 100755 frontend/web/img/why_item1.png create mode 100755 frontend/web/img/why_item2.png create mode 100755 frontend/web/img/why_item3.png create mode 100755 frontend/web/img/why_item4.png create mode 100755 frontend/web/img/why_item5.png create mode 100755 frontend/web/img/why_item6.png create mode 100755 frontend/web/img/woman_sub.jpg create mode 100755 frontend/web/js/basket.js create mode 100755 frontend/web/js/basket2.js create mode 100755 frontend/web/js/begunok.js create mode 100755 frontend/web/js/call.js create mode 100755 frontend/web/js/fix_height.js create mode 100755 frontend/web/js/ion.rangeSlider.js create mode 100755 frontend/web/js/jCarousel/jCarousel.js create mode 100755 frontend/web/js/jcarousel/jcarousel.min.js create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/arrows_left.png create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/arrows_right.png create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/credits.txt create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/next-horizontal.png create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/next-vertical.png create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/next.jpg create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/next.png create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/prev-horizontal.png create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/prev-vertical.png create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/prev.jpg create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/prev.png create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/skin.css create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/skin2.css create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/v_next.png create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/v_next2.png create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/v_prev.png create mode 100755 frontend/web/js/jcarousel/skins/HOME_SLIDER/v_prev2.png create mode 100755 frontend/web/js/jcarousel/skins/ie7/credits.txt create mode 100755 frontend/web/js/jcarousel/skins/ie7/loading-small.gif create mode 100755 frontend/web/js/jcarousel/skins/ie7/loading.gif create mode 100755 frontend/web/js/jcarousel/skins/ie7/loading_small.gif create mode 100755 frontend/web/js/jcarousel/skins/ie7/next-horizontal.gif create mode 100755 frontend/web/js/jcarousel/skins/ie7/prev-horizontal.gif create mode 100755 frontend/web/js/jcarousel/skins/ie7/skin.css create mode 100755 frontend/web/js/jcarousel/skins/tango/arrows_left.png create mode 100755 frontend/web/js/jcarousel/skins/tango/arrows_right.png create mode 100755 frontend/web/js/jcarousel/skins/tango/credits.txt create mode 100755 frontend/web/js/jcarousel/skins/tango/next-horizontal.png create mode 100755 frontend/web/js/jcarousel/skins/tango/next-vertical.png create mode 100755 frontend/web/js/jcarousel/skins/tango/next.jpg create mode 100755 frontend/web/js/jcarousel/skins/tango/next.png create mode 100755 frontend/web/js/jcarousel/skins/tango/prev-horizontal.png create mode 100755 frontend/web/js/jcarousel/skins/tango/prev-vertical.png create mode 100755 frontend/web/js/jcarousel/skins/tango/prev.jpg create mode 100755 frontend/web/js/jcarousel/skins/tango/prev.png create mode 100755 frontend/web/js/jcarousel/skins/tango/skin.css create mode 100755 frontend/web/js/jcarousel/skins/tango/skin2.css create mode 100755 frontend/web/js/jcarousel/skins/tango/v_next.png create mode 100755 frontend/web/js/jcarousel/skins/tango/v_next2.png create mode 100755 frontend/web/js/jcarousel/skins/tango/v_prev.png create mode 100755 frontend/web/js/jcarousel/skins/tango/v_prev2.png create mode 100755 frontend/web/js/jquery-1.5.min.js create mode 100755 frontend/web/js/jquery.mask.js create mode 100755 frontend/web/js/jquery.min.js create mode 100755 frontend/web/js/jquery.ui-slider.js create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/README create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/changelog.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_ajax.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_ajax.txt create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_ajax_php.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_ajax_php.php create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_flickr_api.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_flickr_api.php create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_flickr_feed.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_flickr_feed.php create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/dynamic_javascript.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/images/arrow-down.gif create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/images/arrow-up.gif create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/images/loading-small.gif create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/images/loading-thickbox.gif create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/images/loading.gif create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/special_easing.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/special_flexible.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/special_textscroller.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/special_textscroller.php create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/special_thickbox.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_auto.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_callbacks.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_circular.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_controls.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_multiple.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_simple.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_start.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/static_vertical.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/thickbox/thickbox.css create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/examples/thickbox/thickbox.js create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/index.html create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery-1.4.2.min.js create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.js create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.min.js create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/credits.txt create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/loading-small.gif create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/loading.gif create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/loading_small.gif create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/next-horizontal.gif create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/prev-horizontal.gif create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/ie7/skin.css create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/arrows_left.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/arrows_right.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/credits.txt create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/next-horizontal.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/next-vertical.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/next.jpg create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/next.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/prev-horizontal.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/prev-vertical.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/prev.jpg create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/prev.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/skin.css create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/skin2.css create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/v_next.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/v_next2.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/v_prev.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/skins/tango/v_prev2.png create mode 100755 frontend/web/js/jsor-jcarousel-7bb2e0a/style.css create mode 100755 frontend/web/js/main.js create mode 100755 frontend/web/js/shadowbox-3.0.3/LICENSE create mode 100755 frontend/web/js/shadowbox-3.0.3/README create mode 100755 frontend/web/js/shadowbox-3.0.3/_shadowbox.css create mode 100755 frontend/web/js/shadowbox-3.0.3/close.png create mode 100755 frontend/web/js/shadowbox-3.0.3/loading.gif create mode 100755 frontend/web/js/shadowbox-3.0.3/next.png create mode 100755 frontend/web/js/shadowbox-3.0.3/pause.png create mode 100755 frontend/web/js/shadowbox-3.0.3/play.png create mode 100755 frontend/web/js/shadowbox-3.0.3/previous.png create mode 100755 frontend/web/js/shadowbox-3.0.3/shadowbox.css create mode 100755 frontend/web/js/shadowbox-3.0.3/shadowbox.js create mode 100755 frontend/web/js/slides.min.jquery.js create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/README create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/changelog.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax.txt create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax_php.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax_php.php create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_api.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_api.php create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_feed.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_feed.php create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_javascript.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/arrow-down.gif create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/arrow-up.gif create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading-small.gif create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading-thickbox.gif create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading.gif create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_easing.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_flexible.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_textscroller.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_textscroller.php create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_thickbox.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_auto.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_callbacks.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_circular.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_controls.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_multiple.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_simple.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_start.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_vertical.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/thickbox/thickbox.css create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/examples/thickbox/thickbox.js create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/img/a12.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/img/a14.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/img/a19.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/img/b05.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/img/b12.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/img/b21.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/img/pagination.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/index.html create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/arrows_left.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/arrows_right.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/credits.txt create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next-horizontal.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next-vertical.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next.jpg create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev-horizontal.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev-vertical.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev.jpg create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/skin.css create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/skin2.css create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_next.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_next2.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_prev.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_prev2.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/credits.txt create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading-small.gif create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading.gif create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading_small.gif create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/next-horizontal.gif create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/prev-horizontal.gif create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/skin.css create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/arrows_left.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/arrows_right.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/credits.txt create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next-horizontal.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next-vertical.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next.jpg create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev-horizontal.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev-vertical.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev.jpg create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/skin.css create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/skin2.css create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_next.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_next2.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_prev.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_prev2.png create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/style.css create mode 100755 frontend/web/js/widget-carousel/FILTER_SLIDER/style.js create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/README create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/changelog.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax.txt create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax_php.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax_php.php create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_api.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_api.php create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_feed.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_feed.php create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_javascript.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/arrow-down.gif create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/arrow-up.gif create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading-small.gif create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading-thickbox.gif create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading.gif create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_easing.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_flexible.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_textscroller.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_textscroller.php create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_thickbox.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_auto.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_callbacks.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_circular.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_controls.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_multiple.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_simple.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_start.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_vertical.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/thickbox/thickbox.css create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/examples/thickbox/thickbox.js create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/img/a12.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/img/a14.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/img/a19.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/img/b05.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/img/b12.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/img/b21.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/img/pagination.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/index.html create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/arrows_left.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/arrows_right.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/credits.txt create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next-horizontal.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next-vertical.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next.jpg create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev-horizontal.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev-vertical.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev.jpg create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/skin.css create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/skin2.css create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_next.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_next2.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_prev.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_prev2.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/credits.txt create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading-small.gif create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading.gif create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading_small.gif create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/next-horizontal.gif create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/prev-horizontal.gif create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/skin.css create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/arrows_left.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/arrows_right.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/credits.txt create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next-horizontal.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next-vertical.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next.jpg create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev-horizontal.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev-vertical.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev.jpg create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/skin.css create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/skin2.css create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_next.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_next2.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_prev.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_prev2.png create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/style.css create mode 100755 frontend/web/js/widget-carousel/HOME_SLIDER/style.js create mode 100755 frontend/web/js/widget-carousel/lib/jquery-1.4.2.min.js create mode 100755 frontend/web/js/widget-carousel/lib/jquery.jcarousel.js create mode 100755 frontend/web/js/widget-carousel/lib/jquery.jcarousel.min.js create mode 100755 frontend/web/libraries/aaa.php create mode 100755 frontend/web/libraries/ion/css/ion.rangeSlider.skinFlat.css create mode 100755 frontend/web/libraries/ion/css/ion.rangeSlider.skinModern.css create mode 100755 frontend/web/libraries/ion/css/ion.rangeSlider.skinNice.css create mode 100755 frontend/web/libraries/ion/css/ion.rangeSlider.skinSimple.css create mode 100755 frontend/web/libraries/ion/css/normalize.css create mode 100755 frontend/web/libraries/ion/img/sprite-skin-flat.png create mode 100755 frontend/web/libraries/ion/img/sprite-skin-modern.png create mode 100755 frontend/web/libraries/ion/img/sprite-skin-nice.png create mode 100755 frontend/web/libraries/ion/img/sprite-skin-simple.png create mode 100755 frontend/web/libraries/ion/js/ion.rangeSlider.min.js create mode 100755 frontend/web/robots.txt create mode 100755 frontend/web/updatemods/counter.txt create mode 100755 frontend/web/updatemods/cr.php create mode 100755 frontend/web/updatemods/mysql.class.php create mode 100755 frontend/widgets/BannerWidget.php create mode 100755 frontend/widgets/Rubrics.php create mode 100755 frontend/widgets/Seo.php create mode 100755 frontend/widgets/Slider.php create mode 100755 frontend/widgets/SliderWidget.php create mode 100755 frontend/widgets/views/rubrics.php create mode 100755 frontend/widgets/views/slider.php create mode 100755 generator/.htaccess create mode 100755 generator/changelog.txt create mode 100755 generator/data/.htaccess create mode 100755 generator/data/crawl_dump.log create mode 100755 generator/data/generator.conf create mode 100755 generator/data/placeholder.txt create mode 100755 generator/data/sess_bprm9p4fl503nhno9tstadlbq1 create mode 100755 generator/default.conf create mode 100755 generator/documentation.html create mode 100755 generator/howto-install.pdf create mode 100755 generator/index.php create mode 100755 generator/license.html create mode 100755 generator/pages/class.gping.inc.php create mode 100755 generator/pages/class.grab.inc.php create mode 100755 generator/pages/class.html-creator.inc.php create mode 100755 generator/pages/class.http.inc.php create mode 100755 generator/pages/class.mail.inc.php create mode 100755 generator/pages/class.templates.inc.php create mode 100755 generator/pages/class.utils.inc.php create mode 100755 generator/pages/class.xml-creator.inc.php create mode 100755 generator/pages/mods/extra_embedplayer.inc.php create mode 100755 generator/pages/mods/extra_flvplayer.inc.php create mode 100755 generator/pages/mods/extra_srcvideo.inc.php create mode 100755 generator/pages/mods/extra_swfobject.inc.php create mode 100755 generator/pages/mods/extra_swfplayer.inc.php create mode 100755 generator/pages/mods/extra_videoplayer.inc.php create mode 100755 generator/pages/mods/extra_xmlphp.inc.php create mode 100755 generator/pages/mods/mobile.inc.php create mode 100755 generator/pages/mods/sitemap.xsl create mode 100755 generator/pages/mods/sitemap_base_tpl.xml create mode 100755 generator/pages/mods/sitemap_index_tpl.xml create mode 100755 generator/pages/mods/sitemap_mob_tpl.xml create mode 100755 generator/pages/mods/sitemap_nb.xsl create mode 100755 generator/pages/mods/sitemap_notify.txt create mode 100755 generator/pages/mods/sitemap_ping.txt create mode 100755 generator/pages/mods/sitemap_ror_tpl.xml create mode 100755 generator/pages/mods/sitemap_rss_tpl.xml create mode 100755 generator/pages/mods/sitemap_tpl.html create mode 100755 generator/pages/mods/sitemap_xml_tpl.xml create mode 100755 generator/pages/page-analyze.inc.php create mode 100755 generator/pages/page-bottom.inc.php create mode 100755 generator/pages/page-chlog.inc.php create mode 100755 generator/pages/page-config.inc.php create mode 100755 generator/pages/page-configinit.inc.php create mode 100755 generator/pages/page-crawl.inc.php create mode 100755 generator/pages/page-crawlproc.inc.php create mode 100755 generator/pages/page-ext.inc.php create mode 100755 generator/pages/page-generator.inc.php create mode 100755 generator/pages/page-l404.inc.php create mode 100755 generator/pages/page-login.inc.php create mode 100755 generator/pages/page-reflinks.inc.php create mode 100755 generator/pages/page-sitemap-detail.inc.php create mode 100755 generator/pages/page-top.inc.php create mode 100755 generator/pages/page-view.inc.php create mode 100755 generator/pages/style.css create mode 100755 generator/pages/xmlsitemaps-logo.gif create mode 100755 generator/runcrawl.php create mode 100755 init create mode 100755 init.bat create mode 100755 requirements.php create mode 100755 ror.xml create mode 100755 sitemap.xml create mode 100755 test.php create mode 100755 test.txt create mode 100755 tests/README.md create mode 100755 tests/_bootstrap.php create mode 100755 tests/_data/dump.sql create mode 100755 tests/_output/.gitignore create mode 100755 tests/_support/AcceptanceTester.php create mode 100755 tests/_support/FunctionalTester.php create mode 100755 tests/_support/Helper/Acceptance.php create mode 100755 tests/_support/Helper/Functional.php create mode 100755 tests/_support/Helper/Unit.php create mode 100755 tests/_support/UnitTester.php create mode 100755 tests/_support/_generated/AcceptanceTesterActions.php create mode 100755 tests/_support/_generated/FunctionalTesterActions.php create mode 100755 tests/_support/_generated/UnitTesterActions.php create mode 100755 tests/acceptance.suite.yml create mode 100755 tests/acceptance/SmokeTestCept.php create mode 100755 tests/acceptance/_bootstrap.php create mode 100755 tests/codeception.yml create mode 100755 tests/codeception/_output/.gitignore create mode 100755 tests/codeception/backend/.gitignore create mode 100755 tests/codeception/backend/_bootstrap.php create mode 100755 tests/codeception/backend/_output/.gitignore create mode 100755 tests/codeception/backend/acceptance.suite.yml create mode 100755 tests/codeception/backend/acceptance/LoginCept.php create mode 100755 tests/codeception/backend/acceptance/_bootstrap.php create mode 100755 tests/codeception/backend/codeception.yml create mode 100755 tests/codeception/backend/functional.suite.yml create mode 100755 tests/codeception/backend/functional/LoginCept.php create mode 100755 tests/codeception/backend/functional/_bootstrap.php create mode 100755 tests/codeception/backend/unit.suite.yml create mode 100755 tests/codeception/backend/unit/DbTestCase.php create mode 100755 tests/codeception/backend/unit/TestCase.php create mode 100755 tests/codeception/backend/unit/_bootstrap.php create mode 100755 tests/codeception/backend/unit/fixtures/data/.gitkeep create mode 100755 tests/codeception/bin/_bootstrap.php create mode 100755 tests/codeception/bin/yii create mode 100755 tests/codeception/bin/yii.bat create mode 100755 tests/codeception/common/.gitignore create mode 100755 tests/codeception/common/_bootstrap.php create mode 100755 tests/codeception/common/_output/.gitignore create mode 100755 tests/codeception/common/_pages/LoginPage.php create mode 100755 tests/codeception/common/_support/FixtureHelper.php create mode 100755 tests/codeception/common/codeception.yml create mode 100755 tests/codeception/common/fixtures/UserFixture.php create mode 100755 tests/codeception/common/fixtures/data/init_login.php create mode 100755 tests/codeception/common/templates/fixtures/user.php create mode 100755 tests/codeception/common/unit.suite.yml create mode 100755 tests/codeception/common/unit/DbTestCase.php create mode 100755 tests/codeception/common/unit/TestCase.php create mode 100755 tests/codeception/common/unit/_bootstrap.php create mode 100755 tests/codeception/common/unit/fixtures/data/models/user.php create mode 100755 tests/codeception/common/unit/models/LoginFormTest.php create mode 100755 tests/codeception/config/acceptance.php create mode 100755 tests/codeception/config/backend/acceptance.php create mode 100755 tests/codeception/config/backend/config.php create mode 100755 tests/codeception/config/backend/functional.php create mode 100755 tests/codeception/config/backend/unit.php create mode 100755 tests/codeception/config/common/unit.php create mode 100755 tests/codeception/config/config.php create mode 100755 tests/codeception/config/console/unit.php create mode 100755 tests/codeception/config/frontend/acceptance.php create mode 100755 tests/codeception/config/frontend/config.php create mode 100755 tests/codeception/config/frontend/functional.php create mode 100755 tests/codeception/config/frontend/unit.php create mode 100755 tests/codeception/config/functional.php create mode 100755 tests/codeception/config/unit.php create mode 100755 tests/codeception/console/.gitignore create mode 100755 tests/codeception/console/_bootstrap.php create mode 100755 tests/codeception/console/_output/.gitignore create mode 100755 tests/codeception/console/codeception.yml create mode 100755 tests/codeception/console/unit.suite.yml create mode 100755 tests/codeception/console/unit/DbTestCase.php create mode 100755 tests/codeception/console/unit/TestCase.php create mode 100755 tests/codeception/console/unit/_bootstrap.php create mode 100755 tests/codeception/console/unit/fixtures/data/.gitkeep create mode 100755 tests/codeception/frontend/.gitignore create mode 100755 tests/codeception/frontend/_bootstrap.php create mode 100755 tests/codeception/frontend/_output/.gitignore create mode 100755 tests/codeception/frontend/_pages/AboutPage.php create mode 100755 tests/codeception/frontend/_pages/ContactPage.php create mode 100755 tests/codeception/frontend/_pages/SignupPage.php create mode 100755 tests/codeception/frontend/acceptance.suite.yml create mode 100755 tests/codeception/frontend/acceptance/AboutCept.php create mode 100755 tests/codeception/frontend/acceptance/ContactCept.php create mode 100755 tests/codeception/frontend/acceptance/HomeCept.php create mode 100755 tests/codeception/frontend/acceptance/LoginCept.php create mode 100755 tests/codeception/frontend/acceptance/SignupCest.php create mode 100755 tests/codeception/frontend/acceptance/_bootstrap.php create mode 100755 tests/codeception/frontend/codeception.yml create mode 100755 tests/codeception/frontend/functional.suite.yml create mode 100755 tests/codeception/frontend/functional/AboutCept.php create mode 100755 tests/codeception/frontend/functional/ContactCept.php create mode 100755 tests/codeception/frontend/functional/HomeCept.php create mode 100755 tests/codeception/frontend/functional/LoginCept.php create mode 100755 tests/codeception/frontend/functional/SignupCest.php create mode 100755 tests/codeception/frontend/functional/_bootstrap.php create mode 100755 tests/codeception/frontend/unit.suite.yml create mode 100755 tests/codeception/frontend/unit/DbTestCase.php create mode 100755 tests/codeception/frontend/unit/TestCase.php create mode 100755 tests/codeception/frontend/unit/_bootstrap.php create mode 100755 tests/codeception/frontend/unit/fixtures/data/models/user.php create mode 100755 tests/codeception/frontend/unit/models/ContactFormTest.php create mode 100755 tests/codeception/frontend/unit/models/PasswordResetRequestFormTest.php create mode 100755 tests/codeception/frontend/unit/models/ResetPasswordFormTest.php create mode 100755 tests/codeception/frontend/unit/models/SignupFormTest.php create mode 100755 tests/functional.suite.yml create mode 100755 tests/functional/_bootstrap.php create mode 100755 tests/unit.suite.yml create mode 100755 tests/unit/SmokeTestCept.php create mode 100755 tests/unit/_bootstrap.php create mode 100755 yii.bat diff --git a/.bowerrc b/.bowerrc new file mode 100755 index 0000000..1669168 --- /dev/null +++ b/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory" : "vendor/bower" +} diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..9b0ba82 --- /dev/null +++ b/.gitignore @@ -0,0 +1,51 @@ +# yii console command +/yii + +# phpstorm project files +.idea + +# netbeans project files +nbproject + +# zend studio for eclipse project files +.buildpath +.project +.settings + +# windows thumbnail cache +Thumbs.db + +# composer vendor dir +/vendor + +# composer itself is not needed +composer.phar + +# Mac DS_Store Files +.DS_Store + +# phpunit itself is not needed +phpunit.phar +# local phpunit config +/phpunit.xml + +/storage +/common/config/main-local.php +/common/config/params-local.php +/backend/config/main-local.php +/backend/config/params-local.php +/backend/runtime/ +/frontend/config/main-local.php +/frontend/config/params-local.php +/frontend/runtime/ +/backend/web/assets/ +/frontend/web/assets/ +/frontend/web/upload/ +/frontend/web/css/node_modules/ +/frontend/web/images/ +/frontend/views/вертска +composer.lock + +tests/_output/* +/common/modules/_comment/ +Будет удалено common/modules/comment/ diff --git a/.htaccess b/.htaccess new file mode 100755 index 0000000..9539f04 --- /dev/null +++ b/.htaccess @@ -0,0 +1,168 @@ +AddDefaultCharset utf-8 + + + + Options +FollowSymlinks + + RewriteEngine On + + + + + + RewriteBase / + # deal with admin first + + + Redirect 301 /Kak_vibrat_ryuksak / + Redirect 301 /products/ryukzaki /catalog/ryukzaki + Redirect 301 /products/koshel_ki /catalog/koshelki + Redirect 301 /products/nesessery​ /catalog/nesessery + Redirect 301 /products/sumki /catalog/sumki + Redirect 301 /products/germochehly /catalog/germocehly + + RewriteRule ^storage/(.*)?$ /storage/$1 [L,PT] + RewriteRule ^generator/(.*)?$ /generator/$1 [L,PT] + + RewriteCond %{REQUEST_URI} ^/(admin) + + + + RewriteRule ^admin/assets/(.*)$ backend/web/assets/$1 [L] + + RewriteRule ^admin/css/(.*)$ backend/web/css/$1 [L] + + RewriteRule ^admin/js/(.*)$ backend/web/js/$1 [L] + + RewriteRule ^admin/images/(.*)$ backend/web/images/$1 [L] + + RewriteRule ^admin/fonts/(.*)$ backend/web/fonts/$1 [L] + + + + + + RewriteCond %{REQUEST_URI} !^/backend/web/(assets|css|js|images|fonts)/ + + RewriteCond %{REQUEST_URI} ^/(admin) + + RewriteRule ^.*$ backend/web/index.php [L] + + + RewriteCond %{REQUEST_URI} ^/(assets|css) + + RewriteRule ^assets/(.*)$ frontend/web/assets/$1 [L] + + RewriteRule ^css/(.*)$ frontend/web/css/$1 [L] + + RewriteRule ^js/(.*)$ frontend/web/js/$1 [L] + + RewriteRule ^images/(.*)$ frontend/web/images/$1 [L] + + RewriteRule ^libraries/(.*)$ frontend/web/libraries/$1 [L] + + RewriteRule ^img/(.*)$ frontend/web/img/$1 [L] + + RewriteRule ^files/(.*)$ frontend/web/files/$1 [L] + + RewriteRule ^fonts/(.*)$ frontend/web/fonts/$1 [L] + + RewriteRule robots.txt$ frontend/web/robots.txt [L] + + RewriteRule sitemap.xml$ frontend/web/sitemap.xml [L] + + RewriteCond %{REQUEST_URI} !^/(frontend|backend)/web/(assets|css|txt|js|images|fonts|img|files)/ + + RewriteCond %{REQUEST_URI} !index.php + + RewriteCond %{REQUEST_FILENAME} !-f [OR] + + RewriteCond %{REQUEST_FILENAME} !-d + + + RewriteCond %{HTTP_HOST} ^www\.(.*) + RewriteRule ^(.*)$ frontend/web/index.php + + + RewriteCond %{HTTP_HOST} ^([^www].*)$ + RewriteRule (.*) http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + + RewriteCond %{THE_REQUEST} \s/+(.+?)/+[?\s] + RewriteRule /$ /%1 [R,L] + + + +# RewriteCond %{HTTP_HOST} ^([^www].*)$ +# RewriteRule ^(.*)$ http://www.%1/$1 [R=301] + + + +#для возможности загрузки файлов парсера + + php_value upload_max_filesize 20M + php_value post_max_size 30M + + + +# кеширование в браузере на стороне пользователя + + + ExpiresActive On + ExpiresDefault "access 7 days" + ExpiresByType application/javascript "access plus 1 year" + ExpiresByType text/javascript "access plus 1 year" + ExpiresByType text/css "access plus 1 year" + ExpiresByType text/html "access plus 7 day" + ExpiresByType text/x-javascript "access 1 year" + ExpiresByType image/gif "access plus 1 year" + ExpiresByType image/jpeg "access plus 1 year" + ExpiresByType image/png "access plus 1 year" + ExpiresByType image/jpg "access plus 1 year" + ExpiresByType image/x-icon "access 1 year" + ExpiresByType application/x-shockwave-flash "access 1 year" + + +AddOutputFilterByType DEFLATE text/plain +AddOutputFilterByType DEFLATE text/html +AddOutputFilterByType DEFLATE text/xml +AddOutputFilterByType DEFLATE text/css +AddOutputFilterByType DEFLATE application/xml +AddOutputFilterByType DEFLATE application/xhtml+xml +AddOutputFilterByType DEFLATE application/rss+xml +AddOutputFilterByType DEFLATE application/javascript +AddOutputFilterByType DEFLATE application/x-javascript +BrowserMatch ^Mozilla/4 gzip-only-text/html +BrowserMatch ^Mozilla/4\.0[678] no-gzip +BrowserMatch \bMSIE !no-gzip !gzip-only-text/html +Header append Vary User-Agent +RewriteEngine On +AddEncoding gzip .gz +RewriteCond %{HTTP:Accept-encoding} gzip +RewriteCond %{REQUEST_FILENAME}.gz -f +RewriteRule ^(.*)$ $1.gz [QSA,L] + +# Cache-Control + +# 30 дней + + Header set Cache-Control "max-age=2592000, public" + + # 30 дней + + Header set Cache-Control "max-age=2592000, public" + + # 2 дня + + Header set Cache-Control "max-age=172800, public, must-revalidate" + + # 1 день + + Header set Cache-Control "max-age=172800, private, must-revalidate" + + + +#Запрет отдачи HTTP-заголовков Vary браузерам семейства MSIE + +BrowserMatch "MSIE" force-no-vary +BrowserMatch "Mozilla/4.[0-9]{2}" force-no-vary + diff --git a/LICENSE.md b/LICENSE.md new file mode 100755 index 0000000..9d1f119 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,32 @@ +The Yii framework is free software. It is released under the terms of +the following BSD License. + +Copyright © 2008 by Yii Software LLC (http://www.yiisoft.com) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name of Yii Software LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100755 index 0000000..6028cf0 --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +Yii 2 Advanced Project Template +=============================== + +Yii 2 Advanced Project Template is a skeleton [Yii 2](http://www.yiiframework.com/) application best for +developing complex Web applications with multiple tiers. + +The template includes three tiers: front end, back end, and console, each of which +is a separate Yii application. + +The template is designed to work in a team development environment. It supports +deploying the application in different environments. + +Documentation is at [docs/guide/README.md](docs/guide/README.md). + +[![Latest Stable Version](https://poser.pugx.org/yiisoft/yii2-app-advanced/v/stable.png)](https://packagist.org/packages/yiisoft/yii2-app-advanced) +[![Total Downloads](https://poser.pugx.org/yiisoft/yii2-app-advanced/downloads.png)](https://packagist.org/packages/yiisoft/yii2-app-advanced) +[![Build Status](https://travis-ci.org/yiisoft/yii2-app-advanced.svg?branch=master)](https://travis-ci.org/yiisoft/yii2-app-advanced) + +DIRECTORY STRUCTURE +------------------- + +``` +common + config/ contains shared configurations + mail/ contains view files for e-mails + models/ contains model classes used in both backend and frontend +console + config/ contains console configurations + controllers/ contains console controllers (commands) + migrations/ contains database migrations + models/ contains console-specific model classes + runtime/ contains files generated during runtime +backend + assets/ contains application assets such as JavaScript and CSS + config/ contains backend configurations + controllers/ contains Web controller classes + models/ contains backend-specific model classes + runtime/ contains files generated during runtime + views/ contains view files for the Web application + web/ contains the entry script and Web resources +frontend + assets/ contains application assets such as JavaScript and CSS + config/ contains frontend configurations + controllers/ contains Web controller classes + models/ contains frontend-specific model classes + runtime/ contains files generated during runtime + views/ contains view files for the Web application + web/ contains the entry script and Web resources + widgets/ contains frontend widgets +vendor/ contains dependent 3rd-party packages +environments/ contains environment-based overrides +tests contains various tests for the advanced application + codeception/ contains tests developed with Codeception PHP Testing Framework +``` diff --git a/backend/assets/AdminLteAsset.php b/backend/assets/AdminLteAsset.php new file mode 100755 index 0000000..c4a7c67 --- /dev/null +++ b/backend/assets/AdminLteAsset.php @@ -0,0 +1,35 @@ + + * @since 2.0 + */ +class AdminLteAsset extends AssetBundle +{ + public $sourcePath = '@bower/'; + public $css = [ + 'admin-lte/dist/css/AdminLTE.css', + 'admin-lte/dist/css/skins/_all-skins.css' + ]; + + public $js = [ + 'admin-lte/dist/js/app.js', + + ]; + public $depends = [ + 'yii\web\YiiAsset', + 'common\modules\file\FileUploadAsset', + 'yii\bootstrap\BootstrapPluginAsset', + 'backend\assets\FontAwesomeAsset', + + ]; +} \ No newline at end of file diff --git a/backend/assets/AppAsset.php b/backend/assets/AppAsset.php new file mode 100755 index 0000000..3f9bf26 --- /dev/null +++ b/backend/assets/AppAsset.php @@ -0,0 +1,31 @@ + + * @since 2.0 + */ +class AppAsset extends AssetBundle +{ + public $basePath = '@webroot'; + public $baseUrl = '@web'; + public $css = [ + 'css/site.css', + ]; + public $js = [ + 'js/fieldWidget.js', + 'js/site.js', + ]; + public $depends = [ + 'yii\web\YiiAsset', + 'yii\bootstrap\BootstrapAsset', + ]; +} diff --git a/backend/assets/FontAwesomeAsset.php b/backend/assets/FontAwesomeAsset.php new file mode 100755 index 0000000..72d6f21 --- /dev/null +++ b/backend/assets/FontAwesomeAsset.php @@ -0,0 +1,14 @@ + 'app-backend', + 'basePath' => dirname(__DIR__), + 'controllerMap' => [ + 'elfinder' => [ + 'class' => 'mihaildev\elfinder\Controller', + 'access' => ['@'], //глобальный доступ к фаил менеджеру @ - для авторизорованных , ? - для гостей , чтоб открыть всем ['@', '?'] + 'disabledCommands' => ['netmount'], //отключение ненужных команд https://github.com/Studio-42/elFinder/wiki/Client-configuration-options#commands + 'roots' => [ + [ + 'class' => 'mihaildev\elfinder\volume\UserPath', + 'path' => '../../storage/user_{id}', + 'name' => 'My Documents' + ], + ], + 'watermark' => [ + 'source' => __DIR__.'/logo.png', // Path to Water mark image + 'marginRight' => 5, // Margin right pixel + 'marginBottom' => 5, // Margin bottom pixel + 'quality' => 95, // JPEG image save quality + 'transparency' => 70, // Water mark image transparency ( other than PNG ) + 'targetType' => IMG_GIF|IMG_JPG|IMG_PNG|IMG_WBMP, // Target image formats ( bit-field ) + 'targetMinPixel' => 200 // Target image minimum pixel size + ] + ], + 'artbox-comments' => [ + 'class' => 'common\modules\comment\controllers\ManageController', + 'viewPath' => '@common/modules/comment/views/manage', + ], + ], + 'layout' => 'admin', + 'controllerNamespace' => 'backend\controllers', + 'bootstrap' => ['log'], + 'as AccessBehavior' => [ + 'class' => ArtBoxAccessBehavior::className(), + 'rules' => + [ + 'permit/access' => + [ + [ + 'actions' => ['role', 'permission','add-role', 'update-role','add-permission', 'update-permission' ], + 'allow' => true, + ] + ], + 'site' => + [ + [ + 'actions' => ['login', 'error','logout',], + 'allow' => true, + ], + [ + 'actions' => ['index'], + 'allow' => true, + 'roles' => ['@'], + ] + + ], + 'file/uploader' =>[ + [ + 'actions' => ['images-upload'], + 'allow' => true, + ] + ], + 'elfinder' => [ + [ + 'actions' => ['manager','connect'], + 'allow' => true, + ] + ] + + + ] + ], + 'modules' => [ + 'permit' => [ + 'class' => 'developeruz\db_rbac\Yii2DbRbac', + 'params' => [ + 'userClass' => 'backend\models\User' + ] + ], + + 'rubrication' => [ + 'class' => 'common\modules\rubrication\Module', + 'types' => [ + 'string' => 'Strings', + 'float' => 'Floating number', + 'int' => 'Integer number', + 'link' => 'Web-link', + ] + ], + 'product' => [ + 'class' => 'common\modules\product\Module' + ], + 'gridview' => [ + 'class' => '\kartik\grid\Module' + ], + 'artbox-comment' => [ + 'class' => 'common\modules\comment\Module', + 'userIdentityClass' => 'common\models\Customer', + ], + ], + 'components' => [ + 'authManager' => [ + 'class' => 'yii\rbac\DbManager', + ], + 'user' => [ + 'identityClass' => 'common\models\User', + 'enableAutoLogin' => true, + ], + 'log' => [ + 'traceLevel' => YII_DEBUG ? 3 : 0, + 'targets' => [ + [ + 'class' => 'yii\log\FileTarget', + 'levels' => ['error', 'warning'], + ], + ], + ], + 'imageCache' => [ + 'class' => 'iutbay\yii2imagecache\ImageCache', + 'sourcePath' => '@storage', + 'sourceUrl' => '/storage', + 'thumbsPath' => '@storage/thumbs', + 'thumbsUrl' => '/storage/thumbs', + + 'sizes' => [ + 'slider' => [720, 340], + ], + ], + 'errorHandler' => [ + 'errorAction' => 'site/error', + ], + 'request'=>[ + 'cookieValidationKey' => 'j4iuot9u5894e7tu8reyh78g9y54sy7i', + 'csrfParam' => '_backendCSRF', + + 'class' => 'common\components\Request', + + 'web'=> '/backend/web', + + 'adminUrl' => '/admin' + + ], + 'urlManager' => [ + 'baseUrl' => '/admin', + 'enablePrettyUrl' => true, + 'showScriptName' => false, + 'rules' => [ + 'slider-image///' => 'slider-image/', + 'slider-image//' => 'slider-image/', + 'rubrication/tax-group/' => 'rubrication/tax-group', + 'rubrication/tax-group///' => 'rubrication/tax-group/', + 'rubrication/tax-group//' => 'rubrication/tax-group/', + 'product/manage/' => 'product/manage/', + 'product////' => 'product//', + 'product////' => 'product//', + 'product//' => 'product/', + 'seo-dynamic///' => 'seo-dynamic/', + 'seo-dynamic//' => 'seo-dynamic/', + ] + ] + + ], + 'params' => $params, +]; diff --git a/backend/config/params.php b/backend/config/params.php new file mode 100755 index 0000000..4ee7a49 --- /dev/null +++ b/backend/config/params.php @@ -0,0 +1,4 @@ + 'admin@example.com', +]; diff --git a/backend/controllers/ArticlesController.php b/backend/controllers/ArticlesController.php new file mode 100755 index 0000000..f2ef542 --- /dev/null +++ b/backend/controllers/ArticlesController.php @@ -0,0 +1,165 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all Articles models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new ArticlesSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Articles model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Articles model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Articles(); + + if ($model->load(Yii::$app->request->post())) { + + if ( ($image = UploadedFile::getInstance($model, 'image')) ) { + $model->image = $image->name; + } + + $imgDir = Yii::getAlias('@storage/articles/'); + + if(!is_dir($imgDir)) { + mkdir($imgDir, 0755, true); + } + if ($model->save() && $image) { + $image->saveAs(Yii::getAlias('@storage/articles/' . $image->name)); + } + + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Articles model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post())) { + if ( ($image = UploadedFile::getInstance($model, 'image')) ) { + $model->image = $image->name; + } + + $imgDir = Yii::getAlias('@storage/articles/'); + + if(!is_dir($imgDir)) { + mkdir($imgDir, 0755, true); + } + if ($model->save() && $image) { + $image->saveAs(Yii::getAlias('@storage/articles/' . $image->name)); + } + + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Articles model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Articles model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Articles the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Articles::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/BannerController.php b/backend/controllers/BannerController.php new file mode 100755 index 0000000..ccf4e70 --- /dev/null +++ b/backend/controllers/BannerController.php @@ -0,0 +1,157 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all Banner models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new BannerSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + public function actionSaveImageSettings(){ + \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; + $width = Yii::$app->request->post('width'); + $height = Yii::$app->request->post('height'); + + $html = ImageUploader::widget([ + 'model'=> new Banner(), + 'field'=>'image', + 'size' => [ + [ + 'width'=>$width, + 'height'=>$height, + ], + ], + 'name' => "Загрузить баннер" + ]); + + return ['html'=>$html]; + } + + /** + * Displays a single Banner model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Banner model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Banner(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->banner_id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Banner model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->banner_id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Banner model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Banner model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Banner the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Banner::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/BgController.php b/backend/controllers/BgController.php new file mode 100755 index 0000000..f87fdd6 --- /dev/null +++ b/backend/controllers/BgController.php @@ -0,0 +1,136 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all Bg models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new BgSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Bg model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Bg model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Bg(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Bg model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Bg model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Bg model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Bg the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Bg::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/BlogController.php b/backend/controllers/BlogController.php new file mode 100755 index 0000000..4bf7891 --- /dev/null +++ b/backend/controllers/BlogController.php @@ -0,0 +1,160 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'logout' => ['post'], + ], + ], + ]; + } + + /** + * Lists all Blog models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new BlogSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Blog model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Blog model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Blog(); + + if ($model->load(Yii::$app->request->post())) { + + Fields::saveFieldData(Yii::$app->request->post('Fields'), $model->blog_id, Blog::className(), 'ru'); + + if ( ($image = UploadedFile::getInstance($model, 'imageUpload')) ) { + $model->cover = $image->name; + } + + if ($model->save() && $image) { + $image->saveAs(Yii::getAlias('@imagesDir/articles/' . $image->name)); + } + + return $this->redirect(['view', 'id' => $model->blog_id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Blog model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post())) { + + Fields::saveFieldData(Yii::$app->request->post('Fields'), $model->blog_id, Blog::className(), 'ru'); + + if ( ($image = UploadedFile::getInstance($model, 'imageUpload')) ) { + $model->cover = $image->name; + } + + if ($model->save() && $image) { + $image->saveAs(Yii::getAlias('@imagesDir/articles/' . $image->name)); + } + + return $this->redirect(['view', 'id' => $model->blog_id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Blog model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Blog model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Blog the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Blog::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/BrandController.php b/backend/controllers/BrandController.php new file mode 100755 index 0000000..058a1a0 --- /dev/null +++ b/backend/controllers/BrandController.php @@ -0,0 +1,155 @@ + [ + 'class' => AccessControl::className(), + 'rules' => [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ], + [ + 'actions' => ['logout', 'index', 'create', 'update', 'view', 'delete'], + 'allow' => true, + 'roles' => ['@'], + ], + ], + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'logout' => ['post'], + ], + ], + ]; + } + + /** + * Lists all Brand models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new BrandSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Brand model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Brand model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Brand(); + if ($model->load(Yii::$app->request->post())) { + if ( ($image = UploadedFile::getInstance($model, 'imageUpload')) ) { + $model->image = $image->name; + } + + if ($model->save() && $image) { + $image->saveAs(Yii::getAlias('@imagesDir/brands/' . $image->name)); + } + + return is_null(Yii::$app->request->post('create_and_new')) ? $this->redirect(['view', 'id' => $model->brand_id]) : $this->redirect(array_merge(['create'], Yii::$app->request->queryParams)); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Brand model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post())) { + if ( ($image = UploadedFile::getInstance($model, 'imageUpload')) ) { + $model->image = $image->name; + } + + if ($model->save() && $image) { + $image->saveAs(Yii::getAlias('@imagesDir/brands/' . $image->name)); + } + + return $this->redirect(['view', 'id' => $model->brand_id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Brand model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Brand model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Brand the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Brand::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/CategoryController.php b/backend/controllers/CategoryController.php new file mode 100755 index 0000000..0556c9b --- /dev/null +++ b/backend/controllers/CategoryController.php @@ -0,0 +1,161 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'logout' => ['post'], + ], + ], + ]; + } + + /** + * Lists all Category models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new CategorySearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Category model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Category model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Category(); + + if ($model->load(Yii::$app->request->post())) { + if ( ($image = UploadedFile::getInstance($model, 'imageUpload')) ) { + $model->image = $image->name; + } + + if ($model->save() && $image) { + $image->saveAs(Yii::getAlias('@imagesDir/categories/' . $image->name)); + } + + return is_null(Yii::$app->request->post('create_and_new')) ? $this->redirect(['view', 'id' => $model->category_id]) : $this->redirect(array_merge(['create'], Yii::$app->request->queryParams)); + } else { + if (!empty(Yii::$app->request->queryParams['parent'])) { + $model->parent_id = Yii::$app->request->queryParams['parent']; + } + return $this->render('create', [ + 'model' => $model, + 'categories' => ArtboxTreeHelper::treeMap(Category::find()->with('categoryName')->getTree(), 'category_id', 'categoryName.value', '.') + ]); + } + } + + /** + * Updates an existing Category model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post())) { + if ( ($image = UploadedFile::getInstance($model, 'imageUpload')) ) { + $model->image = $image->name; + } + + if ($model->save() && $image) { + $image->saveAs(Yii::getAlias('@imagesDir/categories/' . $image->name)); + } + + return $this->redirect(['view', 'id' => $model->category_id]); + } else { + return $this->render('update', [ + 'model' => $model, + 'categories' => ArtboxTreeHelper::treeMap(Category::find()->with('categoryName')->getTree(), 'category_id', 'categoryName.value', '.') + ]); + } + } + + /** + * Deletes an existing Category model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Category model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Category the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Category::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/CommentController.php b/backend/controllers/CommentController.php new file mode 100755 index 0000000..1023d5c --- /dev/null +++ b/backend/controllers/CommentController.php @@ -0,0 +1,159 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all Comment models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new CommentSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + $query = $dataProvider->query; + $query->with(['rating', 'user']); + $sort = $dataProvider->sort; + $sort->defaultOrder = [ + 'status' => SORT_ASC, + ]; + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Comment model. + * @param integer $id + * @return mixed + */ +// public function actionView($id) +// { +// return $this->render('view', [ +// 'model' => $this->findModel($id), +// ]); +// } + + /** + * Creates a new Comment model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ +// public function actionCreate() +// { +// $model = new Comment(); +// +// if ($model->load(Yii::$app->request->post()) && $model->save()) { +// return $this->redirect(['view', 'id' => $model->comment_id]); +// } else { +// return $this->render('create', [ +// 'model' => $model, +// ]); +// } +// } + + /** + * Updates an existing Comment model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->comment_id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + public function actionApprove($id) { + $model = $this->findModel($id); + $model->status = Comment::STATUS_ACTIVE; + $model->save(false); + + return $this->redirect(['index']); + } + + public function actionDisapprove($id) { + $model = $this->findModel($id); + $model->status = Comment::STATUS_HIDDEN; + $model->save(false); + + return $this->redirect(['index']); + } + + /** + * Deletes an existing Comment model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Comment model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Comment the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Comment::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/CustomerController.php b/backend/controllers/CustomerController.php new file mode 100755 index 0000000..c91e15d --- /dev/null +++ b/backend/controllers/CustomerController.php @@ -0,0 +1,136 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all Customer models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new CustomerSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Customer model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Customer model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Customer(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Customer model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Customer model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Customer model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Customer the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Customer::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/EventController.php b/backend/controllers/EventController.php new file mode 100755 index 0000000..bf67aab --- /dev/null +++ b/backend/controllers/EventController.php @@ -0,0 +1,156 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all Event models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new EventSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Event model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Event model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Event(); + + if ($model->load(Yii::$app->request->post())) { + + if ( ($image = UploadedFile::getInstance($model, 'imageUpload')) ) { + $model->image = $image->name; + } + + if ($model->save() && $image) { + $image->saveAs(Yii::getAlias('@imagesDir/articles/' . $image->name)); + } + + return $this->redirect(['view', 'id' => $model->event_id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Event model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post())) { + + if ( ($image = UploadedFile::getInstance($model, 'imageUpload')) ) { + $model->image = $image->name; + } + + if ($model->save() && $image) { + $image->saveAs(Yii::getAlias('@imagesDir/articles/' . $image->name)); + } + + return $this->redirect(['view', 'id' => $model->event_id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Event model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Event model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Event the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Event::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/OrdersController.php b/backend/controllers/OrdersController.php new file mode 100755 index 0000000..4794d3a --- /dev/null +++ b/backend/controllers/OrdersController.php @@ -0,0 +1,145 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + public function actionIndex() + { + $searchModel = new OrdersSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'dataProvider'=>$dataProvider, + 'searchModel'=>$searchModel, + ]); + } + + public function actionShow($id) + { + + $model = $this->findModel((int)$id); + $dataProvider = new ActiveDataProvider([ + 'query' => OrdersProducts::find()->where(['order_id'=>(int)$id]), + 'pagination' => [ + 'pageSize' => 20, + ], + ]); + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['index']); + } else { + $model_orderproducts = new OrdersProducts; + + + return $this->renderAjax('show', [ + 'model' => $model, + 'model_orderproducts'=>$model_orderproducts, + 'dataProvider' => $dataProvider, + ]); + } + } + + public function actionLabelupdate(){ + $model = Orders::findOne($_POST['order_id']); + $model->label = $_POST['label_id']; + $model->save(); + } + + public function actionPayupdate(){ + $model = Orders::findOne($_POST['order_id']); + $model->pay = $_POST['pay_id']; + $model->save(); + } + + public function actionDelete(){ + $model = Orders::findOne($_GET['id']); + $model->delete(); + return Yii::$app->response->redirect(['/orders/index']); + } + + + public function actionAdd(){ + $model = new OrdersProducts; + if ($model->load(Yii::$app->request->post())) { + + if(!$modelMod = ProductVariant::find()->with(['product'])->where(['sku'=>$model->sku])->one()) + throw new HttpException(404, 'Данного артикля не существует!'); + $model->product_name = $modelMod->product->name; + $model->name = $modelMod->name; + $model->sku = $modelMod->sku; + $model->price = $modelMod->price; + $model->sum_cost = $model->count*$modelMod->price; + $model->mod_id = $modelMod->id; + $model->save(); + //return Yii::$app->response->redirect(['/admin/orders/show','id'=>$_GET['order_id']]); + } + + //return $this->render('add',['model'=>$model]); + } + + public function actionCreate(){ + $model = new Orders(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['index']); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + public function actionDelete_product(){ + $model = OrdersProducts::findOne($_GET['id']); + $model->delete(); + return Yii::$app->response->redirect(['/admin/orders/show','id'=>$_GET['order_id']]); + } + + protected function findModel($id) + { + if (($model = Orders::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/PageController.php b/backend/controllers/PageController.php new file mode 100755 index 0000000..fbe101f --- /dev/null +++ b/backend/controllers/PageController.php @@ -0,0 +1,136 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all Page models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new PageSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Page model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Page model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Page(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Page model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Page model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Page model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Page the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Page::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/SeoCategoryController.php b/backend/controllers/SeoCategoryController.php new file mode 100755 index 0000000..ea9046c --- /dev/null +++ b/backend/controllers/SeoCategoryController.php @@ -0,0 +1,134 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + + ], + ]; + } + + /** + * Lists all SeoCategory models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new SeoCategorySearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single SeoCategory model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new SeoCategory model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new SeoCategory(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->seo_category_id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing SeoCategory model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->seo_category_id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing SeoCategory model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the SeoCategory model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return SeoCategory the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = SeoCategory::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/SeoController.php b/backend/controllers/SeoController.php new file mode 100755 index 0000000..e3acfaf --- /dev/null +++ b/backend/controllers/SeoController.php @@ -0,0 +1,134 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + + ], + ]; + } + + /** + * Lists all Seo models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new SeoSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Seo model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Seo model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Seo(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->seo_id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Seo model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->seo_id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Seo model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Seo model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Seo the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Seo::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/SeoDynamicController.php b/backend/controllers/SeoDynamicController.php new file mode 100755 index 0000000..54c4162 --- /dev/null +++ b/backend/controllers/SeoDynamicController.php @@ -0,0 +1,140 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + + ], + ]; + } + + /** + * Lists all SeoDynamic models. + * @return mixed + */ + public function actionIndex($seo_category_id) + { + $searchModel = new SeoDynamicSearch(); + $dataProvider = $searchModel->search($seo_category_id,Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + 'seo_category_id' => $seo_category_id + ]); + } + + /** + * Displays a single SeoDynamic model. + * @param integer $id + * @return mixed + */ + public function actionView($seo_category_id, $id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + 'seo_category_id' => $seo_category_id + ]); + } + + /** + * Creates a new SeoDynamic model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate($seo_category_id) + { + $model = new SeoDynamic(); + + if ($model->load(Yii::$app->request->post())) { + $model->seo_category_id = $seo_category_id; + $model->save(); + return $this->redirect(['index', 'seo_category_id' => $model->seo_category_id]); + } else { + return $this->render('create', [ + 'model' => $model, + 'seo_category_id' => $seo_category_id + ]); + } + } + + /** + * Updates an existing SeoDynamic model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($seo_category_id,$id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['index', 'seo_category_id' => $model->seo_category_id]); + } else { + return $this->render('update', [ + 'model' => $model, + 'seo_category_id' => $seo_category_id + ]); + } + } + + /** + * Deletes an existing SeoDynamic model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($seo_category_id,$id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index','seo_category_id'=> $seo_category_id]); + } + + /** + * Finds the SeoDynamic model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return SeoDynamic the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = SeoDynamic::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/ServiceController.php b/backend/controllers/ServiceController.php new file mode 100755 index 0000000..4f199de --- /dev/null +++ b/backend/controllers/ServiceController.php @@ -0,0 +1,136 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all Service models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new ServiceSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Service model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Service model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Service(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->service_id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Service model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->service_id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Service model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Service model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Service the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Service::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/SiteController.php b/backend/controllers/SiteController.php new file mode 100755 index 0000000..ff13865 --- /dev/null +++ b/backend/controllers/SiteController.php @@ -0,0 +1,706 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + ], + ], + ]; + } + + /** + * @inheritdoc + */ + public function actions() + { + return [ + 'error' => [ + 'class' => 'yii\web\ErrorAction', + ], + ]; + } + + public function actionIndex() + { + $blog = new Blog(); + $post = \Yii::$app->request->post(); + if($blog->load($post)) { + $blog->save(); + } + return $this->render('index',[ + 'blog' => $blog + ]); + } + + public function actionLogin() + { + $this->layout = '/none'; + + if (!\Yii::$app->user->isGuest) { + return $this->goHome(); + } + + $model = new LoginForm(); + if ($model->load(Yii::$app->request->post()) && $model->login()) { + return $this->redirect(Url::to('/admin/site/index')); + } else { + return $this->render('login', [ + 'model' => $model, + ]); + } + } + + public function actionLogout() + { + Yii::$app->user->logout(); + + return $this->goHome(); + } + + public function actionGo() { + $new_products = $linked_products = 0; + + // открываем файл и перебираем + $filename = Yii::getAlias('@uploadDir') .'/'. Yii::getAlias('@uploadFileProducts'); + if (!is_file($filename)) { + var_dump("File $filename not found"); + return Controller::EXIT_CODE_ERROR; + } + var_dump("File $filename loaded\n"); + + $db = yii::$app->db; + + if (($handle = fopen ($filename, 'r')) !== FALSE) + { + $j = 0; + + while (($data = fgetcsv ($handle, 10000, ";")) !== FALSE) + { + $j++; + + foreach ($data as &$value) + { + //$value = mb_convert_encoding ($value, "UTF-8", mb_detect_encoding ($value)); + $value = iconv ('windows-1251', "UTF-8//TRANSLIT//IGNORE", $value); + $value = trim ($value); + } + + // будет всегда 19 элементов + for ($i = 0; $i <= 18; $i++) + { + if (! isset ($data[$i])) + { + $data[$i] = null; + } + } + + // 1 Группа (категория) + $catalog_name = $data[0]; + if (empty ($catalog_name)) + { + CONTINUE; + } + + // 2 Бренд + $brand_name = $data[1]; + if (empty ($brand_name)) + { + CONTINUE; + } + + // 3 Название товара + $product_name = $data[2]; + if (empty ($product_name)) + { + CONTINUE; + } + + // 4 Описание Укр + $product_body_uk = $data[3]; + + // 5 Описание Рус + $product_body_ru = $data[4]; + + // 6 Фильтр (через запятую) + $filters = explode (',', $data[5]); + + // 7 Доп фильтр через запятую + $filters_extra = explode (',', $data[6]); + + // 8 Пол череззапятую (мужской, женский, детский, унисекс) + $gender = explode (',', $data[7]); + + // 9 Год + $years = explode (',', $data[8]); + + // 10 Цена старая + $product_cost_old = $data[9]; + + // 11 Цена + $produc_cost = $data[10]; + + // 12 Акция + $product_akciya = (bool)$data[11]; + + // 13 Сопуд. Тов. + $similar = explode (',', $data[12]); + + // 14 Новинки + $product_new = (bool)$data[13]; + + // 15 Топ продаж + $product_top = (bool)$data[14]; + + // 16 Сетка Характеристик + $feature = explode ('=', $data[15]); + + // 17 ВИДЕО КОД + $product_video = $data[16]; + + // 18 Галлерея фото + $fotos = explode (',', $data[17]); + + // 19 Штрих код товара. + // расшифровал - это модификации товара! + + $product_image = explode ('=', $data[18]); + $product_image = @$product_image[3]; + + if ( ($_product = Product::find()->filterWhere(['ilike', 'name', trim($product_name)])->one()) === null ) { + $_product = new Product(); + } + + // ==== Set category ==== + if ( ($category = CategoryName::find()->filterWhere(['ilike', 'value', trim($catalog_name)])->one()) !== null ) { + $_product->categories = [$category->category_id]; + } else { + // Create category + $category = new Category(); + $category->name = trim($catalog_name); + $category->save(); + $_product->categories = [$category->category_id]; + } + + // ===== Set brand ==== + if ( $brand_name ) { + if ( ($brand = BrandName::find()->filterWhere(['ilike', 'value', trim($brand_name)])->one()) !== null ) { + $_product->brand_id = $brand->brand_id; + } else { + // Create brand + $brand = new Brand(); + $brand->name = trim($brand_name); + $brand->save(); + $_product->brand_id = $brand->brand_id; + } + } + + $_product->name = $product_name; + $_product->video = $product_video; + $_product->description = $product_body_ru; + $_product->top = $product_top; + $_product->akciya = $product_akciya; + $_product->new = $product_new; + + + $_product->save(); + + + // @todo Set image + /*// картинки + if (is_file ($dir.'/mod/' . $product_image)) + { + $resizeObj = new resize ($dir.'/mod/' . $product_image); + $resizeObj->resizeImage (135, 200, 'auto'); + $resizeObj->saveImage ($dir.'/products/ico/' . $product_image, 100); + $resizeObj->resizeImage (370, 370, 'auto'); + $resizeObj->saveImage ($dir.'/products/big/' . $product_image, 100); + }*/ + + // ==== mods ==== + + // (типа штрих код товара) + + // нужно для проставления характеристик относящихся к модификациям + $MOD_ARRAY = []; + + for ($i = 18; $i < count ($data); $i ++) + { + if (! empty ($data[$i])) + { + $mod_arr = explode ('=', $data[$i]); + $mod_art = $mod_arr[0]; + $mod_size = $mod_arr[1]; + $mod_color = $mod_arr[2]; + $mod_image = $mod_arr[3]; + $mod_cost = $produc_cost; + $mod_old_cost = $product_cost_old; + + // Check product variant + if ( ($_productVariant = ProductVariant::find()->andWhere(['ilike', 'sku', $mod_art])->andWhere(['product_id' => $_product->product_id])->one()) === null ) { + $_productVariant = new ProductVariant(); + $_productVariant->product_id = $_product->product_id; + } + + $_productVariant->sku = $mod_art; + $_productVariant->price = $mod_cost; + $_productVariant->price_old = $mod_old_cost; + + $_productVariant->save(); + + $MOD_ARRAY[] = $_productVariant->product_variant_id; + + + $dir = Yii::getAlias('@productsDir').'/'; + if (is_file ($dir . $mod_image)) + { + $resizeObj = new resize ($dir . $mod_image); + $resizeObj->resizeImage (40, 40, 'crop'); + $resizeObj->saveImage ($dir.'ico/' . $mod_image, 100); + $resizeObj->resizeImage (370, 370, 'auto'); + $resizeObj->saveImage ($dir.'/big/' . $mod_image, 100); + } + + $product_variant_type_name = ''; + if (! empty ($mod_color)) + $product_variant_type_name = 'Цвет'; + elseif (! empty ($mod_size)) + $product_variant_type_name = 'Размер'; + + // ===== Set variant type ==== + if ( $product_variant_type_name ) { + if ( ($product_variant_type = ProductVariantType::find()->filterWhere(['ilike', 'name', $product_variant_type_name])->one()) !== null ) { + $_productVariant->product_variant_type_id = $product_variant_type->product_variant_type_id; + } else { + // Create brand + $product_variant_type = new ProductVariantType(); + $product_variant_type->name = $product_variant_type_name; + $product_variant_type->save(); + $_productVariant->product_variant_type_id = $product_variant_type->product_variant_type_id; + } + } + } + } + + /*// ==== fotos ==== + + foreach ($fotos as $foto) + { + $fields = [ + 'product_id' => $product_id, + 'image' => $foto + ]; + + $modelFotos = Fotos::find () + ->where ('image=:image', [ + ':image' => $foto + ]) + ->one (); + + if (empty ($modelFotos->id)) + { + $db->createCommand () + ->insert ('products_fotos', $fields) + ->execute (); + } + else + { + $db->createCommand () + ->update ('products_fotos', $fields, 'id = ' . $modelFotos->id) + ->execute (); + } + + if (is_file ($dir.'/fotos/' . $foto)) + { + $resizeObj = new resize ($dir.'/fotos/' . $foto); + $resizeObj->resizeImage (100, 100, 'crop'); + $resizeObj->saveImage ($dir.'/fotos/ico/' . $foto, 100); + $resizeObj->resizeImage (400, 400, 'crop'); + $resizeObj->saveImage ($dir.'/fotos/big/' . $foto, 100); + } + }*/ + + // ======================== + // ==== ХАРАКТЕРИСТИКИ ==== + // ======================== + + // есть общие характеристики, которые относятся product_id, такие как brand, gender... + // есть характеристики, которые относятся mod_id, такие как цвет, размер... + + // ==== gender ==== + + /*if (! empty ($gender)) + { + $bookGender = Book::find () + ->where ('book_alias=:book', [ + ':book' => 'gender' + ]) + ->one (); + + foreach ($gender as $filter) + { + if (! empty ($filter)) + { + $bookGenderValue = BookValue::find () + ->where (' + book_id=:book + AND book_value_title=:value + AND book_value_alias=:alias + ', [ + ':book' => $bookGender->book_id, + ':value' => $filter, + ':alias' => Translite::rusencode ($filter), + ] + ) + ->one(); + + if (! isset ($bookGenderValue->book_value_id) || empty ($bookGenderValue->book_value_id)) + { + $db->createCommand () + ->insert (BookValue::tableName (), [ + 'book_id' => $bookGender->book_id, + 'book_value_title' => $filter, + 'book_value_alias' => Translite::rusencode ($filter), + ]) + ->execute (); + + $book_value_id = Yii::$app->db->lastInsertID; + } + else + { + $book_value_id = $bookGenderValue->book_value_id; + } + + // + products_value + $db->createCommand (' + INSERT IGNORE products_value + SET + product_id = '.(int)$product_id.', + book_value_id = '.(int)$book_value_id.' + ') + ->execute (); + } + } + } + + // есть характеристики, которые относятся mod_id, такие как цвет, размер... + + // ==== destination ==== + + if (! empty ($filters)) + { + $bookDestination = Book::find () + ->where ('book_alias=:book', [ + ':book' => 'destination' + ]) + ->one (); + + foreach ($filters as $filter) + { + if (! empty ($filter)) + { + $bookDestinationValue = BookValue::find () + ->where (' + book_id=:book + AND book_value_title=:value + AND book_value_alias=:alias + ', [ + ':book' => $bookDestination->book_id, + ':value' => $filter, + ':alias' => Translite::rusencode ($filter), + ] + ) + ->one(); + + if (! isset ($bookDestinationValue->book_value_id) || empty ($bookDestinationValue->book_value_id)) + { + $db->createCommand () + ->insert (BookValue::tableName (), [ + 'book_id' => $bookDestination->book_id, + 'book_value_title' => $filter, + 'book_value_alias' => Translite::rusencode ($filter), + ]) + ->execute (); + + $book_value_id = Yii::$app->db->lastInsertID; + } + else + { + $book_value_id = $bookDestinationValue->book_value_id; + } + + if (! empty ($MOD_ARRAY)) + { + foreach ($MOD_ARRAY as $id) + { + // + products_value + $db->createCommand (' + INSERT IGNORE mod_value + SET + mod_id = '.(int)$id.', + book_value_id = '.(int)$book_value_id.' + ') + ->execute (); + } + } + } + } + } + + // ==== special ==== + + if (! empty ($filters_extra)) + { + $bookSpecial = Book::find () + ->where ('book_alias=:book', [ + ':book' => 'special' + ]) + ->one (); + + foreach ($filters_extra as $filter) + { + if (! empty ($filter)) + { + $bookSpecialValue = BookValue::find () + ->where (' + book_id=:book + AND book_value_title=:value + AND book_value_alias=:alias + ', [ + ':book' => $bookSpecial->book_id, + ':value' => $filter, + ':alias' => Translite::rusencode ($filter), + ] + ) + ->one(); + + if (! isset ($bookSpecialValue->book_value_id) || empty ($bookSpecialValue->book_value_id)) + { + $db->createCommand () + ->insert (BookValue::tableName (), [ + 'book_id' => $bookSpecial->book_id, + 'book_value_title' => $filter, + 'book_value_alias' => Translite::rusencode ($filter), + ]) + ->execute (); + + $book_value_id = Yii::$app->db->lastInsertID; + } + else + { + $book_value_id = $bookSpecialValue->book_value_id; + } + + if (! empty ($MOD_ARRAY)) + { + foreach ($MOD_ARRAY as $id) + { + // + products_value + $db->createCommand (' + INSERT IGNORE mod_value + SET + mod_id = '.(int)$id.', + book_value_id = '.(int)$book_value_id.' + ') + ->execute (); + } + } + } + } + } + + // ==== year ==== + + if (! empty ($years)) + { + $bookYear = Book::find () + ->where ('book_alias=:book', [ + ':book' => 'year' + ]) + ->one (); + + foreach ($years as $filter) + { + if (! empty ($filter)) + { + $bookYearValue = BookValue::find () + ->where (' + book_id=:book + AND book_value_title=:value + AND book_value_alias=:alias + ', [ + ':book' => $bookYear->book_id, + ':value' => $filter, + ':alias' => Translite::rusencode ($filter), + ] + ) + ->one(); + + if (! isset ($bookYearValue->book_value_id) || empty ($bookYearValue->book_value_id)) + { + $db->createCommand () + ->insert (BookValue::tableName (), [ + 'book_id' => $bookYear->book_id, + 'book_value_title' => $filter, + 'book_value_alias' => Translite::rusencode ($filter), + ]) + ->execute (); + + $book_value_id = Yii::$app->db->lastInsertID; + } + else + { + $book_value_id = $bookYearValue->book_value_id; + } + + if (! empty ($MOD_ARRAY)) + { + foreach ($MOD_ARRAY as $id) + { + // + products_value + $db->createCommand (' + INSERT IGNORE mod_value + SET + mod_id = '.(int)$id.', + book_value_id = '.(int)$book_value_id.' + ') + ->execute (); + } + } + } + } + } + + // ==== $feature ==== + + if (! empty ($feature)) + { + foreach ($feature as $string) + { + $string = str_replace([':', '.'], '', $string); + + if (! empty ($string)) + { + list ($book_title, $value_title) = explode ('*', $string); + + $book_title = trim ($book_title); + $value_title = trim ($value_title); + + if (empty ($book_title) || empty ($value_title)) + { + CONTINUE; + } + + $bookFeature = Book::find () + ->where ('book_title=:book', [ + ':book' => $book_title + ]) + ->one (); + + if (! isset ($bookFeature->book_id) || empty ($bookFeature->book_id)) + { + $db->createCommand () + ->insert (Book::tableName (), [ + 'book_title' => $book_title, + 'book_alias' => Translite::rusencode ($book_title), + ]) + ->execute (); + + $book_id = Yii::$app->db->lastInsertID; + } + else + { + $book_id = $bookFeature->book_id; + } + + $bookFeatureValue = BookValue::find () + ->where (' + book_id=:book + AND book_value_title=:value + AND book_value_alias=:alias + ', [ + ':book' => $book_id, + ':value' => $value_title, + ':alias' => Translite::rusencode ($value_title), + ] + ) + ->one(); + + if (! isset ($bookFeatureValue->book_value_id) || empty ($bookFeatureValue->book_value_id)) + { + $db->createCommand () + ->insert (BookValue::tableName (), [ + 'book_id' => $book_id, + 'book_value_title' => $value_title, + 'book_value_alias' => Translite::rusencode ($value_title), + ]) + ->execute (); + + $book_value_id = Yii::$app->db->lastInsertID; + } + else + { + $book_value_id = $bookFeatureValue->book_value_id; + } + + if (! empty ($MOD_ARRAY)) + { + foreach ($MOD_ARRAY as $id) + { + // + products_value + $db->createCommand (' + INSERT IGNORE mod_value + SET + mod_id = '.(int)$id.', + book_value_id = '.(int)$book_value_id.' + ') + ->execute (); + } + } + } + } + }*/ + + // ==== IMPORTANT ==== + + // записуем ID обработанной записи + + $_product->save(); + var_dump("$j: Product {$_product->name} saved\n"); + if ($j > 100) { + var_dump("Dev OK"); + exit; + } + } + + fclose ($handle); + } + } +} diff --git a/backend/controllers/SliderController.php b/backend/controllers/SliderController.php new file mode 100755 index 0000000..dad2406 --- /dev/null +++ b/backend/controllers/SliderController.php @@ -0,0 +1,140 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all Slider models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new SliderSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Slider model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Slider model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Slider(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->slider_id]); + } else { + + + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Slider model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->slider_id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Slider model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Slider model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Slider the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Slider::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/SliderImageController.php b/backend/controllers/SliderImageController.php new file mode 100755 index 0000000..a0009cd --- /dev/null +++ b/backend/controllers/SliderImageController.php @@ -0,0 +1,188 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all SliderImage models. + * @param $slider_id Slider id + * @return mixed + */ + public function actionIndex($slider_id) + { + $searchModel = new SliderImageSearch(); + $dataProvider = $searchModel->search($slider_id, Yii::$app->request->queryParams); + + return $this->render('index', [ + 'slider_id' => $slider_id, + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single SliderImage model. + * @param integer $id + * @param $slider_id Slider id + * @return mixed + */ + public function actionView($slider_id, $id) + { + return $this->render('view', [ + 'slider_id' => $slider_id, + 'model' => $this->findModel($slider_id, $id), + ]); + } + + /** + * Creates a new SliderImage model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @param $slider_id Slider id + * @return mixed + */ + public function actionCreate($slider_id) + { + $model = new SliderImage(); + + if ($model->load(Yii::$app->request->post())) { + $model->slider_id = $slider_id; + if ( ($image = UploadedFile::getInstance($model, 'image')) ) { + $model->image = $image->name; + } + if ($model->save() && $image) { + + $imgDir = Yii::getAlias('@storage/slider/'); + + if(!is_dir($imgDir)) { + mkdir($imgDir, 0755, true); + } + + $image->saveAs(Yii::getAlias('@storage/slider/' . $image->name)); + } + return $this->redirect(['view', 'slider_id'=>$slider_id, 'id' => $model->slider_image_id]); + } else { + + $slider = Slider::findOne($slider_id); + + return $this->render('create', [ + 'slider_id' => $slider_id, + 'model' => $model, + 'slider' => $slider, + ]); + } + } + + /** + * Updates an existing SliderImage model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param $slider_id Slider id + * @param integer $id + * @return mixed + */ + public function actionUpdate($slider_id, $id) + { + $model = $this->findModel($slider_id, $id); + + if ($model->load(Yii::$app->request->post())) { + + + + if ( ($image = UploadedFile::getInstance($model, 'image')) ) { + $model->image = $image->name; + } + + if(!$model->image){ + $model->image = $model->getOldAttribute('image'); + } + + if ($model->save() && $image) { + $imgDir = Yii::getAlias('@storage/slider/'); + + if(!is_dir($imgDir)) { + mkdir($imgDir, 0755, true); + } + + $image->saveAs(Yii::getAlias('@storage/slider/' . $image->name)); + } + return $this->redirect(['view', 'slider_id'=>$slider_id, 'id' => $model->slider_image_id]); + } else { + + $slider = Slider::findOne($slider_id); + return $this->render('update', [ + 'model' => $model, + 'slider_id' => $slider_id, + 'slider' => $slider, + ]); + } + } + + /** + * Deletes an existing SliderImage model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param $slider_id Slider id + * @param integer $id + * @return mixed + */ + public function actionDelete($slider_id, $id) + { + $this->findModel($slider_id, $id)->delete(); + + return $this->redirect(['index','slider_id'=>$slider_id]); + } + + /** + * Finds the SliderImage model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param $slider_id Slider id + * @param integer $id + * @return SliderImage the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($slider_id,$id) + { + if (($model = SliderImage::find()->where(['slider_image_id'=> $id, 'slider_id'=>$slider_id])->one()) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/SubscribeController.php b/backend/controllers/SubscribeController.php new file mode 100755 index 0000000..211bddf --- /dev/null +++ b/backend/controllers/SubscribeController.php @@ -0,0 +1,136 @@ +[ + 'class' => AccessBehavior::className(), + 'rules' => + ['site' => + [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ] + ] + ] + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all Subscribe models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new SubscribeSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Subscribe model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Subscribe model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Subscribe(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing Subscribe model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing Subscribe model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Subscribe model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Subscribe the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Subscribe::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/UserController.php b/backend/controllers/UserController.php new file mode 100755 index 0000000..802358c --- /dev/null +++ b/backend/controllers/UserController.php @@ -0,0 +1,161 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + 'access' => [ + 'class' => AccessControl::className(), + 'rules' => [ + [ + 'allow' => true, +// 'actions' => ['login', 'signup'], + 'roles' => ['admin'], + ], + [ +// 'allow' => true, +// 'actions' => ['logout'], +// 'roles' => ['@'], + ], + ], + ], + ]; + } + + /** + * Lists all User models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new UserSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single User model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new User model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new User(); + if (Yii::$app->request->isAjax) { + Yii::$app->response->format = Response::FORMAT_JSON; + $model->load(Yii::$app->request->post()); + return ActiveForm::validate($model); + }else if ($model->load(Yii::$app->request->post()) && $model->validate()) { + $model->save(); + + foreach($model->role as $k => $role){ + $auth = Yii::$app->authManager; + $authorRole = $auth->getRole($role); + $auth->assign($authorRole, $model->id); + } + + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing User model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + if (Yii::$app->request->isAjax) { + Yii::$app->response->format = Response::FORMAT_JSON; + $model->load(Yii::$app->request->post()); + return ActiveForm::validate($model); + }else if ($model->load(Yii::$app->request->post()) && $model->validate()) { + + $model->save(); + + return $this->redirect(['view', 'id' => $model->id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing User model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the User model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return User the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = User::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/models/.gitkeep b/backend/models/.gitkeep new file mode 100755 index 0000000..5e4debc --- /dev/null +++ b/backend/models/.gitkeep @@ -0,0 +1 @@ +* diff --git a/backend/models/CommentSearch.php b/backend/models/CommentSearch.php new file mode 100755 index 0000000..cb831de --- /dev/null +++ b/backend/models/CommentSearch.php @@ -0,0 +1,79 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'comment_id' => $this->comment_id, + 'user_id' => $this->user_id, + 'comment_pid' => $this->comment_pid, + 'status' => $this->status, + 'date_add' => $this->date_add, + 'date_update' => $this->date_update, + 'date_delete' => $this->date_delete, + 'model_id' => $this->model_id, + ]); + + $query->andFilterWhere(['like', 'text', $this->text]) + ->andFilterWhere(['like', 'user_name', $this->user_name]) + ->andFilterWhere(['like', 'user_email', $this->user_email]) + ->andFilterWhere(['like', 'model', $this->model]); + + return $dataProvider; + } +} diff --git a/backend/models/Label.php b/backend/models/Label.php new file mode 100755 index 0000000..fbbc9f7 --- /dev/null +++ b/backend/models/Label.php @@ -0,0 +1,25 @@ +name; + } + + + + + + +} diff --git a/backend/models/LoginForm.php b/backend/models/LoginForm.php new file mode 100755 index 0000000..2e18535 --- /dev/null +++ b/backend/models/LoginForm.php @@ -0,0 +1,93 @@ +hasErrors()) { + $user = $this->getUser(); + if (!$user || !$user->validatePassword($this->password)) { + $this->addError($attribute, 'Incorrect username or password.'); + } + } + } + + /** + * Logs in a user using the provided username and password. + * + * @return boolean whether the user is logged in successfully + */ + public function login() + { + if ($this->validate()) { + return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0); + } else { + return false; + } + } + + /** + * Finds user by [[username]] + * + * @return User|null + */ + protected function getUser() + { + if ($this->_user === null) { + $this->_user = User::findByUsername($this->username); + } + + return $this->_user; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + + 'username' => 'Имя пользователя', + 'password' => 'Пароль', + 'rememberMe' => 'Запомнить пароль', + + ]; + } +} diff --git a/backend/models/Orders.php b/backend/models/Orders.php new file mode 100755 index 0000000..982e623 --- /dev/null +++ b/backend/models/Orders.php @@ -0,0 +1,72 @@ +'jpg, gif, png', 'skipOnEmpty'=>true], + ]; + } + + public function attributeLabels() + { + return [ + 'id'=>'№ заказа', + 'name'=>'ФИО', + 'phone'=>'Телефон', + 'phone2'=>'Телефон 2', + 'adress'=>'Адрес', + 'body'=>'Сообщение', + 'reserve'=>'Резерв', + 'status'=>'Статус', + 'email'=>'E-mail', + 'total'=>'Сумма', + 'labels'=>'Метки', + 'label'=>'Метка', + 'comment'=>'Комментарий менеджера', + 'date_dedline'=>'Дедлайн', + 'numbercard'=>'№ карточки', + 'delivery'=>'Доставка', + 'declaration'=>'Декларация №', + 'stock'=>'№ склада', + 'consignment'=>'№ накладной', + 'payment'=>'Способ оплаты', + 'insurance'=>'Страховка', + 'amount_imposed'=>'Сумма наложенного', + 'shipping_by'=>'Отправка за счет', + 'city'=>'Город' + ]; + } + + public function beforeSave($insert) { + return parent::beforeSave($insert); + } + + public function beforeDelete() { + return parent::beforeDelete(); + } + + public function getUser() + { + return $this->hasOne(Customer::className(), ['id' => 'user_id']); + } + + + +} \ No newline at end of file diff --git a/backend/models/OrdersProducts.php b/backend/models/OrdersProducts.php new file mode 100755 index 0000000..503f311 --- /dev/null +++ b/backend/models/OrdersProducts.php @@ -0,0 +1,38 @@ +'Продукт', + 'name'=>'Вид', + 'art'=>'Артикул', + 'cost'=>'Цена за один', + 'count'=>'Кол.', + 'sum_cost'=>'Сумма', + ]; + } + + public function getMod() + { + return $this->hasOne(ProductVariant::className(), ['product_variant_id' => 'mod_id']); + } +} \ No newline at end of file diff --git a/backend/models/OrdersSearch.php b/backend/models/OrdersSearch.php new file mode 100755 index 0000000..5183ad6 --- /dev/null +++ b/backend/models/OrdersSearch.php @@ -0,0 +1,98 @@ + $query, + 'sort'=> ['defaultOrder' => ['id'=>SORT_DESC]], + 'pagination' => [ + 'pageSize' => 20, + ] + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'id' => $this->id, + 'user_id' => $this->user_id, + 'total' => $this->total, + 'date_time' => $this->date_time, + 'date_dedline' => $this->date_dedline, + 'label' => $this->label, + 'pay' => $this->pay, + 'numbercard' => $this->numbercard, + 'amount_imposed' => $this->amount_imposed, + ]); + + $query->andFilterWhere(['like', 'name', $this->name]) + ->andFilterWhere(['like', 'phone', $this->phone]) + ->andFilterWhere(['like', 'phone2', $this->phone2]) + ->andFilterWhere(['like', 'email', $this->email]) + ->andFilterWhere(['like', 'adress', $this->adress]) + ->andFilterWhere(['like', 'body', $this->body]) + ->andFilterWhere(['like', 'reserve', $this->reserve]) + ->andFilterWhere(['like', 'status', $this->status]) + ->andFilterWhere(['like', 'comment', $this->comment]) + ->andFilterWhere(['like', 'delivery', $this->delivery]) + ->andFilterWhere(['like', 'declaration', $this->declaration]) + ->andFilterWhere(['like', 'stock', $this->stock]) + ->andFilterWhere(['like', 'consignment', $this->consignment]) + ->andFilterWhere(['like', 'payment', $this->payment]) + ->andFilterWhere(['like', 'insurance', $this->insurance]) + ->andFilterWhere(['like', 'shipping_by', $this->shipping_by]) + ->andFilterWhere(['like', 'city', $this->city]); + + return $dataProvider; + } +} diff --git a/backend/models/User.php b/backend/models/User.php new file mode 100755 index 0000000..ad6e067 --- /dev/null +++ b/backend/models/User.php @@ -0,0 +1,204 @@ + 255], + [['auth_key'], 'string', 'max' => 32], + [['password_reset_token'], 'unique'], + ['email', 'unique', 'targetClass' => '\backend\models\User', 'message' => Yii::t('app','message',[ + 'field' => 'Email' + ])], + ]; + } + + + /** + * @inheritdoc + */ + public function behaviors() + { + return [ + TimestampBehavior::className(), + [ + 'class' => 'common\behaviors\ShowImage', + ], + ]; + } + + + public function beforeSave($insert) + { + $this->setPassword($this->password); + $this->generateAuthKey(); + return parent::beforeSave($insert); + } + + + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'username' => 'Username', + 'auth_key' => 'Auth Key', + 'password_hash' => 'Password Hash', + 'password_reset_token' => 'Password Reset Token', + 'email' => 'Email', + 'status' => 'Status', + 'created_at' => 'Created At', + 'updated_at' => 'Updated At', + ]; + } + + + /** + * Generates "remember me" authentication key + */ + public function generateAuthKey() + { + $this->auth_key = Yii::$app->security->generateRandomString(); + } + + /** + * Generates password hash from password and sets it to the model + * + * @param string $password + */ + public function setPassword($password) + { + $this->password_hash = Yii::$app->security->generatePasswordHash($password); + } + + + + + + public function getRole(){ + return !empty($this->id) ? \Yii::$app->authManager->getRolesByUser($this->id) : ""; + } + + /** + * @inheritdoc + */ + public function getId() + { + return $this->getPrimaryKey(); + } + + /** + * @inheritdoc + */ + public function getAuthKey() + { + return $this->auth_key; + } + + /** + * @inheritdoc + */ + public function validateAuthKey($authKey) + { + return $this->getAuthKey() === $authKey; + } + + + /** + * @inheritdoc + */ + public static function findIdentityByAccessToken($token, $type = null) + { + throw new NotSupportedException('"findIdentityByAccessToken" is not implemented.'); + } + + /** + * @inheritdoc + */ + public static function findIdentity($id) + { + return static::findOne(['id' => $id, 'status' => self::STATUS_ACTIVE]); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getComments() + { + return $this->hasMany(Comment::className(), ['user_id' => 'id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getRatings() + { + return $this->hasMany(Rating::className(), ['user_id' => 'id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getShares() + { + return $this->hasMany(Share::className(), ['user_id' => 'id']); + } + + + public function getUserName() + { + return $this->username; + } + + +} diff --git a/backend/models/UserSearch.php b/backend/models/UserSearch.php new file mode 100755 index 0000000..5ac51e0 --- /dev/null +++ b/backend/models/UserSearch.php @@ -0,0 +1,76 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'id' => $this->id, + 'status' => $this->status, + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]); + + $query->andFilterWhere(['like', 'username', $this->username]) + ->andFilterWhere(['like', 'auth_key', $this->auth_key]) + ->andFilterWhere(['like', 'password_hash', $this->password_hash]) + ->andFilterWhere(['like', 'password_reset_token', $this->password_reset_token]) + ->andFilterWhere(['like', 'email', $this->email]); + + return $dataProvider; + } +} diff --git a/backend/views/articles/_form.php b/backend/views/articles/_form.php new file mode 100755 index 0000000..f5eb6f8 --- /dev/null +++ b/backend/views/articles/_form.php @@ -0,0 +1,74 @@ + + +
+ + false, + 'options' => ['enctype' => 'multipart/form-data'] + ]); ?> + + + field($model, 'date') + ->widget(DatePicker::className(), [ + 'dateFormat' => 'yyyy-MM-dd', + 'clientOptions' => [ 'minDate' => 1 ], + ]) ?> + field($model, 'title')->textInput(['maxlength' => true]) ?> + + field($model, 'body')->widget(CKEditor::className(), + [ + 'editorOptions' => ElFinder::ckeditorOptions('elfinder',[ + 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать + 'inline' => false, //по умолчанию false]), + 'filebrowserUploadUrl'=>Yii::$app->getUrlManager()->createUrl('file/uploader/images-upload') + ] + ) + ]) ?> + + + field($model, 'image')->widget(\kartik\file\FileInput::classname(), [ + 'language' => 'ru', + 'options' => [ + 'accept' => 'image/*', + 'multiple' => false, + ], + 'pluginOptions' => [ + 'allowedFileExtensions' => ['jpg', 'gif', 'png'], + 'initialPreview' => !empty($model->imageUrl) ? \common\components\artboximage\ArtboxImageHelper::getImage($model->imageUrl, 'list') : '', + 'overwriteInitial' => true, + 'showRemove' => false, + 'showUpload' => false, + 'previewFileType' => 'image', + ], + ]); ?> + + field($model, 'translit')->textInput(['maxlength' => true]) ?> + + field($model, 'meta_title')->textInput(['maxlength' => true]) ?> + + field($model, 'meta_keywords')->textInput(['maxlength' => true]) ?> + + field($model, 'meta_description')->textInput(['maxlength' => true]) ?> + + field($model, 'seo_text')->textarea(['rows' => 6]) ?> + + field($model, 'h1')->textInput(['maxlength' => true]) ?> + +
+ isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/articles/_search.php b/backend/views/articles/_search.php new file mode 100755 index 0000000..afb9cfc --- /dev/null +++ b/backend/views/articles/_search.php @@ -0,0 +1,47 @@ + + + diff --git a/backend/views/articles/create.php b/backend/views/articles/create.php new file mode 100755 index 0000000..3129639 --- /dev/null +++ b/backend/views/articles/create.php @@ -0,0 +1,21 @@ +title = 'Create Articles'; +$this->params['breadcrumbs'][] = ['label' => 'Articles', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/articles/index.php b/backend/views/articles/index.php new file mode 100755 index 0000000..f97b4d3 --- /dev/null +++ b/backend/views/articles/index.php @@ -0,0 +1,41 @@ +title = 'Articles'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'id', + 'date', + 'title', + 'image', + // 'translit', + // 'meta_title', + // 'meta_keywords', + // 'meta_description', + // 'seo_text:ntext', + // 'h1', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/backend/views/articles/update.php b/backend/views/articles/update.php new file mode 100755 index 0000000..a30c97d --- /dev/null +++ b/backend/views/articles/update.php @@ -0,0 +1,21 @@ +title = 'Update Articles: ' . $model->title; +$this->params['breadcrumbs'][] = ['label' => 'Articles', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->id]]; +$this->params['breadcrumbs'][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/articles/view.php b/backend/views/articles/view.php new file mode 100755 index 0000000..23ccbc5 --- /dev/null +++ b/backend/views/articles/view.php @@ -0,0 +1,42 @@ +title = $model->title; +$this->params['breadcrumbs'][] = ['label' => 'Articles', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->id], ['class' => 'btn btn-primary']) ?> + $model->id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => 'Are you sure you want to delete this item?', + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'id', + 'date', + 'title', + 'translit', + 'meta_title', + 'meta_keywords', + 'meta_description', + 'h1', + ], + ]) ?> + +
diff --git a/backend/views/banner/_form.php b/backend/views/banner/_form.php new file mode 100755 index 0000000..0c8868a --- /dev/null +++ b/backend/views/banner/_form.php @@ -0,0 +1,95 @@ + + + + diff --git a/backend/views/banner/_search.php b/backend/views/banner/_search.php new file mode 100755 index 0000000..4bc81e3 --- /dev/null +++ b/backend/views/banner/_search.php @@ -0,0 +1,38 @@ + + + diff --git a/backend/views/banner/create.php b/backend/views/banner/create.php new file mode 100755 index 0000000..8fbe344 --- /dev/null +++ b/backend/views/banner/create.php @@ -0,0 +1,21 @@ +title = Yii::t('app', 'Create Banner'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Banners'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/backend/views/banner/index.php b/backend/views/banner/index.php new file mode 100755 index 0000000..a6ecfc8 --- /dev/null +++ b/backend/views/banner/index.php @@ -0,0 +1,37 @@ +title = Yii::t('app', 'Banners'); +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/backend/views/banner/update.php b/backend/views/banner/update.php new file mode 100755 index 0000000..44ddca7 --- /dev/null +++ b/backend/views/banner/update.php @@ -0,0 +1,23 @@ +title = Yii::t('app', 'Update {modelClass}: ', [ + 'modelClass' => 'Banner', +]) . $model->title; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Banners'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->banner_id]]; +$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); +?> + diff --git a/backend/views/banner/view.php b/backend/views/banner/view.php new file mode 100755 index 0000000..9200c04 --- /dev/null +++ b/backend/views/banner/view.php @@ -0,0 +1,40 @@ +title = $model->title; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Banners'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/backend/views/bg/_form.php b/backend/views/bg/_form.php new file mode 100755 index 0000000..30dd166 --- /dev/null +++ b/backend/views/bg/_form.php @@ -0,0 +1,27 @@ + + +
+ + + + field($model, 'title')->textInput(['maxlength' => true]) ?> + + field($model, 'url')->textInput(['maxlength' => true]) ?> + + field($model, 'image')->textInput(['maxlength' => true]) ?> + +
+ isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/bg/_search.php b/backend/views/bg/_search.php new file mode 100755 index 0000000..70a8e3a --- /dev/null +++ b/backend/views/bg/_search.php @@ -0,0 +1,33 @@ + + + diff --git a/backend/views/bg/create.php b/backend/views/bg/create.php new file mode 100755 index 0000000..bf0913a --- /dev/null +++ b/backend/views/bg/create.php @@ -0,0 +1,21 @@ +title = 'Create Bg'; +$this->params['breadcrumbs'][] = ['label' => 'Bgs', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/bg/index.php b/backend/views/bg/index.php new file mode 100755 index 0000000..a5e92cd --- /dev/null +++ b/backend/views/bg/index.php @@ -0,0 +1,35 @@ +title = 'Bgs'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'id', + 'title', + 'url:url', + 'image', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/backend/views/bg/update.php b/backend/views/bg/update.php new file mode 100755 index 0000000..a996870 --- /dev/null +++ b/backend/views/bg/update.php @@ -0,0 +1,21 @@ +title = 'Update Bg: ' . $model->title; +$this->params['breadcrumbs'][] = ['label' => 'Bgs', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->id]]; +$this->params['breadcrumbs'][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/bg/view.php b/backend/views/bg/view.php new file mode 100755 index 0000000..c6f5005 --- /dev/null +++ b/backend/views/bg/view.php @@ -0,0 +1,38 @@ +title = $model->title; +$this->params['breadcrumbs'][] = ['label' => 'Bgs', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->id], ['class' => 'btn btn-primary']) ?> + $model->id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => 'Are you sure you want to delete this item?', + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'id', + 'title', + 'url:url', + 'image', + ], + ]) ?> + +
diff --git a/backend/views/blog/_form.php b/backend/views/blog/_form.php new file mode 100755 index 0000000..5f27928 --- /dev/null +++ b/backend/views/blog/_form.php @@ -0,0 +1,65 @@ + + +
+ + false, + 'options' => ['enctype' => 'multipart/form-data'] + ]); ?> + + field($model, 'name')->textInput(['maxlength' => true]) ?> + + field($model, 'link')->textInput(['maxlength' => true]) ?> + + field($model, 'description')->widget(CKEditor::className(), + [ + 'editorOptions' => ElFinder::ckeditorOptions('elfinder',[ + 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать + 'inline' => false, //по умолчанию false]), + 'filebrowserUploadUrl'=>Yii::$app->getUrlManager()->createUrl('file/uploader/images-upload') + ] + ) + ]) ?> + + field($model, 'imageUpload')->widget(\kartik\file\FileInput::classname(), [ + 'language' => 'ru', + 'options' => [ + 'accept' => 'image/*', + 'multiple' => false, + ], + 'pluginOptions' => [ + 'allowedFileExtensions' => ['jpg', 'gif', 'png'], + 'initialPreview' => !empty($model->imageUrl) ? \common\components\artboximage\ArtboxImageHelper::getImage($model->imageUrl, 'list') : '', + 'overwriteInitial' => true, + 'showRemove' => false, + 'showUpload' => false, + 'previewFileType' => 'image', + ], + ]); ?> + + 'education', + 'item_id' => $model->blog_id, + 'model' => 'common\models\Blog', + 'language' => 'ru', + ]); ?> +
+ isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/blog/_search.php b/backend/views/blog/_search.php new file mode 100755 index 0000000..c3ac459 --- /dev/null +++ b/backend/views/blog/_search.php @@ -0,0 +1,43 @@ + + + diff --git a/backend/views/blog/create.php b/backend/views/blog/create.php new file mode 100755 index 0000000..54c74d2 --- /dev/null +++ b/backend/views/blog/create.php @@ -0,0 +1,21 @@ +title = 'Create Blog'; +$this->params['breadcrumbs'][] = ['label' => 'Blogs', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/blog/index.php b/backend/views/blog/index.php new file mode 100755 index 0000000..5a2716d --- /dev/null +++ b/backend/views/blog/index.php @@ -0,0 +1,40 @@ +title = 'Blogs'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'blog_id', + 'user_id', + 'name', + 'link', + 'date_add', + // 'user_add_id', + // 'view_count', + // 'description:ntext', + // 'cover', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/backend/views/blog/update.php b/backend/views/blog/update.php new file mode 100755 index 0000000..05ecebd --- /dev/null +++ b/backend/views/blog/update.php @@ -0,0 +1,21 @@ +title = 'Update Blog: ' . ' ' . $model->name; +$this->params['breadcrumbs'][] = ['label' => 'Blogs', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->blog_id]]; +$this->params['breadcrumbs'][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/blog/view.php b/backend/views/blog/view.php new file mode 100755 index 0000000..08a4665 --- /dev/null +++ b/backend/views/blog/view.php @@ -0,0 +1,43 @@ +title = $model->name; +$this->params['breadcrumbs'][] = ['label' => 'Blogs', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->blog_id], ['class' => 'btn btn-primary']) ?> + $model->blog_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => 'Are you sure you want to delete this item?', + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'blog_id', + 'user_id', + 'name', + 'link', + 'date_add', + 'user_add_id', + 'view_count', + 'description:ntext', + 'cover', + ], + ]) ?> + +
diff --git a/backend/views/brand/_form.php b/backend/views/brand/_form.php new file mode 100755 index 0000000..993a69b --- /dev/null +++ b/backend/views/brand/_form.php @@ -0,0 +1,55 @@ + + +
+ + false, + 'options' => ['enctype' => 'multipart/form-data'] + ]); ?> + + field($model, 'name')->textInput() ?> + + field($model, 'alias')->textInput(['maxlength' => true]) ?> + + field($model, 'imageUpload')->widget(\kartik\file\FileInput::classname(), [ + 'language' => 'ru', + 'options' => [ + 'accept' => 'image/*', + 'multiple' => false, + ], + 'pluginOptions' => [ + 'allowedFileExtensions' => ['jpg', 'gif', 'png'], + 'initialPreview' => !empty($model->imageUrl) ? \common\components\artboximage\ArtboxImageHelper::getImage($model->imageUrl, 'list') : '', + 'overwriteInitial' => true, + 'showRemove' => false, + 'showUpload' => false, + 'previewFileType' => 'image', + ], + ]); ?> + + field($model, 'meta_title')->textInput(['maxlength' => true]) ?> + + field($model, 'meta_desc')->textarea(['rows' => 6]) ?> + + field($model, 'meta_robots')->textInput(['maxlength' => true]) ?> + + field($model, 'seo_text')->textarea(['rows' => 6]) ?> + +
+ isNewRecord ? Yii::t('product', 'Create') : Yii::t('product', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> + isNewRecord) :?> + 'create_and_new', 'class' => 'btn btn-primary']) ?> + +
+ + + +
diff --git a/backend/views/brand/_search.php b/backend/views/brand/_search.php new file mode 100755 index 0000000..ed1902f --- /dev/null +++ b/backend/views/brand/_search.php @@ -0,0 +1,41 @@ + + + diff --git a/backend/views/brand/create.php b/backend/views/brand/create.php new file mode 100755 index 0000000..7de8216 --- /dev/null +++ b/backend/views/brand/create.php @@ -0,0 +1,21 @@ +title = Yii::t('product', 'Create Brand'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Brands'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/brand/index.php b/backend/views/brand/index.php new file mode 100755 index 0000000..d1295f1 --- /dev/null +++ b/backend/views/brand/index.php @@ -0,0 +1,40 @@ +title = Yii::t('product', 'Brands'); +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, +// 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'name', + 'alias', + [ + 'attribute' => 'title', + 'format' => 'html', + 'value' => function($data) { + return Html::img($data->imageUrl, ['width'=>'100']); + }, + ], + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/backend/views/brand/update.php b/backend/views/brand/update.php new file mode 100755 index 0000000..26ae057 --- /dev/null +++ b/backend/views/brand/update.php @@ -0,0 +1,23 @@ +title = Yii::t('product', 'Update {modelClass}: ', [ + 'modelClass' => 'Brand', +]) . ' ' . $model->brand_id; +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Brands'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->brand_id, 'url' => ['view', 'id' => $model->brand_id]]; +$this->params['breadcrumbs'][] = Yii::t('product', 'Update'); +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/brand/view.php b/backend/views/brand/view.php new file mode 100755 index 0000000..ad1a066 --- /dev/null +++ b/backend/views/brand/view.php @@ -0,0 +1,42 @@ +title = $model->brand_id; +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Brands'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->brand_id], ['class' => 'btn btn-primary']) ?> + $model->brand_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('product', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'brand_id', + 'brand_name_id', + 'alias', + 'imageUrl:image', + 'meta_title', + 'meta_desc:ntext', + 'meta_robots', + 'seo_text:ntext', + ], + ]) ?> + +
diff --git a/backend/views/category/_form.php b/backend/views/category/_form.php new file mode 100755 index 0000000..ae21c57 --- /dev/null +++ b/backend/views/category/_form.php @@ -0,0 +1,93 @@ + + +
+ + false, + 'options' => ['enctype' => 'multipart/form-data'] + ]); ?> + + field($model, 'name')->textInput() ?> + + field($model, 'alias')->textInput(['maxlength' => true]) ?> + + field($model, 'parent_id')->dropDownList($categories, [ + 'prompt' => Yii::t('rubrication', 'Root category'), + 'options' => [ + $model->category_id => ['disabled' => true] + ] + ])->label(Yii::t('product', 'Parent category')) ?> + + field($model, 'group_to_category')->widget(Select2::className(), [ + 'data' => \yii\helpers\ArrayHelper::map(\common\modules\rubrication\models\TaxGroup::find()->all(), 'tax_group_id', 'name'), + 'language' => 'ru', + 'options' => [ + 'placeholder' => 'Linked options', + 'multiple' => true, + ], + 'pluginOptions' => [ + 'allowClear' => true + ], + ] + ) ?> + + field($model, 'imageUpload')->widget(\kartik\file\FileInput::classname(), [ + 'language' => 'ru', + 'options' => [ + 'accept' => 'image/*', + 'multiple' => false, + ], + 'pluginOptions' => [ + 'allowedFileExtensions' => ['jpg', 'gif', 'png'], + 'initialPreview' => !empty($model->imageUrl) ? \common\components\artboximage\ArtboxImageHelper::getImage($model->imageUrl, 'list') : '', + 'overwriteInitial' => true, + 'showRemove' => false, + 'showUpload' => false, + 'previewFileType' => 'image', + ], + ]); ?> + + field($model, 'meta_title')->textInput(['maxlength' => true]) ?> + + field($model, 'meta_desc')->textarea(['rows' => 6]) ?> + + field($model, 'meta_robots')->textInput(['maxlength' => true]) ?> + + field($model, 'h1')->textInput(['maxlength' => true]) ?> + + field($model, 'seo_text')->widget(CKEditor::className(), + [ + 'editorOptions' => ElFinder::ckeditorOptions('elfinder',[ + 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать + 'inline' => false, //по умолчанию false]), + 'filebrowserUploadUrl'=>Yii::$app->getUrlManager()->createUrl('file/uploader/images-upload') + ] + ) + ]) ?> + + depth == 2) :?> + field($model, 'populary')->checkbox() ?> + + +
+ isNewRecord ? Yii::t('product', 'Create') : Yii::t('product', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> + isNewRecord) :?> + 'create_and_new', 'class' => 'btn btn-primary']) ?> + +
+ + + +
diff --git a/backend/views/category/_search.php b/backend/views/category/_search.php new file mode 100755 index 0000000..2740e88 --- /dev/null +++ b/backend/views/category/_search.php @@ -0,0 +1,49 @@ + + + diff --git a/backend/views/category/create.php b/backend/views/category/create.php new file mode 100755 index 0000000..99357a3 --- /dev/null +++ b/backend/views/category/create.php @@ -0,0 +1,22 @@ +title = Yii::t('product', 'Create Category'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Categories'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'categories' => $categories + ]) ?> + +
diff --git a/backend/views/category/index.php b/backend/views/category/index.php new file mode 100755 index 0000000..66211a4 --- /dev/null +++ b/backend/views/category/index.php @@ -0,0 +1,72 @@ +title = Yii::t('product', 'Categories'); +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, +// 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + [ + 'label'=> Yii::t('product', 'Name'), + 'content'=>function($data){ + $op = []; + foreach($data->getParents()->all() as $parent) { + $op[] = $parent->name; + } + $op[] = $data->name; + return implode(' → ', $op); +// return str_repeat('-', $data->depth) .' '. $data->name; + } + ], + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{view} {update} {delete} {populary}', + 'buttons' => [ + 'populary' => function ($url, $model) { + if ($model->depth == 2) { + return Html::a('', $url, [ + 'title' => Yii::t('product', ($model->populary ? 'Set not populary' : 'Set populary')), + ]); + } + }, + ], + 'urlCreator' => function ($action, $model, $key, $index) { + switch ($action) { + case 'populary': + return \yii\helpers\Url::to(['category/populary', 'id' => $model->category_id]); + break; + case 'view': + return \yii\helpers\Url::to(['category/view', 'id' => $model->category_id]); + break; + case 'update': + return \yii\helpers\Url::to(['category/update', 'id' => $model->category_id]); + break; + case 'delete': + return \yii\helpers\Url::to(['category/delete', 'id' => $model->category_id]); + break; + } + } + ], + ], + 'panel' => [ + 'type'=>'success', + ], + ]); ?> +
diff --git a/backend/views/category/update.php b/backend/views/category/update.php new file mode 100755 index 0000000..befb58c --- /dev/null +++ b/backend/views/category/update.php @@ -0,0 +1,24 @@ +title = Yii::t('product', 'Update {modelClass}: ', [ + 'modelClass' => 'Category', +]) . ' ' . $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Categories'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->category_id]]; +$this->params['breadcrumbs'][] = Yii::t('product', 'Update'); +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'categories' => $categories + ]) ?> + +
diff --git a/backend/views/category/view.php b/backend/views/category/view.php new file mode 100755 index 0000000..90945f3 --- /dev/null +++ b/backend/views/category/view.php @@ -0,0 +1,52 @@ +title = $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Categories'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->category_id], ['class' => 'btn btn-primary']) ?> + $model->category_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('product', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> + 'btn btn-success']) ?> + parent_id)) :?> + $model->parent->name]), ['category/create?parent='. $model->parent->category_id], ['class' => 'btn btn-success']) ?> + +

+ + $model, + 'attributes' => [ + 'category_id', + 'parent_id', + 'path', + 'depth', + 'imageUrl:image', + 'meta_title', + 'meta_desc:ntext', + 'meta_robots', + 'h1', + 'seo_text:ntext', + 'category_name_id', + 'product_unit_id', + 'alias', + + ], + ]) ?> + +
diff --git a/backend/views/comment/_form.php b/backend/views/comment/_form.php new file mode 100755 index 0000000..efe6e86 --- /dev/null +++ b/backend/views/comment/_form.php @@ -0,0 +1,33 @@ + 'Активный', + Comment::STATUS_HIDDEN => 'Новый', + Comment::STATUS_DELETED => 'Удаленный', + ] +?> + +
+ + + + field($model, 'text') + ->textarea([ 'rows' => 6 ]) ?> + + field($model, 'status') + ->dropDownList($status_list) ?> + +
+ 'btn btn-primary' ]) ?> +
+ + + +
diff --git a/backend/views/comment/_search.php b/backend/views/comment/_search.php new file mode 100755 index 0000000..a61526e --- /dev/null +++ b/backend/views/comment/_search.php @@ -0,0 +1,49 @@ + + + diff --git a/backend/views/comment/index.php b/backend/views/comment/index.php new file mode 100755 index 0000000..3514c68 --- /dev/null +++ b/backend/views/comment/index.php @@ -0,0 +1,99 @@ +title = 'Комменты'; + $this->params[ 'breadcrumbs' ][] = $this->title; +?> +
+ +

title) ?>

+ + $dataProvider, + 'columns' => [ + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{approve} {update} {delete}', + 'buttons' => [ + 'approve' => function($url, $model, $key) { + /** + * @var Comment $model + */ + $options = array_merge([ + 'title' => "Подтвердить", + 'aria-label' => "Подтвердить", + 'data-confirm' => "Комментарий и оценка отобразится на публичной части сайта, подтвердить?", + 'data-method' => 'post', + 'data-pjax' => '0', + ]); + $glyphicon = 'glyphicon-ok'; + if($model->status == $model::STATUS_ACTIVE) { + $url = Url::to(['comment/disapprove', 'id' => $model->comment_id]); + $glyphicon = 'glyphicon-remove'; + } + return Html::a('', $url, $options); + } + ] + ], + 'comment_id', + [ + 'attribute' => 'rating.value', + 'label' => 'Оценка', + ], + 'text:ntext', + [ + 'content' => function($model) { + /** + * @var Comment $model + */ + if(!empty( $model->user )) { + return $model->user->username . " (ID: " . $model->user->id . ")"; + } else { + return $model->user_name . " (Гость: " . $model->user_email . ")"; + } + }, + 'label' => 'Пользователь', + ], + [ + 'attribute' => 'status', + 'value' => function($model) { + /** + * @var Comment $model + */ + $status = ''; + switch($model->status) { + case Comment::STATUS_ACTIVE: + $status = 'Активный'; + break; + case Comment::STATUS_HIDDEN: + $status = 'Новый'; + break; + case Comment::STATUS_DELETED: + $status = 'Удаленный'; + break; + default: + $status = 'Неизвестно'; + }; + return $status; + }, + ], + 'date_add', + [ + 'attribute' => 'model', + 'value' => function($model) { + /** + * @var Comment $model + */ + return $model->model . " (ID: " . $model->model_id . ")"; + }, + ], + ], + ]); ?> +
diff --git a/backend/views/comment/update.php b/backend/views/comment/update.php new file mode 100755 index 0000000..3c96c8f --- /dev/null +++ b/backend/views/comment/update.php @@ -0,0 +1,21 @@ +title = 'Редактировать коммент: ' . $model->comment_id; +$this->params['breadcrumbs'][] = ['label' => 'Комментарии', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->comment_id, 'url' => ['view', 'id' => $model->comment_id]]; +$this->params['breadcrumbs'][] = 'Редактировать'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/comment/view.php b/backend/views/comment/view.php new file mode 100755 index 0000000..1af38ca --- /dev/null +++ b/backend/views/comment/view.php @@ -0,0 +1,46 @@ +title = $model->comment_id; +$this->params['breadcrumbs'][] = ['label' => 'Comments', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->comment_id], ['class' => 'btn btn-primary']) ?> + $model->comment_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => 'Are you sure you want to delete this item?', + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'comment_id', + 'text:ntext', + 'user_id', + 'user_name', + 'user_email:email', + 'comment_pid', + 'status', + 'date_add', + 'date_update', + 'date_delete', + 'model', + 'model_id', + ], + ]) ?> + +
diff --git a/backend/views/customer/_form.php b/backend/views/customer/_form.php new file mode 100755 index 0000000..01f70af --- /dev/null +++ b/backend/views/customer/_form.php @@ -0,0 +1,47 @@ + + +
+ + + + field($model, 'id')->textInput() ?> + + field($model, 'username')->textInput(['maxlength' => true]) ?> + + field($model, 'password')->passwordInput(['maxlength' => true]) ?> + + field($model, 'name')->textInput(['maxlength' => true]) ?> + + field($model, 'surname')->textInput(['maxlength' => true]) ?> + + field($model, 'phone')->textInput(['maxlength' => true]) ?> + + field($model, 'date_time')->textInput() ?> + + field($model, 'sex')->textInput(['maxlength' => true]) ?> + + field($model, 'birth_day')->textInput() ?> + + field($model, 'birth_month')->textInput() ?> + + field($model, 'birth_year')->textInput() ?> + + field($model, 'body')->textarea(['rows' => 6]) ?> + + field($model, 'group_id')->textInput() ?> + +
+ isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/customer/_search.php b/backend/views/customer/_search.php new file mode 100755 index 0000000..3a462e9 --- /dev/null +++ b/backend/views/customer/_search.php @@ -0,0 +1,51 @@ + + + diff --git a/backend/views/customer/create.php b/backend/views/customer/create.php new file mode 100755 index 0000000..45796e5 --- /dev/null +++ b/backend/views/customer/create.php @@ -0,0 +1,21 @@ +title = 'Create Customer'; +$this->params['breadcrumbs'][] = ['label' => 'Customers', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/customer/index.php b/backend/views/customer/index.php new file mode 100755 index 0000000..b7e25bf --- /dev/null +++ b/backend/views/customer/index.php @@ -0,0 +1,44 @@ +title = 'Customers'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'id', + 'username', + 'password', + 'name', + 'surname', + // 'phone', + // 'date_time', + // 'sex', + // 'birth_day', + // 'birth_month', + // 'birth_year', + // 'body:ntext', + // 'group_id', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/backend/views/customer/update.php b/backend/views/customer/update.php new file mode 100755 index 0000000..360c058 --- /dev/null +++ b/backend/views/customer/update.php @@ -0,0 +1,21 @@ +title = 'Update Customer: ' . $model->name; +$this->params['breadcrumbs'][] = ['label' => 'Customers', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]]; +$this->params['breadcrumbs'][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/customer/view.php b/backend/views/customer/view.php new file mode 100755 index 0000000..c070573 --- /dev/null +++ b/backend/views/customer/view.php @@ -0,0 +1,47 @@ +title = $model->name; +$this->params['breadcrumbs'][] = ['label' => 'Customers', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->id], ['class' => 'btn btn-primary']) ?> + $model->id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => 'Are you sure you want to delete this item?', + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'id', + 'username', + 'password', + 'name', + 'surname', + 'phone', + 'date_time', + 'sex', + 'birth_day', + 'birth_month', + 'birth_year', + 'body:ntext', + 'group_id', + ], + ]) ?> + +
diff --git a/backend/views/event/_form.php b/backend/views/event/_form.php new file mode 100755 index 0000000..228ef35 --- /dev/null +++ b/backend/views/event/_form.php @@ -0,0 +1,75 @@ + + +
+ + false, + 'options' => ['enctype' => 'multipart/form-data'] + ]); ?> + + field($model, 'name')->textInput(['maxlength' => true]) ?> + + field($model, 'alias')->textInput(['maxlength' => true]) ?> + + field($model, 'body')->widget(CKEditor::className(), + [ + 'editorOptions' => ElFinder::ckeditorOptions('elfinder',[ + 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать + 'inline' => false, //по умолчанию false]), + 'filebrowserUploadUrl'=>Yii::$app->getUrlManager()->createUrl('file/uploader/images-upload') + ] + ) + ]) ?> + + + field($model, 'end_at') + ->widget(DatePicker::className(), [ + 'pluginOptions' => [ + 'format' => 'dd-M-yyyy', + 'todayHighlight' => true + ]]) ?> + + + field($model, 'imageUpload')->widget(\kartik\file\FileInput::classname(), [ + 'language' => 'ru', + 'options' => [ + 'accept' => 'image/*', + 'multiple' => false, + ], + 'pluginOptions' => [ + 'allowedFileExtensions' => ['jpg', 'gif', 'png'], + 'initialPreview' => !empty($model->imageUrl) ? \common\components\artboximage\ArtboxImageHelper::getImage($model->imageUrl, 'list') : '', + 'overwriteInitial' => true, + 'showRemove' => false, + 'showUpload' => false, + 'previewFileType' => 'image', + ], + ]); ?> + + field($model, 'meta_title')->textInput(['maxlength' => true]) ?> + + field($model, 'description')->textInput(['maxlength' => true]) ?> + + field($model, 'h1')->textInput(['maxlength' => true]) ?> + + field($model, 'seo_text')->textarea(['rows' => 6]) ?> + + + +
+ isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/event/_search.php b/backend/views/event/_search.php new file mode 100755 index 0000000..c60ba39 --- /dev/null +++ b/backend/views/event/_search.php @@ -0,0 +1,49 @@ + + + diff --git a/backend/views/event/create.php b/backend/views/event/create.php new file mode 100755 index 0000000..7909eca --- /dev/null +++ b/backend/views/event/create.php @@ -0,0 +1,21 @@ +title = Yii::t('app', 'Create Event'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Events'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/event/index.php b/backend/views/event/index.php new file mode 100755 index 0000000..b87b7b9 --- /dev/null +++ b/backend/views/event/index.php @@ -0,0 +1,45 @@ +title = Yii::t('app', 'Events'); +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'event_id', + 'name', + 'alias', + [ + 'format' => 'image', + 'attribute'=>'image', + ], + // 'meta_title', + // 'description', + // 'h1', + // 'seo_text:ntext', + // 'created_at', + // 'updated_at', + // 'end_at', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/backend/views/event/update.php b/backend/views/event/update.php new file mode 100755 index 0000000..9009f4d --- /dev/null +++ b/backend/views/event/update.php @@ -0,0 +1,23 @@ +title = Yii::t('app', 'Update {modelClass}: ', [ + 'modelClass' => 'Event', +]) . $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Events'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->event_id]]; +$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/event/view.php b/backend/views/event/view.php new file mode 100755 index 0000000..d33ceb4 --- /dev/null +++ b/backend/views/event/view.php @@ -0,0 +1,40 @@ +title = $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Events'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->event_id], ['class' => 'btn btn-primary']) ?> + $model->event_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'event_id', + 'name', + 'alias', + 'meta_title', + 'description', + 'h1', + ], + ]) ?> + +
diff --git a/backend/views/layouts/admin.php b/backend/views/layouts/admin.php new file mode 100755 index 0000000..98501f4 --- /dev/null +++ b/backend/views/layouts/admin.php @@ -0,0 +1,34 @@ +beginContent('@app/views/layouts/main.php'); +?> + + render('header') ?> + + render('main-sidebar') ?> + + +
+
+ isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], + ]) ?> + + + +
+
+ render('footer') ?> + + + + + render('control-sidebar') ?> + + +
+endContent() ?> \ No newline at end of file diff --git a/backend/views/layouts/control-sidebar.php b/backend/views/layouts/control-sidebar.php new file mode 100755 index 0000000..4eb13ba --- /dev/null +++ b/backend/views/layouts/control-sidebar.php @@ -0,0 +1,188 @@ + \ No newline at end of file diff --git a/backend/views/layouts/footer.php b/backend/views/layouts/footer.php new file mode 100755 index 0000000..e66222f --- /dev/null +++ b/backend/views/layouts/footer.php @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/backend/views/layouts/header.php b/backend/views/layouts/header.php new file mode 100755 index 0000000..95aef0e --- /dev/null +++ b/backend/views/layouts/header.php @@ -0,0 +1,35 @@ + +
+ + + + +
\ No newline at end of file diff --git a/backend/views/layouts/main-sidebar.php b/backend/views/layouts/main-sidebar.php new file mode 100755 index 0000000..a8a5d83 --- /dev/null +++ b/backend/views/layouts/main-sidebar.php @@ -0,0 +1,219 @@ + + \ No newline at end of file diff --git a/backend/views/layouts/main.php b/backend/views/layouts/main.php new file mode 100755 index 0000000..0ef86f0 --- /dev/null +++ b/backend/views/layouts/main.php @@ -0,0 +1,34 @@ + +beginPage() ?> + + + + + + + <?= Html::encode($this->title) ?> + head() ?> + + +beginBody() ?> +
+ + + +
+ +endBody() ?> + + +endPage() ?> diff --git a/backend/views/layouts/none.php b/backend/views/layouts/none.php new file mode 100755 index 0000000..de536ad --- /dev/null +++ b/backend/views/layouts/none.php @@ -0,0 +1,9 @@ +beginContent('@app/views/layouts/main.php'); +?> + + + +endContent() ?> \ No newline at end of file diff --git a/backend/views/orders/_form.php b/backend/views/orders/_form.php new file mode 100755 index 0000000..6579e53 --- /dev/null +++ b/backend/views/orders/_form.php @@ -0,0 +1,66 @@ + + + +
+
+ + + field($model, 'name') ?> + + + field($model, 'phone') ?> + + field($model, 'phone2') ?> + + field($model, 'email') ?> + + field($model, 'numbercard') ?> + + field($model, 'body')->textArea(['rows' => '3']) ?> +field($model, 'delivery')->dropDownList(ArrayHelper::map(Delivery::find()->asArray()->all(), 'id', 'title')) ?> + field($model, 'declaration') ?> + + field($model, 'stock') ?> + + field($model, 'consignment') ?> +
+
+ + field($model, 'payment')->dropDownList(['Оплатить наличными'=>'Оплатить наличными','Оплатить на карту Приват Банка'=>'Оплатить на карту Приват Банка','Оплатить по безналичному расчету'=>'Оплатить по безналичному расчету','Оплатить Правекс-телеграф'=>'Оплатить Правекс-телеграф','Наложенным платежом'=>'Наложенным платежом'],['prompt'=>'...']); ?> + + field($model, 'insurance') ?> + + field($model, 'amount_imposed') ?> + + field($model, 'shipping_by') ?> + + field($model, 'city') ?> + + field($model, 'adress') ?> + + + field($model, 'total') ?> + + field($model, 'status')->dropDownList(['Нет'=>'Нет','Обработан'=>'Обработан','На комплектации'=>'На комплектации','Укомплектован'=>'Укомплектован','Доставка'=>'Доставка','Выполнен'=>'Выполнен','Резерв оплачен'=>'Резерв оплачен','Резерв неоплачен'=>'Резерв неоплачен'],['prompt'=>'...']); ?> + + field($model, 'comment')->textArea(['rows' => '3']) ?> +
+
+
+ isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + diff --git a/backend/views/orders/add.php b/backend/views/orders/add.php new file mode 100755 index 0000000..912df76 --- /dev/null +++ b/backend/views/orders/add.php @@ -0,0 +1,30 @@ +title = 'Добавить товар в заказ'; +$this->params['breadcrumbs'][] = $this->title; +?> +

Добавить товар в заказ

+ + 'reg-form', + 'options' => ['class' => 'form-vertical','enctype' => 'multipart/form-data'], + 'fieldConfig' => [ + //'template' => "{label}\n
{input}
\n
{error}
", + //'labelOptions' => ['class' => 'col-lg-2 control-label'], + ], + ]); ?> + +field($model, 'art') ?> + +field($model, 'count') ?> + + field($model, 'order_id')->hiddenInput(['value'=>$_GET['order_id']])->label(false); ?> + +
+ 'btn btn-primary', 'name' => 'login-button']) ?> +
+ \ No newline at end of file diff --git a/backend/views/orders/create.php b/backend/views/orders/create.php new file mode 100755 index 0000000..15d213f --- /dev/null +++ b/backend/views/orders/create.php @@ -0,0 +1,19 @@ +title = 'Добавить товар в заказ'; +$this->params['breadcrumbs'][] = ['label' => 'Pages', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> + +
+

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> +
+ diff --git a/backend/views/orders/index.php b/backend/views/orders/index.php new file mode 100755 index 0000000..9907dcc --- /dev/null +++ b/backend/views/orders/index.php @@ -0,0 +1,103 @@ +title = 'Заказы'; +$this->params['breadcrumbs'][] = $this->title; +?> +

Заказы

+

+ 'btn btn-success']) ?> +

+ + $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + + [ + 'attribute' => 'id', + 'format' => 'raw', + 'options' => ['class' => 'btn btn-warning'], + 'value' => function($model){ + return Html::button($model->id, ['id'=>$model->id, 'class' => 'btn btn-warning']); + + } + + ], + [ + 'attribute' => 'date_time', + 'value'=>'date_time', + ], + + [ + 'attribute' => 'name', + 'value'=>'name', + 'format'=>'raw', + ], + [ + 'attribute' => 'phone', + 'value'=>'phone', + ], + [ + 'attribute' => 'total', + 'value'=>'total', + ], + [ + 'filter' => yii\helpers\ArrayHelper::map(Label::find()->orderBy('id')->asArray()->all(), 'id', 'label'), + 'attribute' => 'label', + 'value' => function ($model, $key, $index, $column) { + return Html::activeDropDownList($model, 'label', + yii\helpers\ArrayHelper::map(Label::find()->orderBy('id')->asArray()->all(), 'id', 'label'), + [ + 'prompt' => 'Нет', + 'onchange' => "$.ajax({ + url: \"/admin/orders/labelupdate\", + type: \"post\", + data: { order_id: $model->id, label_id : this.value}, + });" + ] + + ); + }, + 'format' => 'raw', + ], + [ + 'attribute' => 'pay', + 'filter' => [ + 0 => 'Нет',1=>'Да' + ], + 'value' => function ($model, $key, $index, $column) { + return Html::activeDropDownList($model, 'pay',[0 => 'Нет',1=>'Да'], + [ + 'onchange' => "$.ajax({ + url: \"/admin/orders/payupdate\", + type: \"post\", + data: { order_id: $model->id, pay_id : this.value}, + });" + ] + + ); + }, + 'format' => 'raw', + ], + [ + 'attribute' => 'status', + 'value'=>'status', + 'contentOptions'=>['style'=>'width: 5px;'] + ], + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{delete}', + 'contentOptions'=>['style'=>'width: 70px;'] + ], + ], +]) ?> + \ No newline at end of file diff --git a/backend/views/orders/show.php b/backend/views/orders/show.php new file mode 100755 index 0000000..75abacb --- /dev/null +++ b/backend/views/orders/show.php @@ -0,0 +1,194 @@ +title = 'Заказ №'.$model->id; +// $this->params['breadcrumbs'][] = $this->title; +?> +
+ + + + + +
+ Заказ успешно сохранен! +
+ + + 'reg-form', + 'layout' => 'horizontal', + 'options' => ['enctype' => 'multipart/form-data'], + 'fieldConfig' => [ + //'template' => "{label}\n
{input}
\n
{error}
", + //'labelOptions' => ['class' => 'col-lg-2 control-label'], + ], + 'action' => [ + 'orders/show', + 'id' => $model->id + ] + ]); ?> + +
+
+
+
Заказ №id?>
+ + date_time?> +
+ + field($model, 'date_dedline') + ->widget(DatePicker::className(), [ + 'pluginOptions' => [ + 'format' => 'dd-M-yyyy', + 'todayHighlight' => true + ]]) ?> + +field($model, 'name') ?> + + +field($model, 'phone') ?> + +field($model, 'phone2') ?> + +field($model, 'email') ?> + +field($model, 'numbercard') ?> + + field($model, 'body')->textArea(['rows' => '3']) ?> +
+
+ field($model, 'delivery')->dropDownList(ArrayHelper::map(Delivery::find()->asArray()->all(), 'id', 'title')) ?> + + field($model, 'declaration') ?> + + field($model, 'stock') ?> + + field($model, 'consignment') ?> + +field($model, 'payment')->dropDownList(['Оплатить наличными'=>'Оплатить наличными','Оплатить на карту Приват Банка'=>'Оплатить на карту Приват Банка','Оплатить по безналичному расчету'=>'Оплатить по безналичному расчету','Оплатить Правекс-телеграф'=>'Оплатить Правекс-телеграф','Наложенным платежом'=>'Наложенным платежом'],['prompt'=>'...']); ?> + +field($model, 'insurance') ?> + +field($model, 'amount_imposed') ?> + +field($model, 'shipping_by') ?> + +field($model, 'city') ?> + +field($model, 'adress') ?> + + +field($model, 'total') ?> + +field($model, 'status')->dropDownList(['Нет'=>'Нет','Обработан'=>'Обработан','На комплектации'=>'На комплектации','Укомплектован'=>'Укомплектован','Доставка'=>'Доставка','Выполнен'=>'Выполнен','Резерв оплачен'=>'Резерв оплачен','Резерв неоплачен'=>'Резерв неоплачен'],['prompt'=>'...']); ?> + +field($model, 'comment')->textArea(['rows' => '3']) ?> +
+ +
+  + + + $dataProvider, + 'columns' => [ + [ + 'attribute' => 'id', + 'value'=>'id', + 'contentOptions'=>['style'=>'width: 70px;'] + ], + [ + 'attribute' => 'sku', + 'value'=>'sku', + 'contentOptions'=>['style'=>'width: 50px;'] + ], + [ + 'attribute' => 'product_name', + 'value'=>'product_name', + 'contentOptions'=>['style'=>'max-width: 300px;'] + ], +// [ +// 'attribute' => 'size', +// 'value'=>'mod.size', +// 'contentOptions'=>['style'=>'width: 100px;'] +// ], +// [ +// 'attribute' => 'size', +// 'value'=>'mod.color', +// 'contentOptions'=>['style'=>'width: 100px;'] +// ], + [ + 'attribute' => 'price', + 'value'=>'price', + 'contentOptions'=>['style'=>'width: 100px;'] + ], + [ + 'attribute' => 'count', + 'value'=>'count', + 'contentOptions'=>['style'=>'width: 30px;'] + ], + [ + 'attribute' => 'sum_cost', + 'value'=>'sum_cost', + 'contentOptions'=>['style'=>'width: 100px;'] + ], + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{delete}', + 'contentOptions'=>['style'=>'width: 20px;'], + 'buttons' => [ + 'delete' => function ($url, $model) { + return Html::a('', ['/admin/orders/delete_product','id'=>$model->id,'order_id'=>$_GET['id']], + [ + 'title' => "Удалить",'data-confirm'=>'Удалить?', + ]); + } + ], + ], + + ], +]) ?> +
+ 'btn btn-primary btn-lg btn-block', 'name' => 'login-button']) ?> +
+ + + +
+
+

Добавить товар в заказ

+ + false, + 'id' => 'add_mod', + 'options' => ['class' => 'form-vertical','enctype' => 'multipart/form-data'], + 'fieldConfig' => [ + //'template' => "{label}\n
{input}
\n
{error}
", + //'labelOptions' => ['class' => 'col-lg-2 control-label'], + ], + ]); ?> + + field($model_orderproducts, 'sku') ?> + + field($model_orderproducts, 'count') ?> + + field($model_orderproducts, 'order_id')->hiddenInput(['value'=>$model->id])->label(false); ?> + +
+ 'btn btn-primary', 'name' => 'login-button']) ?> +
+ +
+ +
+ + + diff --git a/backend/views/orders/update.php b/backend/views/orders/update.php new file mode 100755 index 0000000..e255d66 --- /dev/null +++ b/backend/views/orders/update.php @@ -0,0 +1,144 @@ +title = 'Заказ №'.$model->id; +$this->params['breadcrumbs'][] = $this->title; +?> +

Заказ №id?>

+ + +
+ Заказ успешно сохранен! +
+ + + 'reg-form', + 'layout' => 'horizontal', + 'options' => ['enctype' => 'multipart/form-data'], + 'fieldConfig' => [ + //'template' => "{label}\n
{input}
\n
{error}
", + //'labelOptions' => ['class' => 'col-lg-2 control-label'], + ], + ]); ?> + + +
+
+ + date_time?> +
+field($model,'date_dedline')->widget(\yii\jui\DatePicker::className(),['clientOptions' => [],'options' => ['class'=>'form-control','style'=>'width:150px;'],'dateFormat' => 'yyyy-MM-dd',]) ?> + +field($model, 'surname') ?> + +field($model, 'name') ?> + +field($model, 'patronymic') ?> + +field($model, 'phone') ?> + +field($model, 'phone2') ?> + +field($model, 'email') ?> + +field($model, 'numbercard') ?> + +field($model, 'delivery')->dropDownList(ArrayHelper::map(Delivery::find()->asArray()->all(), 'id', 'title')) ?> + +field($model, 'declaration') ?> + +field($model, 'stock') ?> + +field($model, 'consignment') ?> +
+
+field($model, 'payment')->dropDownList(['Оплатить наличными'=>'Оплатить наличными','Оплатить на карту Приват Банка'=>'Оплатить на карту Приват Банка','Оплатить по безналичному расчету'=>'Оплатить по безналичному расчету','Оплатить Правекс-телеграф'=>'Оплатить Правекс-телеграф','Наложенным платежом'=>'Наложенным платежом'],['prompt'=>'...']); ?> + +field($model, 'insurance') ?> + +field($model, 'amount_imposed') ?> + +field($model, 'shipping_by') ?> + +field($model, 'city') ?> + +field($model, 'adress') ?> + +field($model, 'body')->textArea(['rows' => '6']) ?> + +field($model, 'total') ?> + +field($model, 'status')->dropDownList(['Нет'=>'Нет','Обработан'=>'Обработан','На комплектации'=>'На комплектации','Укомплектован'=>'Укомплектован','Доставка'=>'Доставка','Выполнен'=>'Выполнен','Резерв оплачен'=>'Резерв оплачен','Резерв неоплачен'=>'Резерв неоплачен'],['prompt'=>'...']); ?> + +field($model, 'comment')->textArea(['rows' => '6']) ?> +
+
+ 'btn btn-primary btn-lg btn-block', 'name' => 'login-button']) ?> +
+ + +
+$model->id], ['class'=>'btn btn-success']) ?> + $dataProvider, + 'columns' => [ + [ + 'attribute' => 'id', + 'value'=>'id', + 'contentOptions'=>['style'=>'width: 70px;'] + ], + [ + 'attribute' => 'art', + 'value'=>'art', + 'contentOptions'=>['style'=>'width: 50px;'] + ], + [ + 'attribute' => 'product_name', + 'value'=>'product_name', + //'contentOptions'=>['style'=>'max-width: 300px;'] + ], + [ + 'attribute' => 'name', + 'value'=>'name', + //'contentOptions'=>['style'=>'max-width: 300px;'] + ], + [ + 'attribute' => 'cost', + 'value'=>'cost', + 'contentOptions'=>['style'=>'width: 100px;'] + ], + [ + 'attribute' => 'count', + 'value'=>'count', + 'contentOptions'=>['style'=>'width: 30px;'] + ], + [ + 'attribute' => 'sum_cost', + 'value'=>'sum_cost', + 'contentOptions'=>['style'=>'width: 100px;'] + ], + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{delete}', + 'contentOptions'=>['style'=>'width: 20px;'], + 'buttons' => [ + 'delete' => function ($url, $model) { + return Html::a('', ['/admin/orders/delete_product','id'=>$model->id,'order_id'=>$_GET['id']], + [ + 'title' => "Удалить",'data-confirm'=>'Удалить?', + ]); + } + ], + ], + + ], +]) ?> + + + diff --git a/backend/views/page/_form.php b/backend/views/page/_form.php new file mode 100755 index 0000000..feaee5d --- /dev/null +++ b/backend/views/page/_form.php @@ -0,0 +1,47 @@ + + +
+ + + + field($model, 'title')->textInput(['maxlength' => true]) ?> + + field($model, 'translit')->textInput(['maxlength' => true]) ?> + + field($model, 'body')->widget(CKEditor::className(), + [ + 'editorOptions' => ElFinder::ckeditorOptions('elfinder',[ + 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать + 'inline' => false, //по умолчанию false]), + 'allowedContent' => true, + 'filebrowserUploadUrl'=>Yii::$app->getUrlManager()->createUrl('file/uploader/images-upload') + ] + ) + ]) ?> + + field($model, 'meta_title')->textInput(['maxlength' => true]) ?> + + field($model, 'meta_keywords')->textInput(['maxlength' => true]) ?> + + field($model, 'meta_description')->textInput(['maxlength' => true]) ?> + + field($model, 'seo_text')->textarea(['rows' => 6]) ?> + + field($model, 'h1')->textInput(['maxlength' => true]) ?> + +
+ isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/page/_search.php b/backend/views/page/_search.php new file mode 100755 index 0000000..088e081 --- /dev/null +++ b/backend/views/page/_search.php @@ -0,0 +1,43 @@ + + + diff --git a/backend/views/page/create.php b/backend/views/page/create.php new file mode 100755 index 0000000..d47a8ad --- /dev/null +++ b/backend/views/page/create.php @@ -0,0 +1,21 @@ +title = 'Create Page'; +$this->params['breadcrumbs'][] = ['label' => 'Pages', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/page/index.php b/backend/views/page/index.php new file mode 100755 index 0000000..a1dd24c --- /dev/null +++ b/backend/views/page/index.php @@ -0,0 +1,39 @@ +title = 'Pages'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'id', + 'translit', + 'title', + 'meta_title', + // 'meta_keywords', + // 'meta_description', + // 'seo_text:ntext', + // 'h1', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/backend/views/page/update.php b/backend/views/page/update.php new file mode 100755 index 0000000..a6755db --- /dev/null +++ b/backend/views/page/update.php @@ -0,0 +1,21 @@ +title = 'Update Page: ' . $model->title; +$this->params['breadcrumbs'][] = ['label' => 'Pages', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->id]]; +$this->params['breadcrumbs'][] = 'Update'; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/page/view.php b/backend/views/page/view.php new file mode 100755 index 0000000..6ddfed8 --- /dev/null +++ b/backend/views/page/view.php @@ -0,0 +1,43 @@ +title = $model->title; +$this->params['breadcrumbs'][] = ['label' => 'Pages', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->id], ['class' => 'btn btn-primary']) ?> + $model->id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => 'Are you sure you want to delete this item?', + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'id', + 'translit', + 'title', + 'body:ntext', + 'meta_title', + 'meta_keywords', + 'meta_description', + 'seo_text:ntext', + 'h1', + ], + ]) ?> + +
diff --git a/backend/views/seo-category/_form.php b/backend/views/seo-category/_form.php new file mode 100755 index 0000000..ead4d86 --- /dev/null +++ b/backend/views/seo-category/_form.php @@ -0,0 +1,27 @@ + + +
+ + + + field($model, 'name')->textInput(['maxlength' => true]) ?> + + field($model, 'controller')->textInput(['maxlength' => true]) ?> + + field($model, 'status')->textInput() ?> + +
+ isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/seo-category/_search.php b/backend/views/seo-category/_search.php new file mode 100755 index 0000000..9f4264f --- /dev/null +++ b/backend/views/seo-category/_search.php @@ -0,0 +1,33 @@ + + + diff --git a/backend/views/seo-category/create.php b/backend/views/seo-category/create.php new file mode 100755 index 0000000..7729b68 --- /dev/null +++ b/backend/views/seo-category/create.php @@ -0,0 +1,21 @@ +title = Yii::t('app', 'Create Seo Category'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Categories'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/seo-category/index.php b/backend/views/seo-category/index.php new file mode 100755 index 0000000..9e6bda0 --- /dev/null +++ b/backend/views/seo-category/index.php @@ -0,0 +1,72 @@ +title = Yii::t('app', 'Seo Categories'); +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'seo_category_id', + 'name', + 'controller', + 'status', + + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{update} {image} {delete}', + 'buttons' => [ + 'update' => function ($url, $model) + { + return Html::a ( + '', + Url::toRoute(['seo-category/update', 'id' => $model->seo_category_id]), + [ + 'title' => "Редактировать", + ] + ); + }, + 'image' => function ($url, $model) + { + return Html::a ( + '', + Url::toRoute(['seo-dynamic/index', 'seo_category_id' => $model->seo_category_id]), + [ + 'title' => "слайды", + ] + ); + }, + 'delete' => function ($url, $model) + { + return Html::a ( + '', + Url::toRoute(['seo-category/delete', 'id' => $model->seo_category_id]), + [ + 'title' => "Удалить", + ] + ); + }, + ], + 'contentOptions' => ['style' => 'width: 70px;'], + ], + ], + ]); ?> +
diff --git a/backend/views/seo-category/update.php b/backend/views/seo-category/update.php new file mode 100755 index 0000000..34b49fb --- /dev/null +++ b/backend/views/seo-category/update.php @@ -0,0 +1,23 @@ +title = Yii::t('app', 'Update {modelClass}: ', [ + 'modelClass' => 'Seo Category', +]) . $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Categories'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->seo_category_id]]; +$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/seo-category/view.php b/backend/views/seo-category/view.php new file mode 100755 index 0000000..842e78b --- /dev/null +++ b/backend/views/seo-category/view.php @@ -0,0 +1,38 @@ +title = $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Categories'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->seo_category_id], ['class' => 'btn btn-primary']) ?> + $model->seo_category_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'seo_category_id', + 'name', + 'controller', + 'status', + ], + ]) ?> + +
diff --git a/backend/views/seo-dynamic/_form.php b/backend/views/seo-dynamic/_form.php new file mode 100755 index 0000000..d39755b --- /dev/null +++ b/backend/views/seo-dynamic/_form.php @@ -0,0 +1,59 @@ + + +
+ + + + field($model, 'name')->textInput(['maxlength' => true]) ?> + + field($model, 'action')->textInput(['maxlength' => true]) ?> + + field($model, 'param')->textInput(['maxlength' => true]) ?> + + field($model, 'key')->textInput(['maxlength' => true]) ?> + + field($model, 'fields')->textInput(['maxlength' => true]) ?> + + field($model, 'title')->textInput(['maxlength' => true]) ?> + + field($model, 'meta')->textInput(['maxlength' => true]) ?> + + field($model, 'h1')->textInput(['maxlength' => true]) ?> + + field($model, 'description')->textInput(['maxlength' => true]) ?> + + field($model, 'seo_text')->textarea(['rows' => 6]) ?> + + field($model, 'status')->textInput() ?> + +
+ isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + + + + + + + + + + + + + +
diff --git a/backend/views/seo-dynamic/_search.php b/backend/views/seo-dynamic/_search.php new file mode 100755 index 0000000..745abcd --- /dev/null +++ b/backend/views/seo-dynamic/_search.php @@ -0,0 +1,45 @@ + + + diff --git a/backend/views/seo-dynamic/create.php b/backend/views/seo-dynamic/create.php new file mode 100755 index 0000000..d71114a --- /dev/null +++ b/backend/views/seo-dynamic/create.php @@ -0,0 +1,22 @@ +title = Yii::t('app', 'Create Seo Dynamic'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Dynamics'), 'url' => Url::toRoute(['index','seo_category_id'=>$seo_category_id])]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/seo-dynamic/index.php b/backend/views/seo-dynamic/index.php new file mode 100755 index 0000000..20b9167 --- /dev/null +++ b/backend/views/seo-dynamic/index.php @@ -0,0 +1,77 @@ +title = Yii::t('app', 'Seo Dynamics'); +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ $seo_category_id]), ['class' => 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'seo_dynamic_id', + 'seo_category_id', + 'name', + 'action', + 'fields', + 'meta', + // 'title', + // 'h1', + // 'description', + // 'seo_text:ntext', + // 'status', + + [ + 'class' => 'yii\grid\ActionColumn', + 'buttons' => [ + 'view' => function ($url, $model) + { + return Html::a ( + '', + Url::toRoute(['view','seo_category_id'=> $model->seo_category_id, 'id' => $model->seo_dynamic_id]), + [ + 'title' => "Просмотр", + ] + ); + }, + 'update' => function ($url, $model) + { + return Html::a ( + '', + Url::toRoute(['update','seo_category_id'=> $model->seo_category_id, 'id' => $model->seo_dynamic_id]), + [ + 'title' => "Редактировать", + ] + ); + }, + 'delete' => function ($url, $model) + { + + return Html::a('', Url::toRoute(['delete','seo_category_id'=> $model->seo_category_id, 'id' => $model->seo_dynamic_id]), [ + 'title' => Yii::t('yii', 'Delete'), + 'data-confirm' => Yii::t('yii', 'Are you sure to delete this item?'), + 'data-method' => 'post', + ]); + + }, + ], + ], + ], + ]); ?> +
diff --git a/backend/views/seo-dynamic/update.php b/backend/views/seo-dynamic/update.php new file mode 100755 index 0000000..d43fdfc --- /dev/null +++ b/backend/views/seo-dynamic/update.php @@ -0,0 +1,24 @@ +title = Yii::t('app', 'Update {modelClass}: ', [ + 'modelClass' => 'Seo Dynamic', +]) . $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Dynamics'), 'url' => Url::toRoute(['index','seo_category_id'=>$seo_category_id])]; +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => Url::toRoute(['view', 'seo_category_id'=>$seo_category_id, 'id' => $model->seo_dynamic_id])]; +$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/seo-dynamic/view.php b/backend/views/seo-dynamic/view.php new file mode 100755 index 0000000..36429f0 --- /dev/null +++ b/backend/views/seo-dynamic/view.php @@ -0,0 +1,45 @@ +title = $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Dynamics'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->seo_dynamic_id], ['class' => 'btn btn-primary']) ?> + $model->seo_dynamic_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'seo_dynamic_id', + 'seo_category_id', + 'name', + 'action', + 'fields', + 'title', + 'meta', + 'h1', + 'description', + 'seo_text:ntext', + 'status', + ], + ]) ?> + +
diff --git a/backend/views/seo/_form.php b/backend/views/seo/_form.php new file mode 100755 index 0000000..9853be6 --- /dev/null +++ b/backend/views/seo/_form.php @@ -0,0 +1,41 @@ + + +
+ + + + field($model, 'url')->textInput(['maxlength' => true]) ?> + + field($model, 'title')->textInput(['maxlength' => true]) ?> + + field($model, 'meta')->textInput(['maxlength' => true]) ?> + + field($model, 'description')->textInput(['maxlength' => true]) ?> + + field($model, 'h1')->textInput(['maxlength' => true]) ?> + field($model, 'seo_text')->widget(CKEditor::className(), + [ + 'editorOptions' => ElFinder::ckeditorOptions('elfinder',[ + 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать + 'inline' => false, //по умолчанию false]), + 'filebrowserUploadUrl'=>Yii::$app->getUrlManager()->createUrl('file/uploader/images-upload') + ] + ) + ]) ?> + +
+ isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/seo/_search.php b/backend/views/seo/_search.php new file mode 100755 index 0000000..fe3f629 --- /dev/null +++ b/backend/views/seo/_search.php @@ -0,0 +1,39 @@ + + + diff --git a/backend/views/seo/create.php b/backend/views/seo/create.php new file mode 100755 index 0000000..fb2601c --- /dev/null +++ b/backend/views/seo/create.php @@ -0,0 +1,21 @@ +title = Yii::t('app', 'Create Seo'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seos'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/seo/index.php b/backend/views/seo/index.php new file mode 100755 index 0000000..1118984 --- /dev/null +++ b/backend/views/seo/index.php @@ -0,0 +1,36 @@ +title = Yii::t('app', 'Seo'); +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'seo_id', + 'url:url', + 'meta', + 'h1', + // 'seo_text:ntext', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/backend/views/seo/update.php b/backend/views/seo/update.php new file mode 100755 index 0000000..0cdcc84 --- /dev/null +++ b/backend/views/seo/update.php @@ -0,0 +1,23 @@ +title = Yii::t('app', 'Update {modelClass}: ', [ + 'modelClass' => 'Seo', +]) . $model->title; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seos'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->seo_id]]; +$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/seo/view.php b/backend/views/seo/view.php new file mode 100755 index 0000000..fa1330f --- /dev/null +++ b/backend/views/seo/view.php @@ -0,0 +1,41 @@ +title = $model->title; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seos'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->seo_id], ['class' => 'btn btn-primary']) ?> + $model->seo_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'seo_id', + 'url:url', + 'title', + 'meta', + 'description', + 'h1', + 'seo_text:ntext', + ], + ]) ?> + +
diff --git a/backend/views/service/_form.php b/backend/views/service/_form.php new file mode 100755 index 0000000..772d197 --- /dev/null +++ b/backend/views/service/_form.php @@ -0,0 +1,66 @@ + + +
+ + + + field($model, 'name')->textInput(['maxlength' => true]) ?> + + field($model, 'alias')->textInput(['maxlength' => true]) ?> + + field($model, 'body')->widget(CKEditor::className(), + [ + 'editorOptions' => ElFinder::ckeditorOptions('elfinder',[ + 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать + 'inline' => false, //по умолчанию false]), + 'filebrowserUploadUrl'=>Yii::$app->getUrlManager()->createUrl('file/uploader/images-upload') + ] + ) + ]) ?> + + + $model, + 'field'=>'image', + 'size' => [ + [ + 'width'=>200, + 'height'=>200, + ], + [ + 'width'=>940, + 'height'=>480, + ] + ], + 'multi'=>false, + 'gallery' => $model->image, + 'name' => 'Загрузить изображение' + ]); + ?> + + field($model, 'meta_title')->textInput(['maxlength' => true]) ?> + + field($model, 'description')->textInput(['maxlength' => true]) ?> + + field($model, 'h1')->textInput(['maxlength' => true]) ?> + + field($model, 'seo_text')->textarea(['rows' => 6]) ?> + + +
+ isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/service/_search.php b/backend/views/service/_search.php new file mode 100755 index 0000000..04ba9b1 --- /dev/null +++ b/backend/views/service/_search.php @@ -0,0 +1,45 @@ + + + diff --git a/backend/views/service/create.php b/backend/views/service/create.php new file mode 100755 index 0000000..b84b8fd --- /dev/null +++ b/backend/views/service/create.php @@ -0,0 +1,21 @@ +title = Yii::t('app', 'Create Service'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Services'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/service/index.php b/backend/views/service/index.php new file mode 100755 index 0000000..0a25584 --- /dev/null +++ b/backend/views/service/index.php @@ -0,0 +1,44 @@ +title = Yii::t('app', 'Services'); +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'service_id', + 'name', + 'alias', + [ + 'format' => 'image', + 'attribute'=>'image', + ], + // 'meta_title', + // 'description', + // 'h1', + // 'seo_text:ntext', + // 'created_at', + // 'updated_at', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> +
diff --git a/backend/views/service/update.php b/backend/views/service/update.php new file mode 100755 index 0000000..6e0f6ce --- /dev/null +++ b/backend/views/service/update.php @@ -0,0 +1,23 @@ +title = Yii::t('app', 'Update {modelClass}: ', [ + 'modelClass' => 'Service', +]) . $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Services'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->service_id]]; +$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/service/view.php b/backend/views/service/view.php new file mode 100755 index 0000000..17eaa9b --- /dev/null +++ b/backend/views/service/view.php @@ -0,0 +1,47 @@ +title = $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Services'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->service_id], ['class' => 'btn btn-primary']) ?> + $model->service_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'service_id', + 'name', + 'alias', + [ + 'format' => 'image', + 'attribute'=>'image', + ], + 'meta_title', + 'description', + 'h1', + 'seo_text:ntext', + 'created_at', + 'updated_at', + ], + ]) ?> + +
diff --git a/backend/views/site/error.php b/backend/views/site/error.php new file mode 100755 index 0000000..f44c697 --- /dev/null +++ b/backend/views/site/error.php @@ -0,0 +1,27 @@ +title = $name; +?> +
+ +

title) ?>

+ +
+ +
+ +

+ The above error occurred while the Web server was processing your request. +

+

+ Please contact us if you think this is a server error. Thank you. +

+ +
diff --git a/backend/views/site/index.php b/backend/views/site/index.php new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/backend/views/site/index.php diff --git a/backend/views/site/login.php b/backend/views/site/login.php new file mode 100755 index 0000000..7d7d499 --- /dev/null +++ b/backend/views/site/login.php @@ -0,0 +1,41 @@ +title = 'Login'; +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/backend/views/slider-image/_form.php b/backend/views/slider-image/_form.php new file mode 100755 index 0000000..52b2954 --- /dev/null +++ b/backend/views/slider-image/_form.php @@ -0,0 +1,60 @@ + + +
+ + ['enctype' => 'multipart/form-data']]); ?> + + field($model, 'image')->widget(\kartik\file\FileInput::classname(), [ + 'model' => $model, + 'attribute' => 'image', + 'options' => [ + 'accept' => 'image/*', + 'multiple' => true + ], + 'pluginOptions' => [ + 'allowedFileExtensions' => ['jpg','gif','png'], + 'initialPreview' => $model->imageUrl ? \common\components\artboximage\ArtboxImageHelper::getImage($model->imageUrl, 'slider') : '', + 'overwriteInitial' => true, + 'showRemove' => true, + 'showUpload' => false, + ], + ]); ?> + + + field($model, 'alt')->textInput(['maxlength' => true]) ?> + + field($model, 'title')->textInput(['maxlength' => true]) ?> + + field($model, 'url')->textInput(['maxlength' => true]) ?> + + field($model, 'status')->widget(Select2::className(),([ + 'name' => 'status', + 'hideSearch' => true, + 'data' => [1 => 'Active', 2 => 'Inactive'], + 'options' => ['placeholder' => 'Select status...'], + 'pluginOptions' => [ + 'allowClear' => true + ] + ])) ?> + + field($model, 'sort')->textInput() ?> + +
+ isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/slider-image/_search.php b/backend/views/slider-image/_search.php new file mode 100755 index 0000000..d9674e9 --- /dev/null +++ b/backend/views/slider-image/_search.php @@ -0,0 +1,41 @@ + + + diff --git a/backend/views/slider-image/create.php b/backend/views/slider-image/create.php new file mode 100755 index 0000000..1437321 --- /dev/null +++ b/backend/views/slider-image/create.php @@ -0,0 +1,25 @@ +title = Yii::t('app', 'Create Slider Image'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Slider Images'), 'url' => Url::toRoute(['index','slider_id'=>$slider_id])]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'slider' => $slider, + ]) ?> + +
diff --git a/backend/views/slider-image/index.php b/backend/views/slider-image/index.php new file mode 100755 index 0000000..b70e57a --- /dev/null +++ b/backend/views/slider-image/index.php @@ -0,0 +1,74 @@ +title = Yii::t('app', 'Slider Images'); +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ $slider_id]), ['class' => 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'slider_image_id', + 'slider_id', + 'image', + 'alt', + 'title', + // 'url:url', + // 'status', + // 'sort', + + [ + 'class' => 'yii\grid\ActionColumn', + 'buttons' => [ + 'view' => function ($url, $model) + { + return Html::a ( + '', + Url::toRoute(['view','slider_id'=> $model->slider_id, 'id' => $model->slider_image_id]), + [ + 'title' => "Просмотр", + ] + ); + }, + 'update' => function ($url, $model) + { + return Html::a ( + '', + Url::toRoute(['update','slider_id'=> $model->slider_id, 'id' => $model->slider_image_id]), + [ + 'title' => "Редактировать", + ] + ); + }, + 'delete' => function ($url, $model) + { + + return Html::a('', Url::toRoute(['delete','slider_id'=> $model->slider_id, 'id' => $model->slider_image_id]), [ + 'title' => Yii::t('yii', 'Delete'), + 'data-confirm' => Yii::t('yii', 'Are you sure to delete this item?'), + 'data-method' => 'post', + ]); + + }, + ], + ], + ], + ]); ?> +
diff --git a/backend/views/slider-image/update.php b/backend/views/slider-image/update.php new file mode 100755 index 0000000..e7cf1af --- /dev/null +++ b/backend/views/slider-image/update.php @@ -0,0 +1,27 @@ +title = Yii::t('app', 'Update {modelClass}: ', [ + 'modelClass' => 'Slider Image', +]) . $model->title; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Slider Images'), 'url' => Url::toRoute(['index','slider_id'=>$slider_id])]; +$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => Url::toRoute(['view', 'slider_id'=>$slider_id, 'id' => $model->slider_image_id])]; +$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'slider' => $slider, + ]) ?> + +
diff --git a/backend/views/slider-image/view.php b/backend/views/slider-image/view.php new file mode 100755 index 0000000..acb5d99 --- /dev/null +++ b/backend/views/slider-image/view.php @@ -0,0 +1,43 @@ +title = $model->title; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Slider Images'), 'url' => Url::toRoute(['index','slider_id'=>$slider_id])]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $slider_id, 'id' => $model->slider_image_id], ['class' => 'btn btn-primary']) ?> + $slider_id , 'id' => $model->slider_image_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'slider_image_id', + 'slider_id', + 'image', + 'alt', + 'title', + 'url:url', + 'status', + 'sort', + ], + ]) ?> + +
diff --git a/backend/views/slider/_form.php b/backend/views/slider/_form.php new file mode 100755 index 0000000..4ea7c7e --- /dev/null +++ b/backend/views/slider/_form.php @@ -0,0 +1,44 @@ + + +
+ + + + field($model, 'speed')->textInput() ?> + + field($model, 'duration')->textInput() ?> + + field($model, 'title')->textInput(['maxlength' => true]) ?> + + + field($model, 'width')->textInput(['maxlength' => true]) ?> + + field($model, 'height')->textInput(['maxlength' => true]) ?> + + + field($model, 'status')->widget(Select2::className(),([ + 'name' => 'status', + 'hideSearch' => true, + 'data' => [1 => 'Active', 2 => 'Inactive'], + 'options' => ['placeholder' => 'Select status...'], + 'pluginOptions' => [ + 'allowClear' => true + ] + ])) ?> + +
+ isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/slider/_search.php b/backend/views/slider/_search.php new file mode 100755 index 0000000..7e5731b --- /dev/null +++ b/backend/views/slider/_search.php @@ -0,0 +1,36 @@ + + + diff --git a/backend/views/slider/create.php b/backend/views/slider/create.php new file mode 100755 index 0000000..852aea0 --- /dev/null +++ b/backend/views/slider/create.php @@ -0,0 +1,21 @@ +title = Yii::t('app', 'Create Slider'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Sliders'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/slider/index.php b/backend/views/slider/index.php new file mode 100755 index 0000000..5d3e23e --- /dev/null +++ b/backend/views/slider/index.php @@ -0,0 +1,82 @@ +title = Yii::t('app', 'Sliders'); +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + [ + 'attribute' => 'slider_id', + 'value' => 'slider_id', + 'contentOptions' => ['style' => 'width: 70px;'], + ], + [ + 'attribute' => 'title', + 'value' => 'title', + ], + + [ + 'attribute' => 'status', + 'value' => function ($model) + { + return ($model->status == 0) ? 'Скрыто' : 'Показать'; + }, + ], + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{update} {image} {delete}', + 'buttons' => [ + 'update' => function ($url, $model) + { + return Html::a ( + '', + Url::toRoute(['slider/update', 'id' => $model->slider_id]), + [ + 'title' => "Редактировать", + ] + ); + }, + 'image' => function ($url, $model) + { + return Html::a ( + '', + Url::toRoute(['slider-image/index', 'slider_id' => $model->slider_id]), + [ + 'title' => "слайды", + ] + ); + }, + 'delete' => function ($url, $model) + { + return Html::a ( + '', + Url::toRoute(['slider/delete', 'id' => $model->slider_id]), + [ + 'title' => "Удалить", + ] + ); + }, + ], + 'contentOptions' => ['style' => 'width: 70px;'], + ], + ], + ]); ?> +
diff --git a/backend/views/slider/update.php b/backend/views/slider/update.php new file mode 100755 index 0000000..75eb629 --- /dev/null +++ b/backend/views/slider/update.php @@ -0,0 +1,23 @@ +title = Yii::t('app', 'Update {modelClass}: ', [ + 'modelClass' => 'Slider', +]) . $model->title; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Sliders'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->slider_id]]; +$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/slider/view.php b/backend/views/slider/view.php new file mode 100755 index 0000000..1f8cb41 --- /dev/null +++ b/backend/views/slider/view.php @@ -0,0 +1,39 @@ +title = $model->title; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Sliders'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->slider_id], ['class' => 'btn btn-primary']) ?> + $model->slider_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'slider_id', + 'speed', + 'duration', + 'title', + 'status', + ], + ]) ?> + +
diff --git a/backend/views/subscribe/_form.php b/backend/views/subscribe/_form.php new file mode 100755 index 0000000..36ef492 --- /dev/null +++ b/backend/views/subscribe/_form.php @@ -0,0 +1,25 @@ + + + diff --git a/backend/views/subscribe/_search.php b/backend/views/subscribe/_search.php new file mode 100755 index 0000000..e2aaf8a --- /dev/null +++ b/backend/views/subscribe/_search.php @@ -0,0 +1,33 @@ + + + diff --git a/backend/views/subscribe/create.php b/backend/views/subscribe/create.php new file mode 100755 index 0000000..3f6f09f --- /dev/null +++ b/backend/views/subscribe/create.php @@ -0,0 +1,21 @@ +title = 'Create Subscribe'; +$this->params['breadcrumbs'][] = ['label' => 'Subscribes', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/backend/views/subscribe/index.php b/backend/views/subscribe/index.php new file mode 100755 index 0000000..68e32f3 --- /dev/null +++ b/backend/views/subscribe/index.php @@ -0,0 +1,35 @@ +title = 'Subscribes'; +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/backend/views/subscribe/update.php b/backend/views/subscribe/update.php new file mode 100755 index 0000000..2137e89 --- /dev/null +++ b/backend/views/subscribe/update.php @@ -0,0 +1,21 @@ +title = 'Update Subscribe: ' . $model->id; +$this->params['breadcrumbs'][] = ['label' => 'Subscribes', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]]; +$this->params['breadcrumbs'][] = 'Update'; +?> + diff --git a/backend/views/subscribe/view.php b/backend/views/subscribe/view.php new file mode 100755 index 0000000..7c96baa --- /dev/null +++ b/backend/views/subscribe/view.php @@ -0,0 +1,38 @@ +title = $model->id; +$this->params['breadcrumbs'][] = ['label' => 'Subscribes', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/backend/views/user/_form.php b/backend/views/user/_form.php new file mode 100755 index 0000000..212c576 --- /dev/null +++ b/backend/views/user/_form.php @@ -0,0 +1,29 @@ + + +
+ + + + field($model, 'username')->textInput(['maxlength' => true]) ?> + + field($model, 'password')->textInput(['maxlength' => true]) ?> + + field($model, 'email',['enableAjaxValidation' => true])->textInput(['maxlength' => true]) ?> + + +
+ isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/user/_search.php b/backend/views/user/_search.php new file mode 100755 index 0000000..c1fbe51 --- /dev/null +++ b/backend/views/user/_search.php @@ -0,0 +1,37 @@ + + + diff --git a/backend/views/user/create.php b/backend/views/user/create.php new file mode 100755 index 0000000..3210ec4 --- /dev/null +++ b/backend/views/user/create.php @@ -0,0 +1,21 @@ +title = Yii::t('app', 'Create User'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Users'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/user/index.php b/backend/views/user/index.php new file mode 100755 index 0000000..7d12021 --- /dev/null +++ b/backend/views/user/index.php @@ -0,0 +1,47 @@ +title = Yii::t('app', 'Users'); +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'id', + 'username', + 'email:email', + // 'status', + // 'created_at', + // 'updated_at', + + ['class' => 'yii\grid\ActionColumn', + 'template' => '{view}  {update}  {permit}  {delete}', + 'buttons' => + [ + 'permit' => function ($url, $model) { + return Html::a('', Url::to(['/permit/user/view', 'id' => $model->id]), [ + 'title' => Yii::t('yii', 'Change user role') + ]); }, + ] + ], + ], + ]); ?> +
diff --git a/backend/views/user/update.php b/backend/views/user/update.php new file mode 100755 index 0000000..94e31cd --- /dev/null +++ b/backend/views/user/update.php @@ -0,0 +1,23 @@ +title = Yii::t('app', 'Update {modelClass}: ', [ + 'modelClass' => 'User', +]) . $model->id; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Users'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]]; +$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + ]) ?> + +
diff --git a/backend/views/user/view.php b/backend/views/user/view.php new file mode 100755 index 0000000..953d13e --- /dev/null +++ b/backend/views/user/view.php @@ -0,0 +1,40 @@ +title = $model->id; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Users'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->id], ['class' => 'btn btn-primary']) ?> + $model->id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'id', + 'username', + 'email:email', + 'status', + 'created_at', + 'updated_at', + ], + ]) ?> + +
diff --git a/backend/web/.gitignore b/backend/web/.gitignore new file mode 100755 index 0000000..a6e95c8 --- /dev/null +++ b/backend/web/.gitignore @@ -0,0 +1,2 @@ +/index.php +/index-test.php diff --git a/backend/web/css/site.css b/backend/web/css/site.css new file mode 100755 index 0000000..a454526 --- /dev/null +++ b/backend/web/css/site.css @@ -0,0 +1,209 @@ +html, +body { + height: 100%; +} + +.wrap { + min-height: 100%; + height: auto; + margin: 0 auto -60px; + padding: 0 0 60px; +} + +.wrap > .container { + padding: 70px 15px 20px; +} + +.footer { + height: 60px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + padding-top: 20px; +} + +.jumbotron { + text-align: center; + background-color: transparent; +} + +.jumbotron .btn { + font-size: 21px; + padding: 14px 24px; +} + +.not-set { + color: #c55; + font-style: italic; +} + +/* add sorting icons to gridview sort links */ +a.asc:after, a.desc:after { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + padding-left: 5px; +} + +a.asc:after { + content: /*"\e113"*/ "\e151"; +} + +a.desc:after { + content: /*"\e114"*/ "\e152"; +} + +.sort-numerical a.asc:after { + content: "\e153"; +} + +.sort-numerical a.desc:after { + content: "\e154"; +} + +.sort-ordinal a.asc:after { + content: "\e155"; +} + +.sort-ordinal a.desc:after { + content: "\e156"; +} + +.grid-view td { + white-space: nowrap; +} + +.grid-view .filters input, +.grid-view .filters select { + min-width: 50px; +} + +.hint-block { + display: block; + margin-top: 5px; + color: #999; +} + +.error-summary { + color: #a94442; + background: #fdf7f7; + border-left: 3px solid #eed3d7; + padding: 10px 20px; + margin: 0 0 15px 0; +} + +/* align the logout "link" (button in form) of the navbar */ +.nav > li > form { + padding: 8px; +} + +.nav > li > form > button:hover { + text-decoration: none; +} +.new_admin_form input { + border: 1px solid #95ba2f !important; +} +.new_admin_form h1, .new_admin_form p, .new_admin_form label {color: #bdbdbd !important; font-weight: 400 !important;} +.new_admin_form .btn { + background: #95ba2f !important; + border-radius: 4px !important; + height: 29px !important; + text-transform: uppercase !important; + color: #ffffff !important; + text-decoration: none !important; + font-weight: 600 !important; + text-align: center !important; + border-bottom: 3px solid #799920 !important; + font-size: 12px !important; + outline: none !important; + border-top: none; + border-left: none; + border-right: none; +} +.new_admin_form .btn:focus { + box-shadow: none !important; +} +.new_admin_form .btn:hover { + border-bottom: 3px solid #95ba2f !important; +} +.new_admin_form .btn:active { + border-bottom: 3px solid #799920 !important; + background: #799920 !important; +} +.artbox_logo-wr { + perspective: 250px; +} +.artbox_logo { + text-align: center; + font-size: 42px; + color: #fff; + text-transform: uppercase; + margin-top: 9px; + -webkit-animation-name:anim_artbox; + -moz-animation-name:anim_artbox; + animation-name:anim_artbox; + -webkit-animation-duration:4.7s; + -moz-animation-duration:4.7s; + animation-duration:4.7s; + -webkit-animation-timing-function:linear; + -moz-animation-timing-function:linear; + animation-timing-function:linear; + -webkit-animation-iteration-count:infinite; + -moz-animation-iteration-count:infinite; + animation-iteration-count:infinite; + /*-webkit-animation-play-state:running;*/ + /*-moz-animation-play-state:running;*/ + /*animation-play-state:running*/ + -webkit-animation-play-state:paused; + -moz-animation-play-state:paused; + animation-play-state:paused; +} +@-webkit-keyframes anim_artbox { + 0% + { + -webkit-transform:rotateY(0deg) + } + + 100% + { + -webkit-transform:rotateY(360deg) + } +} + +@-moz-keyframes anim_artbox { + 0% + { + -moz-transform:rotateY(0deg) + } + + 100% + { + -moz-transform:rotateY(360deg) + } +} + +@keyframes anim_artbox { + 0% + { + transform:rotateY(0deg) + } + + 100% + { + transform:rotateY(360deg) + } +} +.artbox_logo_txt { + text-align: center; + font-size: 15px; + color: #fff; + margin-bottom: 11px; +} +.new_admin_form .help-block { + color: #d80400 !important; + text-align: center; + font-size: 13px !important; +} diff --git a/backend/web/favicon.ico b/backend/web/favicon.ico new file mode 100755 index 0000000..580ed73 Binary files /dev/null and b/backend/web/favicon.ico differ diff --git a/backend/web/js/fieldWidget.js b/backend/web/js/fieldWidget.js new file mode 100755 index 0000000..575b7b5 --- /dev/null +++ b/backend/web/js/fieldWidget.js @@ -0,0 +1,24 @@ +$(function(){ + $.each($('.delete-field-item'), function(index, value) { + var container = $(value).parents('.field_list').first(); + var count = $(container).find('.form-group').length; + if(count <= 1) { + $(container).find('.delete-field-item').addClass('hidden'); + } + }); + $(document).on('click', '.delete-field-item', function(){ + var container = $(this).parents('.field_list').first(); + $(this).parent('.form-group').remove(); + var count = $(container).find('.form-group').length; + if(count <= 1) { + $(container).find('.delete-field-item').addClass('hidden'); + } + }); + $(document).on('click', '[class*=add_field_w]', function() { + var container = $(this).siblings('.field_list').first(); + var count = $(container).find('.form-group').length; + if(count > 1) { + $(container).find('.delete-field-item').removeClass('hidden'); + } + }); +}); \ No newline at end of file diff --git a/backend/web/js/site.js b/backend/web/js/site.js new file mode 100755 index 0000000..067057b --- /dev/null +++ b/backend/web/js/site.js @@ -0,0 +1,67 @@ +$(document).ready(function(){ + + var iii = true; + + + + $('body').on('click','.btn-warning', function(){ + + var testt = $(this); + + var id = $(this).attr('id'); + + var ddd = document.getElementById('test_tr_class'); + + // $.post( "index.php?r=order%2Fupdate&id=1", function( data ) { + + if (!ddd) { + + testt.closest('tr').after( + '' + + '' + + 'data' + + '' + + '' + ); + + loadShow(testt,id); + + }else{ + document.getElementById('test_tr_class').remove(); + }; + + iii = false; + console.log(iii); + + + + + }); + + function loadShow(testt,id){ + $.post( "/admin/orders/show?id=" + id + '"', function( data ) { + + $('#content_'+id).html(data); + + $('#add_mod').submit(function() { + $.ajax({ + type: "POST", + url: "/admin/orders/add?order_id="+id, + data: $(this).serialize(), // serializes the form's elements. + success: function(data) + { + loadShow(testt,id); // show response from the php script. + } + }); + return false; + }); + + }); + + } + + + + + +}); \ No newline at end of file diff --git a/backend/web/robots.txt b/backend/web/robots.txt new file mode 100755 index 0000000..70c2374 --- /dev/null +++ b/backend/web/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/codeception.yml b/codeception.yml new file mode 100755 index 0000000..b2d8613 --- /dev/null +++ b/codeception.yml @@ -0,0 +1,21 @@ +actor: Tester +paths: + tests: tests + log: tests/_output + data: tests/_data + support: tests/_support + envs: tests/_envs +settings: + bootstrap: _bootstrap.php + colors: true + memory_limit: 1024M +extensions: + enabled: + - Codeception\Extension\RunFailed +modules: + config: + Db: + dsn: '' + user: '' + password: '' + dump: tests/_data/dump.sql diff --git a/common/behaviors/ArtBoxAccessBehavior.php b/common/behaviors/ArtBoxAccessBehavior.php new file mode 100755 index 0000000..44645f0 --- /dev/null +++ b/common/behaviors/ArtBoxAccessBehavior.php @@ -0,0 +1,111 @@ + 'interception', + ]; + } + + public function interception($event) + { + if(!isset( Yii::$app->i18n->translations['db_rbac'])){ + Yii::$app->i18n->translations['db_rbac'] = [ + 'class' => 'yii\i18n\PhpMessageSource', + 'sourceLanguage' => 'ru-Ru', + 'basePath' => '@developeruz/db_rbac/messages', + ]; + } + + $route = Yii::$app->getRequest()->resolve(); + + //Проверяем права по конфигу + $this->createRule(); + $user = Instance::ensure(Yii::$app->user, User::className()); + $request = Yii::$app->getRequest(); + $action = $event->action; + + + + + if(!$this->cheсkByRule($action, $user, $request)) + { + + //И по AuthManager + if(!$this->checkPermission($route)){ + if ($user->getIsGuest()) { + $user->loginRequired(); + } else { + throw new ForbiddenHttpException(Yii::t('db_rbac','Недостаточно прав')); + } + } + + } + } + + protected function createRule() + { + + foreach($this->rules as $controller => $rule) + { + + foreach ($rule as $singleRule) { + if (is_array($singleRule)) { + $option = [ + 'controllers' => [$controller], + 'class' => 'yii\filters\AccessRule' + ]; + $this->_rules[] = Yii::createObject(array_merge($option, $singleRule)); + + } + } + } + } + + protected function cheсkByRule($action, $user, $request) + { + + foreach ($this->_rules as $rule) { + + if ($rule->allows($action, $user, $request)) + return true; + } + return false; + } + + protected function checkPermission($route) + { + //$route[0] - is the route, $route[1] - is the associated parameters + + $routePathTmp = explode('/', $route[0]); + $routeVariant = array_shift($routePathTmp); + if(Yii::$app->user->can($routeVariant, $route[1])) + return true; + + foreach($routePathTmp as $routePart) + { + $routeVariant .= '/'.$routePart; + + if(Yii::$app->user->can($routeVariant, $route[1])) + return true; + } + + return false; + } + +} \ No newline at end of file diff --git a/common/behaviors/NotifyBehavior.php b/common/behaviors/NotifyBehavior.php new file mode 100755 index 0000000..61dc7a3 --- /dev/null +++ b/common/behaviors/NotifyBehavior.php @@ -0,0 +1,69 @@ + 'afterUpdate', + ]; + } + + public function afterUpdate($event) + { + /** + * @var Event $event + * @var CommentModel $owner + */ + $owner = $this->owner; + if($owner->status == $owner::STATUS_ACTIVE) { + $entity = $owner->entity; + $model = $entity::findOne($owner->entity_id); + if($model != NULL) { + if(!empty( $owner->user )) { + $customer = $owner->user; + if(preg_match('/\S+@\S+\.\S+/', $customer->username)) { + $email = $customer->username; + } else { + return false; + } + } + $url = \Yii::$app->urlManager->getHostInfo(); + if($model::className() == Product::className()) { + $url .= '/product/'.$model->alias.'#artbox-comment'; + } elseif($model::className() == Articles::className()) { + $url .= '/blog/'.$model->translit.'#artbox-comment'; + } + $mailer = Mailer::widget([ + 'type' => 'comment_notify', + 'params' => [ + 'model' => $model, + 'url' => $url, + 'comment' => $owner, + ], + 'subject' => 'Ваш комментарий опубликован', + 'email' => ( !empty( $customer ) ? $email : $owner->email ), + ]); + return $mailer; + } + } + return false; + } + } \ No newline at end of file diff --git a/common/behaviors/RatingBehavior.php b/common/behaviors/RatingBehavior.php new file mode 100755 index 0000000..0d999ca --- /dev/null +++ b/common/behaviors/RatingBehavior.php @@ -0,0 +1,42 @@ + 'afterUpdate', + ]; + } + + public function afterUpdate($event) + { + /** + * @var Event $event + * @var CommentModel $owner + */ + $owner = $this->owner; + if($owner->entity == Product::className() || $owner->entity == Articles::className()) { + $entity = $owner->entity; + $model = $entity::findOne($owner->entity_id); + if($model != NULL) { + $model->recalculateRating(); + } + } + } + } \ No newline at end of file diff --git a/common/behaviors/RuSlug.php b/common/behaviors/RuSlug.php new file mode 100755 index 0000000..2185a4d --- /dev/null +++ b/common/behaviors/RuSlug.php @@ -0,0 +1,139 @@ + 'getSlug' + ]; + } + + public function getSlug( $event ) + { + if ( empty( $this->owner->{$this->out_attribute} ) ) { + $this->owner->{$this->out_attribute} = $this->generateSlug( $this->owner->{$this->in_attribute} ); + } else { + $this->owner->{$this->out_attribute} = $this->generateSlug( $this->owner->{$this->out_attribute} ); + } + } + + private function generateSlug( $slug ) + { + $slug = $this->translit( $slug ); + if ( $this->checkUniqueSlug( $slug ) ) { + return $slug; + } else { + for ( $suffix = 2; !$this->checkUniqueSlug( $new_slug = $slug . '-' . $suffix ); $suffix++ ) {} + return $new_slug; + } + } + + private function slugify( $slug ) + { + if ( $this->translit ) { + return yii\helpers\Inflector::slug( TransliteratorHelper::process( $slug ), '-', true ); + } else { + return $this->slug( $slug, '-', true ); + } + } + + private function slug( $string, $replacement = '-', $lowercase = true ) + { + $string = preg_replace( '/[^\p{L}\p{Nd}]+/u', $replacement, $string ); + $string = trim( $string, $replacement ); + return $lowercase ? strtolower( $string ) : $string; + } + + private function checkUniqueSlug( $slug ) + { + $pk = $this->owner->primaryKey(); + $pk = $pk[0]; + + $condition = $this->out_attribute . ' = :out_attribute'; + $params = [ ':out_attribute' => $slug ]; + if ( !$this->owner->isNewRecord ) { + $condition .= ' and ' . $pk . ' != :pk'; + $params[':pk'] = $this->owner->{$pk}; + } + + return !$this->owner->find() + ->where( $condition, $params ) + ->one(); + } + + static function translit ($string, $setting = 'all') + { + $letter = array ( + + 'а' => 'a', 'б' => 'b', 'в' => 'v', + 'г' => 'g', 'д' => 'd', 'е' => 'e', + 'ё' => 'e', 'ж' => 'zh', 'з' => 'z', + 'и' => 'i', 'й' => 'y', 'к' => 'k', + 'л' => 'l', 'м' => 'm', 'н' => 'n', + 'о' => 'o', 'п' => 'p', 'р' => 'r', + 'с' => 's', 'т' => 't', 'у' => 'u', + 'ф' => 'f', 'х' => 'h', 'ц' => 'c', + 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sch', + 'ь' => "", 'ы' => 'y', 'ъ' => "", + 'э' => 'e', 'ю' => 'yu', 'я' => 'ya', + 'ї' => 'yi', 'є' => 'ye', 'і' => 'ee', + + 'А' => 'A', 'Б' => 'B', 'В' => 'V', + 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', + 'Ё' => 'E', 'Ж' => 'Zh', 'З' => 'Z', + 'И' => 'I', 'Й' => 'Y', 'К' => 'K', + 'Л' => 'L', 'М' => 'M', 'Н' => 'N', + 'О' => 'O', 'П' => 'P', 'Р' => 'R', + 'С' => 'S', 'Т' => 'T', 'У' => 'U', + 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', + 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sch', + 'Ь' => "", 'Ы' => 'Y', 'Ъ' => "", + 'Э' => 'E', 'Ю' => 'Yu', 'Я' => 'Ya', + 'Ї' => 'Yi', 'Є' => 'Ye', 'І' => 'Ee' + ); + + $symbol = array ( + ' ' => '-', "'" => '', '"' => '', + '!' => '', "@" => '', '#' => '', + '$' => '', "%" => '', '^' => '', + ';' => '', "*" => '', '(' => '', + ')' => '', "+" => '', '~' => '', + '.' => '', ',' => '-', '?' => '', + '…' => '', '№' => 'N', '°' => '', + '`' => '', '|' => '', '&' => '-and-', + '<' => '', '>' => '' + ); + + if ($setting == 'all') + { + $converter = $letter + $symbol; + } + else if ($setting == 'letter') + { + $converter = $letter; + } + else if ($setting == 'symbol') + { + $converter = $symbol; + } + + $url = strtr ($string, $converter); + + $url = str_replace ("---", '-', $url); + $url = str_replace ("--", '-', $url); + + return $url; + } + +} \ No newline at end of file diff --git a/common/behaviors/ShowImage.php b/common/behaviors/ShowImage.php new file mode 100755 index 0000000..dde9c28 --- /dev/null +++ b/common/behaviors/ShowImage.php @@ -0,0 +1,43 @@ + 'getSlug', + ActiveRecord::EVENT_BEFORE_UPDATE=> 'getSlug' + ]; + } + + public function getSlug( $event ) + { + if(!empty($this->owner->{$this->in_attribute})){ + if ( empty( $this->owner->{$this->out_attribute} ) ) { + $this->owner->{$this->out_attribute} = $this->generateSlug( $this->owner->{$this->in_attribute} ); + } else { + $this->owner->{$this->out_attribute} = $this->generateSlug( $this->owner->{$this->out_attribute} ); + } + } + + } + + private function generateSlug( $slug ) + { + $slug = $this->slugify( $slug ); + if ( $this->checkUniqueSlug( $slug ) ) { + return $slug; + } else { + for ( $suffix = 2; !$this->checkUniqueSlug( $new_slug = $slug . '-' . $suffix ); $suffix++ ) {} + return $new_slug; + } + } + + private function slugify( $slug ) + { + if ( $this->translit ) { + return yii\helpers\Inflector::slug( TransliteratorHelper::process( $slug ), '-', true ); + } else { + return $this->slug( $slug, '-', true ); + } + } + + private function slug( $string, $replacement = '-', $lowercase = true ) + { + $string = preg_replace( '/[^\p{L}\p{Nd}]+/u', $replacement, $string ); + $string = trim( $string, $replacement ); + return $lowercase ? strtolower( $string ) : $string; + } + + private function checkUniqueSlug( $slug ) + { + $pk = $this->owner->primaryKey(); + $pk = $pk[0]; + + $condition = $this->out_attribute . ' = :out_attribute'; + $params = [ ':out_attribute' => $slug ]; + if ( !$this->owner->isNewRecord ) { + $condition .= ' and ' . $pk . ' != :pk'; + $params[':pk'] = $this->owner->{$pk}; + } + + return !$this->owner->find() + ->where( $condition, $params ) + ->one(); + } + +} \ No newline at end of file diff --git a/common/components/Request.php b/common/components/Request.php new file mode 100755 index 0000000..98a8adf --- /dev/null +++ b/common/components/Request.php @@ -0,0 +1,41 @@ +web, "", parent::getBaseUrl()) . $this->adminUrl; + + } + + + + public function resolvePathInfo() + + { + + if ($this->getUrl() === $this->adminUrl) { + + return ""; + + } else { + + return parent::resolvePathInfo(); + + } + + } + +} \ No newline at end of file diff --git a/common/components/SmsSender.php b/common/components/SmsSender.php new file mode 100755 index 0000000..226a0fc --- /dev/null +++ b/common/components/SmsSender.php @@ -0,0 +1,51 @@ +\n"; + $myXML .= ""; + $myXML .= "SENDSMS"; + $myXML .= ' ' . "\n"; + $myXML .= " " . $text . ""; + $myXML .= " " . $recipient . ""; + $myXML .= ""; + $myXML .= ""; + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_USERPWD, $user . ':' . $password); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_URL, 'http://sms-fly.com/api/api.php'); + curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml", "Accept: text/xml")); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $myXML); + $response = curl_exec($ch); + curl_close($ch); + + return $response; + } +} diff --git a/common/components/artboximage/ArtboxImage.php b/common/components/artboximage/ArtboxImage.php new file mode 100755 index 0000000..244bd62 --- /dev/null +++ b/common/components/artboximage/ArtboxImage.php @@ -0,0 +1,81 @@ + 'jpeg', + 'jpeg' => 'jpeg', + 'png' => 'png', + 'gif' => 'gif', + 'bmp' => 'bmp', + ]; + + public $uploadUrl = '/admin/artboxfile/action/upload'; + + public function load($file = null, $driver = null) { + if(empty($file) || !realpath($file)) { + throw new ErrorException('File name can not be empty and exists'); + } + return Image::factory($file, $driver ? $driver : $this->driver); + } + + public function fileinputWidget($model, $modelField, $formField = 'fileUpload', $multiple = false, $imageOnly = true) { + $options = [ + 'multiple' => $multiple, + ]; + if ($imageOnly) { + $options['accept'] = 'image/*'; + } + return FileInput::widget([ + 'name' => $formField, + 'options' => $options, + 'pluginOptions' => [ + 'allowedFileExtensions' => array_keys($this->extensions), + // @todo set for multiple + 'initialPreview' => $model->{$modelField} ? Html::img($model->{$modelField}) : '', + 'overwriteInitial' => !$multiple, + 'showRemove' => true, + 'showUpload' => false, + 'uploadUrl' => $this->uploadUrl, + 'uploadExtraData' => [ + 'fileField' => $modelField, + 'multiple' => intval($multiple), + ], + ], + 'pluginEvents' => [ + "change" => "function() { console.log('change'); }", + "open" => "function() { console.log('open'); }", + "save" => "function() { console.log('save'); }", + "upload" => "function() { console.log('upload'); }", + "uploaded" => "function() { console.log('uploaded'); }", + "filepreupload" => "function() { console.log('filepreupload'); }", + "fileuploaded" => "function(event, files, extra) { console.log(event, files, extra); }", + "fileuploaderror" => "function() { console.log('fileuploaderror'); }", + "filebatchuploaderror" => "function() { console.log('filebatchuploaderror'); }", + "filebatchuploadsuccess" => "function() { console.log('filebatchuploadsuccess'); }", + "filebatchuploadcomplete" => "function() { console.log('filebatchuploadcomplete'); }", + 'filebatchuploadsuccess' => "function(event, files, extra) { + console.log(event, files, extra); + }", + ], + ]); + } +} \ No newline at end of file diff --git a/common/components/artboximage/ArtboxImageBehavior.php b/common/components/artboximage/ArtboxImageBehavior.php new file mode 100755 index 0000000..51a2c42 --- /dev/null +++ b/common/components/artboximage/ArtboxImageBehavior.php @@ -0,0 +1,10 @@ +artboximage; + } + return self::$imageDriver; + } + + public function getPreset($preset) { + if (empty(self::$presets)) { + self::$presets = self::getDriver()->presets; + } + return empty(self::$presets[$preset]) ? null : self::$presets[$preset]; + } + + public static function getImage($file, $preset, $imgOptions = []) { + $preset_alias = is_array($preset) ? array_keys($preset)[0] : null; + return Html::img(self::getImageSrc($file, $preset, $preset_alias), $imgOptions); + } + + public static function getImageSrc($file, $preset, $preset_alias = null) { + if (is_string($preset)) { + $preset_alias = $preset; + $preset = self::getPreset($preset); + } + if (empty($preset) || empty($preset_alias)) { + return $file; + } + $filePath = self::getPathFromUrl($file); + if (!file_exists($filePath) || !preg_match('#^(.*)\.(' . self::getExtensionsRegexp() . ')$#', $file, $matches)) { + return $file; + } + return self::getPresetUrl($filePath, $preset, $preset_alias); + } + + public static function fileinputWidget($model, $modelField, $formField = 'fileUpload', $multiple = false) { + return Yii::$app->artboximage->fileinputWidget($model, $modelField, $formField, $multiple); + } + + private static function getPathFromUrl($url) { + return substr_replace($url, self::getDriver()->rootPath, 0, strlen(self::getDriver()->rootUrl)); + } + + private static function getUrlFromPath($path) { + return substr_replace($path, self::getDriver()->rootUrl, 0, strlen(self::getDriver()->rootPath)); + } + + private static function getPresetUrl($filePath, $preset, $preset_alias) { + $pathinfo = pathinfo($filePath); + $presetPath = $pathinfo['dirname'] .'/styles/'. strtolower($preset_alias); + $presetFilePath = $presetPath .'/'. $pathinfo['basename']; + $presetUrl = self::getUrlFromPath($presetFilePath); + if (file_exists($presetFilePath)) { + return $presetUrl; + } + if (!file_exists($presetPath)) { + @mkdir($presetPath, 0777, true); + } + $output = self::createPresetImage($filePath, $preset, $preset_alias); + if ( !empty($output) ) { + $f = fopen($presetFilePath, 'w'); + fwrite($f, $output); + fclose($f); + return $presetUrl; + } + return false; + } + + private static function createPresetImage($filePath, $preset, $preset_alias) + { + $image = self::getDriver()->load($filePath); + foreach ($preset as $action => $data) { + switch($action) { + case 'resize': + $width = empty($data['width']) ? null : $data['width']; + $height = empty($data['height']) ? null : $data['height']; + $master = empty($data['master']) ? null : $data['master']; + $image->resize($width, $height, $master); + break; + case 'flip': + $image->flip(@$data['direction']); + break; + default: + break; + } + } + return $image->render(); + } + + /** + * Get extensions regexp + * @return string regexp + */ + private function getExtensionsRegexp() + { + $keys = array_keys(self::getDriver()->extensions); + return '(?i)' . join('|', $keys); + } + + /** + * Get size from suffix + * @param string $suffix + * @return string size + */ + private function getSizeFromSuffix($suffix) + { + return array_search($suffix, $this->getSizeSuffixes()); + } + + /** + * Get suffix from size + * @param string $size + * @return string suffix + */ + private function getSufixFromSize($size) + { + return ArrayHelper::getValue($this->getSizeSuffixes(), $size); + } + + private function getSizeSuffixes() + { + $suffixes = []; + foreach ($this->sizes as $size => $sizeConf) { + $suffixes[$size] = ArrayHelper::getValue($this->sizeSuffixes, $size, $this->defaultSizeSuffix . $size); + } + return $suffixes; + } +} \ No newline at end of file diff --git a/common/components/artboxtree/ArtboxTreeBehavior.php b/common/components/artboxtree/ArtboxTreeBehavior.php new file mode 100755 index 0000000..8774aa1 --- /dev/null +++ b/common/components/artboxtree/ArtboxTreeBehavior.php @@ -0,0 +1,445 @@ + $keyNameDepth; + public $primaryKeyMode = true; + + /** + * @var string + */ + public $delimiter = '|'; + + /** + * @var ActiveRecord|self|null + */ + protected $entity; + + /** + * @param ActiveRecord $owner + * @throws Exception + */ + public function attach($owner) + { + parent::attach($owner); + if ($this->keyNameId === null) { + $primaryKey = $owner->primaryKey(); + if (!isset($primaryKey[0])) { + throw new Exception('"' . $owner->className() . '" must have a primary key.'); + } + $this->keyNameId = $primaryKey[0]; + } + } + + public function events() + { + return [ + // @todo Use beforeSave for automatic set MP-params + ActiveRecord::EVENT_BEFORE_UPDATE => 'beforeUpdate', + ActiveRecord::EVENT_AFTER_INSERT => 'afterInsert', + ]; + } + + /* + * Main methods + */ + + /* + * get one parent + * use AL-method + */ + public function getParent() { + return $this->getParentAL(); + } + + /* + * get all parents + * use MP-method + */ + public function getParents() { + return $this->getParentsMP(); + } + + /* + * get one-level children items + * use AL-method + */ + public function getChildren() { + return $this->getChildrenAL(); + } + + /* + * get all-level children items + * use MP-method + */ + public function getAllChildren($depth = null, $where = [], $with = null) { + return $this->getAllChildrenMP($depth, $where, $with); + } + + /* + * get all-level children items + * use MP-method + */ + public function getAllChildrenTree($depth = null, $where = [], $with = null) { + $query = $this->getAllChildrenMP($depth, $where, $with); + return $this->buildTree($query->all(), $this->owner->getAttribute($this->keyNameId)); + } + + // @todo Check algorytm + public function buildTree(array $data, $parentId = 0) { + $result = []; + foreach ($data as $key => $element) { + if ($element->getAttribute($this->keyNameParentId) == $parentId) { + unset($data[$key]); + $children = $this->buildTree($data, $element->getAttribute($this->keyNameId)); + $result[] = [ + 'item' => $element, + 'children' => $children + ]; + } + } + return $result; + } + + + /* + * ================================ + * MP-methods + * ================================ + */ + + /* + * Full-path (use MP-method) + */ + public function getParentsMP($depth = null) { + $tableName = $this->owner->tableName(); + $path = $this->owner->getAttribute($this->keyNamePath); + $query = $this->owner->find() + ->andWhere(['<@', "{$tableName}.[[{$this->keyNamePath}]]", $path]); + if ($depth > 0) { + $query->andWhere(['>=', "{$tableName}.[[{$this->keyNameDepth}]]", $this->owner->getAttribute($this->keyNameDepth) - $depth]); + } + $query->andWhere(['<', "{$tableName}.[[{$this->keyNameDepth}]]", $this->owner->getAttribute($this->keyNameDepth)]); + + $orderBy = []; + $orderBy["{$tableName}.[[{$this->keyNameDepth}]]"] = SORT_ASC; + $orderBy["{$tableName}.[[{$this->keyNameId}]]"] = SORT_ASC; + + $query + ->andWhere($this->groupWhere()) + ->addOrderBy($orderBy); + $query->multiple = true; + + return $query; + } + /*public function getParentsMP($depth = null) { + $path = $this->getParentPath(); + if ($path !== null) { + $paths = explode(',', trim($path, '{}')); + if (!$this->primaryKeyMode) { + $path = null; + $paths = array_map( + function ($value) use (&$path) { + return $path = ($path !== null ? $path . ',' : '') . $value; + }, + $paths + ); + } + if ($depth !== null) { + $paths = array_slice($paths, -$depth); + } + } else { + $paths = []; + } + + $tableName = $this->owner->tableName(); + if ($this->primaryKeyMode) { + $condition[] = ["{$tableName}.[[{$this->keyNameId}]]" => $paths]; + } else { + $condition[] = ["{$tableName}.[[{$this->keyNamePath}]]" => $paths]; + } + + $query = $this->owner->find() + ->andWhere($condition) + ->andWhere($this->groupWhere()) + ->addOrderBy(["{$tableName}.[[{$this->keyNamePath}]]" => SORT_ASC]); + $query->multiple = true; + + return $query; + }*/ + + /** + * @param bool $asArray = false + * @return null|string|array + */ + public function getParentPath($asArray = false) + { + return static::getParentPathInternal($this->owner->getAttribute($this->keyNamePath), $asArray); + } + /** + * @return array + */ + protected function groupWhere() + { + $tableName = $this->owner->tableName(); + if ($this->keyNameGroup === null) { + return []; + } else { + return ["{$tableName}.[[{$this->keyNameGroup}]]" => $this->owner->getAttribute($this->keyNameGroup)]; + } + } + + + public function getAllChildrenMP($depth = null, $where = [], $with = null) + { + $tableName = $this->owner->tableName(); + $path = $this->owner->getAttribute($this->keyNamePath); + $query = $this->owner->find() + ->andWhere(['@>', "{$tableName}.[[{$this->keyNamePath}]]", $path]); + + if ($depth > 0) { + $query->andWhere(['<=', "{$tableName}.[[{$this->keyNameDepth}]]", $this->owner->getAttribute($this->keyNameDepth) + $depth]); + } + + $orderBy = []; + $orderBy["{$tableName}.[[{$this->keyNameDepth}]]"] = SORT_ASC; + $orderBy["{$tableName}.[[{$this->keyNameId}]]"] = SORT_ASC; + + if ($where) { + $query->andWhere($where); + } + if ($with) { + $query->with($with); + } + + $query + ->andWhere($this->groupWhere()) + ->addOrderBy($orderBy); + $query->multiple = true; + + return $query; + } + + /* + * ================================ + * AL methods + * ================================ + */ + + /* + * Parent entity (use AL-method) + * @return \yii\db\ActiveRecord + */ + public function getParentAL() { + $parent_id = $this->owner->getAttribute($this->keyNameParentId); + if (empty($parent_id)) + return null; + + $where = [$this->keyNameId => $parent_id]; + if ($this->keyNameGroup) { + $where[$this->keyNameGroup] = $this->owner->getAttribute($this->keyNameGroup); + } + + return $this->owner->find()->where($where)->one(); + } + + /* + * Get parents by AL-method + * @return array + */ + public function getParentsAL() { + $parent_id = $this->owner->getAttribute($this->keyNameParentId); + if ($parent_id == 0) { + return []; + } + + $parent = $this->owner; + $parents = []; + while(true) { + $parent = $parent->getParentAL(); + if (is_null($parent)) + break; + $parents[] = $parent; + } + + return array_reverse($parents); + } + + /* + * Children entities (one-step) (use AL-method) + * @return ActiveQuery + */ + public function getChildrenAL() { + $where = [$this->keyNameParentId => $this->owner->getAttribute($this->keyNameId)]; + if ($this->keyNameGroup) { + $where[$this->keyNameGroup] = $this->owner->getAttribute($this->keyNameGroup); + } + return $this->owner->find()->where($where); + } + + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + /** + * @param array $changedAttributes + * @throws Exception + */ + protected function _rebuildChildren($changedAttributes) + { + $path = isset($changedAttributes[$this->keyNamePath]) ? $changedAttributes[$this->keyNamePath] : $this->owner->getAttribute($this->keyNamePath); + $update = []; + $condition = [ + 'and', + ['@>', "[[{$this->keyNamePath}]]", $path, false], + ]; + if ($this->keyNameGroup !== null) { + $group = isset($changedAttributes[$this->keyNameGroup]) ? $changedAttributes[$this->keyNameGroup] : $this->owner->getAttribute($this->keyNameGroup); + $condition[] = [$this->keyNameGroup => $group]; + } + $params = []; + + if (isset($changedAttributes[$this->keyNamePath])) { + $substringExpr = $this->substringExpression( + "[[{$this->keyNamePath}]]", + 'array_length(:pathOld) + 1', + "array_length([[{$this->keyNamePath}]]) - array_length(:pathOld)" + ); + $update[$this->keyNamePath] = new Expression($this->concatExpression([':pathNew', $substringExpr])); + $params[':pathOld'] = $path; + $params[':pathNew'] = $this->owner->getAttribute($this->keyNamePath); + } + + if ($this->keyNameGroup !== null && isset($changedAttributes[$this->keyNameGroup])) { + $update[$this->keyNameGroup] = $this->owner->getAttribute($this->keyNameGroup); + } + + if ($this->keyNameDepth !== null && isset($changedAttributes[$this->keyNameDepth])) { + $delta = $this->owner->getAttribute($this->keyNameDepth) - $changedAttributes[$this->keyNameDepth]; + $update[$this->keyNameDepth] = new Expression("[[{$this->keyNameDepth}]]" . sprintf('%+d', $delta)); + } + if (!empty($update)) { + $this->owner->updateAll($update, $condition, $params); + } + } + + /** + * @param string $path + * @param string $delimiter + * @param bool $asArray = false + * @return null|string|array + */ + protected static function getParentPathInternal($path, $asArray = false) + { + $path = explode(',', trim($path, '{}')); + array_pop($path); + if ($asArray) { + return $path; + } + return count($path) > 0 ? implode(',', $path) : null; + } + + protected function toLike($path) { + return strtr($path . ',', ['%' => '\%', '_' => '\_', '\\' => '\\\\']) . '%'; + } + + protected function concatExpression($items) + { + if ($this->owner->getDb()->driverName === 'sqlite' || $this->owner->getDb()->driverName === 'pgsql') { + return implode(' || ', $items); + } + return 'CONCAT(' . implode(',', $items) . ')'; + } + + protected function substringExpression($string, $from, $length) + { + if ($this->owner->getDb()->driverName === 'sqlite') { + return "SUBSTR({$string}, {$from}, {$length})"; + } + return "SUBSTRING({$string}, {$from}, {$length})"; + } + + // ======================================================= + public function afterInsert() { + $this->withSave(); + $this->owner->updateAttributes([$this->keyNamePath => $this->owner->getAttribute($this->keyNamePath), $this->keyNameDepth => $this->owner->getAttribute($this->keyNameDepth)]); + } + + public function beforeUpdate() + { + if ($this->owner->getIsNewRecord()) { + throw new NotSupportedException('Method "' . $this->owner->className() . '::insert" is not supported for inserting new entitys.'); + } + $this->withSave(); + } + + protected function withSave() { + $id = $this->owner->getAttribute($this->keyNameId); + $parent_id = $this->owner->getAttribute($this->keyNameParentId); + + if (is_null($parent_id)) { + $parent_id = 0; + } + + // check parent_id value is changed! + /*if ($this->owner->getOldAttribute($this->keyNameParentId) == $parent_id) { + return; + }*/ + + // rebuild parents entities + if ($parent_id == 0) { + $depth = 0; + $path = [intval($id)]; + } else { + $parents = $this->getParentsAL(); + $path = []; + $depth = 0; + foreach ($parents as $entity) { + $path[] = $entity->getAttribute($this->keyNameId); + $depth++; + } + $path[] = intval($id); + } + + $path = '{'. implode(',', $path) .'}'; + + // rebuild children entities (recurcive) +// $this->_rebuildChildren([ +// $this->keyNamePath => $path +// ]); + + $this->owner->setAttribute($this->keyNamePath, $path); +// $this->owner->setAttribute($this->keyNamePath, $path); + $this->owner->setAttribute($this->keyNameDepth, $depth); + } + + public function _recursiveRebuildChildren() { + $children = $this->getChildrenAL()->all(); + $root_path = explode(',', $this->owner->getAttribute($this->keyNamePath)); + $root_depth = $this->owner->getAttribute($this->keyNameDepth); + + /** @var $child ActiveRecord */ + foreach ($children as $child) { + $path = $root_path; + $path[] = $child->getAttribute($this->keyNameId); + $depth = $root_depth + 1; + + $child->_recursiveRebuildChildren(); + } + } +} \ No newline at end of file diff --git a/common/components/artboxtree/ArtboxTreeHelper.php b/common/components/artboxtree/ArtboxTreeHelper.php new file mode 100755 index 0000000..26877e7 --- /dev/null +++ b/common/components/artboxtree/ArtboxTreeHelper.php @@ -0,0 +1,47 @@ +depth+1) . $value; + $result[$key] = $row; + if (!empty($item['children'])) { + self::_recursiveTreeMap($result, $item['children'], $from, $to, $symbol); + } + } + } +} \ No newline at end of file diff --git a/common/components/artboxtree/ArtboxTreeQueryTrait.php b/common/components/artboxtree/ArtboxTreeQueryTrait.php new file mode 100755 index 0000000..048c359 --- /dev/null +++ b/common/components/artboxtree/ArtboxTreeQueryTrait.php @@ -0,0 +1,96 @@ +modelClass; + self::$model = new $class; + } + return self::$model; + } + + public function getTree($group = null, $with = null) { + $model = $this->getModel(); + if ($group !== null) { + $this->andWhere([$model->keyNameGroup => $group]); + } + if ($with) { + $this->with($with); + } + $data = $this->all(); + if (empty($data)) + return []; + + return $this->buildTree($data); + } + + private function _recursiveRebuild($tree, $parentPath = null, $depth = 0) { + $model = $this->getModel(); + + foreach ($tree as $row) { + $path = (is_null($parentPath) ? '' : $parentPath . $model->delimiter) . $row['item']->getAttribute($model->keyNameId); + $row['item']->setAttribute($model->keyNamePath, $path); + $row['item']->setAttribute($model->keyNameDepth, $depth); + $row['item']->save(); + if (!empty($row['children'])) { + $this->_recursiveRebuild($row['children'], $path, $depth+1); + } + } + } + + /** + * @param int $group + */ + public function rebuildMP($group, $with = null) { + $tree = $this->getTree($group, $with); + + $this->_recursiveRebuild($tree); + } + + protected function buildTree(array $data, $parentId = 0) { + $model = $this->getModel(); + + $result = []; + foreach ($data as $element) { + if ($element[$model->keyNameParentId] == $parentId) { + $children = $this->buildTree($data, $element[$model->keyNameId]); + $result[] = [ + 'item' => $element, + 'children' => $children + ]; + } + } + return $result; + } + + public function normalizeTreeData(array $data, $parentId = null) + { + $model = $this->getModel(); + + $result = []; + foreach ($data as $element) { + if ($element[$model->keyNameParentId] == $parentId) { + $result[] = $element; + $children = $this->normalizeTreeData($data, $element[$model->keyNameId]); + if ($children) { + $result = array_merge($result, $children); + } + } + } + return $result; + } +} \ No newline at end of file diff --git a/common/components/artboxtree/ArtboxTreeWidget.php b/common/components/artboxtree/ArtboxTreeWidget.php new file mode 100755 index 0000000..4e74c5e --- /dev/null +++ b/common/components/artboxtree/ArtboxTreeWidget.php @@ -0,0 +1,138 @@ +dataProvider === null) { + throw new InvalidConfigException('The "dataProvider" property must be set.'); + } + if ($this->keyNameId === null) { + throw new InvalidConfigException('The "keyNameId" property must be set.'); + } + if ($this->formatter == null) { + $this->formatter = Yii::$app->getFormatter(); + } elseif (is_array($this->formatter)) { + $this->formatter = Yii::createObject($this->formatter); + } + if (!$this->formatter instanceof Formatter) { + throw new InvalidConfigException('The "formatter" property must be either a Format object or a configuration array.'); + } + } + + /** + * Runs the widget. + */ + public function run() + { + if (!empty($this->assetBundle) && class_exists($this->assetBundle)) { + $view = $this->getView(); + $assetBundle = $this->assetBundle; + $assetBundle::register($view); + } + if ($this->dataProvider->getCount() == 0) { + return $this->renderEmptyResult(); + } + + parent::run(); + } + + protected function renderEmptyResult() { + return empty($this->emptyResult) ? Yii::t('artbox', 'TreeViewEmptyResult') : Yii::t('artbox', $this->emptyResult); + } + + /** + * Normalize tree data + * @param array $data + * @param string $parentId + * @return array + */ + protected function _normalizeTreeData(array $data, $parentId = null) { + $result = []; + foreach ($data as $element) { + if ($element[$this->keyNameParentId] == $parentId) { + $result[] = $element; + $children = $this->_normalizeTreeData($data, $element[$this->keyNameId]); + if ($children) { + $result = array_merge($result, $children); + } + } + } + return $result; + } + + /** + * Hierarchy tree data + * @param array $data + * @param string $parentId + * @return array + */ + protected function _hierarchyTreeData(array $data, $parentId = null) { + $result = []; + foreach ($data as $element) { + if ($element[$this->keyNameParentId] == $parentId) { + $children = $this->_hierarchyTreeData($data, $element[$this->keyNameId]); + $result[] = [ + 'item' => $element, + 'children' => $children + ]; + } + } + return $result; + } +} \ No newline at end of file diff --git a/common/components/artboxtree/treegrid/TreeGridColumn.php b/common/components/artboxtree/treegrid/TreeGridColumn.php new file mode 100755 index 0000000..5474766 --- /dev/null +++ b/common/components/artboxtree/treegrid/TreeGridColumn.php @@ -0,0 +1,250 @@ + + */ +class TreeGridColumn extends Object { + + /** + * @var TreeGrid the grid view object that owns this column. + */ + public $grid; + + /** + * @var string the header cell content. Note that it will not be HTML-encoded. + */ + public $header; + + /** + * @var string the footer cell content. Note that it will not be HTML-encoded. + */ + public $footer; + + /** + * @var callable This is a callable that will be used to generate the content of each cell. + * The signature of the function should be the following: `function ($model, $key, $index, $column)`. + * Where `$model`, `$key`, and `$index` refer to the model, key and index of the row currently being rendered + * and `$column` is a reference to the [[TreeColumn]] object. + */ + public $content; + + /** + * @var boolean whether this column is visible. Defaults to true. + */ + public $visible = true; + + /** + * @var array the HTML attributes for the column group tag. + * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. + */ + public $options = []; + + /** + * @var array the HTML attributes for the header cell tag. + * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. + */ + public $headerOptions = []; + + /** + * @var array|\Closure the HTML attributes for the data cell tag. This can either be an array of + * attributes or an anonymous function ([[Closure]]) that returns such an array. + * The signature of the function should be the following: `function ($model, $key, $index, $column)`. + * Where `$model`, `$key`, and `$index` refer to the model, key and index of the row currently being rendered + * and `$column` is a reference to the [[Column]] object. + * A function may be used to assign different attributes to different rows based on the data in that row. + * + * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. + */ + public $contentOptions = []; + + /** + * @var array the HTML attributes for the footer cell tag. + * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. + */ + public $footerOptions = []; + + /** + * @var string the attribute name associated with this column. When neither [[content]] nor [[value]] + * is specified, the value of the specified attribute will be retrieved from each data model and displayed. + * + * Also, if [[label]] is not specified, the label associated with the attribute will be displayed. + */ + public $attribute; + + /** + * @var string label to be displayed in the [[header|header cell]] and also to be used as the sorting + * link label when sorting is enabled for this column. + * If it is not set and the models provided by the GridViews data provider are instances + * of [[\yii\db\ActiveRecord]], the label will be determined using [[\yii\db\ActiveRecord::getAttributeLabel()]]. + * Otherwise [[\yii\helpers\Inflector::camel2words()]] will be used to get a label. + */ + public $label; + + /** + * @var boolean whether the header label should be HTML-encoded. + * @see label + */ + public $encodeLabel = true; + + /** + * @var string|\Closure an anonymous function or a string that is used to determine the value to display in the current column. + * + * If this is an anonymous function, it will be called for each row and the return value will be used as the value to + * display for every data model. The signature of this function should be: `function ($model, $key, $index, $column)`. + * Where `$model`, `$key`, and `$index` refer to the model, key and index of the row currently being rendered + * and `$column` is a reference to the [[DataColumn]] object. + * + * You may also set this property to a string representing the attribute name to be displayed in this column. + * This can be used when the attribute to be displayed is different from the [[attribute]] that is used for + * sorting and filtering. + * + * If this is not set, `$model[$attribute]` will be used to obtain the value, where `$attribute` is the value of [[attribute]]. + */ + public $value; + + /** + * @var string|array in which format should the value of each data model be displayed as (e.g. `"raw"`, `"text"`, `"html"`, + * `['date', 'php:Y-m-d']`). Supported formats are determined by the [[GridView::formatter|formatter]] used by + * the [[GridView]]. Default format is "text" which will format the value as an HTML-encoded plain text when + * [[\yii\i18n\Formatter]] is used as the [[GridView::$formatter|formatter]] of the GridView. + */ + public $format = 'text'; + + /** + * Renders the header cell. + */ + public function renderHeaderCell() + { + return Html::tag('th', $this->renderHeaderCellContent(), $this->headerOptions); + } + + /** + * Renders the footer cell. + */ + public function renderFooterCell() + { + return Html::tag('td', $this->renderFooterCellContent(), $this->footerOptions); + } + + /** + * Renders a data cell. + * @param mixed $model the data model being rendered + * @param mixed $key the key associated with the data model + * @param integer $index the zero-based index of the data item among the item array returned by [[GridView::dataProvider]]. + * @return string the rendering result + */ + public function renderDataCell($model, $key, $index, $is_first = false, $symbol = '–') + { + if ($this->contentOptions instanceof Closure) { + $options = call_user_func($this->contentOptions, $model, $key, $index, $this); + } else { + $options = $this->contentOptions; + } + return Html::tag('td', ($is_first ? str_repeat($symbol, $model->depth) : '') . $this->renderDataCellContent($model, $key, $index), $options); + } + + /** + * Renders the header cell content. + * The default implementation simply renders [[header]]. + * This method may be overridden to customize the rendering of the header cell. + * @return string the rendering result + */ + protected function renderHeaderCellContent() + { + if ($this->header !== null || $this->label === null && $this->attribute === null) { + return trim($this->header) !== '' ? $this->header : $this->grid->emptyCell; + } + + $provider = $this->grid->dataProvider; + + if ($this->label === null) { + if ($provider instanceof ActiveDataProvider && $provider->query instanceof ActiveQueryInterface) { + /* @var $model Model */ + $model = new $provider->query->modelClass; + $label = $model->getAttributeLabel($this->attribute); + } else { + $models = $provider->getModels(); + if (($model = reset($models)) instanceof Model) { + /* @var $model Model */ + $label = $model->getAttributeLabel($this->attribute); + } else { + $label = Inflector::camel2words($this->attribute); + } + } + } else { + $label = $this->label; + } + + return $this->encodeLabel ? Html::encode($label) : $label; + } + + /** + * Renders the footer cell content. + * The default implementation simply renders [[footer]]. + * This method may be overridden to customize the rendering of the footer cell. + * @return string the rendering result + */ + protected function renderFooterCellContent() + { + return trim($this->footer) !== '' ? $this->footer : $this->grid->emptyCell; + } + + /** + * Renders the data cell content. + * @param mixed $model the data model + * @param mixed $key the key associated with the data model + * @param integer $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]]. + * @return string the rendering result + */ + protected function renderDataCellContent($model, $key, $index) + { + if ($this->content === null) { + return $this->grid->formatter->format($this->getDataCellValue($model, $key, $index), $this->format); + } else { + if ($this->content !== null) { + return call_user_func($this->content, $model, $key, $index, $this); + } else { + return $this->grid->emptyCell; + } + } + + + } + + /** + * Returns the data cell value. + * @param mixed $model the data model + * @param mixed $key the key associated with the data model + * @param integer $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]]. + * @return string the data cell value + */ + public function getDataCellValue($model, $key, $index) + { + if ($this->value !== null) { + if (is_string($this->value)) { + return ArrayHelper::getValue($model, $this->value); + } else { + return call_user_func($this->value, $model, $key, $index, $this); + } + } elseif ($this->attribute !== null) { + return ArrayHelper::getValue($model, $this->attribute); + } + return null; + } + +} \ No newline at end of file diff --git a/common/components/artboxtree/treegrid/TreeGridWidget.php b/common/components/artboxtree/treegrid/TreeGridWidget.php new file mode 100755 index 0000000..9996437 --- /dev/null +++ b/common/components/artboxtree/treegrid/TreeGridWidget.php @@ -0,0 +1,277 @@ + 'table table-striped table-bordered']; + + /** + * @var array The plugin options + */ + public $pluginOptions = []; + + /** + * @var boolean whether to show the grid view if [[dataProvider]] returns no data. + */ + public $showOnEmpty = true; + + public $rowOptions = []; + + /** + * @var Closure an anonymous function that is called once BEFORE rendering each data model. + * It should have the similar signature as [[rowOptions]]. The return result of the function + * will be rendered directly. + */ + public $beforeRow; + + /** + * @var Closure an anonymous function that is called once AFTER rendering each data model. + * It should have the similar signature as [[rowOptions]]. The return result of the function + * will be rendered directly. + */ + public $afterRow; + + /** + * @var boolean whether to show the header section of the grid table. + */ + public $showHeader = true; + + /** + * @var array the HTML attributes for the table header row. + * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. + */ + public $headerRowOptions = []; + + /** + * @var boolean whether to show the footer section of the grid table. + */ + public $showFooter = false; + + /** + * @var string the HTML display when the content of a cell is empty + */ + public $emptyCell = ' '; + + public $levelSymbol = '–'; + + /** + * Init the widget object. + */ + public function init() { + parent::init(); + + $this->initColumns(); + } + + /** + * Runs the widget. + */ + public function run() { + $run = parent::run(); + if (!is_null($run)) + return $run; + + if ($this->showOnEmpty || $this->dataProvider->getCount() > 0) { + $pagination = $this->dataProvider->getPagination(); + $pagination->setPageSize($this->dataProvider->getTotalCount()); + + $header = $this->showHeader ? $this->renderTableHeader() : false; + $body = $this->renderItems(); + $footer = $this->showFooter ? $this->renderTableFooter() : false; + + $content = array_filter([ + $header, + $body, + $footer + ]); + + return Html::tag('table', implode("\n", $content), $this->options); + } else { + return $this->renderEmptyResult(); + } + } + + /** + * Renders the table header. + * @return string the rendering result. + */ + public function renderTableHeader() + { + $cells = []; + foreach ($this->columns as $column) { + /* @var $column TreeGridColumn */ + $cells[] = $column->renderHeaderCell(); + } + $content = Html::tag('tr', implode('', $cells), $this->headerRowOptions); + return "\n" . $content . "\n"; + } + + /** + * Renders the table footer. + * @return string the rendering result. + */ + public function renderTableFooter() + { + $cells = []; + foreach ($this->columns as $column) { + /* @var $column TreeGridColumn */ + $cells[] = $column->renderFooterCell(); + } + $content = Html::tag('tr', implode('', $cells), $this->footerRowOptions); + return "\n" . $content . "\n"; + } + + /** + * Renders the data models for the grid view. + */ + public function renderItems() + { + $rows = []; + $models = array_values($this->dataProvider->getModels()); + $keys = $this->dataProvider->getKeys(); + $models = TaxOption::find()->normalizeTreeData($models, $this->rootParentId); + foreach ($models as $index => $model) { + $key = $keys[$index]; + if ($this->beforeRow !== null) { + $row = call_user_func($this->beforeRow, $model, $key, $index, $this); + if (!empty($row)) { + $rows[] = $row; + } + } + + $rows[] = $this->renderTableRow($model, $key, $index); + + if ($this->afterRow !== null) { + $row = call_user_func($this->afterRow, $model, $key, $index, $this); + if (!empty($row)) { + $rows[] = $row; + } + } + } + + if (empty($rows)) { + $colspan = count($this->columns); + return "" . $this->renderEmpty() . ""; + } else { + return implode("\n", $rows); + } + } + + /** + * Renders a table row with the given data model and key. + * @param mixed $model the data model to be rendered + * @param mixed $key the key associated with the data model + * @param integer $index the zero-based index of the data model among the model array returned by [[dataProvider]]. + * @return string the rendering result + */ + public function renderTableRow($model, $key, $index) + { + $cells = []; + /* @var $column TreeGridColumn */ + $i = 0; + foreach ($this->columns as $column) { + $cells[] = $column->renderDataCell($model, $key, $index, $i == 0, $this->levelSymbol); + $i++; + } + if ($this->rowOptions instanceof Closure) { + $options = call_user_func($this->rowOptions, $model, $key, $index, $this); + } else { + $options = $this->rowOptions; + } + $options['data-key'] = is_array($key) ? json_encode($key) : (string) $key; + + $id = ArrayHelper::getValue($model, $this->keyNameId); + Html::addCssClass($options, "treegrid-$id"); + + $parentId = ArrayHelper::getValue($model, $this->keyNameParentId); + if ($parentId) { + Html::addCssClass($options, "treegrid-parent-$parentId"); + } + + return Html::tag('tr', implode('', $cells), $options); + } + + /** + * Creates column objects and initializes them. + */ + protected function initColumns() + { + if (empty($this->columns)) { + $this->guessColumns(); + } + foreach ($this->columns as $i => $column) { + if (is_string($column)) { + $column = $this->createDataColumn($column); + } else { + $column = Yii::createObject(array_merge([ + 'class' => $this->dataColumnClass ? : TreeGridColumn::className(), + 'grid' => $this, + ], $column)); + } + if (!$column->visible) { + unset($this->columns[$i]); + continue; + } + $this->columns[$i] = $column; + } + } + + /** + * Creates a [[DataColumn]] object based on a string in the format of "attribute:format:label". + * @param string $text the column specification string + * @return DataColumn the column instance + * @throws InvalidConfigException if the column specification is invalid + */ + protected function createDataColumn($text) + { + if (!preg_match('/^([^:]+)(:(\w*))?(:(.*))?$/', $text, $matches)) { + throw new InvalidConfigException('The column must be specified in the format of "attribute", "attribute:format" or "attribute:format:label"'); + } + + return Yii::createObject([ + 'class' => $this->dataColumnClass ? : TreeGridColumn::className(), + 'grid' => $this, + 'attribute' => $matches[1], + 'format' => isset($matches[3]) ? $matches[3] : 'text', + 'label' => isset($matches[5]) ? $matches[5] : null, + ]); + } + + /** + * This function tries to guess the columns to show from the given data + * if [[columns]] are not explicitly specified. + */ + protected function guessColumns() + { + $models = $this->dataProvider->getModels(); + $model = reset($models); + if (is_array($model) || is_object($model)) { + foreach ($model as $name => $value) { + $this->columns[] = $name; + } + } + } +} \ No newline at end of file diff --git a/common/components/artboxtree/treelist/TreeListWidget.php b/common/components/artboxtree/treelist/TreeListWidget.php new file mode 100755 index 0000000..a3e2165 --- /dev/null +++ b/common/components/artboxtree/treelist/TreeListWidget.php @@ -0,0 +1,62 @@ +_hierarchyTreeData(array_values($this->dataProvider->getModels()), $this->rootParentId); + return $this->renderTreelist($models); + } + + protected function renderTreelist($models) { + foreach ($models as $index => $model) { + $row = $this->renderTreelistItem($model['item']); + $children = empty($model['children']) ? '' : $this->renderTreelist($model['children']); + $output[] = '
  • '. $row . $children .'
  • '; + } + + if (!empty($output)) + return '
      '. implode("\n", $output) .'
    '; + } + + protected function renderTreelistItem($model) + { + $options = []; + $id = ArrayHelper::getValue($model, $this->keyNameId); + Html::addCssClass($options, "treelistitem-$id"); + + $parent_id = ArrayHelper::getValue($model, $this->keyNameParentId); + if ($parent_id) { + Html::addCssClass($options, "treelistitem-parent-$parent_id"); + } + +// if (is_string($this->value)) { +// return ArrayHelper::getValue($model, $this->value); +// } else { +// return call_user_func($this->value, $model, $key, $index, $this); +// } + + return Html::tag('span', ArrayHelper::getValue($model, $this->displayField), $options); + } +} \ No newline at end of file diff --git a/common/components/artboxtree/treemenu/TreeMenuWidget.php b/common/components/artboxtree/treemenu/TreeMenuWidget.php new file mode 100755 index 0000000..0b66cb8 --- /dev/null +++ b/common/components/artboxtree/treemenu/TreeMenuWidget.php @@ -0,0 +1,62 @@ +_hierarchyTreeData(array_values($this->dataProvider->getModels()), $this->rootParentId); + return $this->renderTreelist($models); + } + + protected function renderTreelist($models) { + foreach ($models as $index => $model) { + $row = $this->renderTreelistItem($model['item']); + $children = empty($model['children']) ? '' : $this->renderTreelist($model['children']); + $output[] = '
  • '. $row . $children .'
  • '; + } + + if (!empty($output)) + return '
      '. implode("\n", $output) .'
    '; + } + + protected function renderTreelistItem($model) + { + $options = []; + $id = ArrayHelper::getValue($model, $this->keyNameId); + Html::addCssClass($options, "treelistitem-$id"); + + $parent_id = ArrayHelper::getValue($model, $this->keyNameParentId); + if ($parent_id) { + Html::addCssClass($options, "treelistitem-parent-$parent_id"); + } + +// if (is_string($this->value)) { +// return ArrayHelper::getValue($model, $this->value); +// } else { +// return call_user_func($this->value, $model, $key, $index, $this); +// } + + return Html::tag('span', ArrayHelper::getValue($model, $this->displayField), $options); + } +} \ No newline at end of file diff --git a/common/components/urlManager/.htaccess b/common/components/urlManager/.htaccess new file mode 100755 index 0000000..cc79a2f --- /dev/null +++ b/common/components/urlManager/.htaccess @@ -0,0 +1,10 @@ +AddDefaultCharset WINDOWS-1251 +#php_value display_errors 1 +#php_value error_reporting 2047 + +RewriteEngine on + + + +RewriteRule ^(.*)(date\.php|votebar|spam|\.css|uploaded|img|rating\.php|forum_comment\.php|js|admin|googlec87a9150150cf5d3.html)(.*)$ $1$2$3 [L] +RewriteRule ^(.*)$ index.php [L] diff --git a/common/components/urlManager/LangRequest.php b/common/components/urlManager/LangRequest.php new file mode 100755 index 0000000..caa4545 --- /dev/null +++ b/common/components/urlManager/LangRequest.php @@ -0,0 +1,17 @@ +urlManager->languages as $lang){ + if(strpos($_SERVER['PHP_SELF'], '/'.$lang))Yii::$app->language = $lang; + } + return parent::resolvePathInfo(); + } +} \ No newline at end of file diff --git a/common/components/urlManager/LangUrlManager.php b/common/components/urlManager/LangUrlManager.php new file mode 100755 index 0000000..0cf85ad --- /dev/null +++ b/common/components/urlManager/LangUrlManager.php @@ -0,0 +1,30 @@ +langParam])){ if(Yii::$app->language != $this->lang)$params[$this->langParam]=Yii::$app->language;} + else if($params[$this->langParam] == $this->lang)unset($params[$this->langParam]); + return parent::createUrl($params); + } + //put your code here +} \ No newline at end of file diff --git a/common/components/urlManager/LangUrlRule.php b/common/components/urlManager/LangUrlRule.php new file mode 100755 index 0000000..31c93ae --- /dev/null +++ b/common/components/urlManager/LangUrlRule.php @@ -0,0 +1,61 @@ +getRequest()->getPreferredLanguage(); + //if language pass via url use it + if(isset($_GET[$this->langParam])&&in_array($_GET[$this->langParam],$this->languages)){ + Yii::app()->language=$_GET[$this->langParam]; + //else if preffered language is allowed + }elseif(in_array($userLang,$this->languages)) { + Yii::app()->language=$userLang; + //else use the first language from the list + }else Yii::app()->language=$this->lang; + + }*/ + //put your code here + + public function init(){ + print '=='; + print Yii::$app->getRequest()->getQueryParam('language'); + return parent::init(); + } + public function createUrl($params=array()){ + $userLang=Yii::$app->getRequest()->getPreferredLanguage(); + //if language pass via url use it + if(isset($_GET[$this->langParam])&&in_array($_GET[$this->langParam],$this->languages)){ + Yii::$app->language=$_GET[$this->langParam]; + //else if preffered language is allowed + }elseif(in_array($userLang,$this->languages)) { + Yii::$app->language=$userLang; + //else use the first language from the list + }else Yii::$app->language=$this->lang; + + //print_r($_GET); + if(!isset($params[$this->langParam])){ if(Yii::$app->language != $this->lang)$params[$this->langParam]=Yii::$app->language;} + else if($params[$this->langParam] == $this->lang)unset($params[$this->langParam]); + //print_r($params); + return parent::createUrl($params); + } + //put your code here +} \ No newline at end of file diff --git a/common/config/.gitignore b/common/config/.gitignore new file mode 100755 index 0000000..bfabe93 --- /dev/null +++ b/common/config/.gitignore @@ -0,0 +1,2 @@ +main-local.php +params-local.php diff --git a/common/config/bootstrap.php b/common/config/bootstrap.php new file mode 100755 index 0000000..8a3c9bc --- /dev/null +++ b/common/config/bootstrap.php @@ -0,0 +1,9 @@ + 'ru', + 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', + 'controllerMap' => [ +// 'artbox-comment' => [ +// 'class' => \common\modules\comment\Controller::className(), +// ], + ], + 'components' => [ + 'assetManager' => [ + 'bundles' => [ + 'yii\web\JqueryAsset' =>[ + 'jsOptions' => ['position' => \yii\web\View::POS_HEAD] + ] + ], + ], + + 'sms' => [ + 'class' => 'common\components\SmsSender', + ], + + 'cache' => [ + 'class' => 'yii\caching\FileCache', + ], + + 'i18n' => [ + 'translations' => [ + '*' => [ + 'class' => 'yii\i18n\PhpMessageSource', + 'basePath' => '@common/translation', + 'fileMap' => [ + 'app' => 'app.php', + 'app/error' => 'error.php', + ], + ], + 'app' => [ + 'class' => 'yii\i18n\PhpMessageSource', + 'basePath' => '@common/translation', + 'fileMap' => [ + 'app' => 'app.php', + 'app/error' => 'error.php', + ], + ], + 'artbox-comment' => [ + 'class' => 'yii\i18n\PhpMessageSource', + 'basePath' => '@common/modules/comment/messages', + ], + ], + ], + 'artboximage' => [ + 'class' => 'common\components\artboximage\ArtboxImage', + 'driver' => 'GD', //GD or Imagick + 'rootPath' => Yii::getAlias('@storage'), + 'rootUrl' => Yii::getAlias('/storage'), + 'presets' => [ + 'product' => [ + 'resize' => [ + 'width' => 300, + 'height' => 300, + 'master' => null + ], + ], + 'product_variant' => [ + 'resize' => [ + 'width' => 38, + 'height' => 38, + 'master' => null + ], + ], + 'product_trumb2' => [ + 'resize' => [ + 'width' => 88, + 'height' => 88, + 'master' => null + ], + ], + 'product_basket' => [ + 'resize' => [ + 'width' => 100, + 'height' => 200, + 'master' => null + ], + ], + 'product_view' => [ + 'resize' => [ + 'width' => 392, + 'height' => 365, + 'master' => null + ], + ], + 'iam' => [ + 'resize' => [ + 'width' => 120, + 'height' => 240, + 'master' => null + ], + ], + 'slider' => [ + 'resize' => [ + 'width' => 720, + 'height' => 340, + 'master' => null + ], + ], + 'brandlist' => [ + 'resize' => [ + 'width' => 128, + 'height' => 128, + 'master' => null + ], + ], + 'eventlist' => [ + 'resize' => [ + 'width' => 180, + 'height' => 125, + 'master' => null + ], + ], + 'brand_item' => [ + 'resize' => [ + 'width' => 150, + 'height' => 150, + 'master' => null + ], + 'crop' => [ + 'width' => 150, + 'height' => 150, + 'master' => null + ], + ], + 'mainmenu' => [ + 'resize' => [ + 'width' => 160, + 'height' => 170, + 'master' => null + ], + ], + 'list' => [ + 'resize' => [ + 'width' => 134, + 'height' => 200, + 'master' => null + ], + ], + 'large' => [ + 'resize' => [ + 'width' => 600, + 'height' => 600, + 'master' => null + ], + ], + 'admin_thumb' => [ + 'resize' => [ + 'width' => 256, + ], + ], + ] + ], + ], + + 'modules' => [ + 'file' => [ + 'class' => 'common\modules\file\Module', + ], + 'artbox-comment' => [ + 'class' => 'common\modules\comment\Module', + ], + 'relation' => [ + 'class' => 'common\modules\relation\Module', + 'relations' => [ + 'product_categories' => [ + 'name' => Yii::t('product', 'Categories'), + 'field' => 'categories', + 'entity1' => [ + 'model' => '\common\modules\product\models\Product', + 'label' => 'Product', + 'listField' => 'name', + 'searchField' => 'name', + 'key' => 'product_id', + 'linked_key' => 'product_id', + ], + 'entity2' => [ + 'model' => '\common\modules\product\models\Category', + 'label' => 'Category', + 'listField' => 'categoryName.value', + 'searchField' => 'category_name.value', + 'searchJoin' => 'categoryName', + 'key' => 'category_id', + 'linked_key' => 'category_id', + 'hierarchy' => [ + 'key' => 'category_id', + 'parentKey' => 'parent_id', + ] + ], + 'via' => [ + 'model' => '\common\modules\product\models\ProductCategory', + ] + ], + 'product_option' => [ + 'name' => Yii::t('product', 'Properties'), + 'field' => 'options', + 'entity1' => [ + 'model' => '\common\modules\product\models\Product', + 'label' => 'Product', + 'listField' => 'fullname', + 'key' => 'product_id', + 'linked_key' => 'product_id', + ], + 'entity2' => [ + 'model' => '\common\modules\rubrication\models\TaxOption', + 'label' => 'Option', + 'listField' => 'ValueRenderFlash', + 'key' => 'tax_option_id', + 'linked_key' => 'option_id', + ], + 'via' => [ + 'model' => 'common\modules\product\models\ProductOption', + ] + ], + 'product_variant_option' => [ + 'name' => Yii::t('product', 'Properties'), + 'field' => 'options', + 'entity1' => [ + 'model' => '\common\modules\product\models\ProductVariant', + 'label' => 'Variant', + 'listField' => 'fullname', + 'key' => 'product_variant_id', + 'linked_key' => 'product_variant_id', + ], + 'entity2' => [ + 'model' => '\common\modules\rubrication\models\TaxOption', + 'label' => 'Option', + 'listField' => 'ValueRenderFlash', + 'key' => 'tax_option_id', + 'linked_key' => 'option_id', + ], + 'via' => [ + 'model' => 'common\modules\product\models\ProductVariantOption', + ] + ], + 'tax_group_to_category' => [ + 'name' => Yii::t('product', 'Характеристики по категориям'), + 'field' => 'group_to_category', + 'entity1' => [ + 'model' => '\common\modules\rubrication\models\TaxGroup', + 'label' => 'Group', + 'listField' => 'name', + 'key' => 'tax_group_id', + 'linked_key' => 'entity1_id', + ], + 'entity2' => [ + 'model' => '\common\modules\product\models\Category', + 'label' => 'Category', + 'listField' => 'name', + 'key' => 'category_id', + 'linked_key' => 'entity2_id', + 'hierarchy' => [ + 'key' => 'category_id', + 'parentKey' => 'parent_id', + ] + ], + 'via' => [ + 'model' => '\common\modules\relation\models\Relation', + 'alias' => 'alias', + ] + ], + /* + 'relation_categories' => [ + 'name' => Yii::t('relation', 'Relation categories'), + 'field' => 'categories', + 'entity1' => [ + 'model' => '\common\modules\product\models\Product', + 'label' => 'Product', + 'listField' => 'fullname', + 'key' => 'product_id', + 'linked_key' => 'product_id', + ], + 'entity2' => [ + 'model' => '\common\modules\rubrication\models\TaxOption', + 'label' => 'Category', + 'listField' => 'ValueRenderFlash', + 'key' => 'tax_option_id', + 'linked_key' => 'category_id', + 'where' => [ + 'tax_group_id' => 1 + ] + ], + 'via' => [ + 'model' => '\common\modules\relation\models\Relation', + 'alias' => 'alias', + ] + ], + 'tax_option_to_group' => [ + 'name' => 'Options-Groups', + 'field' => 'tax_option_to_group', + 'linked_table' => 'tax_option_to_group', + 'entity1' => [ + 'label' => 'Option', + 'listField' => 'ValueRenderFlash', + 'model' => '\common\modules\rubrication\models\TaxOption', + 'key' => 'tax_option_id', + 'linked_key' => 'tax_option_id', + ], + 'entity2' => [ + 'label' => 'Group', + 'listField' => 'name', + 'model' => '\common\modules\rubrication\models\TaxGroup', + 'key' => 'tax_group_id', + 'linked_key' => 'tax_group_id', + ], + 'via' => [ + 'model' => 'common\modules\rubrication\models\TaxOptionToGroup', + 'alias' => 'alias', + ] + ], + 'tax_option_to_option' => [ + 'name' => 'Options-Options', + 'field' => 'tax_option_to_option', + 'entity1' => [ + 'label' => 'Option', + 'listField' => 'ValueRenderFlash', + 'model' => '\common\modules\rubrication\models\TaxOption', + 'key' => 'tax_option_id', + 'linked_key' => 'tax_option1_id', + ], + 'entity2' => [ + 'label' => 'Option', + 'listField' => 'ValueRenderFlash', + 'model' => '\common\modules\rubrication\models\TaxOption', + 'key' => 'tax_option_id', + 'linked_key' => 'tax_option2_id', + ], + 'via' => [ + 'model' => 'common\modules\rubrication\models\TaxOptionRelation', + 'alias' => 'alias', + ] + ], + 'brand_cats' => [ + 'name' => 'Категории производителей', + 'field' => 'tax_option_to_option', + 'entity1' => [ + 'label' => 'Бренд', + 'listField' => 'ValueRenderFlash', + 'model' => '\common\modules\rubrication\models\TaxOption', + 'key' => 'tax_option_id', + 'linked_key' => 'tax_option1_id', + ], + 'entity2' => [ + 'label' => 'Категория', + 'listField' => 'ValueRenderFlash', + 'model' => '\common\modules\rubrication\models\TaxOption', + 'key' => 'tax_option_id', + 'linked_key' => 'tax_option2_id', + ], + 'via' => [ + 'model' => 'common\modules\rubrication\models\TaxOptionRelation', + 'alias' => 'alias', + ] + ]*/ + ] + ], + ], +]; diff --git a/common/config/params.php b/common/config/params.php new file mode 100755 index 0000000..446a650 --- /dev/null +++ b/common/config/params.php @@ -0,0 +1,6 @@ + 'admin@example.com', + 'supportEmail' => 'support@example.com', + 'user.passwordResetTokenExpire' => 3600, +]; diff --git a/common/mail/layouts/html.php b/common/mail/layouts/html.php new file mode 100755 index 0000000..accc6cf --- /dev/null +++ b/common/mail/layouts/html.php @@ -0,0 +1,22 @@ + +beginPage() ?> + + + + + <?= Html::encode($this->title) ?> + head() ?> + + + beginBody() ?> + + endBody() ?> + + +endPage() ?> diff --git a/common/mail/layouts/text.php b/common/mail/layouts/text.php new file mode 100755 index 0000000..968f894 --- /dev/null +++ b/common/mail/layouts/text.php @@ -0,0 +1,12 @@ + +beginPage() ?> +beginBody() ?> + +endBody() ?> +endPage() ?> diff --git a/common/mail/passwordResetToken-html.php b/common/mail/passwordResetToken-html.php new file mode 100755 index 0000000..24e8de9 --- /dev/null +++ b/common/mail/passwordResetToken-html.php @@ -0,0 +1,15 @@ +urlManager->createAbsoluteUrl(['site/reset-password', 'token' => $user->password_reset_token]); +?> +
    +

    Hello username) ?>,

    + +

    Follow the link below to reset your password:

    + +

    +
    diff --git a/common/mail/passwordResetToken-text.php b/common/mail/passwordResetToken-text.php new file mode 100755 index 0000000..0905f76 --- /dev/null +++ b/common/mail/passwordResetToken-text.php @@ -0,0 +1,12 @@ +urlManager->createAbsoluteUrl(['site/reset-password', 'token' => $user->password_reset_token]); +?> +Hello username ?>, + +Follow the link below to reset your password: + + diff --git a/common/models/ArticleToRating.php b/common/models/ArticleToRating.php new file mode 100755 index 0000000..44b3be6 --- /dev/null +++ b/common/models/ArticleToRating.php @@ -0,0 +1,58 @@ + true, 'targetClass' => Articles::className(), 'targetAttribute' => ['articles_id' => 'id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'article_to_rating_id' => 'Article To Rating ID', + 'articles_id' => 'Articles ID', + 'value' => 'Value', + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getArticles() + { + return $this->hasOne(Articles::className(), ['id' => 'articles_id']); + } +} diff --git a/common/models/Articles.php b/common/models/Articles.php new file mode 100755 index 0000000..bd90b81 --- /dev/null +++ b/common/models/Articles.php @@ -0,0 +1,127 @@ + [ + 'class' => 'common\behaviors\Slug', + 'in_attribute' => 'title', + 'out_attribute' => 'translit', + 'translit' => true + ], + [ + 'class' => RatingBehavior::className(), + ], + ]; + } + + /** + * @inheritdoc + */ + public function rules() + { + return [ + [['date'], 'safe'], + [['title', 'body'], 'required'], + [['body', 'seo_text'], 'string'], + [['title', 'image', 'translit', 'meta_title', 'meta_keywords', 'meta_description', 'h1'], 'string', 'max' => 255], + [['imageUpload'], 'safe'], + [['imageUpload'], 'file', 'extensions' => 'jpg, gif, png'], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'date' => 'Date', + 'title' => 'Title', + 'body' => 'Body', + 'image' => 'Image', + 'imageUrl' => Yii::t('app', 'Image'), + 'translit' => 'Translit', + 'meta_title' => 'Meta Title', + 'meta_keywords' => 'Meta Keywords', + 'meta_description' => 'Meta Description', + 'seo_text' => 'Seo Text', + 'h1' => 'H1', + ]; + } + + public function getImageFile() { + return empty($this->image) ? null : Yii::getAlias('@imagesDir/articles/'. $this->image); + } + + public function getImageUrl() + { + return empty($this->image) ? null : Yii::getAlias('@imagesUrl/articles/' . $this->image); + } + + public function recalculateRating() { + /** + * @var ArticleToRating $averageRating + */ + $average = $this->getComments()->joinWith('rating')->select(['average' => 'avg(artbox_comment_rating.value)::float'])->scalar(); + if(!$average) { + $average = 0; + } + $averageRating = $this->averageRating; + if(!empty($averageRating)) { + $averageRating->value = $average; + } else { + $averageRating = new ArticleToRating(['articles_id' => $this->id, 'value' => $average]); + } + if($averageRating->save()) { + return true; + } else { + return false; + } + } + + public function getComments() { + return $this->hasMany(CommentModel::className(), ['entity_id' => 'id'])->where(['artbox_comment.entity' => self::className(), 'artbox_comment.status' => CommentModel::STATUS_ACTIVE, 'artbox_comment.artbox_comment_pid' => NULL]); + } + + public function getAverageRating() { + return $this->hasOne(ArticleToRating::className(), ['articles_id' => 'id']); + } +} diff --git a/common/models/ArticlesSearch.php b/common/models/ArticlesSearch.php new file mode 100755 index 0000000..686dca2 --- /dev/null +++ b/common/models/ArticlesSearch.php @@ -0,0 +1,78 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'id' => $this->id, + 'date' => $this->date, + ]); + + $query->andFilterWhere(['like', 'title', $this->title]) + ->andFilterWhere(['like', 'body', $this->body]) + ->andFilterWhere(['like', 'image', $this->image]) + ->andFilterWhere(['like', 'translit', $this->translit]) + ->andFilterWhere(['like', 'meta_title', $this->meta_title]) + ->andFilterWhere(['like', 'meta_keywords', $this->meta_keywords]) + ->andFilterWhere(['like', 'meta_description', $this->meta_description]) + ->andFilterWhere(['like', 'seo_text', $this->seo_text]) + ->andFilterWhere(['like', 'h1', $this->h1]); + + return $dataProvider; + } +} diff --git a/common/models/Banner.php b/common/models/Banner.php new file mode 100755 index 0000000..4638770 --- /dev/null +++ b/common/models/Banner.php @@ -0,0 +1,67 @@ + 255], + [['width', 'height'], 'required'], + ['title', 'unique', 'targetClass' => '\common\models\Slider', 'message' => Yii::t('app','message',[ + 'field' => 'Title' + ])], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'banner_id' => Yii::t('app', 'status'), + 'image' => Yii::t('app', 'image'), + 'alt' => Yii::t('app', 'alt'), + 'title' => Yii::t('app', 'title'), + 'url' => Yii::t('app', 'url'), + 'status' => Yii::t('app', 'status'), + 'width' => Yii::t('app', 'width'), + 'height' => Yii::t('app', 'height'), + ]; + } + + static function getFileExtension ($filename) + { + $ext = explode ('.', $filename); + + return end ($ext); + } +} diff --git a/common/models/BannerSearch.php b/common/models/BannerSearch.php new file mode 100755 index 0000000..32929ba --- /dev/null +++ b/common/models/BannerSearch.php @@ -0,0 +1,73 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'banner_id' => $this->banner_id, + 'status' => $this->status, + ]); + + $query->andFilterWhere(['like', 'image', $this->image]) + ->andFilterWhere(['like', 'alt', $this->alt]) + ->andFilterWhere(['like', 'title', $this->title]) + ->andFilterWhere(['like', 'url', $this->url]); + + return $dataProvider; + } +} diff --git a/common/models/Bg.php b/common/models/Bg.php new file mode 100755 index 0000000..aabd040 --- /dev/null +++ b/common/models/Bg.php @@ -0,0 +1,49 @@ +'jpg, gif, png', 'skipOnEmpty'=>true], + + ]; + } + + public function attributeLabels() + { + return [ + 'title'=>'Название', + 'body'=>'Описание', + 'date'=>'Дата', + 'image'=>'Изображения', + ]; + } + + + + public function beforeDelete() { + $this->deleteImage($this->image); + return parent::beforeDelete(); + } + + public function deleteImage($file){ + if(!empty($file)){ + @unlink('upload/bg/'.$file); + } + } + + +} + diff --git a/common/models/BgSearch.php b/common/models/BgSearch.php new file mode 100755 index 0000000..485aa6e --- /dev/null +++ b/common/models/BgSearch.php @@ -0,0 +1,71 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'id' => $this->id, + ]); + + $query->andFilterWhere(['like', 'title', $this->title]) + ->andFilterWhere(['like', 'url', $this->url]) + ->andFilterWhere(['like', 'image', $this->image]); + + return $dataProvider; + } +} diff --git a/common/models/Blog.php b/common/models/Blog.php new file mode 100755 index 0000000..1cf7239 --- /dev/null +++ b/common/models/Blog.php @@ -0,0 +1,121 @@ + BlameableBehavior::className(), + 'createdByAttribute' => 'user_id', + 'updatedByAttribute' => false, + ], + [ + 'class' => TimestampBehavior::className(), + 'createdAtAttribute' => 'date_add', + 'updatedAtAttribute' => false, + 'value' => new Expression('NOW()'), + ], + 'slug' => [ + 'class' => 'common\behaviors\Slug', + 'in_attribute' => 'name', + 'out_attribute' => 'link', + 'translit' => true + ] + ]; + } + + /** + * @inheritdoc + */ + public function rules() + { + return [ + [ + [ 'name', 'description' ], + 'required', + ], + [ + [ 'description' ], + 'string', + ], + [ + [ + 'name', + 'link', + 'cover', + ], + 'string', + 'max' => 255, + ], + [['imageUpload'], 'safe'], + [['imageUpload'], 'file', 'extensions' => 'jpg, gif, png'], + ]; + } + + public function getDateCreate(){ + return date('Y-m-d',strtotime($this->date_add)); + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'blog_id' => Yii::t('app', 'blog_id'), + 'user_id' => Yii::t('app', 'user_id'), + 'name' => Yii::t('app', 'name'), + 'link' => Yii::t('app', 'link'), + 'date_add' => Yii::t('app', 'date_add'), + 'user_add_id' => Yii::t('app', 'user_add_id'), + 'view_count' => Yii::t('app', 'view_count'), + 'description' => Yii::t('app', 'description'), + 'cover' => Yii::t('app', 'cover'), + 'image' => Yii::t('app', 'cover'), + 'imageUrl' => Yii::t('app', 'cover'), + ]; + } + + public function getImageFile() { + return empty($this->image) ? null : Yii::getAlias('@imagesDir/brands/'. $this->image); + } + + public function getImageUrl() + { + return empty($this->image) ? null : Yii::getAlias('@imagesUrl/brands/' . $this->image); + } + } diff --git a/common/models/BlogSearch.php b/common/models/BlogSearch.php new file mode 100755 index 0000000..b82adb0 --- /dev/null +++ b/common/models/BlogSearch.php @@ -0,0 +1,135 @@ + date('Y-m-d', 0), + ], + [ + [ + 'date_add_to', + ], + 'default', + 'value' => date('Y-m-d'), + ], + ]; + } + + /** + * @inheritdoc + */ + public function scenarios() + { + // bypass scenarios() implementation in the parent class + return Model::scenarios(); + } + + /** + * Creates data provider instance with search query applied + * + * @param array $params + * + * @return ActiveDataProvider + */ + public function search($params) + { + $query = Blog::find(); + + // add conditions that should always apply here + + $dataProvider = new ActiveDataProvider([ + 'query' => $query, + ]); + + $this->load($params); + + if(!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + $query->andWhere([ 'user_id' => \Yii::$app->user->getId() ]); + + // grid filtering conditions + $query->andFilterWhere([ + 'blog_id' => $this->blog_id, + 'date_add' => $this->date_add, + 'user_add_id' => $this->user_add_id, + 'view_count' => $this->view_count, + ]); + + $query->andFilterWhere([ + 'between', + 'date_add', + $this->date_add_from, + (new \DateTime($this->date_add_to))->modify('+1 day')->format('Y-m-d') + ]); + + $query->andFilterWhere([ + 'like', + 'name', + $this->name, + ]) + ->andFilterWhere([ + 'like', + 'description', + $this->description, + ]) + ->andFilterWhere([ + 'like', + 'cover', + $this->cover, + ]); + + return $dataProvider; + } + + } diff --git a/common/models/Customer.php b/common/models/Customer.php new file mode 100755 index 0000000..8103ac0 --- /dev/null +++ b/common/models/Customer.php @@ -0,0 +1,262 @@ +['person','company','customer']], + [['verifyCode'], 'captcha','captchaAction'=>'reg/captcha','on'=>['person','company','customer']], + [['password_repeat'], 'required','on'=>['person','company','customer','edit_person']], + [['password_repeat'], 'password_repeat','on'=>['person','company','customer','edit_person']], + [['username'], 'is_username','on'=>['person','company','customer']], + [['username'], 'email','on'=>['person','company','customer','edit_person']], + [['company'], 'required','on'=>['company']], + + [['username', 'password','phone','role','name','surname'], 'required','on'=>['edit_person','edit_customer','edit_company']], + [['company'], 'required','on'=>['edit_company']], + [['sex','body','birth_day','birth_mouth','birth_year'], 'safe','on'=>['edit_person']], + [['sex','status','children','body','old_image','birth_day','birth_mouth','birth_year'], 'safe','on'=>['edit_customer']], + [['body'], 'safe','on'=>['edit_company']], + // [['image'], 'file', 'extensions'=>'jpg, gif, png','skipOnEmpty'=>true,'on'=>['edit_person','edit_customer','edit_company']], + ]; + } + + public function attributeLabels() + { + return [ + 'username'=>'Логин (E-mail)', + 'password'=>'Пароль', + 'password_repeat'=>'Повторить пароль', + 'phone'=>'Телефон', + 'verifyCode'=>'Код проверки', + 'name'=>'Имя', + 'surname'=>'Фамилия', + 'company'=>'Компания', + 'sex'=>'Пол', + 'status'=>'Семейное положение', + 'children'=>'Дети', + 'edu'=>'Образование', + 'work'=>'Работа', + 'langs'=>'Иностранные языки', + 'prava'=>'Водительское удостоверение', + 'body'=>'О себе', + 'image'=>'Изображения', + ]; + } + + public function password_repeat($attribute){ + if($this->password != $this->password_repeat) + $this->addError('password_repeat','Не правильный повтор пароля.'); + } + + public function is_username($attribute) + { + if(Customer::find() + //->where( ['username' => $this->username],['id!='.$_GET['id']] ) + ->where('username = :username', [':username' => $this->username]) + ->exists()) + $this->addError('username','Такой пользователь уже есть.'); + } + + + public function afterSave($insert, $changedAttributes) + { + parent::afterSave($insert, $changedAttributes); + + // установка роли пользователя + $auth = Yii::$app->authManager; + $role = $auth->getRole($this->role); + if (!$insert) { + $auth->revokeAll($this->id); + } + $auth->assign($role, $this->id); + + + } + + public function beforeSave($insert) { + + + $this->date_time = new \yii\db\Expression('NOW()'); + + /** + if($image = UploadedFile::getInstance($this,'image')){ + + $this->deleteImage($this->old_image); + //$this->image = $image; + $this->image = time() . '_' . rand(1, 1000) . '.' . $image->extension; + $image->saveAs('upload/profile/'.$this->image); + + $resizeObj = new resize('upload/profile/'.$this->image); + $resizeObj -> resizeImage(240, 240, 'crop'); + $resizeObj -> saveImage('upload/profile/ico/'.$this->image, 100); + }elseif(!empty($this->old_image)) $this->image = $this->old_image; + **/ + + return parent::beforeSave($insert); + } + + public function beforeDelete() { + //$this->deleteImage($this->image); + return parent::beforeDelete(); + } + + public function deleteImage($file){ + if(!empty($file)){ + @unlink('upload/profile/'.$file); + @unlink('upload/profile/ico/'.$file); + // @unlink('upload/fotos/big/'.$file); + } + } + + + public function getOld(){ + if(empty($this->birth_year) || empty($this->birth_mouth) || empty($this->birth_day))return; + $birthday = $this->birth_year.'-'.$this->birth_mouth.'-'.$this->birth_day; + if($birthday=="0000-00-00")return; + $birthday_timestamp = strtotime($birthday); + $age = date('Y') - date('Y', $birthday_timestamp); + if (date('md', $birthday_timestamp) > date('md')) { + $age--; + } + return $age; + + } + + /** + * @inheritdoc + */ + public static function findIdentity($id) + { + + /**Yii::$app->db->createCommand() + ->update('user', [ + 'time_online' => (time() + (10*60)), + ], 'id = '.$id) + ->execute(); **/ + return static::find()->select(['customer.*','auth_assignment.item_name as role'])->where(['id'=>$id])->join('LEFT JOIN','auth_assignment','auth_assignment.user_id = customer.id')->one(); + } + + /** + * @inheritdoc + */ + public static function findIdentityByAccessToken($token, $type = null) + { + return static::findOne(['access_token' => $token]); + } + + /** + * Finds user by username + * + * @param string $username + * @return static|null + */ + public static function findByUsername($username) + { + return static::findOne(['username' => $username]); + } + + /** + * @inheritdoc + */ + public function getId() + { + return $this->id; + } + + /** + * @inheritdoc + */ + public function getAuthKey() + { + return $this->authKey; + } + + /** + * @inheritdoc + */ + public function validateAuthKey($authKey) + { + return $this->authKey === $authKey; + } + + /** + * Validates password + * + * @param string $password password to validate + * @return boolean if password provided is valid for current user + */ + public function validatePassword($password) + { + return $this->password === $password; + } + + public function getImageProfile(){ + return !empty($this->image) ? $this->image : 'user_photo.png'; + } + + public static function findByPasswordResetToken($token) + { + if (!static::isPasswordResetTokenValid($token)) { + return null; + } + + return static::findOne([ + 'password_reset_token' => $token, + 'status' => self::STATUS_ACTIVE, + ]); + } + + /** + * Finds out if password reset token is valid + * + * @param string $token password reset token + * @return boolean + */ + public static function isPasswordResetTokenValid($token) + { + if (empty($token)) { + return false; + } + + $timestamp = (int) substr($token, strrpos($token, '_') + 1); + $expire = Yii::$app->params['user.passwordResetTokenExpire']; + return $timestamp + $expire >= time(); + } + + /** + * Generates new password reset token + */ + public function generatePasswordResetToken() + { + $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time(); + } + + /** + * Removes password reset token + */ + public function removePasswordResetToken() + { + $this->password_reset_token = null; + } +} diff --git a/common/models/CustomerSearch.php b/common/models/CustomerSearch.php new file mode 100755 index 0000000..9cd6feb --- /dev/null +++ b/common/models/CustomerSearch.php @@ -0,0 +1,80 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'id' => $this->id, + 'date_time' => $this->date_time, + 'birth_day' => $this->birth_day, + 'birth_month' => $this->birth_month, + 'birth_year' => $this->birth_year, + 'group_id' => $this->group_id, + ]); + + $query->andFilterWhere(['like', 'username', $this->username]) + ->andFilterWhere(['like', 'password', $this->password]) + ->andFilterWhere(['like', 'name', $this->name]) + ->andFilterWhere(['like', 'surname', $this->surname]) + ->andFilterWhere(['like', 'phone', $this->phone]) + ->andFilterWhere(['like', 'sex', $this->sex]) + ->andFilterWhere(['like', 'body', $this->body]); + + return $dataProvider; + } +} diff --git a/common/models/Delivery.php b/common/models/Delivery.php new file mode 100755 index 0000000..d1a9304 --- /dev/null +++ b/common/models/Delivery.php @@ -0,0 +1,12 @@ + [ + 'class' => 'common\behaviors\Slug', + 'in_attribute' => 'name', + 'out_attribute' => 'alias', + 'translit' => true + ], + [ + 'class' => 'common\behaviors\ShowImage', + ], + ]; + } + + + public function beforeSave($insert) + { + if (parent::beforeSave($insert)) { + $this->end_at = strtotime($this->end_at); + return true; + } else { + return false; + } + } + + public function afterFind(){ + $this->end_at = date("Y-m-d", $this->end_at); + } + + + /** + * @inheritdoc + */ + public function rules() + { + return [ + [['body', 'seo_text'], 'string'], + [['created_at', 'updated_at' ], 'integer'], + [['name', 'alias', 'image', 'meta_title', 'description', 'h1','end_at'], 'string', 'max' => 255], + [['name','body'], 'required'], + [['imageUpload'], 'safe'], + [['imageUpload'], 'file', 'extensions' => 'jpg, gif, png'], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'event_id' => Yii::t('app', 'event_id'), + 'name' => Yii::t('app', 'name'), + 'alias' => Yii::t('app', 'alias'), + 'body' => Yii::t('app', 'body'), + 'image' => Yii::t('app', 'image'), + 'meta_title' => Yii::t('app', 'meta_title'), + 'description' => Yii::t('app', 'description'), + 'h1' => Yii::t('app', 'h1'), + 'seo_text' => Yii::t('app', 'seo_text'), + 'created_at' => Yii::t('app', 'created_at'), + 'updated_at' => Yii::t('app', 'updated_at'), + 'end_at' => Yii::t('app', 'end_at'), + ]; + } + + + public function getImageFile() { + return empty($this->image) ? null : Yii::getAlias('@imagesDir/articles/'. $this->image); + } + + public function getImageUrl() + { + return empty($this->image) ? null : Yii::getAlias('@imagesUrl/articles/' . $this->image); + } +} diff --git a/common/models/EventSearch.php b/common/models/EventSearch.php new file mode 100755 index 0000000..60c85b9 --- /dev/null +++ b/common/models/EventSearch.php @@ -0,0 +1,83 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'event_id' => $this->event_id, + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + 'end_at' => $this->end_at, + ]); + + $query->andFilterWhere(['like', 'name', $this->name]) + ->andFilterWhere(['like', 'alias', $this->alias]) + ->andFilterWhere(['like', 'body', $this->body]) + ->andFilterWhere(['like', 'image', $this->image]) + ->andFilterWhere(['like', 'meta_title', $this->meta_title]) + ->andFilterWhere(['like', 'description', $this->description]) + ->andFilterWhere(['like', 'h1', $this->h1]) + ->andFilterWhere(['like', 'seo_text', $this->seo_text]); + + return $dataProvider; + } +} diff --git a/common/models/Fields.php b/common/models/Fields.php new file mode 100755 index 0000000..3db277b --- /dev/null +++ b/common/models/Fields.php @@ -0,0 +1,155 @@ + 255] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'table_name' => 'Model Name', + 'table_id' => 'Model ID', + 'value' => 'Value', + 'field_name' => 'Field Name', + 'language' => 'Language', + ]; + } + + public static function getData($id, $model, $type){ + $data = ArrayHelper::toArray(self::find()->where(['table_id'=>$id, 'table_name'=>$model, 'field_type'=>$type])->all()); + $result = []; + for($i=0; $i < count($data); $i ++){ + $result[$data[$i]['parent_key']][$data[$i]['field_name']] = $data[$i]['value']; + } + + return $result; + } + + + /** + * @param $post - array with field data + * @param $table_id - row id in model table + * @param $table_name - madel table name + * @param $language - language id + */ + + public static function saveFieldData($post,$table_id,$table_name, $language){ + + self::deleteAll(['table_id'=>$table_id, 'table_name'=>$table_name, 'language' => $language, 'field_type' => array_keys($post)]); + + if($post){ + + + foreach($post as $k => $field){ + + + + foreach($field as $parent_key => $row){ + + foreach($row as $key => $value){ + + $field_model = new Fields(); + $field_model->field_name = array_keys($value)[0]; + $field_model->value = $value[array_keys($value)[0]]; + $field_model->table_name = $table_name; + $field_model->table_id = $table_id; + $field_model->field_type = $k; + $field_model->language = 'ru'; + $field_model->parent_key = $parent_key; + $field_model->key = $key; + $field_model->save(); + } + + } + } + } + } + + + /** + * @param $post - array with field data + * @param $table_id - row id in model table + * @param $table_name - madel table name + * @param $language - language id + */ + + public static function saveFieldVideoData($post,$table_id,$table_name, $language){ + + self::deleteAll(['table_id'=>$table_id, 'table_name'=>$table_name, 'language' => $language, 'field_type' => array_keys($post)]); + + if($post){ + + + foreach($post as $k => $field){ + + + + foreach($field as $parent_key => $row){ + + foreach($row as $key => $value){ + + preg_match('/src=\"(.[^"]*)\"/', $value[array_keys($value)[0]], $video_url); + + if(isset($video_url[1]) && !empty($video_url[1])){ + + $field_model = new Fields(); + $field_model->field_name = array_keys($value)[0]; + $field_model->value = $video_url[1].'?showinfo=0&autoplay=0'; + $field_model->table_name = $table_name; + $field_model->table_id = $table_id; + $field_model->field_type = $k; + $field_model->language = 'ru'; + $field_model->parent_key = $parent_key; + $field_model->key = $key; + $field_model->save(); + + } + + + } + + } + } + } + } +} diff --git a/common/models/LoginForm.php b/common/models/LoginForm.php new file mode 100755 index 0000000..92dcf8f --- /dev/null +++ b/common/models/LoginForm.php @@ -0,0 +1,88 @@ +'Логин', + 'password'=>'Пароль', + 'rememberMe'=>'Запомнить', + ]; + } + + /** + * Validates the password. + * This method serves as the inline validation for password. + * + * @param string $attribute the attribute currently being validated + * @param array $params the additional name-value pairs given in the rule + */ + public function validatePassword($attribute, $params) + { + if (!$this->hasErrors()) { + $user = $this->getUser(); + + if (!$user || !$user->validatePassword($this->password)) { + $this->addError($attribute, 'Incorrect username or password.'); + } + } + } + + /** + * Logs in a user using the provided username and password. + * @return boolean whether the user is logged in successfully + */ + public function login() + { + if ($this->validate()) { + return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0); + } else { + return false; + } + } + + /** + * Finds user by [[username]] + * + * @return User|null + */ + public function getUser() + { + if ($this->_user === false) { + $this->_user = User::findByUsername($this->username); + } + + return $this->_user; + } +} diff --git a/common/models/Orders.php b/common/models/Orders.php new file mode 100755 index 0000000..61cec67 --- /dev/null +++ b/common/models/Orders.php @@ -0,0 +1,175 @@ + true], + [['total','body','email','phone2','delivery','payment','adress','city'], 'safe'], + [['email'],'email'], + ]; + } + + public function attributeLabels() + { + return [ + 'name' => 'Ф.И.О', + 'phone'=>'Телефон', + 'phone2'=>'Доп. Тел.', + 'body'=>'Сообщение', + 'adress'=>'Адрес', + 'city'=>'Город', + 'email'=>'E-mail', + 'date_time'=>'Дата', + 'total'=>'Сума', + 'status'=>'Статус', + 'delivery'=>'Вариант доставки', + 'payment'=>'Способы оплаты', + ]; + } + + public function beforeSave($insert) { + $this->user_id = Yii::$app->user->id; + $this->date_time = new \yii\db\Expression('NOW()'); + return parent::beforeSave($insert); + } + + public function beforeDelete() { + return parent::beforeDelete(); + } + + + public function addBasket ($mod_id, $count) + { + $session = new Session; + $session->open (); + $data = $session['basket']; + $i = 0; + if (isset($session['basket'])) + { + foreach ($session['basket'] as $key => $basket) + { + if ($mod_id == $basket['id']) + { + $data[$key]['count'] += $count; + $session['basket'] = $data; + $i++; + } + } + } + if ($i == 0) + { + $data[] = ['id' => $mod_id, 'count' => $count]; + $session['basket'] = $data; + } + } + + + public function rowBasket () + { + $session = new Session; + $session->open (); + $cost = 0; + $count = 0; + if (isset($session['basket']) && count ($session['basket'])) + { + foreach ($session['basket'] as $product) + { + $count += $product['count']; + } + } + + return (object)['cost' => $cost, 'count' => $count]; + } + + + public function deleteBasketMod ($id) + { + $session = new Session; + $session->open (); + $basket = $session['basket']; + foreach ($basket as $key => $product) + { + if ($id == $product['id']) unset($basket[$key]); + } + $session['basket'] = $basket; + } + + public function updateBasket ($row) + { + $session = new Session; + $session->open (); + //$data = array(); + if ($row['count'] > 0) $this->data[] = ['id' => $row['id'], 'count' => $row['count']]; + $session['basket'] = $this->data; + } + + + public function getBasketMods () + { + $session = new Session; + $session->open (); + $products = []; + if (empty($session['basket'])) return []; + foreach ($session['basket'] as $product) + { + $row = ProductVariant::find ()->select (['product_variant.*', 'product.name as product_name', 'product.alias']) + ->where (['product_variant.product_variant_id' => $product['id']]) + ->leftJoin ('product', 'product.product_id = product_variant.product_id') + ->one (); + $row->count = $product['count']; + $row->sum_cost = $product['count'] * $row->price; + $products[] = $row; + } + + return $products; + } + + public function getSumCost () + { + $session = new Session; + $session->open (); + $cost = 0; + if (empty($session['basket'])) return false; + foreach ($session['basket'] as $product) + { + $cost += ($this->getModCost ($product['id']) * $product['count']); + } + + return $cost; + } + + private function getModCost ($mod_id) + { + $mod = ProductVariant::find ()->where (['product_variant_id' => $mod_id])->one (); + + return $mod->price; + } + public function clearBasket () + { + $session = new Session; + $session->open (); + $session['basket'] = null; + } + public function getUser() + { + return $this->hasOne(User::className(), ['id' => 'user_id']); + } + + public function getProducts() + { + return $this->hasMany(OrdersProducts::className(), ['order_id' => 'id']); + } +} \ No newline at end of file diff --git a/common/models/OrdersProducts.php b/common/models/OrdersProducts.php new file mode 100755 index 0000000..dbc7b3e --- /dev/null +++ b/common/models/OrdersProducts.php @@ -0,0 +1,40 @@ +'Продукт', + 'name'=>'Вид', + 'art'=>'Артикул', + 'cost'=>'Цена за один', + 'count'=>'Кол.', + 'sum_cost'=>'Сумма', + ]; + } + + public function getProductVariant() + { + return $this->hasOne(ProductVariant::className(), ['product_variant_id' => 'mod_id']); + } +} \ No newline at end of file diff --git a/common/models/OrdersSearch.php b/common/models/OrdersSearch.php new file mode 100755 index 0000000..b5ce4dd --- /dev/null +++ b/common/models/OrdersSearch.php @@ -0,0 +1,78 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'order_id' => $this->order_id, + 'customer_id' => $this->customer_id, + 'delivery' => $this->delivery, + 'payment' => $this->payment, + 'status' => $this->status, + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]); + + $query->andFilterWhere(['like', 'name', $this->name]) + ->andFilterWhere(['like', 'email', $this->email]) + ->andFilterWhere(['like', 'phone', $this->phone]) + ->andFilterWhere(['like', 'code', $this->code]); + + return $dataProvider; + } +} diff --git a/common/models/Page.php b/common/models/Page.php new file mode 100755 index 0000000..bac6703 --- /dev/null +++ b/common/models/Page.php @@ -0,0 +1,76 @@ + [ + 'class' => 'common\behaviors\Slug', + 'in_attribute' => 'title', + 'out_attribute' => 'translit', + 'translit' => true + ] + ]; + } + /** + * @inheritdoc + */ + public function rules() + { + return [ + [['body', 'seo_text'], 'string'], + [['translit', 'title', 'meta_title', 'meta_keywords', 'meta_description', 'h1'], 'string', 'max' => 255], + ]; + } + public function getPageTranslit($page){ + return self::find() + ->where(['translit' => $page]) + ->one(); + + } + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'translit' => 'Translit', + 'title' => 'Title', + 'body' => 'Body', + 'meta_title' => 'Meta Title', + 'meta_keywords' => 'Meta Keywords', + 'meta_description' => 'Meta Description', + 'seo_text' => 'Seo Text', + 'h1' => 'H1', + ]; + } +} diff --git a/common/models/PageSearch.php b/common/models/PageSearch.php new file mode 100755 index 0000000..a914813 --- /dev/null +++ b/common/models/PageSearch.php @@ -0,0 +1,76 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'id' => $this->id, + ]); + + $query->andFilterWhere(['like', 'translit', $this->translit]) + ->andFilterWhere(['like', 'title', $this->title]) + ->andFilterWhere(['like', 'body', $this->body]) + ->andFilterWhere(['like', 'meta_title', $this->meta_title]) + ->andFilterWhere(['like', 'meta_keywords', $this->meta_keywords]) + ->andFilterWhere(['like', 'meta_description', $this->meta_description]) + ->andFilterWhere(['like', 'seo_text', $this->seo_text]) + ->andFilterWhere(['like', 'h1', $this->h1]); + + return $dataProvider; + } +} diff --git a/common/models/ProductToRating.php b/common/models/ProductToRating.php new file mode 100755 index 0000000..ad5755e --- /dev/null +++ b/common/models/ProductToRating.php @@ -0,0 +1,59 @@ + 0], + [['product_id'], 'exist', 'skipOnError' => true, 'targetClass' => Product::className(), 'targetAttribute' => ['product_id' => 'product_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'product_to_rating_id' => 'Product To Rating ID', + 'product_id' => 'Product ID', + 'value' => 'Value', + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getProduct() + { + return $this->hasOne(Product::className(), ['product_id' => 'product_id']); + } +} diff --git a/common/models/Seo.php b/common/models/Seo.php new file mode 100755 index 0000000..86df70e --- /dev/null +++ b/common/models/Seo.php @@ -0,0 +1,55 @@ + 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'seo_id' => Yii::t('app', 'seo_id'), + 'url' => Yii::t('app', 'url'), + 'title' => Yii::t('app', 'title'), + 'meta' => Yii::t('app', 'meta_title'), + 'description' => Yii::t('app', 'description'), + 'h1' => Yii::t('app', 'h1'), + 'seo_text' => Yii::t('app', 'seo_text'), + ]; + } +} diff --git a/common/models/SeoCategory.php b/common/models/SeoCategory.php new file mode 100755 index 0000000..4cd7459 --- /dev/null +++ b/common/models/SeoCategory.php @@ -0,0 +1,59 @@ + 255], + [['controller'], 'string', 'max' => 100], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'seo_category_id' => Yii::t('app', 'seo_category_id'), + 'name' => Yii::t('app', 'name'), + 'controller' => Yii::t('app', 'controller'), + 'status' => Yii::t('app', 'status'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getSeoDynamics() + { + return $this->hasMany(SeoDynamic::className(), ['seo_category_id' => 'seo_category_id']); + } +} diff --git a/common/models/SeoCategorySearch.php b/common/models/SeoCategorySearch.php new file mode 100755 index 0000000..120800b --- /dev/null +++ b/common/models/SeoCategorySearch.php @@ -0,0 +1,71 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'seo_category_id' => $this->seo_category_id, + 'status' => $this->status, + ]); + + $query->andFilterWhere(['like', 'name', $this->name]) + ->andFilterWhere(['like', 'controller', $this->controller]); + + return $dataProvider; + } +} diff --git a/common/models/SeoDynamic.php b/common/models/SeoDynamic.php new file mode 100755 index 0000000..2d58dad --- /dev/null +++ b/common/models/SeoDynamic.php @@ -0,0 +1,78 @@ + 200], + [['fields', 'title', 'meta', 'h1', 'description', 'param', 'key'], 'string', 'max' => 255], + [['seo_category_id'], 'exist', 'skipOnError' => true, 'targetClass' => SeoCategory::className(), 'targetAttribute' => ['seo_category_id' => 'seo_category_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'seo_dynamic_id' => Yii::t('app', 'seo_dynamic_id'), + 'seo_category_id' => Yii::t('app', 'seo_category_id'), + 'name' => Yii::t('app', 'name'), + 'action' => Yii::t('app', 'action'), + 'fields' => Yii::t('app', 'fields'), + 'title' => Yii::t('app', 'title'), + 'meta' => Yii::t('app', 'meta'), + 'h1' => Yii::t('app', 'h1'), + 'description' => Yii::t('app', 'description'), + 'seo_text' => Yii::t('app', 'seo_text'), + 'status' => Yii::t('app', 'status'), + 'param' => Yii::t('app', 'param'), + 'key' => Yii::t('app', 'key'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getSeoCategory() + { + return $this->hasOne(SeoCategory::className(), ['seo_category_id' => 'seo_category_id']); + } +} diff --git a/common/models/SeoDynamicSearch.php b/common/models/SeoDynamicSearch.php new file mode 100755 index 0000000..6c57b34 --- /dev/null +++ b/common/models/SeoDynamicSearch.php @@ -0,0 +1,78 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'seo_dynamic_id' => $this->seo_dynamic_id, + 'seo_category_id' => $seo_category_id, + 'status' => $this->status, + ]); + + $query->andFilterWhere(['like', 'name', $this->name]) + ->andFilterWhere(['like', 'action', $this->action]) + ->andFilterWhere(['like', 'fields', $this->fields]) + ->andFilterWhere(['like', 'title', $this->title]) + ->andFilterWhere(['like', 'meta', $this->title]) + ->andFilterWhere(['like', 'h1', $this->h1]) + ->andFilterWhere(['like', 'description', $this->description]) + ->andFilterWhere(['like', 'seo_text', $this->seo_text]); + + return $dataProvider; + } +} diff --git a/common/models/SeoSearch.php b/common/models/SeoSearch.php new file mode 100755 index 0000000..e8882bc --- /dev/null +++ b/common/models/SeoSearch.php @@ -0,0 +1,74 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'seo_id' => $this->seo_id, + ]); + + $query->andFilterWhere(['like', 'url', $this->url]) + ->andFilterWhere(['like', 'title', $this->title]) + ->andFilterWhere(['like', 'meta', $this->meta]) + ->andFilterWhere(['like', 'description', $this->description]) + ->andFilterWhere(['like', 'h1', $this->h1]) + ->andFilterWhere(['like', 'seo_text', $this->seo_text]); + + return $dataProvider; + } +} diff --git a/common/models/Service.php b/common/models/Service.php new file mode 100755 index 0000000..05ed8f8 --- /dev/null +++ b/common/models/Service.php @@ -0,0 +1,81 @@ + 255], + ]; + } + /** + * @inheritdoc + */ + public function behaviors() + { + return [ + TimestampBehavior::className(), + 'slug' => [ + 'class' => 'common\behaviors\Slug', + 'in_attribute' => 'name', + 'out_attribute' => 'alias', + 'translit' => true + ], + [ + 'class' => 'common\behaviors\ShowImage', + ], + ]; + } + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'service_id' => Yii::t('app', 'service_id'), + 'name' => Yii::t('app', 'name'), + 'alias' => Yii::t('app', 'alias'), + 'body' => Yii::t('app', 'body'), + 'image' => Yii::t('app', 'image'), + 'meta_title' => Yii::t('app', 'meta_title'), + 'description' => Yii::t('app', 'description'), + 'h1' => Yii::t('app', 'h1'), + 'seo_text' => Yii::t('app', 'seo_text'), + 'created_at' => Yii::t('app', 'created_at'), + 'updated_at' => Yii::t('app', 'updated_at'), + ]; + } +} diff --git a/common/models/ServiceSearch.php b/common/models/ServiceSearch.php new file mode 100755 index 0000000..8b1edac --- /dev/null +++ b/common/models/ServiceSearch.php @@ -0,0 +1,78 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'service_id' => $this->service_id, + 'created_at' => $this->created_at, + 'updated_at' => $this->updated_at, + ]); + + $query->andFilterWhere(['like', 'name', $this->name]) + ->andFilterWhere(['like', 'alias', $this->alias]) + ->andFilterWhere(['like', 'body', $this->body]) + ->andFilterWhere(['like', 'image', $this->image]) + ->andFilterWhere(['like', 'meta_title', $this->meta_title]) + ->andFilterWhere(['like', 'description', $this->description]) + ->andFilterWhere(['like', 'h1', $this->h1]) + ->andFilterWhere(['like', 'seo_text', $this->seo_text]); + + return $dataProvider; + } +} diff --git a/common/models/Share.php b/common/models/Share.php new file mode 100755 index 0000000..f25dcaf --- /dev/null +++ b/common/models/Share.php @@ -0,0 +1,45 @@ + 'Название', + 'date_time'=>'Дата', + ]; + } + + public function beforeSave($insert) { + $this->user_id = Yii::$app->user->id; + $this->date_time = date('Y-m-d H:i:s'); + $this->date = date('Y-m-d'); + return parent::beforeSave($insert); + } + + public function beforeDelete() { + return parent::beforeDelete(); + } + + public function getProduct() + { + return $this->hasOne(Product::className(), ['product_id' => 'product_id']); + } + + public function getShareList() + { + return $this->hasMany(self::className(), ['date' => 'date'])->where(['user_id'=>Yii::$app->user->id])->orderBy('id DESC'); + } + +} diff --git a/common/models/Slider.php b/common/models/Slider.php new file mode 100755 index 0000000..4ce0975 --- /dev/null +++ b/common/models/Slider.php @@ -0,0 +1,68 @@ + 200], + [['width', 'height'], 'required'], + ['title', 'unique', 'targetClass' => '\common\models\Slider', 'message' => Yii::t('app','message',[ + 'field' => 'Title' + ])], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'slider_id' => Yii::t('app', 'slider_id'), + 'speed' => Yii::t('app', 'speed'), + 'duration' => Yii::t('app', 'duration'), + 'title' => Yii::t('app', 'title'), + 'status' => Yii::t('app', 'status'), + 'width' => Yii::t('app', 'width'), + 'height' => Yii::t('app', 'height'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getSliderImage() + { + return $this->hasMany(SliderImage::className(), ['slider_id' => 'slider_id'])->where([SliderImage::tableName().'.status'=>1]); + } +} diff --git a/common/models/SliderImage.php b/common/models/SliderImage.php new file mode 100755 index 0000000..b24fa3c --- /dev/null +++ b/common/models/SliderImage.php @@ -0,0 +1,76 @@ + 255], + [['slider_id'], 'exist', 'skipOnError' => true, 'targetClass' => Slider::className(), 'targetAttribute' => ['slider_id' => 'slider_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'slider_image_id' => Yii::t('app', 'slider_image_id'), + 'slider_id' => Yii::t('app', 'slider_id'), + 'image' => Yii::t('app', 'image'), + 'alt' => Yii::t('app', 'alt'), + 'title' => Yii::t('app', 'title'), + 'url' => Yii::t('app', 'url'), + 'status' => Yii::t('app', 'status'), + 'sort' => Yii::t('app', 'sort'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getSlider() + { + return $this->hasOne(Slider::className(), ['slider_id' => 'slider_id']); + } + + public function getImageFile() { + return empty($this->image) ? null : '/storage/slider/'. $this->image; + } + + public function getImageUrl() { + return empty($this->image) ? null : '/storage/slider/'. $this->image; + } + +} diff --git a/common/models/SliderImageSearch.php b/common/models/SliderImageSearch.php new file mode 100755 index 0000000..56368eb --- /dev/null +++ b/common/models/SliderImageSearch.php @@ -0,0 +1,77 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'slider_image_id' => $this->slider_image_id, + 'slider_id' => $slider_id, + 'status' => $this->status, + 'sort' => $this->sort, + ]); + + $query->andFilterWhere(['like', 'image', $this->image]) + ->andFilterWhere(['like', 'alt', $this->alt]) + ->andFilterWhere(['like', 'title', $this->title]) + ->andFilterWhere(['like', 'url', $this->url]); + + return $dataProvider; + } +} diff --git a/common/models/SliderSearch.php b/common/models/SliderSearch.php new file mode 100755 index 0000000..f4fc994 --- /dev/null +++ b/common/models/SliderSearch.php @@ -0,0 +1,74 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'slider_id' => $this->slider_id, + 'speed' => $this->speed, + 'duration' => $this->duration, + 'status' => $this->status, + + ]); + + $query->andFilterWhere(['like', 'title', $this->title]); + + return $dataProvider; + } +} diff --git a/common/models/Subscribe.php b/common/models/Subscribe.php new file mode 100755 index 0000000..e3baba3 --- /dev/null +++ b/common/models/Subscribe.php @@ -0,0 +1,28 @@ +where('email = :email', [':email' => $this->email]) + ->exists()) + $this->addError('email','Такой email уже есть.'); + } + +} \ No newline at end of file diff --git a/common/models/SubscribeSearch.php b/common/models/SubscribeSearch.php new file mode 100755 index 0000000..4aeca70 --- /dev/null +++ b/common/models/SubscribeSearch.php @@ -0,0 +1,71 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'id' => $this->id, + 'sale' => $this->sale, + 'sand' => $this->sand, + ]); + + $query->andFilterWhere(['like', 'email', $this->email]); + + return $dataProvider; + } +} diff --git a/common/models/TemplateLocation.php b/common/models/TemplateLocation.php new file mode 100755 index 0000000..22fa840 --- /dev/null +++ b/common/models/TemplateLocation.php @@ -0,0 +1,76 @@ + 255], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'template_location_id' => Yii::t('app', 'Template Location ID'), + 'template_location_name' => Yii::t('app', 'Template Location Name'), + 'template_location_title' => Yii::t('app', 'Template Location Title'), + 'width' => Yii::t('app', 'Width'), + 'height' => Yii::t('app', 'Height'), + 'sort' => Yii::t('app', 'Sort'), + 'is_slider' => Yii::t('app', 'Is Slider'), + 'is_banner' => Yii::t('app', 'Is Banner'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getBanners() + { + return $this->hasMany(Banner::className(), ['template_location_id' => 'template_location_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getSliders() + { + return $this->hasMany(Slider::className(), ['template_location_id' => 'template_location_id']); + } +} diff --git a/common/models/TemplateLocationSearch.php b/common/models/TemplateLocationSearch.php new file mode 100755 index 0000000..dbbcd74 --- /dev/null +++ b/common/models/TemplateLocationSearch.php @@ -0,0 +1,75 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'template_location_id' => $this->template_location_id, + 'width' => $this->width, + 'height' => $this->height, + 'sort' => $this->sort, + 'is_slider' => $this->is_slider, + 'is_banner' => $this->is_banner, + ]); + + $query->andFilterWhere(['like', 'template_location_name', $this->template_location_name]) + ->andFilterWhere(['like', 'template_location_title', $this->template_location_title]); + + return $dataProvider; + } +} diff --git a/common/models/User.php b/common/models/User.php new file mode 100755 index 0000000..71d7a0c --- /dev/null +++ b/common/models/User.php @@ -0,0 +1,190 @@ + self::STATUS_ACTIVE], + ['status', 'in', 'range' => [self::STATUS_ACTIVE, self::STATUS_DELETED]], + ]; + } + + /** + * @inheritdoc + */ + public static function findIdentity($id) + { + return static::findOne(['id' => $id, 'status' => self::STATUS_ACTIVE]); + } + + /** + * @inheritdoc + */ + public static function findIdentityByAccessToken($token, $type = null) + { + throw new NotSupportedException('"findIdentityByAccessToken" is not implemented.'); + } + + /** + * Finds user by username + * + * @param string $username + * @return static|null + */ + public static function findByUsername($username) + { + return static::findOne(['username' => $username, 'status' => self::STATUS_ACTIVE]); + } + + /** + * Finds user by password reset token + * + * @param string $token password reset token + * @return static|null + */ + public static function findByPasswordResetToken($token) + { + if (!static::isPasswordResetTokenValid($token)) { + return null; + } + + return static::findOne([ + 'password_reset_token' => $token, + 'status' => self::STATUS_ACTIVE, + ]); + } + + /** + * Finds out if password reset token is valid + * + * @param string $token password reset token + * @return boolean + */ + public static function isPasswordResetTokenValid($token) + { + if (empty($token)) { + return false; + } + + $timestamp = (int) substr($token, strrpos($token, '_') + 1); + $expire = Yii::$app->params['user.passwordResetTokenExpire']; + return $timestamp + $expire >= time(); + } + + /** + * @inheritdoc + */ + public function getId() + { + return $this->getPrimaryKey(); + } + + /** + * @inheritdoc + */ + public function getAuthKey() + { + return $this->auth_key; + } + + /** + * @inheritdoc + */ + public function validateAuthKey($authKey) + { + return $this->getAuthKey() === $authKey; + } + + /** + * Validates password + * + * @param string $password password to validate + * @return boolean if password provided is valid for current user + */ + public function validatePassword($password) + { + return Yii::$app->security->validatePassword($password, $this->password_hash); + } + + /** + * Generates password hash from password and sets it to the model + * + * @param string $password + */ + public function setPassword($password) + { + $this->password_hash = Yii::$app->security->generatePasswordHash($password); + } + + /** + * Generates "remember me" authentication key + */ + public function generateAuthKey() + { + $this->auth_key = Yii::$app->security->generateRandomString(); + } + + /** + * Generates new password reset token + */ + public function generatePasswordResetToken() + { + $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time(); + } + + /** + * Removes password reset token + */ + public function removePasswordResetToken() + { + $this->password_reset_token = null; + } + + +} diff --git a/common/modules/artboxfile/Module.php b/common/modules/artboxfile/Module.php new file mode 100755 index 0000000..72360d2 --- /dev/null +++ b/common/modules/artboxfile/Module.php @@ -0,0 +1,24 @@ +request->post(); + + $multiple = !empty($request['multiple']); + $fileField = empty($request['fileField']) ? 'file' : $request['fileField']; + $formField = empty($request['formField']) ? 'fileUpload' : $request['formField']; + + + if($_FILES[$formField]) + { + if (($_FILES[$formField] == "none") OR (empty($_FILES[$formField]['name'])) ) + { + $error = "Вы не выбрали файл"; + } + else if ($_FILES[$formField]["size"] == 0 OR $_FILES[$formField]["size"] > 2050000) + { + $error = "Размер файла не соответствует нормам"; + } + /*else if (($_FILES['upload']["type"] != "image/jpeg") AND ($_FILES['upload']["type"] != "image/jpeg") AND ($_FILES['upload']["type"] != "image/png") AND ($_FILES['upload']['type'] != 'image/gif')) + { + $message = "Допускается загрузка только картинок JPG, GIF и PNG."; + }*/ + else if (!is_uploaded_file($_FILES[$formField]["tmp_name"])) + { + $error = "Что-то пошло не так. Попытайтесь загрузить файл ещё раз."; + } + else{ + $ext = $this->getex($_FILES[$formField]['name']); + $name = $_FILES[$formField]['name'] .'.'. $ext; + $tmpName = uniqid('tmpfile_') .'.'. $ext; + + $path = Yii::getAlias($this->tmpDir); + if(!is_dir($path)) { + mkdir($path, 0755, true); + } + + if (!move_uploaded_file($_FILES[$formField]['tmp_name'], $path .'/'. $tmpName)) { + $error = "File not uploaded"; + } else { + $full_path = $path .'/'. $tmpName; + $message = "Файл " . $_FILES[$formField]['name'] . " in $full_path загружен"; + } + } + } + if (!empty($error)) { + print json_encode(['error' => $error]); + } else { + $sendingData = [ + 'append' => $multiple, +// 'initialPreview' => Html::img() +// 'initialPreviewConfig' => , +// 'initialPreviewThumbTags' => , + + ]; + print json_encode(['message' => $message, 'tmpfile' => $full_path, 'filename' => $name]); + } + exit; + } + + protected function getex($filename) { + return end(explode(".", $filename)); + } +} \ No newline at end of file diff --git a/common/modules/artboxfile/models/File.php b/common/modules/artboxfile/models/File.php new file mode 100755 index 0000000..f5c4188 --- /dev/null +++ b/common/modules/artboxfile/models/File.php @@ -0,0 +1,34 @@ + 255], + [[$this->fileUploadName], 'safe'], + [[$this->fileUploadName], 'file', 'extensions' => 'jpg, gif, png'], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'file' => Yii::t('artbox', 'File name'), + 'fileUpload' => Yii::t('artbox', 'File'), + ]; + } +} \ No newline at end of file diff --git a/common/modules/blog/Module.php b/common/modules/blog/Module.php new file mode 100755 index 0000000..4b46c45 --- /dev/null +++ b/common/modules/blog/Module.php @@ -0,0 +1,15 @@ + [[0 => property(свойство обьекта), ... дополнительные + * настройки]], ...[]] + * + */ + public $attributes; + + /** + * События + * + * События на которые должно срабатывать поведение. Задается ассоциативный массив, в котором ключ - событие + * связанного обьекта, а значение - метод, который вызывается при этом событии + * + * @return array [key(event) => val(method)] + * + */ + public function events() + { + return [ + ActiveRecord::EVENT_BEFORE_INSERT => 'autocomplete', + ActiveRecord::EVENT_BEFORE_UPDATE => 'autocomplete', + ]; + } + + /** + * События + * + * События на которые должно срабатывать поведение. Задается ассоциативный массив, в котором ключ - событие + * связанного обьекта, а значение - метод, который вызывается при этом событии + * Доступные автозаполнения: + * ['translit' => ['prop1', ... 'prop2']], + * где prop - свойство подлежащее транслитерации + * ['repeat' => [[string 'prop1', string 'target1', boolean 'skipFilled', int 'count', boolean 'truncate', string 'suffix'], ...[]], + * где prop - свойство для преобразования, + * target - свойство с которого взять данные, + * count - число для преобразования, + * skipFilled - пропустить непустые, + * truncate - true - обрезать по словам, false - по символам, + * suffix - суффикс, который добавить после обрезки + * + * @param mixed $event Yii обьект свойста https://github.com/yiisoft/yii2/blob/master/docs/guide-ru/concept-events.md + * + */ + public function autocomplete($event) + { + if(!empty($this->attributes['translit'])) { + foreach($this->attributes['translit'] as $translit) { + if($this->owner->hasAttribute($translit)) { + $this->owner->$translit = Tools::translit($this->owner->$translit); + } + } + } + if(!empty($this->attributes['repeat'])) { + foreach($this->attributes['repeat'] as $repeat) { + if(is_array($repeat) && $this->owner->hasAttribute($repeat[0]) && $this->owner->hasAttribute($repeat[1]) && is_int($repeat[3]) && (empty($this->owner->$repeat[0]) || $repeat[2])) { + $suffix = $repeat[5]?:''; + $truncate = $repeat[4]?'truncateWords':'truncate'; + $this->owner->$repeat[0] = StringHelper::$truncate($this->owner->$repeat[1], $repeat[3], $suffix); + } + } + } + } +} \ No newline at end of file diff --git a/common/modules/blog/config.php b/common/modules/blog/config.php new file mode 100755 index 0000000..8a7e162 --- /dev/null +++ b/common/modules/blog/config.php @@ -0,0 +1,9 @@ + [ + + ], + 'params' => [ + 'test' => 'Hello', + ], +]; diff --git a/common/modules/blog/controllers/AjaxController.php b/common/modules/blog/controllers/AjaxController.php new file mode 100755 index 0000000..6e6ebcd --- /dev/null +++ b/common/modules/blog/controllers/AjaxController.php @@ -0,0 +1,133 @@ +request->getIsAjax()) { + //throw new ForbiddenHttpException('Permission denied'); + } + + if(!parent::beforeAction($action)) { + return false; + } + + return true; + } + + public function actionCategoryForm($language_id, $widget_id) + { + $model = Language::find()->where(['>=', 'language_id', 1])->andWhere(['status' => 1, 'language_id' => $language_id])->one(); + if(!$model) { + throw new NotFoundHttpException('Language not found'); + } + $category_lang = new ArticleCategoryLang(); + return $this->renderAjax('_category_form', ['model' => $model, 'category_lang' => $category_lang, 'widget_id' => $widget_id]); + } + + public function actionArticleForm($language_id, $widget_id) + { + $model = Language::find()->where(['>=', 'language_id', 1])->andWhere(['status' => 1, 'language_id' => $language_id])->one(); + if(!$model) { + throw new NotFoundHttpException('Language not found'); + } + $article_lang = new ArticleLang(); + return $this->renderAjax('_article_form', ['model' => $model, 'article_lang' => $article_lang, 'widget_id' => $widget_id]); + } + + public function actionArticleMediaForm($language_id, $widget_id, $type) + { + $model = Language::find()->where(['>=', 'language_id', 1])->andWhere(['status' => 1, 'language_id' => $language_id])->one(); + if(!$model) { + throw new NotFoundHttpException('Language not found'); + } + if(!in_array($type, ['full', 'preview'])) { + throw new InvalidParamException('Type must only be full/preview'); + } + $article_lang = new ArticleMedia(); + return $this->renderAjax('_article_media_form', ['model' => $model, 'article_lang' => $article_lang, 'widget_id' => $widget_id, 'type' => $type]); + } + + public function actionArticleCategoryMediaForm($language_id, $widget_id, $type) + { + $model = Language::find()->where(['>=', 'language_id', 1])->andWhere(['status' => 1, 'language_id' => $language_id])->one(); + if(!$model) { + throw new NotFoundHttpException('Language not found'); + } + if(!in_array($type, ['full', 'preview'])) { + throw new InvalidParamException('Type must only be full/preview'); + } + $article_lang = new ArticleCategoryMedia(); + return $this->renderAjax('_article_media_form', ['model' => $model, 'article_lang' => $article_lang, 'widget_id' => $widget_id, 'type' => $type]); + } + + public function actionRemoveImage() + { + $post = \Yii::$app->request->post(); + if(!empty($post['article_media_id'])) { + $article_media = ArticleMedia::findOne($post['article_media_id']); + if($post['remove_media']) { + $media = $article_media->media->delete(); + } + if(!empty($article_media)) { + $article_media->delete(); + } + return true; + } else { + return false; + } + } + + public function actionRemoveCategoryImage() + { + $post = \Yii::$app->request->post(); + if(!empty($post['category_media_id'])) { + $category_media = ArticleCategoryMedia::findOne($post['category_media_id']); + if($post['remove_media']) { + $media = $category_media->media->delete(); + } + if(!empty($category_media)) { + $category_media->delete(); + } + return true; + } else { + return false; + } + } + + public function actionRemoveImageCategory() + { + $post = \Yii::$app->request->post(); + if(!empty($post['category_media_id'])) { + $category_media = ArticleCategoryMedia::findOne($post['category_media_id']); + if($post['remove_media']) { + $media = $category_media->media->delete(); + } + if(!empty($category_media)) { + $category_media->delete(); + } + return true; + } else { + return false; + } + } + + public function actionMultilangForm($model, $ajaxView, $widget_id, $language_id = NULL) + { + $model = new $model(['language_id' => $language_id]); + return $this->renderAjax($ajaxView, ['model' => $model, 'widget_id' => $widget_id]); + } + +} diff --git a/common/modules/blog/controllers/ArticleController.php b/common/modules/blog/controllers/ArticleController.php new file mode 100755 index 0000000..c5f18ab --- /dev/null +++ b/common/modules/blog/controllers/ArticleController.php @@ -0,0 +1,228 @@ + Article::find(), + 'pagination' => [ + 'pageSize' => 1, + ], + ]); + return $this->render('index', ['dataProvider' => $dataProvider]); + } + + public function actionCreate() + { + $article_langs = array(); + $article = new Article(); + $default_lang = Language::getDefaultLang(); + $images = array(); + $images[$default_lang->language_id]['full'] = new ArticleMedia(['scenario' => ArticleMedia::SCENARIO_FULL]); + $images[$default_lang->language_id]['preview'] = new ArticleMedia(['scenario' => ArticleMedia::SCENARIO_PREVIEW]); + $images[0]['additional'] = new ArticleMedia(['scenario' => ArticleMedia::SCENARIO_ADDITIONAL]); + $article->loadDefaultValues(); + $langs = Language::getActiveLanguages(); + $isValid = false; + if(!empty(\Yii::$app->request->post())) { + $isValid = true; + $article->load(\Yii::$app->request->post()); + $article->user_id = \Yii::$app->user->getId(); + $isValid = $article->validate(); + foreach(\Yii::$app->request->post()['ArticleMedia'] as $lang => $value) { + foreach($value as $type => $fields) { + $images[$lang][$type] = new ArticleMedia(['scenario' => $type]); + $images[$lang][$type]->type = $type; + $images[$lang][$type]->language_id = $lang; + $images[$lang][$type]->imageFile = UploadedFile::getInstance($images[$lang][$type], "[{$lang}][{$type}]imageFile"); + $isValid = $images[$lang][$type]->validate(['imageFile']) && $isValid; + } + } + $images[0]['additional']->language_id = 0; + $images[0]['additional']->type = 'additional'; + $images[0]['additional']->imageFile = UploadedFile::getInstances($images[0]['additional'], "[0][additional]imageFile"); + if(empty(\Yii::$app->request->post()['ArticleLang'])) { + $article_langs[$default_lang->language_id] = new ArticleLang(); + $isValid = ArticleLang::validateMultiple($article_langs) && $isValid; + } else { + foreach(\Yii::$app->request->post()['ArticleLang'] as $index => $article_lang) { + $article_langs[$index] = new ArticleLang(); + } + ArticleLang::loadMultiple($article_langs, \Yii::$app->request->post()); + $isValid = ArticleLang::validateMultiple($article_langs) && $isValid; + } + } else { + $article_langs[$default_lang->language_id] = new ArticleLang(); + } + if($isValid) { + $article->save(false); + $article_categories = \Yii::$app->request->post('Article')['articleCategoriesArray']; + if(!empty($article_categories)) { + foreach($article_categories as $article_category) { + $articletocategory[$article_category] = new ArticleToCategory(); + $articletocategory[$article_category]->article_category_id = $article_category; + $articletocategory[$article_category]->link('article', $article); + } + } + $first = 1; + foreach($images as $lang => $value) { + foreach($value as $type => $fields) { + $images[$lang][$type]->upload($article->article_id); + if($first && $type != 'additional') { + $media_clone = clone $images[$lang][$type]; + $media_clone->setIsNewRecord(true); + unset($media_clone->article_media_id); + $media_clone->language_id = 0; + $media_clone->upload($article->article_id); + unset($media_clone); + $first = 0; + } + } + } + $first = 1; + foreach($article_langs as $article_lang) { + if($first) { + $article_lang_clone = clone $article_lang; + $article_lang_clone->language_id = 0; + $article_lang_clone->link('article', $article); + unset($article_lang_clone); + } + $article_lang->link('article', $article); + $first = 0; + } + echo "ok"; + //$this->redirect('index'); + } else { + return $this->render('create', [ + 'article_langs' => $article_langs, + 'article' => $article, + 'langs' => $langs, + 'images' => $images + ]); + } + } + + public function actionUpdate($id) + { + $article = Article::findOne($id); + $imagestack = $article->getArticleMedia()->all(); + $images = []; + $images[0]['additional'][0] = new ArticleMedia(['scenario' => ArticleMedia::SCENARIO_ADDITIONAL]); + $images[0]['additional'][0]->type = 'additional'; + $images[0]['additional'][0]->language_id = 0; + foreach($imagestack as $image) { + if(in_array($image->type, ['full', 'preview'])) { + $images[$image->language_id][$image->type] = $image; + $images[$image->language_id][$image->type]->scenario = $image->type; + } else { + $images[$image->language_id][$image->type][$image->article_media_id] = $image; + $images[$image->language_id][$image->type][$image->article_media_id]->scenario = $image->type; + } + } + foreach($images as $lang => $value) { + $images[$lang]['additional'][0] = new ArticleMedia(['scenario' => ArticleMedia::SCENARIO_ADDITIONAL]); + } + $article_langs = $article->getArticleLangs()->where(['>=', 'language_id', '1'])->indexBy('language_id')->all(); + $langs = Language::getActiveLanguages(); + $default_lang = Language::getDefaultLang(); + $isValid = false; + if(!empty(\Yii::$app->request->post())) { + $isValid = true; + $article->load(\Yii::$app->request->post()); + ArticleToCategory::deleteAll(['article_id' => $article->article_id]); + $article_categories = \Yii::$app->request->post('Article')['articleCategoriesArray']; + if(!empty($article_categories)) { + foreach($article_categories as $article_category) { + $articletocategory[$article_category] = new ArticleToCategory(); + $articletocategory[$article_category]->article_category_id = $article_category; + $articletocategory[$article_category]->link('article', $article); + } + } + $isValid = $article->validate(); + $images[0]['additional'][0]->type = 'additional'; + $images[0]['additional'][0]->language_id = 0; + $images[0]['additional'][0]->imageFile = UploadedFile::getInstances($images[0]['additional'][0], "[0][additional]imageFile"); + $isValid = $images[0]['additional'][0]->validate(['imageFile']) && $isValid; + foreach(\Yii::$app->request->post()['ArticleMedia'] as $lang => $value) { + foreach($value as $type => $fields) { + if(!in_array($type, ['full', 'preview'])) continue; + $images[$lang][$type] = new ArticleMedia(['scenario' => $type]); + $images[$lang][$type]->language_id = $lang; + $images[$lang][$type]->type = $type; + $images[$lang][$type]->imageFile = UploadedFile::getInstance($images[$lang][$type], "[{$lang}][{$type}]imageFile"); + $isValid = $images[$lang][$type]->validate(['imageFile']) && $isValid; + } + } + if(empty(\Yii::$app->request->post()['ArticleLang'])) { + $isValid = ArticleLang::validateMultiple($article_langs) && $isValid; + } else { + foreach(\Yii::$app->request->post()['ArticleLang'] as $index => $article_lang) { + if (!array_key_exists($index, $article_langs)) { + $article_langs[$index] = new ArticleLang(); + $article_langs[$index]->article_id = $article->article_id; + } + } + ArticleLang::loadMultiple($article_langs, \Yii::$app->request->post()); + $isValid = ArticleLang::validateMultiple($article_langs) && $isValid; + } + } + if($isValid) { + $article->save(false); + foreach($images as $lang => $value) { + foreach($value as $type => $fields) { + if($type == 'additional') { + $images[$lang][$type][0]->upload($article->id); + } else { + if(!empty($images[$lang][$type]->imageFile)) { + $images[$lang][$type]->replace($article->article_id); + } + } + } + } + foreach($article_langs as $article_lang) { + $article_lang->save(false); + } + echo "ok"; + //$this->redirect('index'); + } else { + return $this->render('update', [ + 'article_langs' => $article_langs, + 'article' => $article, + 'langs' => $langs, + 'images' => $images + ]); + } + } + + public function actionDelete($id) + { + $this->findModel($id)->delete(); + return $this->redirect(['index']); + } + + protected function findModel($id) + { + if (($model = Article::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/common/modules/blog/controllers/CategoryController.php b/common/modules/blog/controllers/CategoryController.php new file mode 100755 index 0000000..505f5b8 --- /dev/null +++ b/common/modules/blog/controllers/CategoryController.php @@ -0,0 +1,219 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['post'] + ] + ] + ]; + } + + public function actionIndex() + { + $dataProvider = new ActiveDataProvider([ + 'query' => ArticleCategory::find(), + 'pagination' => [ + 'pageSize' => 1, + ], + ]); + return $this->render('index', ['dataProvider' => $dataProvider]); + } + + public function actionCreate() + { + $category_langs = array(); + $category = new ArticleCategory(); + $default_lang = Language::getDefaultLang(); + $images = array(); + $images[$default_lang->language_id]['full'] = new ArticleCategoryMedia(['scenario' => ArticleCategoryMedia::SCENARIO_FULL]); + $images[$default_lang->language_id]['preview'] = new ArticleCategoryMedia(['scenario' => ArticleCategoryMedia::SCENARIO_PREVIEW]); + $images[0]['additional'] = new ArticleCategoryMedia(['scenario' => ArticleCategoryMedia::SCENARIO_ADDITIONAL]); + $category->loadDefaultValues(); + $langs = Language::getActiveLanguages(); + $isValid = false; + if(!empty(\Yii::$app->request->post())) { + $isValid = true; + $category->load(\Yii::$app->request->post()); + $isValid = $category->validate(); + foreach(\Yii::$app->request->post()['ArticleCategoryMedia'] as $lang => $value) { + foreach($value as $type => $fields) { + $images[$lang][$type] = new ArticleCategoryMedia(['scenario' => $type]); + $images[$lang][$type]->type = $type; + $images[$lang][$type]->language_id = $lang; + $images[$lang][$type]->imageFile = UploadedFile::getInstance($images[$lang][$type], "[{$lang}][{$type}]imageFile"); + $isValid = $images[$lang][$type]->validate(['imageFile']) && $isValid; + } + } + $images[0]['additional']->language_id = 0; + $images[0]['additional']->type = 'additional'; + $images[0]['additional']->imageFile = UploadedFile::getInstances($images[0]['additional'], "[0][additional]imageFile"); + if(empty(\Yii::$app->request->post()['ArticleCategoryLang'])) { + $category_langs[$default_lang->language_id] = new ArticleCategoryLang(); + $isValid = ArticleCategoryLang::validateMultiple($category_langs) && $isValid; + } else { + foreach(\Yii::$app->request->post()['ArticleCategoryLang'] as $index => $category_lang) { + $category_langs[$index] = new ArticleCategoryLang(); + } + ArticleCategoryLang::loadMultiple($category_langs, \Yii::$app->request->post()); + $isValid = ArticleCategoryLang::validateMultiple($category_langs) && $isValid; + } + } else { + $category_langs[$default_lang->language_id] = new ArticleCategoryLang(); + } + if($isValid) { + $category->save(false); + $first = 1; + foreach($images as $lang => $value) { + foreach($value as $type => $fields) { + $images[$lang][$type]->upload($category->article_category_id); + if($first && $type != 'additional') { + $media_clone = clone $images[$lang][$type]; + $media_clone->setIsNewRecord(true); + unset($media_clone->article_category_media_id); + $media_clone->language_id = 0; + $media_clone->upload($category->article_category_id); + unset($media_clone); + $first = 0; + } + } + } + $first = 1; + foreach($category_langs as $category_lang) { + if($first) { + $category_lang_clone = clone $category_lang; + $category_lang_clone->language_id = 0; + $category_lang_clone->link('category', $category); + unset($category_lang_clone); + } + $category_lang->link('category', $category); + $first = 0; + } + echo "ok"; + //$this->redirect('index'); + } else { + return $this->render('create', [ + 'category_langs' => $category_langs, + 'category' => $category, + 'langs' => $langs, + 'images' => $images + ]); + } + } + + public function actionUpdate($id) + { + $category = ArticleCategory::findOne($id); + $imagestack = $category->getArticleCategoryMedia()->all(); + $images = []; + $images[0]['additional'][0] = new ArticleCategoryMedia(['scenario' => ArticleCategoryMedia::SCENARIO_ADDITIONAL]); + $images[0]['additional'][0]->type = 'additional'; + $images[0]['additional'][0]->language_id = 0; + foreach($imagestack as $image) { + if(in_array($image->type, ['full', 'preview'])) { + $images[$image->language_id][$image->type] = $image; + $images[$image->language_id][$image->type]->scenario = $image->type; + } else { + $images[$image->language_id][$image->type][$image->article_category_media_id] = $image; + $images[$image->language_id][$image->type][$image->article_category_media_id]->scenario = $image->type; + } + } + foreach($images as $lang => $value) { + $images[$lang]['additional'][0] = new ArticleCategoryMedia(['scenario' => ArticleCategoryMedia::SCENARIO_ADDITIONAL]); + } + $category_langs = $category->getArticleCategoryLangs()->where(['>=', 'language_id', '1'])->indexBy('language_id')->all(); + $langs = Language::getActiveLanguages(); + $default_lang = Language::getDefaultLang(); + $isValid = false; + if(!empty(\Yii::$app->request->post())) { + $isValid = true; + $category->load(\Yii::$app->request->post()); + $isValid = $category->validate(); + $images[0]['additional'][0]->type = 'additional'; + $images[0]['additional'][0]->language_id = 0; + $images[0]['additional'][0]->imageFile = UploadedFile::getInstances($images[0]['additional'][0], "[0][additional]imageFile"); + $isValid = $images[0]['additional'][0]->validate(['imageFile']) && $isValid; + foreach(\Yii::$app->request->post()['ArticleCategoryMedia'] as $lang => $value) { + foreach($value as $type => $fields) { + if(!in_array($type, ['full', 'preview'])) continue; + $images[$lang][$type] = new ArticleCategoryMedia(['scenario' => $type]); + $images[$lang][$type]->language_id = $lang; + $images[$lang][$type]->type = $type; + $images[$lang][$type]->imageFile = UploadedFile::getInstance($images[$lang][$type], "[{$lang}][{$type}]imageFile"); + $isValid = $images[$lang][$type]->validate(['imageFile']) && $isValid; + } + } + if(empty(\Yii::$app->request->post()['ArticleCategoryLang'])) { + $isValid = ArticleCategoryLang::validateMultiple($category_langs) && $isValid; + } else { + foreach(\Yii::$app->request->post()['ArticleCategoryLang'] as $index => $category_lang) { + if(!array_key_exists($index, $category_langs)) { + $category_langs[$index] = new ArticleCategoryLang(); + $category_langs[$index]->article_category_id = $category->article_category_id; + } + } + ArticleCategoryLang::loadMultiple($category_langs, \Yii::$app->request->post()); + $isValid = ArticleCategoryLang::validateMultiple($category_langs) && $isValid; + } + } + if($isValid) { + $category->save(false); + foreach($images as $lang => $value) { + foreach($value as $type => $fields) { + if($type == 'additional') { + $images[$lang][$type][0]->upload($category->article_category_id); + } else { + if(!empty($images[$lang][$type]->imageFile)) { + $images[$lang][$type]->replace($category->article_category_id); + } + } + } + } + foreach($category_langs as $category_lang) { + $category_lang->save(false); + } + echo "ok"; + //$this->redirect('index'); + } else { + return $this->render('update', [ + 'category_langs' => $category_langs, + 'category' => $category, + 'langs' => $langs, + 'images' => $images + ]); + } + } + + public function actionDelete($id) + { + $this->findModel($id)->delete(); + return $this->redirect(['index']); + } + + protected function findModel($id) + { + if (($model = ArticleCategory::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/common/modules/blog/controllers/DefaultController.php b/common/modules/blog/controllers/DefaultController.php new file mode 100755 index 0000000..81604e5 --- /dev/null +++ b/common/modules/blog/controllers/DefaultController.php @@ -0,0 +1,12 @@ +render('index'); + } +} diff --git a/common/modules/blog/controllers/MediaController.php b/common/modules/blog/controllers/MediaController.php new file mode 100755 index 0000000..43e7920 --- /dev/null +++ b/common/modules/blog/controllers/MediaController.php @@ -0,0 +1,45 @@ +request->isPost) { + $model->imageFile = UploadedFile::getInstance($model, 'imageFile'); + if($model->upload()) { + return true; + } else { + return false; + } + } + return $this->render('index', ['model' => $model]); + } + + public function actionCreate() + { + + } + + public function actionUpdate($id) + { + + } + + public function actionDelete($id) + { + $model = Media::findOne($id); + return $model->delete(); + } + + protected function findModel($id) + { + + } +} diff --git a/common/modules/blog/controllers/TestController.php b/common/modules/blog/controllers/TestController.php new file mode 100755 index 0000000..3039a12 --- /dev/null +++ b/common/modules/blog/controllers/TestController.php @@ -0,0 +1,17 @@ +language_id] = new ArticleLang(); + $model[3] = new ArticleLang(); + return $this->render('index', ['model' => $model]); + } +} \ No newline at end of file diff --git a/common/modules/blog/models/Article.php b/common/modules/blog/models/Article.php new file mode 100755 index 0000000..75c636d --- /dev/null +++ b/common/modules/blog/models/Article.php @@ -0,0 +1,163 @@ + Autocomplete::className(), + 'attributes' => [ + 'translit' => ['code'], + ] + ] + ]; + } + /** + * @inheritdoc + */ + public function rules() + { + return [ + [['sort', 'article_pid', 'status', 'comment', 'vote'], 'integer'], + [['date_add', 'date_update'], 'safe'], + [['code'], 'required'], + [['code', 'tag'], 'string'] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'article_id' => Yii::t('app', 'ID'), + 'sort' => Yii::t('app', 'Sort'), + 'date_add' => Yii::t('app', 'Create At'), + 'date_update' => Yii::t('app', 'Update At'), + 'code' => Yii::t('app', 'Code'), + 'user_id' => Yii::t('app', 'Author'), + 'tag' => Yii::t('app', 'Tags'), + 'article_pid' => Yii::t('app', 'Parent ID'), + 'status' => Yii::t('app', 'Active'), + 'comment' => Yii::t('app', 'Comments'), + 'vote' => Yii::t('app', 'Voting'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getParent() + { + return $this->hasOne(Article::className(), ['article_id' => 'article_pid']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getArticles() + { + return $this->hasMany(Article::className(), ['article_pid' => 'article_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getUser() + { + return $this->hasOne(User::className(), ['id' => 'user_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getArticleLangs() + { + return $this->hasMany(ArticleLang::className(), ['article_id' => 'article_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getArticleMedia() + { + return $this->hasMany(ArticleMedia::className(), ['article_id' => 'article_id']); + } + + public function getMedia() + { + return $this->hasMany(Media::className(), ['article_id' => 'media_id'])->via('articleMedia'); + } + /** + * @return \yii\db\ActiveQuery + */ + public function getArticleToCategories() + { + return $this->hasMany(ArticleToCategory::className(), ['article_id' => 'article_id']); + } + + public function getArticleCategories() + { + return $this->hasMany(ArticleCategory::className(), ['article_category_id' => 'article_category_id'])->viaTable('article_to_category', ['article_id' => 'article_category_id']); + } + + public static function findArticleDropdown($id) + { + $query = new Query(); + return $query->select(['l.name', 'a.article_id']) + ->from(['article a']) + ->leftJoin(['article_lang l'], 'a.article_id = l.article_id') + ->where(['l.language_id' => 0, 'a.status' => 1]) + ->andWhere(['not', ['a.article_id' => $id]]) + ->indexBy('article_id') + ->column(); + } + + public function getArticleCategoriesArray() + { + return $this->getArticleToCategories()->select('article_category_id')->column(); + } + +} diff --git a/common/modules/blog/models/ArticleCategory.php b/common/modules/blog/models/ArticleCategory.php new file mode 100755 index 0000000..411c61a --- /dev/null +++ b/common/modules/blog/models/ArticleCategory.php @@ -0,0 +1,133 @@ + Autocomplete::className(), + 'attributes' => [ + 'translit' => ['code'], + ] + ] + ]; + } + /** + * @inheritdoc + */ + public function rules() + { + return [ + [['status', 'sort', 'article_category_pid'], 'integer'], + [['code'], 'required'], + [['code', 'tag'], 'string'], + [['date_add', 'date_update'], 'safe'], + [['status'], 'boolean'], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'article_category_id' => Yii::t('app', 'ID'), + 'status' => Yii::t('app', 'Active'), + 'sort' => Yii::t('app', 'Sort'), + 'code' => Yii::t('app', 'Code'), + 'date_add' => Yii::t('app', 'Created At'), + 'date_update' => Yii::t('app', 'Updated At'), + 'tag' => Yii::t('app', 'Tags'), + 'article_category_pid' => Yii::t('app', 'Parent ID'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getArticles() + { + return $this->hasMany(Article::className(), ['article_id' => 'article_id'])->viaTable('article_to_category', ['article_category_id' => 'article_category_id']) ; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getParent() + { + return $this->hasOne(ArticleCategory::className(), ['article_category_id' => 'article_category_pid']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getArticleCategories() + { + return $this->hasMany(ArticleCategory::className(), ['article_category_pid' => 'article_category_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getArticleCategoryLangs() + { + return $this->hasMany(ArticleCategoryLang::className(), ['article_category_id' => 'article_category_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getArticleCategoryMedia() + { + return $this->hasMany(ArticleCategoryMedia::className(), ['article_category_id' => 'article_category_id']); + } + + public static function findArticleCategoryDropdown($id) + { + $query = new Query(); + return $query->select(['l.name', 'c.article_category_id']) + ->from(['article_category c']) + ->leftJoin(['article_category_lang l'], 'c.article_category_id = l.article_category_id') + ->where(['l.language_id' => 0, 'c.status' => 1]) + ->andWhere(['not', ['c.article_category_id' => $id]]) + ->indexBy('article_category_id') + ->column(); + } + +} diff --git a/common/modules/blog/models/ArticleCategoryLang.php b/common/modules/blog/models/ArticleCategoryLang.php new file mode 100755 index 0000000..748f9c1 --- /dev/null +++ b/common/modules/blog/models/ArticleCategoryLang.php @@ -0,0 +1,102 @@ + Autocomplete::className(), + 'attributes' => [ + 'repeat' => [['preview', 'text', false, 5, true, '...']], + ] + ] + ]; + } + /** + * @inheritdoc + */ + public function rules() + { + return [ + [['language_id', 'article_category_id'], 'integer'], + [['text', 'name'], 'required'], + [['text', 'preview', 'seo_url', 'name', 'meta_title', 'meta_descr', 'meta_keyword', 'h1_tag', 'tag'], 'string'], + ['seo_url', function($attribute, $params) { + $pattern = "/^[a-zA-Z\d_-]+$/"; + if(!preg_match($pattern, $this->$attribute)) { + $this->addError($attribute, Yii::t('app', "Pattern doesn't match.")); + } + }] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'article_category_language_id' => Yii::t('app', 'ID'), + 'language_id' => Yii::t('app', 'Lang ID'), + 'article_category_id' => Yii::t('app', 'Category ID'), + 'text' => Yii::t('app', 'Text'), + 'preview' => Yii::t('app', 'Preview'), + 'seo_url' => Yii::t('app', 'Seo Url'), + 'name' => Yii::t('app', 'Name'), + 'meta_title' => Yii::t('app', 'Meta Title'), + 'meta_descr' => Yii::t('app', 'Meta Descr'), + 'meta_keyword' => Yii::t('app', 'Meta Keywords'), + 'h1_tag' => Yii::t('app', 'H1 Tag'), + 'tag' => Yii::t('app', 'Tags'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getCategory() + { + return $this->hasOne(ArticleCategory::className(), ['article_category_id' => 'article_category_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getLang() + { + return $this->hasOne(Language::className(), ['language_id' => 'language_id']); + } +} diff --git a/common/modules/blog/models/ArticleCategoryMedia.php b/common/modules/blog/models/ArticleCategoryMedia.php new file mode 100755 index 0000000..a8c135c --- /dev/null +++ b/common/modules/blog/models/ArticleCategoryMedia.php @@ -0,0 +1,162 @@ + 10], + [['imageFile'], 'file', 'extensions' => 'png, gif, jpg, jpeg', 'skipOnEmpty' => true, 'on' => self::SCENARIO_FULL], + [['imageFile'], 'file', 'extensions' => 'png, gif, jpg, jpeg', 'skipOnEmpty' => true, 'on' => self::SCENARIO_PREVIEW], + [['imageFile'], 'file', 'extensions' => 'png, gif, jpg, jpeg', 'skipOnEmpty' => true, 'maxFiles' => 10, 'on' => self::SCENARIO_ADDITIONAL] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'article_category_media_id' => Yii::t('app', 'ID'), + 'article_category_id' => Yii::t('app', 'Category ID'), + 'media_id' => Yii::t('app', 'Media ID'), + 'media_alt' => Yii::t('app', 'Media Alt'), + 'media_title' => Yii::t('app', 'Media Title'), + 'media_caption' => Yii::t('app', 'Media Caption'), + 'type' => Yii::t('app', 'Type'), + 'imageFile' => Yii::t('app', 'Image File'), + 'language_id' => Yii::t('app', 'Language ID'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getCategory() + { + return $this->hasOne(ArticleCategory::className(), ['article_category_id' => 'article_category_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getMedia() + { + return $this->hasOne(Media::className(), ['media_id' => 'media_id']); + } + + public function upload($category_id) + { + $this->article_category_id = $category_id; + if(is_array($this->imageFile)) { + $ok = true; + foreach($this->imageFile as $image) { + $media_category = clone $this; + $media = new Media(); + $media->imageFile = $image; + $media->upload(); + $media_category->media_id = $media->media_id; + $ok = $media_category->save() && $ok; + unset($media_category); + } + return $ok; + } elseif(!empty($this->imageFile)) { + $media = new Media(); + $media->imageFile = $this->imageFile; + $media->upload(); + $this->media_id = $media->media_id; + return $this->save(); + } + } + + public function replace($category_id, $removeMedia = false) + { + $this->article_category_id = $category_id; + if($removeMedia) { + $category_media = ArticleCategoryMedia::find()->select('media_id')->where(['article_category_id' => $this->article_category_id, 'type' => $this->type])->column(); + $media = array(); + foreach($category_media as $media_id) { + $media[] = Media::findOne(['media_id' => $media_id]); + } + $media = array_unique($media); + foreach($media as $one_media) { + if($one_media instanceof Media) { + $one_media->delete(); + } + } + unset($media); + unset($category_media); + } + if(is_array($this->imageFile)) { + $ok = true; + foreach($this->imageFile as $image) { + $media_category = clone $this; + $media = new Media(); + $media->imageFile = $image; + $media->upload(); + $media_category->media_id = $media->media_id; + $ok = $media_category->save() && $ok; + unset($media_category); + } + return $ok; + } elseif(!empty($this->imageFile)) { + ArticleCategoryMedia::deleteAll(['category_id' => $this->article_category_id, 'type' => $this->type]); + $media = new Media(); + $media->imageFile = $this->imageFile; + $media->upload(); + $this->media_id = $media->media_id; + $this->setIsNewRecord(true); + return $this->save(); + } + } + +} diff --git a/common/modules/blog/models/ArticleLang.php b/common/modules/blog/models/ArticleLang.php new file mode 100755 index 0000000..94bf761 --- /dev/null +++ b/common/modules/blog/models/ArticleLang.php @@ -0,0 +1,85 @@ + Yii::t('app', 'ID'), + 'language_id' => Yii::t('app', 'Lang ID'), + 'article_id' => Yii::t('app', 'Article ID'), + 'text' => Yii::t('app', 'Text'), + 'seo_url' => Yii::t('app', 'Seo Url'), + 'name' => Yii::t('app', 'Name'), + 'preview' => Yii::t('app', 'Preview'), + 'meta_title' => Yii::t('app', 'Meta Title'), + 'meta_descr' => Yii::t('app', 'Meta Descr'), + 'meta_keyword' => Yii::t('app', 'Meta Keywords'), + 'h1_tag' => Yii::t('app', 'H1 Tag'), + 'tag' => Yii::t('app', 'Tags'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getArticle() + { + return $this->hasOne(Article::className(), ['article_id' => 'article_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getLang() + { + return $this->hasOne(Language::className(), ['language_id' => 'language_id']); + } +} diff --git a/common/modules/blog/models/ArticleMedia.php b/common/modules/blog/models/ArticleMedia.php new file mode 100755 index 0000000..977f8a8 --- /dev/null +++ b/common/modules/blog/models/ArticleMedia.php @@ -0,0 +1,161 @@ + 10], + [['imageFile'], 'file', 'extensions' => 'png, gif, jpg, jpeg', 'skipOnEmpty' => true, 'on' => self::SCENARIO_FULL], + [['imageFile'], 'file', 'extensions' => 'png, gif, jpg, jpeg', 'skipOnEmpty' => true, 'on' => self::SCENARIO_PREVIEW], + [['imageFile'], 'file', 'extensions' => 'png, gif, jpg, jpeg', 'skipOnEmpty' => true, 'maxFiles' => 10, 'on' => self::SCENARIO_ADDITIONAL] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'article_media_id' => Yii::t('app', 'ID'), + 'article_id' => Yii::t('app', 'Article ID'), + 'media_id' => Yii::t('app', 'Media ID'), + 'type' => Yii::t('app', 'Type'), + 'media_alt' => Yii::t('app', 'Media Alt'), + 'media_title' => Yii::t('app', 'Media Title'), + 'media_caption' => Yii::t('app', 'Media Caption'), + 'imageFile' => Yii::t('app', 'Image File'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getArticle() + { + return $this->hasOne(Article::className(), ['article_id' => 'article_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getMedia() + { + return $this->hasOne(Media::className(), ['media_id' => 'media_id']); + } + + public function upload($article_id) + { + $this->article_id = $article_id; + if(is_array($this->imageFile)) { + $ok = true; + foreach($this->imageFile as $image) { + $media_article = clone $this; + $media = new Media(); + $media->imageFile = $image; + $media->upload(); + $media_article->media_id = $media->media_id; + $ok = $media_article->save() && $ok; + unset($media_article); + } + return $ok; + } elseif(!empty($this->imageFile)) { + $media = new Media(); + $media->imageFile = $this->imageFile; + $media->upload(); + $this->media_id = $media->media_id; + return $this->save(); + } + } + + public function replace($article_id, $removeMedia = false) + { + $this->article_id = $article_id; + if($removeMedia && !$this->getIsNewRecord()) { + $article_media = ArticleMedia::find()->select('media_id')->where(['article_id' => $this->article_id, 'type' => $this->type, 'language_id' => $this->language_id])->column(); + $media = array(); + foreach($article_media as $media_id) { + $media[] = Media::findOne(['media_id' => $media_id]); + } + $media = array_unique($media); + foreach($media as $one_media) { + if($one_media instanceof Media) { + $one_media->delete(); + } + } + unset($media); + unset($article_media); + } + if(is_array($this->imageFile)) { + $ok = true; + foreach($this->imageFile as $image) { + $media_article = clone $this; + $media = new Media(); + $media->imageFile = $image; + $media->upload(); + $media_article->media_id = $media->media_id; + $ok = $media_article->save() && $ok; + unset($media_article); + } + return $ok; + } elseif(!empty($this->imageFile)) { + ArticleMedia::deleteAll(['article_id' => $this->article_id, 'type' => $this->type, 'language_id' => $this->language_id]); + $media = new Media(); + $media->imageFile = $this->imageFile; + $media->upload(); + $this->media_id = $media->media_id; + $this->setIsNewRecord(true); + return $this->save(); + } + } + +} diff --git a/common/modules/blog/models/ArticleToCategory.php b/common/modules/blog/models/ArticleToCategory.php new file mode 100755 index 0000000..3032fde --- /dev/null +++ b/common/modules/blog/models/ArticleToCategory.php @@ -0,0 +1,62 @@ + Yii::t('app', 'Article ID'), + 'article_category_id' => Yii::t('app', 'Category ID'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getArticle() + { + return $this->hasOne(Article::className(), ['article_id' => 'article_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getCategory() + { + return $this->hasOne(ArticleCategory::className(), ['article_category_id' => 'article_category_id']); + } +} diff --git a/common/modules/blog/views/ajax/_article_form.php b/common/modules/blog/views/ajax/_article_form.php new file mode 100755 index 0000000..22f8b05 --- /dev/null +++ b/common/modules/blog/views/ajax/_article_form.php @@ -0,0 +1,38 @@ + +
    + + $model, 'attribute' => "[$model->language_id]language_id"]))->label(false)->hiddenInput(['value' => $model->language_id]) ?> + + $model, 'attribute' => "[$model->language_id]text", 'form' => $form]))->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ]]); ?> + + $model, 'attribute' => "[$model->language_id]preview", 'form' => $form]))->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ]]); ?> + + $model, 'attribute' => "[$model->language_id]seo_url"]))->textInput() ?> + + $model, 'attribute' => "[$model->language_id]name"]))->textInput() ?> + + $model, 'attribute' => "[$model->language_id]meta_title"]))->textInput() ?> + + $model, 'attribute' => "[$model->language_id]meta_descr"]))->textarea() ?> + + $model, 'attribute' => "[$model->language_id]meta_keyword"]))->textInput() ?> + + $model, 'attribute' => "[$model->language_id]h1_tag"]))->textInput() ?> + + $model, 'attribute' => "[$model->language_id]tag"]))->textInput() ?> + +
    +end(); + } +?> diff --git a/common/modules/blog/views/ajax/_article_form_test.php b/common/modules/blog/views/ajax/_article_form_test.php new file mode 100755 index 0000000..237311e --- /dev/null +++ b/common/modules/blog/views/ajax/_article_form_test.php @@ -0,0 +1,38 @@ + +
    + + $model, 'attribute' => "[$model->language_id]language_id"]))->label(false)->hiddenInput(['value' => $model->language_id]) ?> + + $model, 'attribute' => "[$model->language_id]text", 'form' => $form]))->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ]]); ?> + + $model, 'attribute' => "[$model->language_id]preview", 'form' => $form]))->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ]]); ?> + + $model, 'attribute' => "[$model->language_id]seo_url"]))->textInput() ?> + + $model, 'attribute' => "[$model->language_id]name"]))->textInput() ?> + + $model, 'attribute' => "[$model->language_id]meta_title"]))->textInput() ?> + + $model, 'attribute' => "[$model->language_id]meta_descr"]))->textarea() ?> + + $model, 'attribute' => "[$model->language_id]meta_keyword"]))->textInput() ?> + + $model, 'attribute' => "[$model->language_id]h1_tag"]))->textInput() ?> + + $model, 'attribute' => "[$model->language_id]tag"]))->textInput() ?> + +
    +end(); + } +?> diff --git a/common/modules/blog/views/ajax/_article_media_form.php b/common/modules/blog/views/ajax/_article_media_form.php new file mode 100755 index 0000000..6058444 --- /dev/null +++ b/common/modules/blog/views/ajax/_article_media_form.php @@ -0,0 +1,17 @@ + +
    + + $article_lang, 'attribute' => "[$model->language_id][$type]language_id"]))->label(false)->hiddenInput(['value' => $model->language_id]) ?> + + $article_lang, 'attribute' => "[$model->language_id][$type]imageFile"]))->fileInput(['class' => 'image_inputs_field']) ?> + +
    +end(); +?> diff --git a/common/modules/blog/views/ajax/_category_form.php b/common/modules/blog/views/ajax/_category_form.php new file mode 100755 index 0000000..cff9b7e --- /dev/null +++ b/common/modules/blog/views/ajax/_category_form.php @@ -0,0 +1,33 @@ + +
    + + $category_lang, 'attribute' => "[$model->language_id]language_id"]))->label(false)->hiddenInput(['value' => $model->language_id]) ?> + + $category_lang, 'attribute' => "[$model->language_id]text", 'form' => $form]))->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ]]); ?> + + $category_lang, 'attribute' => "[$model->language_id]preview", 'form' => $form]))->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ]]); ?> + + $category_lang, 'attribute' => "[$model->language_id]seo_url"]))->textInput() ?> + + $category_lang, 'attribute' => "[$model->language_id]name"]))->textInput() ?> + + $category_lang, 'attribute' => "[$model->language_id]meta_title"]))->textInput() ?> + + $category_lang, 'attribute' => "[$model->language_id]meta_descr"]))->textarea() ?> + + $category_lang, 'attribute' => "[$model->language_id]meta_keyword"]))->textInput() ?> + + $category_lang, 'attribute' => "[$model->language_id]h1_tag"]))->textInput() ?> + + $category_lang, 'attribute' => "[$model->language_id]tag"]))->textInput() ?> + +
    +end(); +?> diff --git a/common/modules/blog/views/article/_form.php b/common/modules/blog/views/article/_form.php new file mode 100755 index 0000000..71d165e --- /dev/null +++ b/common/modules/blog/views/article/_form.php @@ -0,0 +1,172 @@ + +
    + + ['enctype' => 'multipart/form-data']]); ?> + + field($article, 'code')->hint(Yii::t('app', 'Insensitive latin non-space'))->textInput() ?> + + field($article, 'tag')->hint(Yii::t('app', 'Comma-separated'))->textInput() ?> + + field($article, 'sort')->input('number') ?> + + field($article, 'article_pid') + ->dropDownList(Article::findArticleDropdown($article->article_id), ['prompt' => Yii::t('app', 'Select parent')]) ?> + + field($article, 'articleCategoriesArray') + ->dropDownList(ArticleCategory::findArticleCategoryDropdown(NULL), ['multiple' => 'multiple'])->label(\Yii::t('app', 'Article Categories Array')); ?> + + field($article, 'status')->checkbox() ?> + + +
    +
    + Url::to(['/blog/ajax/article-media-form?type=full']), + 'form' => $form, + 'data_langs' => $article->getIsNewRecord()?$images:ArticleMedia::find()->where(['article_id' => $article->article_id, 'type' => 'full'])->indexBy('language_id')->all() + ]); + $first = 1; + foreach($images as $lang => $value) { + if(!array_key_exists('full', $value)) continue; + ?> +
    + field($images[$lang]['full'], "[{$lang}][full]language_id")->label(false)->hiddenInput(['value' => $lang]); + echo $form->field($images[$lang]['full'], "[{$lang}][full]imageFile")->fileInput(['class' => 'image_inputs_field']); + if(!empty($images[$lang]['full']->article_media_id)) { + echo "media->hash}/original.{$images[$lang]['full']->media->extension}' width='100' class='image_inputs_prev'>"; + } + ?> +
    + end(); + ?> +
    +
    + Url::to(['/blog/ajax/article-media-form?type=preview']), + 'form' => $form, + 'data_langs' => $article->getIsNewRecord()?$images:ArticleMedia::find()->where(['article_id' => $article->article_id, 'type' => 'preview'])->indexBy('language_id')->all() + ]); + $first = 1; + foreach($images as $lang => $value) { + if(!array_key_exists('preview', $value)) continue; + ?> +
    + field($images[$lang]['preview'], "[{$lang}][preview]language_id")->label(false)->hiddenInput(['value' => $lang]); + echo $form->field($images[$lang]['preview'], "[{$lang}][preview]imageFile")->fileInput(['class' => 'image_inputs_field']); + if(!empty($images[$lang]['preview']->article_media_id)) { + echo "media->hash}/original.{$images[$lang]['preview']->media->extension}' width='100' class='image_inputs_prev'>"; + } + ?> +
    + end(); + ?> +
    +
    + field(is_array($images[0]['additional'])?$images[0]['additional'][0]:$images[0]['additional'], "[0][additional]imageFile[]")->fileInput(['multiple' => 'multiple', 'class' => 'image_inputs_field']); + if(is_array($images[0]['additional']) && count($images[0]['additional']) > 1) { + foreach($images[0]['additional'] as $onefield => $oneimage) { + if($onefield) { + ?> + + +
    +
    + +
    + + $article_langs, + 'form' => $form, + 'ajaxView' => '@common/modules/blog/views/ajax/_article_form', + ]); + /* + $multilang = Multilang::begin(['ajaxpath' => Url::to(['/blog/ajax/article-form']), 'form' => $form, 'data_langs' => $article_langs]); + ?> + $article_lang) { + ?> +
    + + field($article_langs[$index], "[$index]language_id")->label(false)->hiddenInput(['value' => $index]) ?> + + field($article_langs[$index], "[$index]text")->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ], ]); ?> + + field($article_langs[$index], "[$index]preview")->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ], ]); ?> + + field($article_langs[$index], "[$index]seo_url")->textInput() ?> + + field($article_langs[$index], "[$index]name")->textInput() ?> + + field($article_langs[$index], "[$index]meta_title")->textInput() ?> + + field($article_langs[$index], "[$index]meta_descr")->textarea(); ?> + + field($article_langs[$index], "[$index]meta_keywords")->textInput() ?> + + field($article_langs[$index], "[$index]h1_tag")->textInput() ?> + + field($article_langs[$index], "[$index]tags")->textInput() ?> + +
    + + end(); + */ + ?> + +
    + isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $article->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
    + + + +
    + \ No newline at end of file diff --git a/common/modules/blog/views/article/create.php b/common/modules/blog/views/article/create.php new file mode 100755 index 0000000..1524640 --- /dev/null +++ b/common/modules/blog/views/article/create.php @@ -0,0 +1,19 @@ +title = Yii::t('app', 'Article create'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Articles'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + + render('_form', [ + 'article_langs' => $article_langs, + 'article' => $article, + 'langs' => $langs, + 'images' => $images + ]) ?> + +
    diff --git a/common/modules/blog/views/article/index.php b/common/modules/blog/views/article/index.php new file mode 100755 index 0000000..8229525 --- /dev/null +++ b/common/modules/blog/views/article/index.php @@ -0,0 +1,32 @@ + $dataProvider, + 'columns' => [ + 'article_id', + 'code', + 'date_add', + [ + 'value' => function($data) { + return $data->user->firstname.' '.$data->user->lastname; + }, + 'header' => Yii::t('app', 'Author') + ], + [ + 'class' => Column::className(), + 'header' => Yii::t('app', 'Name'), + 'content' => function($model, $key, $index, $column) { + return $model->getArticleLangs()->where(['language_id' => Language::getDefaultLang()->language_id])->one()->name; + } + ], + [ + 'class' => ActionColumn::className(), + 'template' => '{update} {delete}' + ] + ] +]); \ No newline at end of file diff --git a/common/modules/blog/views/article/update.php b/common/modules/blog/views/article/update.php new file mode 100755 index 0000000..12f4704 --- /dev/null +++ b/common/modules/blog/views/article/update.php @@ -0,0 +1,18 @@ +title = Yii::t('app', 'Article update'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Articles'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + render('_form', [ + 'article_langs' => $article_langs, + 'article' => $article, + 'langs' => $langs, + 'images' => $images + ]) ?> + +
    diff --git a/common/modules/blog/views/category/_form.php b/common/modules/blog/views/category/_form.php new file mode 100755 index 0000000..71c0d42 --- /dev/null +++ b/common/modules/blog/views/category/_form.php @@ -0,0 +1,158 @@ + +
    + + ['enctype' => 'multipart/form-data']]); ?> + + field($category, 'code')->hint(Yii::t('app', 'Insensitive latin non-space'))->textInput() ?> + + field($category, 'tag')->hint(Yii::t('app', 'Comma-separated'))->textInput() ?> + + field($category, 'sort')->input('number') ?> + + field($category, 'article_category_pid') + ->dropDownList(ArticleCategory::findArticleCategoryDropdown($category->article_category_id), ['prompt' => Yii::t('app', 'Select parent')]) ?> + + field($category, 'status')->checkbox() ?> + + +
    +
    + Url::to(['/blog/ajax/article-category-media-form?type=full']), + 'form' => $form, + 'data_langs' => $category->getIsNewRecord()?$images:ArticleCategoryMedia::find()->where(['article_category_id' => $category->article_category_id, 'type' => 'full'])->indexBy('language_id')->all() + ]); + $first = 1; + foreach($images as $lang => $value) { + if(!array_key_exists('full', $value)) continue; + ?> +
    + field($images[$lang]['full'], "[{$lang}][full]language_id")->label(false)->hiddenInput(['value' => $lang]); + echo $form->field($images[$lang]['full'], "[{$lang}][full]imageFile")->fileInput(['class' => 'image_inputs_field']); + if(!empty($images[$lang]['full']->article_category_media_id)) { + echo "media->hash}/original.{$images[$lang]['full']->media->extension}' width='100' class='image_inputs_prev'>"; + } + ?> +
    + end(); + ?> +
    +
    + Url::to(['/blog/ajax/article-category-media-form?type=preview']), + 'form' => $form, + 'data_langs' => $category->getIsNewRecord()?$images:ArticleCategoryMedia::find()->where(['article_category_id' => $category->article_category_id, 'type' => 'preview'])->indexBy('language_id')->all() + ]); + $first = 1; + foreach($images as $lang => $value) { + if(!array_key_exists('preview', $value)) continue; + ?> +
    + field($images[$lang]['preview'], "[{$lang}][preview]language_id")->label(false)->hiddenInput(['value' => $lang]); + echo $form->field($images[$lang]['preview'], "[{$lang}][preview]imageFile")->fileInput(['class' => 'image_inputs_field']); + if(!empty($images[$lang]['preview']->article_category_media_id)) { + echo "media->hash}/original.{$images[$lang]['preview']->media->extension}' width='100' class='image_inputs_prev'>"; + } + ?> +
    + end(); + ?> +
    +
    + field(is_array($images[0]['additional'])?$images[0]['additional'][0]:$images[0]['additional'], "[0][additional]imageFile[]")->fileInput(['multiple' => 'multiple', 'class' => 'image_inputs_field']); + if(is_array($images[0]['additional']) && count($images[0]['additional']) > 1) { + foreach($images[0]['additional'] as $onefield => $oneimage) { + if($onefield) { + ?> + + +
    +
    + +
    + + Url::to(['/blog/ajax/category-form']), 'form' => $form, 'data_langs' => $category_langs]) + ?> + $category_lang) { + ?> +
    + field($category_langs[$index], "[$index]language_id")->label(false)->hiddenInput(['value' => $index]) ?> + + field($category_langs[$index], "[$index]text")->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ], ]); ?> + + field($category_langs[$index], "[$index]preview")->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ], ]); ?> + + field($category_langs[$index], "[$index]seo_url")->textInput() ?> + + field($category_langs[$index], "[$index]name")->textInput() ?> + + field($category_langs[$index], "[$index]meta_title")->textInput() ?> + + field($category_langs[$index], "[$index]meta_descr")->textarea(); ?> + + field($category_langs[$index], "[$index]meta_keyword")->textInput() ?> + + field($category_langs[$index], "[$index]h1_tag")->textInput() ?> + + field($category_langs[$index], "[$index]tag")->textInput() ?> + +
    + + end(); + ?> + +
    + isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $category->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
    + + + +
    + \ No newline at end of file diff --git a/common/modules/blog/views/category/create.php b/common/modules/blog/views/category/create.php new file mode 100755 index 0000000..dc19a6f --- /dev/null +++ b/common/modules/blog/views/category/create.php @@ -0,0 +1,19 @@ +title = Yii::t('app', 'Category create'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Categories'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + + render('_form', [ + 'category_langs' => $category_langs, + 'category' => $category, + 'langs' => $langs, + 'images' => $images + ]) ?> + +
    diff --git a/common/modules/blog/views/category/index.php b/common/modules/blog/views/category/index.php new file mode 100755 index 0000000..dce7f03 --- /dev/null +++ b/common/modules/blog/views/category/index.php @@ -0,0 +1,26 @@ + $dataProvider, + 'columns' => [ + 'article_category_id', + 'code', + 'date_add', + 'date_update', + [ + 'class' => Column::className(), + 'header' => Yii::t('app', 'Name'), + 'content' => function($model, $key, $index, $column) { + return $model->getArticleCategoryLangs()->orderBy(['language_id' => 'ASC'])->one()->name; + } + ], + [ + 'class' => ActionColumn::className(), + 'template' => '{update} {delete}' + ] + ] +]); \ No newline at end of file diff --git a/common/modules/blog/views/category/update.php b/common/modules/blog/views/category/update.php new file mode 100755 index 0000000..57e81e3 --- /dev/null +++ b/common/modules/blog/views/category/update.php @@ -0,0 +1,18 @@ +title = Yii::t('app', 'Update category'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Categories'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + render('_form', [ + 'category_langs' => $category_langs, + 'category' => $category, + 'langs' => $langs, + 'images' => $images + ]) ?> + +
    diff --git a/common/modules/blog/views/default/index.php b/common/modules/blog/views/default/index.php new file mode 100755 index 0000000..efb5c35 --- /dev/null +++ b/common/modules/blog/views/default/index.php @@ -0,0 +1,7 @@ +value); \ No newline at end of file diff --git a/common/modules/blog/views/media/index.php b/common/modules/blog/views/media/index.php new file mode 100755 index 0000000..e536935 --- /dev/null +++ b/common/modules/blog/views/media/index.php @@ -0,0 +1,37 @@ + ['enctype' => 'multipart/form-data']]); + +echo $form->field($model, 'imageFile')->fileInput(['multiple' => 'multiple']); + +?> + your image +
    + 'btn btn-success']) ?> +
    + + diff --git a/common/modules/blog/views/test/index.php b/common/modules/blog/views/test/index.php new file mode 100755 index 0000000..f24ade0 --- /dev/null +++ b/common/modules/blog/views/test/index.php @@ -0,0 +1,11 @@ + $model, + 'form' => $form, + 'ajaxView' => '@common/modules/blog/views/ajax/_article_form_test', +]); +$form->end(); \ No newline at end of file diff --git a/common/modules/comment/Module.php b/common/modules/comment/Module.php new file mode 100755 index 0000000..cb0473c --- /dev/null +++ b/common/modules/comment/Module.php @@ -0,0 +1,89 @@ +db + */ + public $db = NULL; + + /** + * Key, used to encrypt and decrypt comment service data. + * + * @var string Encryption key + */ + public static $encryptionKey = 'artbox-comment'; + + /** + * Whether to enable comment rating or not. + * + * @var bool + */ + public static $enableRating = true; + + /** + * Initializes the module. + * This method is called after the module is created and initialized with property values + * given in configuration. The default implementation will initialize + * [[controllerNamespace]] if it is not set. If you override this method, please make sure + * you call the parent implementation. + */ + public function init() + { + if($this->userIdentityClass === NULL) { + $this->userIdentityClass = Yii::$app->getUser()->identityClass; + } + if($this->commentModelClass === NULL) { + $this->commentModelClass = CommentModel::className(); + } + if(self::$enableRating && $this->ratingModelClass === NULL) { + $this->ratingModelClass = RatingModel::className(); + } + if(\Yii::$app instanceof \yii\console\Application) { + $this->controllerNamespace = 'common\modules\comment\commands'; + } + if($this->db === NULL) { + $this->db = \Yii::$app->db; + } + Yii::setAlias('@artbox-comment', __DIR__); + parent::init(); + } + + } diff --git a/common/modules/comment/assets/CommentAsset.php b/common/modules/comment/assets/CommentAsset.php new file mode 100755 index 0000000..62492bc --- /dev/null +++ b/common/modules/comment/assets/CommentAsset.php @@ -0,0 +1,41 @@ + 'afterValidate', + ]; + } + + /** + * @param Event $event + */ + public function afterValidate($event) { + /** + * @var CommentModel $owner + */ + $owner = $this->owner; + if(!empty($owner->artbox_comment_pid)) { + /** + * @var CommentModel $parent + */ + $parent = CommentModel::find()->where(['artbox_comment_id' => $owner->artbox_comment_pid])->one(); + if(!empty($parent->artbox_comment_pid)) { + $owner->related_id = $owner->artbox_comment_pid; + $owner->artbox_comment_pid = $parent->artbox_comment_pid; + } + } + } + } \ No newline at end of file diff --git a/common/modules/comment/controllers/DefaultController.php b/common/modules/comment/controllers/DefaultController.php new file mode 100755 index 0000000..b4b0de0 --- /dev/null +++ b/common/modules/comment/controllers/DefaultController.php @@ -0,0 +1,139 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'create' => [ 'post' ], + 'delete' => [ + 'post', + 'delete', + ], + ], + ], + 'access' => [ + 'class' => AccessControl::className(), + 'only' => [ 'delete' ], + 'rules' => [ + [ + 'allow' => true, + 'roles' => [ '@' ], + ], + ], + ], + ]; + } + + /** + * Create comment. + * @return array|null|Response + */ + public function actionCreate(string $entity) + { + \Yii::$app->response->format = Response::FORMAT_JSON; + /* @var $module Module */ + $module = \Yii::$app->getModule(Module::$name); + $entity_data_json = \Yii::$app->getSecurity() + ->decryptByKey($entity, $module::$encryptionKey); + if($entity_data_json != false) { + $entity_data = Json::decode($entity_data_json); + $commentModelClass = $module->commentModelClass; + /** + * @var CommentModel $model + */ + $model = new $commentModelClass([ + 'scenario' => \Yii::$app->user->getIsGuest() ? $commentModelClass::SCENARIO_GUEST : $commentModelClass::SCENARIO_USER, + ]); + if($model->load(\Yii::$app->request->post())) { + $model->setAttributes($entity_data); + if($model->save()) { + if(empty( $model->artbox_comment_pid ) && $module::$enableRating) { + $ratingModelClass = $module->ratingModelClass; + /** + * @var RatingModel $rating + */ + $rating = new $ratingModelClass([ + 'model' => $model::className(), + 'model_id' => $model->primaryKey, + ]); + if($rating->load(\Yii::$app->request->post())) { + $rating->save(); + } + } + \Yii::$app->session->setFlash('artbox_comment_success', \Yii::t('artbox-comment', 'Comment posted')); + return [ 'status' => 'success' ]; + } else { + return [ + 'status' => 'error', + 'errors' => $model->getFirstErrors(), + ]; + } + } + } + return [ + 'status' => 'error', + 'message' => \Yii::t('artbox-comment', 'Oops, something went wrong. Please try again later.'), + ]; + } + + /** + * Delete comment. + * + * @param integer $id Comment ID + * + * @return string Comment text + */ + public function actionDelete($id) + { + \Yii::$app->response->format = Response::FORMAT_JSON; + $model = $this->findModel($id); + if($model->deleteComment()) { + return [ + 'status' => 'success', + 'message' => \Yii::t('yii2mod.comments', 'Comment has been deleted.'), + ]; + } else { + \Yii::$app->response->setStatusCode(500); + return \Yii::t('yii2mod.comments', 'Comment has not been deleted. Please try again!'); + } + } + + /** + * Find model by ID. + * + * @param integer|array $id Comment ID + * + * @return CommentModel + * @throws NotFoundHttpException + */ + protected function findModel(int $id): CommentModel + { + /** @var CommentModel $model */ + $commentModelClass = \Yii::$app->getModule(Module::$name)->commentModelClass; + if(( $model = $commentModelClass::findOne($id) ) !== NULL) { + return $model; + } else { + throw new NotFoundHttpException(\Yii::t('yii2mod.comments', 'The requested page does not exist.')); + } + } + } \ No newline at end of file diff --git a/common/modules/comment/controllers/ManageController.php b/common/modules/comment/controllers/ManageController.php new file mode 100755 index 0000000..3a63045 --- /dev/null +++ b/common/modules/comment/controllers/ManageController.php @@ -0,0 +1,108 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'index' => ['get'], + 'update' => ['get', 'post'], + 'delete' => ['post'], + ], + ], + ]; + } + + /** + * Lists all comments. + * + * @return mixed + */ + public function actionIndex() + { + $searchModel = new CommentModelSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + $commentModel = Yii::$app->getModule(Module::$name)->commentModelClass; + + return $this->render('index', [ + 'dataProvider' => $dataProvider, + 'searchModel' => $searchModel, + 'commentModel' => $commentModel + ]); + } + + /** + * Updates an existing CommentModel model. + * + * If update is successful, the browser will be redirected to the 'view' page. + * + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + Yii::$app->session->setFlash('artbox_comment_success', /*Yii::t('yii2mod.comments', 'Comment has been saved.')*/'Comment has been saved.'); + return $this->redirect(['index']); + } + + return $this->render('update', [ + 'model' => $model, + ]); + + } + + /** + * Deletes an existing CommentModel model. + * + * If deletion is successful, the browser will be redirected to the 'index' page. + * + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + Yii::$app->session->setFlash('artbox_comment_success', Yii::t('artbox-comment', 'Comment has been deleted.')); + return $this->redirect(['index']); + } + + /** + * Finds the CommentModel model based on its primary key value. + * + * If the model is not found, a 404 HTTP exception will be thrown. + * + * @param integer $id + * @return CommentModel the loaded model + * + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = CommentModel::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException(/*Yii::t('yii2mod.comments', 'The requested page does not exist.')*/'The requested page does not exist.'); + } + } +} \ No newline at end of file diff --git a/common/modules/comment/messages/config.php b/common/modules/comment/messages/config.php new file mode 100755 index 0000000..34cdfe6 --- /dev/null +++ b/common/modules/comment/messages/config.php @@ -0,0 +1,58 @@ + __DIR__ . DIRECTORY_SEPARATOR . '..', + // array, required, list of language codes that the extracted messages + // should be translated to. For example, ['zh-CN', 'de']. + 'languages' => ['en', 'ru'], + // string, the name of the function for translating messages. + // Defaults to 'Yii::t'. This is used as a mark to find the messages to be + // translated. You may use a string for single function name or an array for + // multiple function names. + 'translator' => 'Yii::t', + // boolean, whether to sort messages by keys when merging new messages + // with the existing ones. Defaults to false, which means the new (untranslated) + // messages will be separated from the old (translated) ones. + 'sort' => true, + // boolean, whether to remove messages that no longer appear in the source code. + // Defaults to false, which means each of these messages will be enclosed with a pair of '@@' marks. + 'removeUnused' => false, + // array, list of patterns that specify which files (not directories) should be processed. + // If empty or not set, all files will be processed. + // Please refer to "except" for details about the patterns. + 'only' => ['*.php'], + // array, list of patterns that specify which files/directories should NOT be processed. + // If empty or not set, all files/directories will be processed. + // A path matches a pattern if it contains the pattern string at its end. For example, + // '/a/b' will match all files and directories ending with '/a/b'; + // the '*.svn' will match all files and directories whose name ends with '.svn'. + // and the '.svn' will match all files and directories named exactly '.svn'. + // Note, the '/' characters in a pattern matches both '/' and '\'. + // See helpers/FileHelper::findFiles() description for more details on pattern matching rules. + // If a file/directory matches both a pattern in "only" and "except", it will NOT be processed. + 'except' => [ + '.svn', + '.git', + '.gitignore', + '.gitkeep', + '.hgignore', + '.hgkeep', + '/messages', + '/tests', + '/runtime', + '/vendor', + ], + + // 'php' output format is for saving messages to php files. + 'format' => 'php', + // Root directory containing message translations. + 'messagePath' => __DIR__, + // boolean, whether the message file should be overwritten with the merged messages + 'overwrite' => true, + + // Message categories to ignore + 'ignoreCategories' => [ + 'yii', + ], +]; diff --git a/common/modules/comment/messages/en/artbox-comment.php b/common/modules/comment/messages/en/artbox-comment.php new file mode 100755 index 0000000..3fef9ec --- /dev/null +++ b/common/modules/comment/messages/en/artbox-comment.php @@ -0,0 +1,60 @@ + 'ID', + 'Text' => 'Content', + 'Entity' => 'Entity', + 'Entity ID' => 'Entity ID', + 'Parent ID' => 'Parent ID', + 'Status' => 'Status', + 'Level' => 'Level', + 'User' => 'User', + 'Username' => 'User name', + 'Date add' => 'Date add', + 'Date update' => 'Date update', + 'Date delete' => 'Date delete', + 'Comment parent' => 'Parent comment', + 'Comment related' => 'Related comment', + 'Info' => 'Additional info', + 'Created by' => 'Created by', + 'Updated by' => 'Related to', + 'Related to' => 'Related to', + 'Created date' => 'Created date', + 'Updated date' => 'Updated date', + 'Update' => 'Update', + 'Delete' => 'Delete', + 'Reply' => 'Reply', + 'Comments ({0})' => 'Comments ({0})', + 'Comment cannot be blank.' => 'Comment cannot be blank.', + 'Comment has not been deleted. Please try again!' => 'Comment has not been deleted. Please try again!', + 'Add a comment...' => 'Add a comment...', + 'Comment' => 'Comment', + 'Oops, something went wrong. Please try again later.' => 'Oops, something went wrong. Please try again later.', + 'The requested page does not exist.' => 'The requested page does not exist.', + 'Comment has been deleted.' => 'Comment has been deleted.', + 'Comment has been saved.' => 'Comment has been saved.', + 'Click here to cancel reply.' => 'Click here to cancel reply.', + 'Comments Management' => 'Comments Management', + 'Select Status' => 'Select Status', + 'Select Author' => 'Select Author', + 'Update Comment: {0}' => 'Update Comment: {0}', + 'Active' => 'Active', + 'Deleted' => 'Deleted', + 'Comment posted' => 'Comment successfully added and will appear after moderator check.', +]; diff --git a/common/modules/comment/messages/ru/artbox-comment.php b/common/modules/comment/messages/ru/artbox-comment.php new file mode 100755 index 0000000..81b0d22 --- /dev/null +++ b/common/modules/comment/messages/ru/artbox-comment.php @@ -0,0 +1,59 @@ + 'Идентификатор', + 'Text' => 'Комментарий', + 'Entity' => 'Модель', + 'Entity ID' => 'Идентификатор модели', + 'Parent ID' => 'Родитель', + 'Status' => 'Статус', + 'Level' => 'Уровень', + 'User' => 'Пользователь', + 'Username' => 'Имя', + 'Date add' => 'Дата добавления', + 'Date update' => 'Дата обновления', + 'Date delete' => 'Дата удаления', + 'Comment parent' => 'Родитель', + 'Comment related' => 'Связзанный комментарий', + 'Info' => 'Дополнительная информация', + 'Created by' => 'Создан', + 'Updated by' => 'Обновлен', + 'Related to' => 'Относится к', + 'Created date' => 'Дата создания', + 'Updated date' => 'Дата обновления', + 'Update' => 'Обновить', + 'Delete' => 'Удалить', + 'Reply' => 'Ответить', + 'Comments ({0})' => 'Комментарии ({0})', + 'Comment cannot be blank.' => 'Комментарий не может быть пустым.', + 'Comment has not been deleted. Please try again!' => 'Не удалось удалить комментарий. Попробуйте пожалуйста еще раз!', + 'Add a comment...' => 'Добавить комментарий...', + 'Comment' => 'Опубликовать комментарий', + 'Oops, something went wrong. Please try again later.' => 'Не удалось добавить комментарий. Попробуйте пожалуйста еще раз.', + 'The requested page does not exist.' => 'Ошибка 404 - страница не найдена!', + 'Comment has been deleted.' => 'Комментарий был удалён.', + 'Comment has been saved.' => 'Комментарий был сохранён.', + 'Click here to cancel reply.' => 'Нажмите здесь, чтобы отменить ответ.', + 'Comments Management' => 'Управление Комментариями', + 'Select Status' => 'Выберите Статус', + 'Select Author' => 'Выберите Автора', + 'Update Comment: {0}' => 'Обновить комментарий: {0}', + 'Active' => 'Включён', + 'Deleted' => 'Удален', + 'Comment posted' => 'Комментарий успешно добавлен и появится после проверки администрацией.', + 'Submit' => 'Добавить комментарий', + 'Cancel' => 'Отменить', + 'Guest' => 'Гость', + ]; diff --git a/common/modules/comment/migrations/m160724_162347_artbox_comment.php b/common/modules/comment/migrations/m160724_162347_artbox_comment.php new file mode 100755 index 0000000..93028c3 --- /dev/null +++ b/common/modules/comment/migrations/m160724_162347_artbox_comment.php @@ -0,0 +1,54 @@ +createTable('{{%artbox_comment}}', [ + 'artbox_comment_id' => $this->primaryKey(), + 'text' => $this->text()->notNull(), + 'user_id' => $this->integer(), + 'username' => $this->string(), + 'email' => $this->string(), + 'date_add' => $this->integer()->notNull(), + 'date_update' => $this->integer()->notNull(), + 'date_delete' => $this->integer(), + 'status' => $this->integer()->notNull()->defaultValue(1), + 'artbox_comment_pid' => $this->integer(), + 'related_id' => $this->integer(), + 'ip' => $this->string()->notNull(), + 'info' => $this->text(), + ]); + + $this->addForeignKey('user_id_user', '{{%artbox_comment}}', 'user_id', 'customer', 'id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('artbox_comment_pid_artbox_comment', '{{%artbox_comment}}', 'artbox_comment_pid', 'artbox_comment', 'artbox_comment_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('related_id_artbox_comment', '{{%artbox_comment}}', 'related_id', 'artbox_comment', 'artbox_comment_id', 'CASCADE', 'CASCADE'); + + $this->createTable('{{%artbox_like}}', [ + 'artbox_like_id' => $this->primaryKey(), + 'artbox_comment_id' => $this->integer()->notNull(), + 'user_id' => $this->integer(), + 'date_add' => $this->integer()->notNull(), + 'is_like' => $this->integer()->notNull()->defaultValue(1), + ]); + + $this->addForeignKey('artbox_comment_id_artbox_comment', '{{%artbox_like}}', 'artbox_comment_id', 'artbox_comment', 'artbox_comment_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('user_id_user', '{{%artbox_like}}', 'user_id', 'customer', 'id', 'CASCADE', 'CASCADE'); + $this->createIndex('artbox_like_unique', '{{%artbox_like}}', ['artbox_comment_id', 'user_id', 'is_like'], true); + + } + + public function down() + { + $this->dropForeignKey('user_id_user', '{{%artbox_comment}}'); + $this->dropForeignKey('artbox_comment_pid_artbox_comment', '{{%artbox_comment}}'); + $this->dropForeignKey('related_id_artbox_comment', '{{%artbox_comment}}'); + $this->dropForeignKey('artbox_comment_id_artbox_comment', '{{%artbox_like}}'); + $this->dropForeignKey('user_id_user', '{{%artbox_like}}'); + $this->dropIndex('artbox_like_unique', '{{%artbox_like}}'); + $this->dropTable('{{%artbox_comment}}'); + $this->dropTable('{{%artbox_like}}'); + } +} diff --git a/common/modules/comment/migrations/m160726_092634_add_entity_fields.php b/common/modules/comment/migrations/m160726_092634_add_entity_fields.php new file mode 100755 index 0000000..16d8193 --- /dev/null +++ b/common/modules/comment/migrations/m160726_092634_add_entity_fields.php @@ -0,0 +1,18 @@ +addColumn('{{%artbox_comment}}', 'entity', $this->string()->notNull()->defaultValue('')); + $this->addColumn('{{%artbox_comment}}', 'entity_id', $this->integer()->notNull()->defaultValue(1)); + } + + public function down() + { + $this->dropColumn('{{%artbox_comment}}', 'entity'); + $this->dropColumn('{{%artbox_comment}}', 'entity_id'); + } +} diff --git a/common/modules/comment/migrations/m160726_211227_create_artbox_comment_rating.php b/common/modules/comment/migrations/m160726_211227_create_artbox_comment_rating.php new file mode 100755 index 0000000..2f0848e --- /dev/null +++ b/common/modules/comment/migrations/m160726_211227_create_artbox_comment_rating.php @@ -0,0 +1,31 @@ +createTable('{{%artbox_comment_rating}}', [ + 'artbox_comment_rating_id' => $this->primaryKey(), + 'date_add' => $this->integer() + ->notNull(), + 'date_update' => $this->integer() + ->notNull(), + 'user_id' => $this->integer(), + 'value' => $this->float(), + 'model' => $this->string() + ->notNull(), + 'model_id' => $this->integer() + ->notNull(), + ]); + $this->addForeignKey('user_id_user', '{{%artbox_comment_rating}}', 'user_id', 'customer', 'id', 'CASCADE', 'CASCADE'); + } + + public function down() + { + $this->dropForeignKey('user_id_user', '{{%artbox_comment_rating}}'); + $this->dropTable('{{%artbox_comment_rating}}'); + } + } diff --git a/common/modules/comment/models/CommentModel.php b/common/modules/comment/models/CommentModel.php new file mode 100755 index 0000000..d7ca4d6 --- /dev/null +++ b/common/modules/comment/models/CommentModel.php @@ -0,0 +1,245 @@ + self::SCENARIO_GUEST, + ], + [ + [ + 'text', + 'entity', + 'username', + ], + 'string', + ], + [ + [ + 'email', + ], + 'email', + ], + [ + [ 'entity_id', 'artbox_comment_pid' ], + 'integer', + ], + [ + [ 'status' ], + 'default', + 'value' => 0, + ], + [ + ['artbox_comment_pid'], + 'exist', + 'targetAttribute' => 'artbox_comment_id', + 'skipOnError' => true, + ], + ]; + } + + public function behaviors() + { + return [ + [ + 'class' => TimestampBehavior::className(), + 'createdAtAttribute' => 'date_add', + 'updatedAtAttribute' => 'date_update', + ], + [ + 'class' => BlameableBehavior::className(), + 'createdByAttribute' => 'user_id', + 'updatedByAttribute' => false, + ], + [ + 'class' => AttributeBehavior::className(), + 'attributes' => [ + ActiveRecord::EVENT_BEFORE_INSERT => 'ip', + ], + 'value' => function($event) { + return \Yii::$app->request->userIP; + }, + ], + [ + 'class' => ParentBehavior::className(), + ], + [ + 'class' => RatingBehavior::className(), + ], + [ + 'class' => NotifyBehavior::className(), + ], + ]; + } + + public function attributeLabels() + { + return [ + 'artbox_comment_id' => \Yii::t('artbox-comment', 'ID'), + 'text' => \Yii::t('artbox-comment', 'Text'), + 'user_id' => \Yii::t('artbox-comment', 'User'), + 'username' => \Yii::t('artbox-comment', 'Username'), + 'email' => 'Email', + 'date_add' => \Yii::t('artbox-comment', 'Date add'), + 'date_update' => \Yii::t('artbox-comment', 'Date update'), + 'date_delete' => \Yii::t('artbox-comment', 'Date delete'), + 'status' => \Yii::t('artbox-comment', 'Status'), + 'artbox_comment_pid' => \Yii::t('artbox-comment', 'Comment parent'), + 'related_id' => \Yii::t('artbox-comment', 'Comment related'), + 'ip' => 'IP', + 'entity' => \Yii::t('artbox-comment', 'Entity'), + 'info' => \Yii::t('artbox-comment', 'Info'), + 'entity_id' => \Yii::t('artbox-comment', 'Entity ID'), + ]; + } + + function setEntity(string $entity) + { + $this->entity = $entity; + } + + function getEntity(): string + { + return $this->entity; + } + + static function getTree(string $entity, int $entityId): ActiveDataProvider + { + return new ActiveDataProvider([ + 'query' => self::find() + ->with([ + 'children', + 'user', + 'children.user', + ]) + ->where([ + 'entity' => $entity, + 'entity_id' => $entityId, + 'status' => 1, + 'artbox_comment_pid' => NULL, + ]), + 'pagination' => [ + 'pageSize' => 20, + ], + 'sort' => [ + 'defaultOrder' => [ + 'date_add' => SORT_DESC, + ], + ], + ]); + } + + function deleteComment(): bool { + if(\Yii::$app->user->id != NULL && \Yii::$app->user->id == $this->user_id) { + if($this->delete()) { + return true; + } + } + return false; + } + + function setEntityId(int $entityId) + { + $this->entityId = $entityId; + } + + function getEntityId(): int + { + return $this->entityId; + } + + function getChildren() + { + return $this->hasMany(self::className(), [ 'artbox_comment_pid' => 'artbox_comment_id' ]) + ->andFilterWhere(['status' => self::STATUS_ACTIVE]) + ->inverseOf('parent'); + } + + function getParent() + { + return $this->hasOne(self::className(), [ 'artbox_comment_id' => 'artbox_comment_pid' ]) + ->inverseOf('children'); + } + + function getUser() + { + $module = \Yii::$app->getModule('artbox-comment'); + return $this->hasOne($module->userIdentityClass, [ 'id' => 'user_id' ]); + } + + function getRating() + { + return $this->hasOne(RatingModel::className(), ['model_id' => 'artbox_comment_id'])->andWhere(['or', ['artbox_comment_rating.model' => NULL], ['artbox_comment_rating.model' => self::className()] ]); + } + } \ No newline at end of file diff --git a/common/modules/comment/models/CommentModelSearch.php b/common/modules/comment/models/CommentModelSearch.php new file mode 100755 index 0000000..7c3b9cb --- /dev/null +++ b/common/modules/comment/models/CommentModelSearch.php @@ -0,0 +1,204 @@ + 0, + ], + [ + [ + 'rating_value', + ], + 'number', + 'min' => 1, + 'max' => 5, + ], + [ + [ + 'user_id', + 'text', + 'username', + 'email', + 'ip', + 'entity', + 'info', + ], + 'safe', + ], + ]; + } + + public function attributeLabels() + { + return array_merge(parent::attributeLabels(), [ + 'rating_value' => 'Рейтинг', + 'children_count' => 'Количество ответов', + ]); + } + + /** + * @inheritdoc + */ + public function scenarios() + { + // bypass scenarios() implementation in the parent class + return Model::scenarios(); + } + + /** + * Creates data provider instance with search query applied + * + * @param array $params + * + * @return ActiveDataProvider + */ + public function search($params) + { + $query = CommentModel::find() + ->joinWith([ + 'rating', + 'user', + ]); + + // add conditions that should always apply here + + $dataProvider = new ActiveDataProvider([ + 'query' => $query, + 'sort' => [ + 'attributes' => [ + 'rating_value' => [ + 'asc' => [ 'artbox_comment_rating.value' => SORT_ASC ], + 'desc' => [ 'artbox_comment_rating.value' => SORT_DESC ], + ], + 'artbox_comment_id', + 'date_add', + 'text', + 'user_id', + 'status', + 'entity', + 'entity_id', + ], + 'defaultOrder' => [ + 'date_add' => SORT_DESC, + ], + ], + ]); + + $this->load($params); + + if(!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + // grid filtering conditions + $query->andFilterWhere([ + 'artbox_comment_id' => $this->artbox_comment_id, + 'date_add' => $this->date_add, + 'date_update' => $this->date_update, + 'date_delete' => $this->date_delete, + 'artbox_comment.status' => $this->status, + 'artbox_comment_pid' => $this->artbox_comment_pid, + 'related_id' => $this->related_id, + 'entity_id' => $this->entity_id, + ]); + + $query->andFilterWhere([ + 'like', + 'text', + $this->text, + ]) + ->andFilterWhere([ + 'like', + 'username', + $this->username, + ]) + ->andFilterWhere([ + 'like', + 'email', + $this->email, + ]) + ->andFilterWhere([ + 'like', + 'ip', + $this->ip, + ]) + ->andFilterWhere([ + 'like', + 'entity', + $this->entity, + ]) + ->andFilterWhere([ + 'like', + 'info', + $this->info, + ]) + ->andFilterWhere([ + 'artbox_comment_rating.value' => $this->rating_value, + ]); + + if(!empty( $this->user_id )) { + $query->andWhere([ + 'or', + [ 'artbox_comment.user_id' => (int) $this->user_id ], + [ + 'like', + 'user.username', + $this->user_id, + ], + [ + 'like', + 'artbox_comment.username', + $this->user_id, + ], + [ + 'like', + 'artbox_comment.email', + $this->user_id, + ], + ]); + } + + return $dataProvider; + } + } diff --git a/common/modules/comment/models/LikeModel.php b/common/modules/comment/models/LikeModel.php new file mode 100755 index 0000000..8ad420e --- /dev/null +++ b/common/modules/comment/models/LikeModel.php @@ -0,0 +1,14 @@ + 0.5, 'max' => 5], + ]; + } + + public function behaviors() + { + return [ + [ + 'class' => TimestampBehavior::className(), + 'createdAtAttribute' => 'date_add', + 'updatedAtAttribute' => 'date_update', + ], + [ + 'class' => BlameableBehavior::className(), + 'createdByAttribute' => 'user_id', + 'updatedByAttribute' => false, + ], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'rating_id' => Yii::t('app', 'Rating ID'), + 'date_add' => Yii::t('app', 'Date Add'), + 'date_update' => Yii::t('app', 'Date Update'), + 'user_id' => Yii::t('app', 'User ID'), + 'entity' => Yii::t('app', 'Entity'), + 'value' => Yii::t('app', 'Value'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getUser() + { + return $this->hasOne(\common\models\User::className(), ['id' => 'user_id']); + } + + public function getModel() + { + $model = $this->model; + return $this->hasOne($model, [$model::primaryKey() => 'model_id']); + } +} diff --git a/common/modules/comment/models/interfaces/CommentInterface.php b/common/modules/comment/models/interfaces/CommentInterface.php new file mode 100755 index 0000000..4c5bd1d --- /dev/null +++ b/common/modules/comment/models/interfaces/CommentInterface.php @@ -0,0 +1,23 @@ +1?(f("min",isNaN(f("min"))?Number(h[0].options[0].value):f("min")),f("max",Number(h[0].options[h[0].length-1].value)),f("step",Number(h[0].options[1].value)-Number(h[0].options[0].value)),b=h.find("option[selected]"),b.length==1&&f("value",b.val())):f("value",h.val())),g=c[0].nodeName=="DIV"?"div":"span",e++,nt=' + + +
    +
    + $stock): ?> +
    +
    + isNewRecord) { + echo Html::activeHiddenInput($stock, "[{$i}]stock_id"); + } + ?> +
    +
    + field($stock, "[{$i}]quantity")->textInput(['maxlength' => true]) ?> +
    +
    + field($stock, "[{$i}]name")->textInput(['maxlength' => true]) ?> +
    +
    + +
    +
    +
    +
    + +
    +
    + + + + field($model, 'product_unit_id')->dropDownList( + ArrayHelper::map(\common\modules\product\models\ProductUnit::find()->all(), 'product_unit_id', 'name'), + [ + 'prompt' => Yii::t('product', 'Unit'), + ])->label(Yii::t('product', 'Unit')) ?> + + + all() as $group) :?> + field($model, 'options')->checkboxList( + ArrayHelper::map($group->options, 'tax_option_id', 'ValueRenderFlash'), + [ + 'multiple' => true, + 'unselect' => null, + ] + )->label($group->name);?> + + + +
    + isNewRecord ? Yii::t('product', 'Create') : Yii::t('product', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
    + + + + diff --git a/common/modules/product/views/variant/_search.php b/common/modules/product/views/variant/_search.php new file mode 100755 index 0000000..00015dc --- /dev/null +++ b/common/modules/product/views/variant/_search.php @@ -0,0 +1,31 @@ + + + diff --git a/common/modules/product/views/variant/create.php b/common/modules/product/views/variant/create.php new file mode 100755 index 0000000..1c3d2de --- /dev/null +++ b/common/modules/product/views/variant/create.php @@ -0,0 +1,23 @@ +title = Yii::t('product', 'Create Product'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Products'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + + render('_form', [ + 'model' => $model, + 'groups' => $groups, + 'stocks' => $stocks, + ]) ?> + +
    diff --git a/common/modules/product/views/variant/index.php b/common/modules/product/views/variant/index.php new file mode 100755 index 0000000..4355909 --- /dev/null +++ b/common/modules/product/views/variant/index.php @@ -0,0 +1,96 @@ +title = Yii::t('product', 'Variants'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Products'), 'url' => ['/product/manage']]; +if (!empty($product)) { + $this->params['breadcrumbs'] = [ + ['label' => Yii::t('product', 'Variants'), 'url' => ['/product/variant']], + $product->fullname + ]; +} else { + $this->params['breadcrumbs'][] = $this->title; +} +?> +
    + +

    title) ?>

    + render('_search', ['model' => $searchModel]); ?> + +

    + $product_id]), ['class' => 'btn btn-success']) ?> +

    + $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + [ + 'attribute' => 'product_id', + 'value' => 'fullname', + 'label' => Yii::t('product', 'Name'), + 'filter' => \kartik\select2\Select2::widget([ + 'model' => $searchModel, + 'attribute' => 'product_id', + 'data' => \yii\helpers\ArrayHelper::map(\common\modules\product\models\Product::find()->orderBy(['name' => 'ASC'])->all(), 'product_id', 'name'), + 'language' => 'ru', + 'options' => [ + 'placeholder' => Yii::t('product', 'Select product'), + 'multiple' => false, + ], + 'pluginOptions' => [ + 'allowClear' => true + ], + ]), + ], + 'sku', + 'price', + 'price_old', + 'stock', + + [ + 'class' => 'yii\grid\ActionColumn', + 'buttons' => [ + 'view' => function ($url, $model) + { + return Html::a ( + '', + Url::to(['view','product_id'=> $model->product_id, 'id' => $model->product_variant_id]), + [ + 'title' => "Просмотр", + ] + ); + }, + 'update' => function ($url, $model) + { + return Html::a ( + '', + Url::to(['update','product_id'=> $model->product_id, 'id' => $model->product_variant_id]), + [ + 'title' => "Редактировать", + ] + ); + }, + 'delete' => function ($url, $model) + { + + return Html::a('', Url::to(['delete','product_id'=> $model->product_id, 'id' => $model->product_variant_id]), [ + 'title' => Yii::t('yii', 'Delete'), + 'data-confirm' => Yii::t('yii', 'Are you sure to delete this item?'), + 'data-method' => 'post', + ]); + + }, + ], + ], + ], + ]); ?> +
    diff --git a/common/modules/product/views/variant/update.php b/common/modules/product/views/variant/update.php new file mode 100755 index 0000000..a146f7d --- /dev/null +++ b/common/modules/product/views/variant/update.php @@ -0,0 +1,27 @@ +title = Yii::t('product', 'Update {modelClass}: ', [ + 'modelClass' => 'Product', +]) . ' ' . $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Products'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->product->name, 'url' => ['view', 'id' => $model->product->product_id]]; +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Variants'), 'url' => Url::to(['/product/variant', 'product_id' => $model->product->product_id])]; +$this->params['breadcrumbs'][] = Yii::t('product', 'Update'); +?> +
    + +

    title) ?>

    + + render('_form', [ + 'model' => $model, + 'groups' => $groups, + 'stocks' => $stocks, + ]) ?> + +
    diff --git a/common/modules/product/views/variant/view.php b/common/modules/product/views/variant/view.php new file mode 100755 index 0000000..5eaecd8 --- /dev/null +++ b/common/modules/product/views/variant/view.php @@ -0,0 +1,42 @@ +title = $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Products'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->product->name, 'url' => ['view', 'id' => $model->product->product_id]]; +$this->params['breadcrumbs'][] = ['label' => Yii::t('product', 'Variants'), 'url' => ['/product/variant?product_id='. $model->product->product_id]]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + +

    + $model->product_variant_id], ['class' => 'btn btn-primary']) ?> + $model->product_variant_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('product', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> +

    + + $model, + 'attributes' => [ + 'product_id', + 'name', + 'fullname', + 'brand.name', + 'category.name', + 'image.imageUrl:image' + ], + ]) ?> + +
    diff --git a/common/modules/product/widgets/brandsCarouselWidget.php b/common/modules/product/widgets/brandsCarouselWidget.php new file mode 100755 index 0000000..d907530 --- /dev/null +++ b/common/modules/product/widgets/brandsCarouselWidget.php @@ -0,0 +1,21 @@ +with('brandName')->all(); + return $this->render('brandsCarousel', [ + 'brands' => $brands, + ]); + } +} \ No newline at end of file diff --git a/common/modules/product/widgets/catalogSubmenuWidget.php b/common/modules/product/widgets/catalogSubmenuWidget.php new file mode 100755 index 0000000..ef9388f --- /dev/null +++ b/common/modules/product/widgets/catalogSubmenuWidget.php @@ -0,0 +1,36 @@ +root_id); + + $categories = $rootCategory->getAllChildren(2, [], 'categoryName')->all(); + $populary = []; + foreach($categories as $category) { + if ($category->populary) { + $populary[] = $category; + } + } + + return $this->render('submenu', [ + 'rootCategory' => $rootCategory, + 'rootClass' => $this->rootClass, + 'populary' => $populary, + 'items' => $rootCategory->buildTree($categories, $rootCategory->category_id) + ]); + } +} \ No newline at end of file diff --git a/common/modules/product/widgets/lastProducts.php b/common/modules/product/widgets/lastProducts.php new file mode 100755 index 0000000..ab00838 --- /dev/null +++ b/common/modules/product/widgets/lastProducts.php @@ -0,0 +1,22 @@ +render('products_block', [ + 'title' => \Yii::t('product', 'Вы недавно просматривали'), + 'class' => 'last-products', + 'products' => ProductHelper::getLastProducts(true), + ]); + } +} \ No newline at end of file diff --git a/common/modules/product/widgets/similarProducts.php b/common/modules/product/widgets/similarProducts.php new file mode 100755 index 0000000..aebd754 --- /dev/null +++ b/common/modules/product/widgets/similarProducts.php @@ -0,0 +1,35 @@ +product, $this->count); + + if (!$this->title) { + $this->title = Yii::t('product', 'Similar products'); + } + + return $this->render('products_block', [ + 'title' => $this->title, + 'class' => 'similar-products', + 'products' => $products, + ]); + } +} \ No newline at end of file diff --git a/common/modules/product/widgets/specialProducts.php b/common/modules/product/widgets/specialProducts.php new file mode 100755 index 0000000..dd2e00b --- /dev/null +++ b/common/modules/product/widgets/specialProducts.php @@ -0,0 +1,47 @@ +type, $this->count, $this->sort); + + if (!$this->title) { + switch($this->type) { + case 'top': + $this->title = Yii::t('product', 'Top products'); + break; + case 'promo': + $this->title = Yii::t('product', 'Promo products'); + break; + case 'new': + $this->title = Yii::t('product', 'New products'); + break; + } + } + + return $this->render('products_block', [ + 'title' => $this->title, + 'class' => $this->type, + 'products' => $products, + ]); + } +} \ No newline at end of file diff --git a/common/modules/product/widgets/views/brandsCarousel.php b/common/modules/product/widgets/views/brandsCarousel.php new file mode 100755 index 0000000..0d76762 --- /dev/null +++ b/common/modules/product/widgets/views/brandsCarousel.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/common/modules/product/widgets/views/product_smart.php b/common/modules/product/widgets/views/product_smart.php new file mode 100755 index 0000000..b47be81 --- /dev/null +++ b/common/modules/product/widgets/views/product_smart.php @@ -0,0 +1,64 @@ + +
    +
    + + is_top) || !empty($product->is_new) || !empty($product->akciya)) :?> +
      + is_top)) :?> +
    • top
    • + + is_new)) :?> +
    • new
    • + + akciya)) :?> +
    • promo
    • + +
    + + name ?> + + +
    +

    + enabledVariants[0]->price_old != 0 && $product->enabledVariants[0]->price_old != $product->enabledVariants[0]->price) :?> + enabledVariants[0]->price_old ?> грн.  + + enabledVariants[0]->price?> грн.

    +
    +
    + + Купить + + +
    \ No newline at end of file diff --git a/common/modules/product/widgets/views/products_block.php b/common/modules/product/widgets/views/products_block.php new file mode 100755 index 0000000..feae4a3 --- /dev/null +++ b/common/modules/product/widgets/views/products_block.php @@ -0,0 +1,31 @@ + + +
    +
    + + +
    +
    +
    + registerJs($js, View::POS_READY); + ?> + \ No newline at end of file diff --git a/common/modules/product/widgets/views/submenu.php b/common/modules/product/widgets/views/submenu.php new file mode 100755 index 0000000..1a5a82f --- /dev/null +++ b/common/modules/product/widgets/views/submenu.php @@ -0,0 +1,50 @@ + diff --git a/common/modules/relation/Module.php b/common/modules/relation/Module.php new file mode 100755 index 0000000..f7cac20 --- /dev/null +++ b/common/modules/relation/Module.php @@ -0,0 +1,40 @@ +render('index'); + } +} diff --git a/common/modules/relation/controllers/ManageController.php b/common/modules/relation/controllers/ManageController.php new file mode 100755 index 0000000..49242a1 --- /dev/null +++ b/common/modules/relation/controllers/ManageController.php @@ -0,0 +1,238 @@ + [ + 'class' => ContentNegotiator::className(), + 'only' => ['autocomplete'], + 'formats' => [ 'application/json' => Response::FORMAT_JSON], + 'languages' => [ + 'ru', + ], + ],*/ + ]; + } + + /** + * Renders the relations view + * @return string + */ + public function actionIndex() + { + $relations = relationHelper::getRelations(); + $list = []; + foreach ($relations as $key => $relation) { + $list[] = [ + 'key' => $key, + 'name' => $relation['name'], + 'entity1_label' => $relation['entity1']['label'], + 'entity1_model' => $relation['entity1']['model'], + 'entity2_label' => $relation['entity2']['label'], + 'entity2_model' => $relation['entity2']['model'], + ]; + } + return $this->render('relations', [ + 'relations' => $list + ]); + } + /** + * Renders the pars view for + * @return string + */ + public function actionPars($relation) + { + $relation_key = strtolower($relation); + $relation = relationHelper::getRelation($relation_key); + + $dataProvider = new ActiveDataProvider([ + 'query' => $relation['via']['model']::find(), + ]); + + return $this->render('pars', [ + 'dataProvider' => $dataProvider, + 'relation_key' => $relation_key, + 'relation' => $relation, + ]); + } + + public function actionCreate($relation) { + $relation_key = strtolower($relation); + $relation = relationHelper::getRelation($relation_key); + + $model = new $relation['via']['model']; + + if ($model->load(Yii::$app->request->post())) { + $model->save(); + return $this->redirect(['pars', 'relation' => $relation_key]); +// return $this->redirect(['update', 'id' => $model->{$relation['entity1']['linked_key']}. ':' .$model->{$relation['entity2']['linked_key']}]); + } else { + return $this->render('create', [ + 'model' => $model, +// 'items1' => $query1->limit(100)->all(), +// 'items2' => $query2->asArray()->all(), + 'relation_key' => $relation_key, + 'relation' => $relation, + ]); + } + } + + /** + * Updates an existing TaxGroup model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($relation, $id) { + $relation_key = strtolower($relation); + $relation = relationHelper::getRelation($relation_key); + + list($id1, $id2) = explode(':', $id); + + $model = $this->findModel($relation_key, $id1, $id2); + + if ($model->load(Yii::$app->request->post())) { + $connection = Yii::$app->getDb(); + $transaction = $connection->beginTransaction(); + try { + // Delete links from viaTable + $connection->createCommand() + ->update + ( + $relation['linked_table'], + [ + $relation['entity1']['linked_key'] => $model->getAttribute($relation['entity1']['linked_key']), + $relation['entity2']['linked_key'] => $model->getAttribute($relation['entity2']['linked_key']) + ], + $this->getWhere($relation_key, $id1, $id2) + ) + ->execute(); + $transaction->commit(); + } catch (Exception $ex) { + $transaction->rollback(); + throw $ex; + } + + return $this->redirect(['pars', 'relation' => $relation_key]); + } else { + return $this->render('update', [ + 'model' => $model, + 'value1' => $model->entity1->getAttribute($relation['entity1']['listField']), + 'value2' => $model->entity2->getAttribute($relation['entity2']['listField']), + 'relation_key' => $relation_key, + 'relation' => $relation, + ]); + } + } + + /** + * Deletes an existing TaxGroup model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($relation, $id) + { + $relation_key = strtolower($relation); + $relation = relationHelper::getRelation($relation_key); + + list($id1, $id2) = explode(':', $id); + + $connection = Yii::$app->getDb(); + $transaction = $connection->beginTransaction(); + try { + // Delete links from viaTable + $connection->createCommand() + ->delete + ( + $relation['linked_table'], + $this->getWhere($relation_key, $id1, $id2) + ) + ->execute(); + $transaction->commit(); + } catch (Exception $ex) { + $transaction->rollback(); + throw $ex; + } + + return $this->redirect(['pars', 'relation' => $relation_key]); + } + + public function actionAutocomplete() { + $relation_key = Yii::$app->request->get('relation_key'); + $entity = Yii::$app->request->get('entity'); + $term = Yii::$app->request->get('term'); + $relation_key = strtolower($relation_key); + $relation = relationHelper::getRelation($relation_key); + + /** @var ActiveQuery $query */ + $query = $relation[$entity]['model']::find(); + + if (!empty($relation[$entity]['searchJoin'])) { + $query->innerJoinWith($relation[$entity]['searchJoin']); + } + if (!empty($relation[$entity]['where'])) { + $query->where($relation[$entity]['where']); + } + $query->where(['ilike', $relation[$entity]['searchField'], $term]); + + print json_encode(ArrayHelper::map($query->limit(50)->all(), $relation[$entity]['key'], $relation[$entity]['listField'])); + exit; + } + + /** + * Finds the based model for relation on its primaries keys value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param string $relation + * @param integer $id1 + * @param integer $id2 + * @return ActiveRecord the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($relation, $id1, $id2) + { + $relation_key = strtolower($relation); + $relation = relationHelper::getRelation($relation_key); + if (($model = $relation['via']['model']::findOne($this->getWhere($relation_key, $id1, $id2))) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } + + protected function getWhere($relation_key, $id1, $id2) { + $relation = relationHelper::getRelation($relation_key); + // @todo Just think - if you need to search keys in the reverse order + $where = [ + $relation['entity1']['linked_key'] => $id1, + $relation['entity2']['linked_key'] => $id2, + ]; + if (!empty($relation['alias'])) { + $where[$relation['alias']] = $relation_key; + } + return $where; + } + +} diff --git a/common/modules/relation/models/Relation.php b/common/modules/relation/models/Relation.php new file mode 100755 index 0000000..a7fe4df --- /dev/null +++ b/common/modules/relation/models/Relation.php @@ -0,0 +1,78 @@ + 50] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'alias' => Yii::t('relation', 'Alias'), + 'entity1_id' => Yii::t('relation', 'Entity1 ID'), + 'entity2_id' => Yii::t('relation', 'Entity2 ID'), + 'entity1' => Yii::t('relation', 'Entity1 ID'), + 'entity2' => Yii::t('relation', 'Entity2 ID'), + ]; + } + + /** + * @inheritdoc + * @return RelationQuery the active query used by this AR class. + */ + public static function find() + { + return new RelationQuery(get_called_class()); + } + + public function getRelationSection() { + return relationHelper::getRelation($this->alias); + } + + public function getEntity1() { + return $this->getEntity('entity1'); + } + + public function getEntity2() { + return $this->getEntity('entity2'); + } + + protected function getEntity($entity) { + $relation = $this->getRelationSection(); + if (!$relation) + return; + return $this->hasOne($relation[$entity]['model']::className(), [$relation[$entity]['key'] => $relation[$entity]['linked_key']]); + } +} diff --git a/common/modules/relation/models/RelationQuery.php b/common/modules/relation/models/RelationQuery.php new file mode 100755 index 0000000..7948f50 --- /dev/null +++ b/common/modules/relation/models/RelationQuery.php @@ -0,0 +1,35 @@ +andWhere('[[status]]=1'); + return $this; + }*/ + + /** + * @inheritdoc + * @return Relation[]|array + */ + public function all($db = null) + { + return parent::all($db); + } + + /** + * @inheritdoc + * @return Relation|array|null + */ + public function one($db = null) + { + return parent::one($db); + } +} \ No newline at end of file diff --git a/common/modules/relation/relationBehavior.php b/common/modules/relation/relationBehavior.php new file mode 100755 index 0000000..138977f --- /dev/null +++ b/common/modules/relation/relationBehavior.php @@ -0,0 +1,243 @@ +relations as $relation_key => &$relation) { + if (is_string($relation)) { + // Get data from module's data + $relation_entity = $relation; + $relation = $this->_getRelationParams($relation_key); + $relation['inner'] = $relation[$relation_entity]; + $relation['outer'] = $relation[$relation_entity == 'entity1' ? 'entity2' : 'entity1']; + $relation['linked_table'] = $relation['via']['model']::tableName(); + if (!empty($relation['via']['alias'])) { + $relation['linked_alias'] = $relation['via']['alias']; + } + } + $this->fields[$relation['field']] = $relation_key; + + } + } + + /* + * Events for auto-drive relations data + */ + public function events() + { + return [ + ActiveRecord::EVENT_AFTER_INSERT => 'relationsAfterSave', + ActiveRecord::EVENT_AFTER_UPDATE => 'relationsAfterSave', + ActiveRecord::EVENT_BEFORE_DELETE => 'relationBeforeDelete', + ]; + } + + public function relationsAfterSave($insert) { + + if (is_array($modelPrimaryKey = $this->owner->getPrimaryKey())) { + throw new ErrorException('This behavior does not support composite primary keys'); + } + + foreach ($this->relations as $relation_key => $relation) { + if (empty($relation['field']) || !is_array($this->{$relation['field']})) + continue; + + $values = $this->{$relation['field']}; + + /** @var ActiveRecord $model */ + $model = new $relation['inner']['model']; + + $connection = $model::getDb(); + $transaction = $connection->beginTransaction(); + + $delete_where = [$relation['inner']['linked_key'] => $this->owner->{$relation['inner']['key']}]; + if (!empty($relation['linked_alias'])) { + $delete_where[$relation['linked_alias']] = $relation_key; + } + + try { + // Delete all links from viaTable + $connection->createCommand() + ->delete + ( + $relation['linked_table'], + $delete_where + ) + ->execute(); + + if (!empty($values)) { + + foreach($values as $value) { + $insertData = [ + $relation['inner']['linked_key'] => $this->owner->{$relation['inner']['key']}, + $relation['outer']['linked_key'] => $value + ]; + if (!empty($relation['linked_alias'])) { + $insertData[$relation['linked_alias']] = $relation_key; + } + + + $connection->createCommand() + ->insert + ( + $relation['linked_table'], + $insertData + ) + ->execute(); + } + } + $transaction->commit(); + +// $model->link($relation_key, ) + } catch (Exception $ex) { +// var_dump($relation_key, $relation);exit; + $transaction->rollback(); + throw $ex; + } + } + } + + public function relationBeforeDelete() { + if (is_array($modelPrimaryKey = $this->owner->getPrimaryKey())) { + throw new ErrorException('This behavior does not support composite primary keys'); + } + foreach ($this->relations as $relation_key => $relation) { + if (empty($relation['field'])) + continue; + $values = $this->{$relation['field']}; + + /** @var ActiveRecord $model */ + $model = new $relation['inner']['model']; + + $connection = $model::getDb(); + $transaction = $connection->beginTransaction(); + + // @todo Refix to ActiveRecord format + try { + // Delete all links from viaTable + $connection->createCommand() + ->delete + ( + $relation['linked_table'], + [$relation['inner']['linked_key'] => $this->owner->{$relation['inner']['key']}] + ) + ->execute(); + $transaction->commit(); + } catch (Exception $ex) { + $transaction->rollback(); + throw $ex; + } + } + } + + /** + * Get related data for $relation + * @params string $relation Relation key + */ + public function getRelations($relation) { + $relation = $this->_getRelation($relation); + return + $this->owner + ->hasMany($relation['outer']['model'], [$relation['outer']['key'] => $relation['outer']['linked_key']]) + ->viaTable($relation['linked_table'], [$relation['inner']['linked_key'] => $relation['inner']['key']]); + } + + /* + * Get relation params for $relation + * @param string $relation Relation key + */ + protected function _getRelation($relation) { + $relation = strtolower($relation); + return isset($this->relations[$relation]) ? $this->relations[$relation] : null; + } + + /** + * Return relation data from main app config + * @params string $section Relations key + */ + protected function _getRelationParams($section) { + $relation = relationHelper::getRelation($section); + if (!$relation) + throw new Exception('Relation "' . $section . '" not set on this application.'); + return $relation; + } + + protected function _getRelationNameByField($field) { + return isset($this->fields[$field]) ? $this->fields[$field] : null; + } + + protected function _getRelationByField($field) { + return ( isset($this->fields[$field]) && isset($this->relations[$this->fields[$field]]) ) ? $this->relations[$this->fields[$field]] : null; + } + + /** + * @inheritdoc + */ + public function canGetProperty($name, $checkVars = true) + { + return true; + } + + /** + * @inheritdoc + */ + public function canSetProperty($name, $checkVars = true) + { + return array_key_exists($name, $this->fields) ? + true : parent::canSetProperty($name, $checkVars = true); + } + + /** + * @inheritdoc + */ + public function __set($name, $value) { + if (isset($this->fields[$name])) { + $this->values[$name] = $value; + } + } + + /** + * @inheritdoc + */ + public function __get($name) { + if (isset($this->values[$name])) { + return $this->values[$name]; + } else { + $relation_key = $this->_getRelationNameByField($name); + if (!$relation_key) + return; + + return $this->getRelations($relation_key); + } + } +} \ No newline at end of file diff --git a/common/modules/relation/relationHelper.php b/common/modules/relation/relationHelper.php new file mode 100755 index 0000000..f90cfab --- /dev/null +++ b/common/modules/relation/relationHelper.php @@ -0,0 +1,60 @@ +getModule('relation'); + + if (!is_array($module->relations)) + return []; + + return $module->relations; + } + + /** + * Return one relation for key $name + * @param string $name + * @return string (@todo refix to relationOject) + */ + public static function getRelation($name) { + $name = strtolower($name); + if (isset(self::$relations[$name])) { + return self::$relations[$name]; + } + $relations = self::getRelations(); + if (isset($relations[$name])) { + self::$relations[$name] = self::prepareRelation($relations[$name]); + } else { + self::$relations[$name] = null; + } + return self::$relations[$name]; + } + + + private static function prepareRelation($relation) { + if (!isset($relation['linked_table']) && isset($relation['via']['model'])) { + $relation['linked_table'] = $relation['via']['model']::tableName(); + } + return $relation; + } + + /** + * @param string $name + * @return bool + */ + public static function issetRelation($name) { + $relations = self::getRelations(); + return isset($relations[$name]); + } +} \ No newline at end of file diff --git a/common/modules/relation/relationObject.php b/common/modules/relation/relationObject.php new file mode 100755 index 0000000..ae04cb8 --- /dev/null +++ b/common/modules/relation/relationObject.php @@ -0,0 +1,29 @@ +_getRelationParams($relation_key); + $relation['inner'] = $relation[$relation_entity]; + $relation['outer'] = $relation[$relation_entity == 'entity1' ? 'entity2' : 'entity1']; + $relation['linked_table'] = $relation['via']['model']::tableName(); + } + + $this->moduleRelations = relationHelper::getRelations(); + + + } +} \ No newline at end of file diff --git a/common/modules/relation/relationQueryTrait.php b/common/modules/relation/relationQueryTrait.php new file mode 100755 index 0000000..27a0354 --- /dev/null +++ b/common/modules/relation/relationQueryTrait.php @@ -0,0 +1,33 @@ +modelClass; + self::$model = new $class; + } + return self::$model; + } + + /*public function getRelations($relation) { + $model = $this->getModel(); + + $relation = $model->_getRelation($relation); + return + $model->owner + ->hasMany($relation['outer']['model'], [$relation['outer']['key'] => $relation['outer']['linked_key']]) + ->viaTable($relation['linked_table'], [$relation['inner']['linked_key'] => $relation['inner']['key']]); + }*/ +} \ No newline at end of file diff --git a/common/modules/relation/views/default/index.php b/common/modules/relation/views/default/index.php new file mode 100755 index 0000000..dc021a6 --- /dev/null +++ b/common/modules/relation/views/default/index.php @@ -0,0 +1,12 @@ +
    +

    context->action->uniqueId ?>

    +

    + This is the view content for action "context->action->id ?>". + The action belongs to the controller "context) ?>" + in the "context->module->id ?>" module. +

    +

    + You may customize this page by editing the following file:
    + +

    +
    diff --git a/common/modules/relation/views/manage/_form.php b/common/modules/relation/views/manage/_form.php new file mode 100755 index 0000000..ad32f7c --- /dev/null +++ b/common/modules/relation/views/manage/_form.php @@ -0,0 +1,58 @@ + + +
    + + + + field($model, $relation['entity1']['linked_key'])->widget( + AutoComplete::className(), [ +// 'model' => \common\modules\relation\models\Relation::className(), + 'clientOptions' => [ + 'source' => \yii\helpers\Url::to(['manage/autocomplete/', 'relation_key' => $relation_key, 'entity' => 'entity1']), + 'dataType' => 'json', + 'autoFill' => true, + 'minLength' => '2', + ], + 'options' => [ + 'value' => empty($value1) ? '' : $value1, + 'class'=>'form-control', + 'placeholder' => $relation['entity1']['label'] + ] + ]); + ?> + + field($model, $relation['entity2']['linked_key'])->widget( + AutoComplete::className(), [ +// 'model' => \common\modules\relation\models\Relation::className(), + 'clientOptions' => [ + 'source' => \yii\helpers\Url::to(['manage/autocomplete/', 'relation_key' => $relation_key, 'entity' => 'entity2']), + 'dataType' => 'json', + 'autoFill' => true, + 'minLength' => '2', + 'allowClear' => true, + ], + 'options' => [ + 'value' => empty($value2) ? '' : $value2, + 'class'=>'form-control', + 'placeholder' => $relation['entity2']['label'] + ] + ]); + ?> + +
    + isNewRecord ? Yii::t('relation', 'Create') : Yii::t('relation', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
    + + + +
    diff --git a/common/modules/relation/views/manage/create.php b/common/modules/relation/views/manage/create.php new file mode 100755 index 0000000..9728570 --- /dev/null +++ b/common/modules/relation/views/manage/create.php @@ -0,0 +1,22 @@ +title = Yii::t('relation', $relation['name']); +$this->params['breadcrumbs'][] = ['label' => Yii::t('relation', 'Relations'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => Yii::t('relation', $relation['name']), 'url' => ['/relation/manage/pars', 'relation' => $relation_key]]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + + render('_form', [ + 'model' => $model, + 'relation_key' => $relation_key, + 'relation' => $relation, + ]) ?> + +
    diff --git a/common/modules/relation/views/manage/pars.php b/common/modules/relation/views/manage/pars.php new file mode 100755 index 0000000..7852d4c --- /dev/null +++ b/common/modules/relation/views/manage/pars.php @@ -0,0 +1,54 @@ +title = Yii::t('relation', 'Relation items for {relation}', ['relation' => $relation['name']]); +$this->params['breadcrumbs'][] = ['label' => Yii::t('relation', 'Relations'), 'url' => ['/relation/manage']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + +

    + 'btn btn-success']) ?> +

    + + $dataProvider, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + 'alias', + 'entity1.'. $relation['entity1']['listField'], + 'entity2.'. $relation['entity2']['listField'], + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{update} {delete}', + 'buttons' => [ + 'update' => function ($url, $model) { + return Html::a('', $url, [ + 'title' => Yii::t('relation', 'Edit par'), + ]); + }, + 'delete' => function ($url, $model) { + return Html::a('', $url, [ + 'title' => Yii::t('relation', 'Delete par'), + ]); + }, + ], + 'urlCreator' => function ($action, $model, $key, $index) use ($relation, $relation_key) { + if ($action === 'update') { + $url ='/admin/relation/manage/update?relation='. $relation_key .'&id='. $model->{$relation['entity1']['linked_key']} .':'. $model->{$relation['entity2']['linked_key']}; + return $url; + } + if ($action === 'delete') { + $url ='/admin/relation/manage/delete?relation='. $relation_key .'&id='. $model->{$relation['entity1']['linked_key']} .':'. $model->{$relation['entity2']['linked_key']}; + return $url; + } + } + ], + ], + ]); ?> +
    diff --git a/common/modules/relation/views/manage/relations.php b/common/modules/relation/views/manage/relations.php new file mode 100755 index 0000000..790e0e3 --- /dev/null +++ b/common/modules/relation/views/manage/relations.php @@ -0,0 +1,53 @@ +title = Yii::t('relation', 'Relations'); +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + + $relations, + 'sort' => [ + 'attributes' => ['name', 'key', 'entity1_label', 'entity2_label'], + ], + 'pagination' => [ + 'pageSize' => 10, + ], + ]); + ?> + + $dataProvider, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + 'name', + 'key', + 'entity1_label', + 'entity2_label', + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{view}', + 'buttons' => [ + 'view' => function ($url, $model) { + return Html::a('', $url, [ + 'title' => Yii::t('relation', 'View pars'), + ]); + }, + ], + 'urlCreator' => function ($action, $model) { + if ($action === 'view') { + $url ='/admin/relation/manage/pars?relation='. $model['key']; + return $url; + } + } + ], + ], + ]); ?> +
    diff --git a/common/modules/relation/views/manage/update.php b/common/modules/relation/views/manage/update.php new file mode 100755 index 0000000..cacc640 --- /dev/null +++ b/common/modules/relation/views/manage/update.php @@ -0,0 +1,25 @@ +title = Yii::t('relation', $relation['name']); +$this->params['breadcrumbs'][] = ['label' => Yii::t('relation', 'Relations'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => Yii::t('relation', $relation['name']), 'url' => ['/relation/manage/pars', 'relation' => $relation_key]]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + + render('_form', [ + 'model' => $model, + 'value1' => $value1, + 'value2' => $value2, + 'relation_key' => $relation_key, + 'relation' => $relation, + ]) ?> + +
    diff --git a/common/modules/rubrication/Module.php b/common/modules/rubrication/Module.php new file mode 100755 index 0000000..dd3159a --- /dev/null +++ b/common/modules/rubrication/Module.php @@ -0,0 +1,26 @@ +keyNameId === null) { + $primaryKey = $owner->primaryKey(); + if (!isset($primaryKey[0])) { + throw new Exception('"' . $owner->className() . '" must have a primary key.'); + } + $this->keyNameId = $primaryKey[0]; + } + } + + /* + * Inicialize behavior (read and prepare params) + */ + public function init() { + if (empty($this->valueModel)) { + $this->valueModel = TaxValueString::className(); + } + if (empty($this->valuePKey)) { + $vm = $this->valueModel; + $primaryKey = $vm::primaryKey(); + if (!isset($primaryKey[0])) { + throw new Exception('"' . $this->valueModel . '" must have a primary key.'); + } + if (count($primaryKey) > 1) { + throw new Exception('"' . $this->valueModel . '" is contains multiple keys.'); + } + $this->valuePKey = $primaryKey[0]; + } + } + + /* + * Events for auto-drive default value + */ + public function events() { + return [ + ActiveRecord::EVENT_AFTER_INSERT => 'afterInsert', + ActiveRecord::EVENT_AFTER_UPDATE => 'beforeUpdate', + ActiveRecord::EVENT_BEFORE_DELETE => 'beforeDelete', + ]; + } + + public function getAutoValue() { + return $this->owner->hasOne($this->valueModel, [$this->valuePKey => $this->keyNameValue]); + } + + public function afterInsert() { + /** @var ActiveRecord $valueModel */ + $valueModel = new $this->valueModel; + foreach ($this->valueFields as $key => $field) { + $valueModel->setAttribute($field, $this->$key); + } + $valueModel->setAttribute($this->valueOptionId, $this->owner->getAttribute($this->keyNameId)); + $valueModel->save(); + $this->owner->setAttribute($this->keyNameValue, $valueModel->getAttribute($this->valuePKey)); + $this->owner->{$this->slug['slugKeyName']} = $this->slugify($valueModel->{$this->slug['valueKeyName']}); + $this->owner->save(false); + } + + public function beforeUpdate() { + if ($this->owner->getIsNewRecord()) { + throw new NotSupportedException('Method "' . $this->owner->className() . '::insert" is not supported for inserting new entitys.'); + } + + if (!$this->owner->getAttribute($this->keyNameValue)) { + return; + } + + /** @var ActiveRecord $valueModel */ + $valueModelName = $this->valueModel; + $valueModel = $valueModelName::findOne($this->owner->getAttribute($this->keyNameValue)); + + $isave = false; + foreach ($this->valueFields as $key => $field) { + if ($valueModel->getAttribute($field) == $this->$key) { + continue; + } + $isave = true; + $valueModel->setAttribute($field, $this->$key); + } + if ($isave) { + $valueModel->setAttribute($this->valueOptionId, $this->owner->getAttribute($this->keyNameId)); + $valueModel->save(); + if (!empty($this->slug) && empty($this->owner->{$this->slug['slugKeyName']})) { + $this->owner->{$this->slug['slugKeyName']} = $this->slugify($valueModel->{$this->slug['valueKeyName']}); + } + } + } + + public function beforeDelete() { + /** @var ActiveRecord $valueModel */ + $valueModelName = $this->valueModel; + $valueModelName::deleteAll([ + $this->valueOptionId => $this->owner->getAttribute($this->keyNameId) + ]); + } + + private function slugify( $slug ) + { + return Inflector::slug( TransliteratorHelper::process( $slug ), '-', true ); + } + + /** + * @inheritdoc + */ + public function canSetProperty($key, $checkVars = true) + { + return array_key_exists($key, $this->valueFields) ? + true : parent::canSetProperty($key, $checkVars = true); + } + + /** + * @inheritdoc + */ + public function __set($key, $value) { + if (isset($this->valueFields[$key])) { + $this->values[$key] = $value; + } + } + + /** + * @inheritdoc + */ + public function __get($key) { + return $this->_getValue($key); + } + + public function _getValue($key) { + if (isset($this->values[$key])) { + return $this->values[$key]; + } + } +} \ No newline at end of file diff --git a/common/modules/rubrication/controllers/DefaultController.php b/common/modules/rubrication/controllers/DefaultController.php new file mode 100755 index 0000000..cbc303c --- /dev/null +++ b/common/modules/rubrication/controllers/DefaultController.php @@ -0,0 +1,20 @@ +render('index'); + } +} diff --git a/common/modules/rubrication/controllers/TaxGroupController.php b/common/modules/rubrication/controllers/TaxGroupController.php new file mode 100755 index 0000000..30c37b9 --- /dev/null +++ b/common/modules/rubrication/controllers/TaxGroupController.php @@ -0,0 +1,158 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all TaxGroup models. + * @param $level integer + * @return mixed + */ + public function actionIndex($level) + { + $dataProvider = new ActiveDataProvider([ + 'query' => TaxGroup::find()->where(['level' => $level]), + ]); + + return $this->render('index', [ + 'dataProvider' => $dataProvider, + 'level' => $level + ]); + } + + /** + * Displays a single TaxGroup model. + * @param integer $id + * @return mixed + */ + public function actionView($level,$id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new TaxGroup model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @param $level integer + * @return mixed + */ + public function actionCreate($level) + { + $model = new TaxGroup(); + + if ($model->load(Yii::$app->request->post()) && $model->validate()) { + $model->level = $level; + $model->save(); + return $this->redirect(['index', 'level' => $level]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing TaxGroup model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param $level integer + * @param integer $id + * @return mixed + */ + public function actionUpdate($level,$id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['index', 'level' => $level]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing TaxGroup model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param $level integer + * @param integer $id + * @return mixed + */ + public function actionDelete($level,$id) + { + $this->findModel($id)->delete(); + return $this->redirect(['index', 'level' => $level]); + } + + /* + * Group-relations + */ + public function actionRelation($id, $relations = ['tax_option_to_group', 'tax_option_to_option']) { + $group = $this->findModel($id); + $items = []; + + foreach($relations as $relation) { + $rows = $group->getRelations($relation)->all(); + $items = array_merge($items, $rows); + } + + return $this->render('relations', [ + 'items' => $items, + 'group' => $group, + ]); + } + + /* + * Rebuilp MP-params for group options + */ + public function actionRebuild($id) { + TaxOption::find()->rebuildMP($id); + + return $this->redirect(['index']); + } + + /** + * Finds the TaxGroup model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return TaxGroup the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = TaxGroup::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/common/modules/rubrication/controllers/TaxOptionController.php b/common/modules/rubrication/controllers/TaxOptionController.php new file mode 100755 index 0000000..e94a90c --- /dev/null +++ b/common/modules/rubrication/controllers/TaxOptionController.php @@ -0,0 +1,174 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['POST'], + ], + ], + ]; + } + + /** + * Lists all TaxOption models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new TaxOptionSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + $group = TaxGroup::findOne(Yii::$app->request->queryParams['group']); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + 'group' => $group, + ]); + } + + /** + * Displays a single TaxOption model. + * @param string $id + * @return mixed + */ + public function actionView($id) + { + $model = $this->findModel($id); + $group = TaxGroup::findOne($model->tax_group_id); + return $this->render('view', [ + 'model' => $model, + 'group' => $group, + ]); + } + + /** + * Creates a new TaxOption model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new TaxOption(); + $group = TaxGroup::findOne(Yii::$app->request->queryParams['group']); + $valueModelName = $this->getValueModelName($group); + $valueModel = new $valueModelName; + + if ($model->load(Yii::$app->request->post())) { + + $model->save(); + + $valueModel->tax_option_id = $model->tax_option_id; + $valueModel->value = $model->name; + $valueModel->save(); + + $model->default_value = $valueModel->tax_value_id; + $model->save(); + + return is_null(Yii::$app->request->post('create_and_new')) ? $this->redirect(['view', 'id' => $model->tax_option_id]) : $this->redirect(array_merge(['create'], Yii::$app->request->queryParams)); + } else { + $model->tax_group_id = $group->tax_group_id; + if (!empty(Yii::$app->request->queryParams['parent'])) { + $model->parent_id = Yii::$app->request->queryParams['parent']; + } + return $this->render('create', [ + 'model' => $model, + 'group' => $group, + 'valueModel' => $valueModel, + ]); + } + } + + /** + * Updates an existing TaxOption model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param string $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + $group = TaxGroup::findOne($model->tax_group_id); + $valueModelName = $this->getValueModelName($group); + $valueModel = $valueModelName::findOne($model->default_value); + + if ($model->load(Yii::$app->request->post())) { + $model->save(); + $valueModel->tax_option_id = $model->tax_option_id; + $valueModel->value = $model->name; + $valueModel->save(); + + $model->default_value = $valueModel->tax_value_id; + $model->save(); + + TaxOption::find()->rebuildMP($model->tax_group_id); + + return $this->redirect(['view', 'id' => $model->tax_option_id]); + } else { + return $this->render('update', [ + 'model' => $model, + 'group' => $group, + 'valueModel' => $valueModel, + ]); + } + } + + /** + * Deletes an existing TaxOption model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param string $id + * @return mixed + */ + public function actionDelete($id) + { + $model = $this->findModel($id); + $group_id = $model->tax_group_id; + + $model->delete(); + + return $this->redirect(['index', 'group' => $group_id]); + } + + /** + * Finds the TaxOption model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param string $id + * @return TaxOption the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = TaxOption::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } + + protected function getValueModelName($group) { + $valueClass = '\common\modules\rubrication\models\TaxValue'. ucfirst($group->module); + return class_exists($valueClass) ? $valueClass : FALSE; + } +} diff --git a/common/modules/rubrication/helpers/RubricationHelper.php b/common/modules/rubrication/helpers/RubricationHelper.php new file mode 100755 index 0000000..4044373 --- /dev/null +++ b/common/modules/rubrication/helpers/RubricationHelper.php @@ -0,0 +1,51 @@ + Yii::t('order', 'Invisible'), + 1 => Yii::t('order', 'Active'), + ]; + } + + /** + * @inheritdoc + * Returns sort-interval of appropriate options and others + * @return array. + */ + static public function SortArray($low = 0, $high = 100) { + return range($low, $high); + } + + static public function OptionTypes() { + if (!is_null(self::$types)) { + return self::$types; + } + + $module = \Yii::$app->getModule('rubrication'); + + if (!is_array($module->types)) + return []; + + return $module->types; + + } + + public function checkboxList($items, $options = []) + { + $this->adjustLabelFor($options); + $this->parts['{input}'] = Html::activeCheckboxList($this->model, $this->attribute, $items, $options); + + return $this; + } +} \ No newline at end of file diff --git a/common/modules/rubrication/models/TaxGroup.php b/common/modules/rubrication/models/TaxGroup.php new file mode 100755 index 0000000..0bc8b42 --- /dev/null +++ b/common/modules/rubrication/models/TaxGroup.php @@ -0,0 +1,141 @@ + relationBehavior::className(), + 'relations' => [ + 'tax_group_to_category' => 'entity1', + ] + ], + 'slug' => [ + 'class' => 'common\behaviors\Slug', + 'in_attribute' => 'name', + 'out_attribute' => 'alias', + 'translit' => true + ], + ]; + } + + /** + * @inheritdoc + */ + public static function tableName() + { + return 'tax_group'; + } + + /** + * @inheritdoc + */ + public function rules() + { + return [ + [['name', 'module'], 'required'], + [['description', 'settings'], 'string'], + [['hierarchical', 'is_filter', 'display'], 'boolean'], + [['level', 'sort'], 'integer'], + [['alias', 'module'], 'string', 'max' => 50], + [['name'], 'string', 'max' => 255], + [['group_to_category'], 'safe'] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'tax_group_id' => 'Tax Group ID', + 'alias' => 'Alias', + 'name' => 'Name', + 'description' => 'Description', + 'module' => 'Module', + 'hierarchical' => 'Hierarchical', +// 'settings' => 'Settings', + 'is_filter' => 'Use in filter', + 'sort' => 'Sort', + 'display' => 'Display', + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxGroupToGroups() + { + return $this->hasMany(TaxGroupToGroup::className(), ['tax_group1_id' => 'tax_group_id'])->inverseOf('taxGroup1'); + } + + public function getCategories() + { + return $this->hasMany(Category::className(), ['category_id' => 'entity2_id']) + ->viaTable('relation', ['entity1_id' => 'tax_group_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxGroupToGroups0() + { + return $this->hasMany(TaxGroupToGroup::className(), ['tax_group2_id' => 'tax_group_id'])->inverseOf('taxGroup2'); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getOptions() { + return $this->getTaxOptions(); + } + public function getTaxOptions() + { + return $this->hasMany(TaxOption::className(), ['tax_group_id' => 'tax_group_id'])->inverseOf('taxGroup'); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxOptionToGroups() + { + return $this->hasMany(TaxOptionToGroup::className(), ['tax_group_id' => 'tax_group_id'])->inverseOf('taxGroup'); + } + + public function getValueModelName($full_path = true) { + $valueClass = 'TaxValue'. ucfirst($this->module); + $fullClass = '\common\modules\rubrication\models\\'. $valueClass; + return class_exists($fullClass) ? $full_path ? $fullClass : $valueClass : FALSE; + } +} diff --git a/common/modules/rubrication/models/TaxGroupToGroup.php b/common/modules/rubrication/models/TaxGroupToGroup.php new file mode 100755 index 0000000..b621239 --- /dev/null +++ b/common/modules/rubrication/models/TaxGroupToGroup.php @@ -0,0 +1,69 @@ + 50] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'tax_group1_id' => Yii::t('app', 'Tax Group1 ID'), + 'tax_group2_id' => Yii::t('app', 'Tax Group2 ID'), + 'alias' => Yii::t('app', 'Alias'), + 'sort' => Yii::t('app', 'Sort'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxGroup1() + { + return $this->hasOne(TaxGroup::className(), ['tax_group_id' => 'tax_group1_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxGroup2() + { + return $this->hasOne(TaxGroup::className(), ['tax_group_id' => 'tax_group2_id']); + } +} diff --git a/common/modules/rubrication/models/TaxOption.php b/common/modules/rubrication/models/TaxOption.php new file mode 100755 index 0000000..7a05c44 --- /dev/null +++ b/common/modules/rubrication/models/TaxOption.php @@ -0,0 +1,245 @@ + [ + 'class' => ArtboxTreeBehavior::className(), + 'keyNameGroup' => 'tax_group_id', + ], + 'slug' => [ + 'class' => 'common\behaviors\Slug', + 'in_attribute' => 'name', + 'out_attribute' => 'alias', + 'translit' => true + ], + + ]; + } + + /** + * @inheritdoc + */ + public static function tableName() + { + return '{{%tax_option}}'; + } + + /** + * @inheritdoc + */ + public function rules() + { + return [ + [['tax_group_id','name'], 'required'], + [['tax_group_id', 'parent_id', 'sort', 'default_value'], 'integer'], + [['alias'], 'string', 'max' => 50], + [['tax_group_id'], 'exist', 'skipOnError' => true, 'targetClass' => TaxGroup::className(), 'targetAttribute' => ['tax_group_id' => 'tax_group_id']], +// [['parent_id'], 'exist', 'skipOnError' => true, 'targetClass' => TaxOption::className(), 'targetAttribute' => ['parent_id' => 'tax_option_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'tax_option_id' => Yii::t('app', 'Tax Option ID'), + 'tax_group_id' => Yii::t('app', 'Tax Group ID'), + 'parent_id' => Yii::t('app', 'Parent ID'), + 'alias' => Yii::t('app', 'Alias'), + 'sort' => Yii::t('app', 'Sort'), + 'default_value' => Yii::t('app', 'Default Value'), + ]; + } + + public static function find() { + return new TaxOptionQuery(get_called_class()); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxEntityRelations() + { + return $this->hasMany(TaxEntityRelation::className(), ['tax_option_id' => 'tax_option_id'])->inverseOf('taxOption'); + } + + + /** + * @return \yii\db\ActiveQuery + */ + public function getGroup() + { + return $this->getTaxGroup(); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxGroup() + { + return $this->hasOne(TaxGroup::className(), ['tax_group_id' => 'tax_group_id'])->inverseOf('taxOptions'); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxOptions() + { + return $this->hasMany(TaxOption::className(), ['parent_id' => 'tax_option_id'])->inverseOf('parent'); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxOptionToGroups() + { + return $this->hasMany(TaxOptionToGroup::className(), ['tax_option_id' => 'tax_option_id'])->inverseOf('taxOption'); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxOptionToOptions() + { + return $this->hasMany(TaxOptionToOption::className(), ['tax_option1_id' => 'tax_option_id'])->inverseOf('taxOption1'); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxOptionToOptions0() + { + return $this->hasMany(TaxOptionToOption::className(), ['tax_option2_id' => 'tax_option_id'])->inverseOf('taxOption2'); + } + + + public function getTaxValueString(){ + return $this->hasOne(TaxValueString::className(), ['tax_option_id' => 'tax_option_id']); + } + + public function getName(){ + return (!empty($this->taxValueString)) ? $this->taxValueString->value : '' ; + } + + + + public function setName($values){ + $this->name = $values; + } + + /** + */ + public function getValue() + { + $valueClass = $this->getValueModelName(); + if ($valueClass) { + return $this->hasOne($valueClass, ['tax_value_id' => 'default_value', 'tax_option_id' => 'tax_option_id'])->inverseOf('taxOption'); + } + } + + /** + */ + public function getValueRenderFlash() + { + $valueClass = $this->getValueModelName(); + $value = $this->value; + if ($valueClass && method_exists($valueClass, 'getValueRenderFlash')) { + return $valueClass::getValueRenderFlash($value); + } elseif(!empty($value)) { + return $value->value; + } else { + return null; + } + } + + /** + */ + public function getValueRenderHTML() + { + $valueClass = $this->getValueModelName(); + $value = $this->value; + if ($valueClass && method_exists($valueClass, 'getValueRenderHTML')) { + return $valueClass::getValueRenderHTML($value); + } else { + return $value->value; + } + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getValues() + { + if ($valueClass = $this->getValueModelName()) + return $this->hasMany($valueClass, ['tax_option_id' => 'tax_option_id'])->inverseOf('taxOption')->cascadeOnDelete(); + } + + public function beforeSave($insert) + { + if (parent::beforeSave($insert)) { + + if (empty($this->parent_id)) + $this->parent_id = 0; + + + + return true; + } + return false; + } + +// public function beforeDelete() { +// if ( ($model = $this->getValueModelName()) !== FALSE ) { +// +// } +// } + + private function getValueModelName() { + $group = $this->taxGroup; + $valueClass = '\common\modules\rubrication\models\TaxValue'. ucfirst($group->module); + return class_exists($valueClass) ? $valueClass : FALSE; + } +} diff --git a/common/modules/rubrication/models/TaxOptionQuery.php b/common/modules/rubrication/models/TaxOptionQuery.php new file mode 100755 index 0000000..9dbc6c2 --- /dev/null +++ b/common/modules/rubrication/models/TaxOptionQuery.php @@ -0,0 +1,39 @@ +andWhere('[[status]]=1'); + }*/ + + /** + * @inheritdoc + * @return TaxOption[]|array + */ + public function all($db = null) + { + $this->with('value'); + return parent::all($db); + } + + /** + * @inheritdoc + * @return TaxOption|array|null + */ + public function one($db = null) + { + $this->with('value'); + return parent::one($db); + } +} diff --git a/common/modules/rubrication/models/TaxOptionRelation.php b/common/modules/rubrication/models/TaxOptionRelation.php new file mode 100755 index 0000000..c5390be --- /dev/null +++ b/common/modules/rubrication/models/TaxOptionRelation.php @@ -0,0 +1,50 @@ + 50] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'tax_option1_id' => Yii::t('product', 'Tax Option1 ID'), + 'tax_option2_id' => Yii::t('product', 'Tax Option2 ID'), + 'alias' => Yii::t('product', 'Alias'), + 'sort' => Yii::t('product', 'Sort'), + ]; + } +} diff --git a/common/modules/rubrication/models/TaxOptionSearch.php b/common/modules/rubrication/models/TaxOptionSearch.php new file mode 100755 index 0000000..9cdddb4 --- /dev/null +++ b/common/modules/rubrication/models/TaxOptionSearch.php @@ -0,0 +1,76 @@ +tax_group_id = intval($params['group']); + unset($params['group']); + } + + $dataProvider = new ActiveDataProvider([ + 'query' => $query, + ]); + + $this->load($params); + +// if (!$this->validate()) { +// return $dataProvider; +// } + + // grid filtering conditions + $query->andFilterWhere([ + 'tax_option_id' => $this->tax_option_id, + 'tax_group_id' => $this->tax_group_id, + 'parent_id' => $this->parent_id, + 'sort' => $this->sort, + ]); + + $query->andFilterWhere(['like', 'alias', $this->alias]); + $query->andFilterWhere(['like', 'tax_value_string.value', $this->default_value]); + + $query->orderBy(['path_int' => SORT_ASC, 'depth' => SORT_ASC, 'sort' => SORT_ASC]); + + return $dataProvider; + } +} diff --git a/common/modules/rubrication/models/TaxValueFloat.php b/common/modules/rubrication/models/TaxValueFloat.php new file mode 100755 index 0000000..a8d76e6 --- /dev/null +++ b/common/modules/rubrication/models/TaxValueFloat.php @@ -0,0 +1,58 @@ + true, 'targetClass' => TaxOption::className(), 'targetAttribute' => ['tax_option_id' => 'tax_option_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'tax_value_id' => Yii::t('app', 'Tax Value ID'), + 'tax_option_id' => Yii::t('app', 'Tax Option ID'), + 'value' => Yii::t('app', 'Value'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxOption() + { + return $this->hasOne(TaxOption::className(), ['tax_option_id' => 'tax_option_id'])->inverseOf('taxValues'); + } +} diff --git a/common/modules/rubrication/models/TaxValueInt.php b/common/modules/rubrication/models/TaxValueInt.php new file mode 100755 index 0000000..89406f2 --- /dev/null +++ b/common/modules/rubrication/models/TaxValueInt.php @@ -0,0 +1,57 @@ + true, 'targetClass' => TaxOption::className(), 'targetAttribute' => ['tax_option_id' => 'tax_option_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'tax_value_id' => Yii::t('app', 'Tax Value ID'), + 'tax_option_id' => Yii::t('app', 'Tax Option ID'), + 'value' => Yii::t('app', 'Value'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxOption() + { + return $this->hasOne(TaxOption::className(), ['tax_option_id' => 'tax_option_id'])->inverseOf('taxValues'); + } +} diff --git a/common/modules/rubrication/models/TaxValueLink.php b/common/modules/rubrication/models/TaxValueLink.php new file mode 100755 index 0000000..c6c3d90 --- /dev/null +++ b/common/modules/rubrication/models/TaxValueLink.php @@ -0,0 +1,69 @@ + 150], + [['link'], 'string', 'max' => 255], + [['tax_option_id'], 'exist', 'skipOnError' => true, 'targetClass' => TaxOption::className(), 'targetAttribute' => ['tax_option_id' => 'tax_option_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'tax_value_id' => Yii::t('app', 'Tax Value ID'), + 'tax_option_id' => Yii::t('app', 'Tax Option ID'), + 'name' => Yii::t('app', 'Name'), + 'link' => Yii::t('app', 'Link'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxOption() + { + return $this->hasOne(TaxOption::className(), ['tax_option_id' => 'tax_option_id'])->inverseOf('taxValueLinks'); + } + + public static function getValueRenderFlash($value) { + return $value->name; + } + + public static function getValueRenderHTML($value) { + return Html::a($value->name, $value->link); + } +} diff --git a/common/modules/rubrication/models/TaxValueString.php b/common/modules/rubrication/models/TaxValueString.php new file mode 100755 index 0000000..881110b --- /dev/null +++ b/common/modules/rubrication/models/TaxValueString.php @@ -0,0 +1,58 @@ + 255], + [['tax_option_id'], 'exist', 'skipOnError' => true, 'targetClass' => TaxOption::className(), 'targetAttribute' => ['tax_option_id' => 'tax_option_id']], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'tax_value_id' => Yii::t('rubrication', 'Tax Value ID'), + 'tax_option_id' => Yii::t('rubrication', 'Tax Option ID'), + 'value' => Yii::t('rubrication', 'Value'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTaxOption() + { + return $this->hasOne(TaxOption::className(), ['tax_option_id' => 'tax_option_id']); + } +} diff --git a/common/modules/rubrication/views/default/index.php b/common/modules/rubrication/views/default/index.php new file mode 100755 index 0000000..d9e8d45 --- /dev/null +++ b/common/modules/rubrication/views/default/index.php @@ -0,0 +1,12 @@ +
    +

    context->action->uniqueId ?>

    +

    + This is the view content for action "context->action->id ?>". + The action belongs to the controller "context) ?>" + in the "context->module->id ?>" module. +

    +

    + You may customize this page by editing the following file:
    + +

    +
    diff --git a/common/modules/rubrication/views/tax-group/_form.php b/common/modules/rubrication/views/tax-group/_form.php new file mode 100755 index 0000000..d2b44e7 --- /dev/null +++ b/common/modules/rubrication/views/tax-group/_form.php @@ -0,0 +1,49 @@ + + +
    + + + + field($model, 'name')->textInput(['maxlength' => true]) ?> + + field($model, 'alias')->textInput(['maxlength' => true]) ?> + + field($model, 'description')->textarea(['rows' => 6]) ?> + + field($model, 'module')->dropDownList(RubricationHelper::OptionTypes(), [ + 'prompt' => Yii::t('rubrication', 'Select module'), + ]) ?> + + field($model, 'group_to_category')->dropDownList( + ArtboxTreeHelper::treeMap(ProductHelper::getCategories(), 'category_id', 'categoryName.value'), + [ + 'multiple' => true + ] + )->label('Use in the following categories') ?> + + field($model, 'hierarchical')->checkbox()*/ ?> + + field($model, 'is_filter')->checkbox() ?> + + field($model, 'display')->checkbox() ?> + + field($model, 'sort')->textInput() ?> + +
    + isNewRecord ? Yii::t('rubrication', 'Create') : Yii::t('rubrication', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
    + + + +
    diff --git a/common/modules/rubrication/views/tax-group/create.php b/common/modules/rubrication/views/tax-group/create.php new file mode 100755 index 0000000..ddcc890 --- /dev/null +++ b/common/modules/rubrication/views/tax-group/create.php @@ -0,0 +1,21 @@ +title = Yii::t('rubrication', 'Create Tax Group'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', 'Tax Groups'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + + render('_form', [ + 'model' => $model, + ]) ?> + +
    diff --git a/common/modules/rubrication/views/tax-group/index.php b/common/modules/rubrication/views/tax-group/index.php new file mode 100755 index 0000000..705eff0 --- /dev/null +++ b/common/modules/rubrication/views/tax-group/index.php @@ -0,0 +1,76 @@ +title = Yii::t('rubrication', 'Groups'); +$this->params['breadcrumbs'][] = $this->title; +?> + +
    + +

    title) ?>

    +

    + $level]), ['class' => 'btn btn-success']) ?> +

    + + $dataProvider, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + + 'name', + 'alias', + 'description:ntext', + 'module', + 'hierarchical:boolean', + 'is_filter:boolean', + // 'settings:ntext', + + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{update} {options} {relations} {delete} {rebuild}', + 'buttons' => [ + 'options' => function ($url, $model) { + return Html::a('', $url, [ + 'title' => Yii::t('rubrication', 'Options'), + ]); + }, + 'relations' => function ($url, $model) { + return Html::a('', $url, [ + 'title' => Yii::t('rubrication', 'Relations'), + ]); + }, + 'rebuild' => function ($url, $model) { + return Html::a('', $url, [ + 'title' => Yii::t('rubrication', 'Rebuild cache'), + ]); + } + ], + 'urlCreator' => function ($action, $model, $key, $index) use ($level) { + if ($action === 'options') { + $url ='/admin/rubrication/tax-option?group='.$model->tax_group_id; + return $url; + } elseif ($action === 'relations') { + $url ='/admin/rubrication/tax-group/relation&id='.$model->tax_group_id; + return $url; + } elseif ($action === 'update') { + $url =Url::to(['/rubrication/tax-group/update', 'level'=> $level,'id' =>$model->tax_group_id]); + return $url; + } elseif ($action === 'delete') { + $url =Url::to(['/rubrication/tax-group/delete', 'level'=> $level,'id' =>$model->tax_group_id]); + return $url; + } elseif ($action === 'rebuild') { + $url ='/admin/rubrication/tax-group/rebuild?id='.$model->tax_group_id; + return $url; + } + } + ], + ], + ]); ?> +
    + diff --git a/common/modules/rubrication/views/tax-group/relations.php b/common/modules/rubrication/views/tax-group/relations.php new file mode 100755 index 0000000..c65a58d --- /dev/null +++ b/common/modules/rubrication/views/tax-group/relations.php @@ -0,0 +1,58 @@ +title = Yii::t('relation', 'Relation for Group "{group}"', ['group' => $group->name]); +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', 'Tax Groups'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + + + 'btn btn-success']) ?> + + + $items, + 'sort' => [ + 'attributes' => ['name', 'alias', 'entity1_label', 'entity2_label'], + ], + 'pagination' => [ + 'pageSize' => 10, + ], + ]); + ?> + + $dataProvider, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + 'name', + 'alias', + 'entity1_label', + 'entity2_label', + /*[ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{view}', + 'buttons' => [ + 'view' => function ($url, $model) { + return Html::a('', $url, [ + 'title' => Yii::t('relation', 'View pars'), + ]); + }, + ], + 'urlCreator' => function ($action, $model, $key, $index) { + if ($action === 'view') { + $url ='/admin/relation/manage/pars?relation='. $model['key']; + return $url; + } + } + ],*/ + ], + ]); ?> +
    diff --git a/common/modules/rubrication/views/tax-group/update.php b/common/modules/rubrication/views/tax-group/update.php new file mode 100755 index 0000000..8414ea0 --- /dev/null +++ b/common/modules/rubrication/views/tax-group/update.php @@ -0,0 +1,23 @@ +title = Yii::t('rubrication', 'Update {modelClass}: ', [ + 'modelClass' => 'Tax Group', +]) . ' ' . $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', 'Groups'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->tax_group_id]]; +$this->params['breadcrumbs'][] = Yii::t('rubrication', 'Update'); +?> +
    + +

    title) ?>

    + + render('_form', [ + 'model' => $model, + ]) ?> + +
    diff --git a/common/modules/rubrication/views/tax-group/view.php b/common/modules/rubrication/views/tax-group/view.php new file mode 100755 index 0000000..44e1691 --- /dev/null +++ b/common/modules/rubrication/views/tax-group/view.php @@ -0,0 +1,43 @@ +title = $model->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', 'Tax Groups'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + +

    + $model->tax_group_id], ['class' => 'btn btn-primary']) ?> + $model->tax_group_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('rubrication', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> + tax_group_id], ['class' => 'btn btn-success']) ?> +

    + + $model, + 'attributes' => [ + 'tax_group_id', + 'alias', + 'name', + 'description:ntext', + 'module', + 'hierarchical:boolean', + 'is_filter:boolean', + 'settings:ntext', + ], + ]) ?> + +
    diff --git a/common/modules/rubrication/views/tax-option/_form.php b/common/modules/rubrication/views/tax-option/_form.php new file mode 100755 index 0000000..d73bcbd --- /dev/null +++ b/common/modules/rubrication/views/tax-option/_form.php @@ -0,0 +1,64 @@ + + +
    + + + tax_group_id)) :?> + field($model, 'tax_group_id')->dropDownList( + ArrayHelper::map(TaxOption::find()->all(), 'tax_group_id', 'name'), + [ + 'prompt' => Yii::t('rubrication', 'Select group'), + ] + ) ?> + + field($model, 'tax_group_id')->hiddenInput()->label('') ?> + + + + field($model, 'name')->textInput(['maxlength' => true]) ?> +module .'.php')?> + + field($model, 'alias')->textInput(['maxlength' => true]) ?> + + hierarchical) :?> + getTree($model->tax_group_id); + ?> + field($model, 'parent_id')->dropDownList( + ArtboxTreeHelper::treeMap($tree, 'tax_option_id', 'ValueRenderFlash', '.'), + [ + 'prompt' => Yii::t('rubrication', 'Root level'), + 'options' => [ + $model->tax_option_id => ['disabled' => true] + ] + ] + ) ?> + + field($model, 'parent_id')->hiddenInput()->label('') ?> + + + field($model, 'sort')->dropDownList(RubricationHelper::SortArray()) ?> + +
    + isNewRecord ? Yii::t('rubrication', 'Create') : Yii::t('rubrication', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> + isNewRecord) :?> + 'create_and_new', 'class' => 'btn btn-primary']) ?> + +
    + + + +
    diff --git a/common/modules/rubrication/views/tax-option/_search.php b/common/modules/rubrication/views/tax-option/_search.php new file mode 100755 index 0000000..8414c97 --- /dev/null +++ b/common/modules/rubrication/views/tax-option/_search.php @@ -0,0 +1,37 @@ + + + diff --git a/common/modules/rubrication/views/tax-option/create.php b/common/modules/rubrication/views/tax-option/create.php new file mode 100755 index 0000000..55ddf4a --- /dev/null +++ b/common/modules/rubrication/views/tax-option/create.php @@ -0,0 +1,25 @@ +title = Yii::t('rubrication', 'Create Tax Option'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', 'Groups'), 'url' => ['tax-group/index']]; +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', $group->name), 'url' => ['index', 'group' => $group->tax_group_id]]; +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', Yii::t('rubrication', 'Options of {name}', ['name' => $group->name])), 'url' => ['index', 'group' => $group->tax_group_id]]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + + render('_form', [ + 'model' => $model, + 'group' => $group, + 'valueModel' => $valueModel, + ]) ?> + +
    diff --git a/common/modules/rubrication/views/tax-option/index.php b/common/modules/rubrication/views/tax-option/index.php new file mode 100755 index 0000000..dbd2389 --- /dev/null +++ b/common/modules/rubrication/views/tax-option/index.php @@ -0,0 +1,100 @@ +title = Yii::t('rubrication', 'Options for group "{group}"', ['group' => $group->name]); +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', 'Groups'), 'url' => ['tax-group/index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + render('_search', ['model' => $searchModel]); ?> + +

    + tax_group_id], ['class' => 'btn btn-success']) ?> +

    + +hierarchical) :?> + $dataProvider, +// 'filterModel' => $searchModel, + 'columns' => [ + [ + 'label'=> Yii::t('rubrication', 'Value'), + 'content'=>function($data){ + return str_repeat('-', $data->depth) .' '. $data->ValueRenderFlash; + } + ], + 'alias', + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{view} {update} {delete} {synonim}', + 'buttons' => [ + 'synonim' => function ($url, $model) { + return Html::a('', $url, [ + 'title' => Yii::t('rubrication', 'Synonims'), + ]); + }, + ], + 'urlCreator' => function ($action, $model, $key, $index) { + if ($action === 'view') { + $url = '/admin/rubrication/tax-option/view?id=' . $model->tax_option_id; + return $url; + } elseif ($action === 'update') { + $url ='/admin/rubrication/tax-option/update?id='.$model->tax_option_id; + return $url; + } elseif ($action === 'delete') { + $url ='/admin/rubrication/tax-option/delete?id='.$model->tax_option_id; + return $url; + } elseif ($action === 'synonim') { + $url ='/admin/rubrication/tax-synonim/delete?id='.$model->tax_option_id; + return $url; + } + } + ], + ], + ]);?> + + $dataProvider, +// 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + 'valueRenderHTML', + 'alias', + [ + 'class' => 'yii\grid\ActionColumn', + 'template' => '{update} {delete} {synonim}', + 'buttons' => [ + 'synonim' => function ($url, $model) { + return Html::a('', $url, [ + 'title' => Yii::t('rubrication', 'Synonims'), + ]); + }, + ], + 'urlCreator' => function ($action, $model, $key, $index) { + if ($action === 'update') { + $url ='/admin/rubrication/tax-option/update?id='.$model->tax_option_id; + return $url; + } elseif ($action === 'delete') { + $url ='/admin/rubrication/tax-option/delete?id='.$model->tax_option_id; + return $url; + } elseif ($action === 'synonim') { + $url ='/admin/rubrication/tax-synonim/delete?id='.$model->tax_option_id; + return $url; + } + } + ], + ], + ]);?> + +
    diff --git a/common/modules/rubrication/views/tax-option/update.php b/common/modules/rubrication/views/tax-option/update.php new file mode 100755 index 0000000..a0dbb1c --- /dev/null +++ b/common/modules/rubrication/views/tax-option/update.php @@ -0,0 +1,26 @@ +title = Yii::t('rubrication', 'Update {modelClass}: ', [ + 'modelClass' => 'Tax Option', +]) . ' ' . $model->tax_option_id; +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', 'Groups'), 'url' => ['tax-group/index']]; +$this->params['breadcrumbs'][] = ['label' => $group->name, 'url' => ['view', 'id' => $group->tax_group_id]]; +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', Yii::t('rubrication', 'Options of {name}', ['name' => $group->name])), 'url' => ['index', 'group' => $group->tax_group_id]]; +$this->params['breadcrumbs'][] = Yii::t('rubrication', 'Update'); +?> +
    + +

    title) ?>

    + + render('_form', [ + 'model' => $model, + 'group' => $group, + 'valueModel' => $valueModel, + ]) ?> + +
    diff --git a/common/modules/rubrication/views/tax-option/value/_fields_float.php b/common/modules/rubrication/views/tax-option/value/_fields_float.php new file mode 100755 index 0000000..6a35b2f --- /dev/null +++ b/common/modules/rubrication/views/tax-option/value/_fields_float.php @@ -0,0 +1 @@ +field($valueModel, 'value')->textInput() ?> \ No newline at end of file diff --git a/common/modules/rubrication/views/tax-option/value/_fields_int.php b/common/modules/rubrication/views/tax-option/value/_fields_int.php new file mode 100755 index 0000000..6a35b2f --- /dev/null +++ b/common/modules/rubrication/views/tax-option/value/_fields_int.php @@ -0,0 +1 @@ +field($valueModel, 'value')->textInput() ?> \ No newline at end of file diff --git a/common/modules/rubrication/views/tax-option/value/_fields_link.php b/common/modules/rubrication/views/tax-option/value/_fields_link.php new file mode 100755 index 0000000..5aeb45e --- /dev/null +++ b/common/modules/rubrication/views/tax-option/value/_fields_link.php @@ -0,0 +1,2 @@ +field($valueModel, 'name')->textInput(['maxlength' => true]) ?> +field($valueModel, 'link')->textInput(['maxlength' => true]) ?> \ No newline at end of file diff --git a/common/modules/rubrication/views/tax-option/value/_fields_string.php b/common/modules/rubrication/views/tax-option/value/_fields_string.php new file mode 100755 index 0000000..6a35b2f --- /dev/null +++ b/common/modules/rubrication/views/tax-option/value/_fields_string.php @@ -0,0 +1 @@ +field($valueModel, 'value')->textInput() ?> \ No newline at end of file diff --git a/common/modules/rubrication/views/tax-option/view.php b/common/modules/rubrication/views/tax-option/view.php new file mode 100755 index 0000000..8858d75 --- /dev/null +++ b/common/modules/rubrication/views/tax-option/view.php @@ -0,0 +1,46 @@ +title = $model->valueRenderFlash; +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', 'Groups'), 'url' => ['tax-group/index']]; +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', $group->name), 'url' => ['index', 'group' => $group->tax_group_id]]; +$this->params['breadcrumbs'][] = ['label' => Yii::t('rubrication', Yii::t('rubrication', 'Options of {name}', ['name' => $group->name])), 'url' => ['index', 'group' => $group->tax_group_id]]; +$this->params['breadcrumbs'][] = $this->title; +?> +
    + +

    title) ?>

    + +

    + $model->tax_option_id], ['class' => 'btn btn-primary']) ?> + $model->tax_option_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('rubrication', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> + tax_group_id], ['class' => 'btn btn-success']) ?> + parent_id)) :?> + $model->parent->ValueRenderFlash]), ['tax-option/create?group='. $model->tax_group_id .'&parent='. $model->parent->tax_option_id], ['class' => 'btn btn-success']) ?> + +

    + + $model, + 'attributes' => [ + 'tax_option_id', + 'ValueRenderFlash', + 'alias', + 'parent.ValueRenderFlash', + 'group.name', + 'sort', + ], + ]) ?> + +
    diff --git a/common/translation/ru/app.php b/common/translation/ru/app.php new file mode 100755 index 0000000..e1eea62 --- /dev/null +++ b/common/translation/ru/app.php @@ -0,0 +1,81 @@ + 'ID', + 'username' => 'Имя', + 'surname' => 'Фамилия', + 'auth_key' => 'Auth Key', + 'password_hash' => 'Password Hash', + 'password_reset_token' => 'Password Reset Token', + 'email' => 'Логин (e-mail)', + 'phone' => 'Телефон', + 'status' => 'Статус', + 'created_at' => 'Created At', + 'updated_at' => 'Updated At', + 'verifyCode' => 'Код проверки', + 'password' => 'Пароль', + 'password_repeat' => 'Повторить пароль', + 'registration' => 'Регистрация', + 'message' => 'Этот {field} уже занят', + 'message_match_password' => 'Пароли не совпадают', + 'exit' => 'Выход', + 'enter' => 'Войти', + 'your_personal_area' => 'Вход в личный кабинет', + 'forgot_password' => 'Забыли пароль?', + 'rememberMe' => 'Запомнить меня', + 'articles' => 'Всего товаров', + 'code' => 'Код: {0}', + 'checkout' => 'оформить заказ', + 'sum' => 'Сумма', + 'continue_shopping' => 'продолжить покупки', + 'edit_personal_data' => 'Редактировать личные данные', + 'personal_data' => 'Личные данные', + 'my_orders' => 'Мои заказы', + 'bookmarks' => 'Закладки', + 'basket' => 'Корзина', + 'banner_id' => 'Banner ID', + 'image' => 'Изображение', + 'alt' => 'Описание', + 'title' => 'Заголовок', + 'url' => 'Ссылка', + 'width' => 'Ширина', + 'height' => 'Высота', + 'blog_id' => 'Blog ID', + 'user_id' => 'User ID', + 'name' => 'Название', + 'link' => 'Ссылка', + 'date_add' => 'Дата добавления', + 'user_add_id' => 'User Add ID', + 'view_count' => 'Количество просмотров', + 'description' => 'Описание', + 'cover' => 'Фото главное', + 'event_id' => 'Event ID', + 'alias' => 'Ссылка', + 'body' => 'Тело', + 'meta_title' => 'Мета заголовок', + 'h1' => 'H1', + 'seo_text' => 'Сео Текст', + 'end_at' => 'Срок действия по', + 'order_items_id' => 'Order Items ID', + 'order_id' => 'Order ID', + 'item_id' => 'Item ID', + 'item_count' => 'Количество', + 'price' => 'Цена', + 'customer_id' => 'Customer ID', + 'delivery' => 'Доставка', + 'payment' => 'Оплата', + 'seo_id' => 'Seo ID', + 'controller' => 'Controller', + 'seo_category_id' => 'Seo Category ID', + 'seo_dynamic_id' => 'Seo Dynamic ID', + 'action' => 'Action', + 'fields' => 'Поля', + 'param' => 'Параметры', + 'key' => 'Ключ', + 'service_id' => 'Service ID', + 'slider_id' => 'Slider ID', + 'speed' => 'Скорость', + 'duration' => 'Продолжительность', + 'slider_image_id' => 'Slider Image ID', + 'sort' => 'Сортировка', + +]; \ No newline at end of file diff --git a/common/translation/ru/product.php b/common/translation/ru/product.php new file mode 100755 index 0000000..ca15056 --- /dev/null +++ b/common/translation/ru/product.php @@ -0,0 +1,32 @@ + 'Категории', + 'Create Category' => 'Создать Категорию', + 'Name' => 'Наименование', + 'Set populary' => 'Сделать популярной', + 'Set not populary' => 'Сделать не популярной', + 'Remote ID' => 'ID в 1С', + 'Search for "{keywords}"' => 'Поиск по "{keywords}"', + 'Search for "{keywords}" in category "{category}"' => 'Поиск по "{keywords}" в категории "{category}"', + 'Promo products' => 'Акционные товары', + 'New products' => 'Новинки', + 'Top products' => 'Популярные', + 'Similar products' => 'Похожие товары', + 'Brands' => 'Бренды', + 'Brand' => 'Бренд', + 'Categories' => 'Категории', + 'Category' => 'Категория', + 'Select brand' => 'Выберите бренд', + 'Select category' => 'Выберите категорию', + 'SKU' => 'Артикул', + 'Stock' => 'Остаток', + 'Price' => 'Цена', + 'Price Old' => 'Старая Цена', + 'Products' => 'Товары', + 'Product' => 'Товар', + 'Variants' => 'Модификации', + 'Variant' => 'Модификация', + 'Create Product' => 'Создать Товар', + 'Enable' => 'Доступно', + 'Disable' => 'Отсутсвует', +]; \ No newline at end of file diff --git a/common/widgets/Alert.php b/common/widgets/Alert.php new file mode 100755 index 0000000..5b5bbb2 --- /dev/null +++ b/common/widgets/Alert.php @@ -0,0 +1,79 @@ +session->setFlash('error', 'This is the message'); + * \Yii::$app->session->setFlash('success', 'This is the message'); + * \Yii::$app->session->setFlash('info', 'This is the message'); + * ``` + * + * Multiple messages could be set as follows: + * + * ```php + * \Yii::$app->session->setFlash('error', ['Error 1', 'Error 2']); + * ``` + * + * @author Kartik Visweswaran + * @author Alexander Makarov + */ +class Alert extends \yii\bootstrap\Widget +{ + /** + * @var array the alert types configuration for the flash messages. + * This array is setup as $key => $value, where: + * - $key is the name of the session flash variable + * - $value is the bootstrap alert type (i.e. danger, success, info, warning) + */ + public $alertTypes = [ + 'error' => 'alert-danger', + 'danger' => 'alert-danger', + 'success' => 'alert-success', + 'info' => 'alert-info', + 'warning' => 'alert-warning' + ]; + + /** + * @var array the options for rendering the close button tag. + */ + public $closeButton = []; + + public function init() + { + parent::init(); + + $session = \Yii::$app->session; + $flashes = $session->getAllFlashes(); + $appendCss = isset($this->options['class']) ? ' ' . $this->options['class'] : ''; + + foreach ($flashes as $type => $data) { + if (isset($this->alertTypes[$type])) { + $data = (array) $data; + foreach ($data as $i => $message) { + /* initialize css class for each alert box */ + $this->options['class'] = $this->alertTypes[$type] . $appendCss; + + /* assign unique id to each alert box */ + $this->options['id'] = $this->getId() . '-' . $type . '-' . $i; + + echo \yii\bootstrap\Alert::widget([ + 'body' => $message, + 'closeButton' => $this->closeButton, + 'options' => $this->options, + ]); + } + + $session->removeFlash($type); + } + } + } +} diff --git a/common/widgets/BasketHead.php b/common/widgets/BasketHead.php new file mode 100755 index 0000000..79535cd --- /dev/null +++ b/common/widgets/BasketHead.php @@ -0,0 +1,50 @@ +session->get('order'); + unset($sessionData['order_id']); + $count = count($sessionData); + $price = 0; + if(is_array($sessionData) && !empty($sessionData)){ + + $variant = ProductVariant::find()->where(['product_variant_id'=>array_keys($sessionData)])->indexBy('product_variant_id')->all(); + + + foreach ($sessionData as $k => $item) { + $sessionData[$k]['item'] = $variant[$k]; + $price += $variant[$k]->price * $sessionData[$k]['num']; + } + + + return $this->render('basket_head',[ + 'items'=>$sessionData, + 'count' => $count, + 'price' => $price + ]); + + } + + } +} \ No newline at end of file diff --git a/common/widgets/BasketModal.php b/common/widgets/BasketModal.php new file mode 100755 index 0000000..8a30fa7 --- /dev/null +++ b/common/widgets/BasketModal.php @@ -0,0 +1,44 @@ +session->get('order'); + unset($sessionData['order_id']); + $count = count($sessionData); + $price = 0; + if(is_array($sessionData) && !empty($sessionData)){ + + $variant = ProductVariant::find()->where(['product_variant_id'=>array_keys($sessionData)])->indexBy('product_variant_id')->all(); + + + foreach ($sessionData as $k => $item) { + $sessionData[$k]['item'] = $variant[$k]; + $price += $variant[$k]->price * $sessionData[$k]['num']; + } + + + return $this->render('basket_modal',[ + 'items'=>$sessionData, + 'count' => $count, + 'price' => $price + ]); + + } + + } + +} \ No newline at end of file diff --git a/common/widgets/FieldEditor.php b/common/widgets/FieldEditor.php new file mode 100755 index 0000000..fcb7d04 --- /dev/null +++ b/common/widgets/FieldEditor.php @@ -0,0 +1,48 @@ +item_id && $this->model){ + $widgetData = $this->findModel(); + } else { + $widgetData= [new Fields()]; + } + + return $this->render($this->template.'_field',['model'=>ArrayHelper::toArray($widgetData)]); + } + + protected function findModel() + { + + if (($model = Fields::find()->where([ + 'table_id'=>$this->item_id, + 'table_name'=>$this->model, + 'field_type'=>$this->template, + 'language'=>$this->language, + ])->all())) { + + return $model; + + } else { + return [new Fields()]; + } + } +} \ No newline at end of file diff --git a/common/widgets/Mailer.php b/common/widgets/Mailer.php new file mode 100755 index 0000000..497b8e7 --- /dev/null +++ b/common/widgets/Mailer.php @@ -0,0 +1,60 @@ +IsSMTP(); + $mail->SMTPOptions = array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + 'allow_self_signed' => true + ) + ); + $mail->Host = "195.248.225.139"; + $mail->SMTPDebug = true; + $mail->SMTPAuth = 0; + $mail->Port = 25; + $mail->CharSet = 'UTF-8'; + $mail->Username = ""; + $mail->Password = ""; + $mail->SetFrom('Rukzachok.com.ua@gmail.com'); + $mail->Subject = $this->subject; + $mail->MsgHTML($this->render($this->type, ['params' => $this->params])); + $address = "Rukzachok.com.ua@gmail.com"; + $mail->AddAddress($address); + $mail->AddAddress($this->email); + if(!$mail->send()) { + + \Yii::$app->getSession()->setFlash('error', 'Mailer Error: ' . $mail->ErrorInfo); + + return 'Mailer Error: ' . $mail->ErrorInfo; + } else { + + + return 'Message has been sent'; + } + } + +} + diff --git a/common/widgets/views/basket_head.php b/common/widgets/views/basket_head.php new file mode 100755 index 0000000..6b6b021 --- /dev/null +++ b/common/widgets/views/basket_head.php @@ -0,0 +1,10 @@ + +
    + +
    +
    'head_basket_count']) :'' ?>
    +
    + +
    diff --git a/common/widgets/views/basket_modal.php b/common/widgets/views/basket_modal.php new file mode 100755 index 0000000..96265f0 --- /dev/null +++ b/common/widgets/views/basket_modal.php @@ -0,0 +1,53 @@ + +
    +
      + + +
    • +
      +
      +
      + product->image)) :?> + + + <?= $item['item']->product->image->alt ? $item['item']->product->image->alt : $item['item']->product->name?> + +
      +
      + product->name.' '.$item['item']->name?> + +
      +
      +
      + +
      +
      +
      +
      -
      +
      +
      +
      price * $item['num'] ?>грн.
      +
      +
      +
    • + + +
    +
    +
    +

    :

    +

    : грн.

    +
    +
    + 'close']) ?> + 'button']);?> +
    +
    diff --git a/common/widgets/views/comment_notify.php b/common/widgets/views/comment_notify.php new file mode 100755 index 0000000..9ed6242 --- /dev/null +++ b/common/widgets/views/comment_notify.php @@ -0,0 +1,39 @@ + + + + + + Rukzachok.com.ua + + + +
    +

    Ваш коммертарий успешно опубликован.

    +

    Добрый день!

    +

    Ваш комментарий прошел модерацию и успешно опубликован.

    +

    text; ?>

    +

    Чтобы просмотреть комментарий перейдите по ссылке: Прочесть комментарий

    +
    + + \ No newline at end of file diff --git a/common/widgets/views/education_field.php b/common/widgets/views/education_field.php new file mode 100755 index 0000000..b24e544 --- /dev/null +++ b/common/widgets/views/education_field.php @@ -0,0 +1,83 @@ + +
    + +
    Образование
    + +
    + + + + 'form-group', + 'id' => isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0, + ]) ?> +
    + + +
    +
    + + +
    +
    + + +
    + + + + + +
    +

    добавить еще

    +
    + + + + diff --git a/common/widgets/views/order.php b/common/widgets/views/order.php new file mode 100755 index 0000000..fe7d6ec --- /dev/null +++ b/common/widgets/views/order.php @@ -0,0 +1,127 @@ + + + + + + Rukzachok.com.ua + + + +
    +
    +
    +

    Добрый день, name ?>!

    +

    Ваш заказ получен. В ближайшее время с Вами свяжется менеджер для уточнения деталей

    +
    + + + + + + + + + +
    + Заказ №id ?> +
    +
    + На сумму total ?> грн +
    + Данные покупателя +
    + name ?> +
    + phone ?> +
    + email ?> +
    + Доставка +
    + city ?> +
    + adress ?> + +
    + Спасибо за покупку! +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
     НазваниеКоличествоЦена
    + + + + + × + + грн +
    + Всего к оплате: + + total) ?> грн +
    +
    +
    +
    + + + + + + +
    + +38 (067) 395 65 73 + + rukzachok.com.ua +
    + +
    +
    + + \ No newline at end of file diff --git a/common/widgets/views/password.php b/common/widgets/views/password.php new file mode 100755 index 0000000..163a4b5 --- /dev/null +++ b/common/widgets/views/password.php @@ -0,0 +1,16 @@ +urlManager->createAbsoluteUrl(['site/reset-password', 'token' => $params->password_reset_token]); +?> +
    +

    Hello username) ?>,

    + +

    Follow the link below to reset your password:

    + +

    +
    + \ No newline at end of file diff --git a/common/widgets/views/registration.php b/common/widgets/views/registration.php new file mode 100755 index 0000000..636cb3f --- /dev/null +++ b/common/widgets/views/registration.php @@ -0,0 +1,51 @@ + + + + + + + + Rukzachok.com.ua + + + +
    +
    +
    +

    Добрый день, !

    +

    Спасибо за регистрацию . Приятных покупок в магазине Rukzachok.com.ua

    +
    +
    +
    + + + + + + +
    + +38 (067) 000 00 00 + + rukzachok.com.ua +
    + +
    +
    + + diff --git a/common/widgets/views/test.php b/common/widgets/views/test.php new file mode 100755 index 0000000..41e1cee --- /dev/null +++ b/common/widgets/views/test.php @@ -0,0 +1 @@ +

    H1

    \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100755 index 0000000..7a37378 --- /dev/null +++ b/composer.json @@ -0,0 +1,66 @@ +{ + "name": "yiisoft/yii2-app-advanced", + "description": "Yii 2 Advanced Project Template", + "keywords": ["yii2", "framework", "advanced", "project template"], + "homepage": "http://www.yiiframework.com/", + "type": "project", + "license": "BSD-3-Clause", + "support": { + "issues": "https://github.com/yiisoft/yii2/issues?state=open", + "forum": "http://www.yiiframework.com/forum/", + "wiki": "http://www.yiiframework.com/wiki/", + "irc": "irc://irc.freenode.net/yii", + "source": "https://github.com/yiisoft/yii2" + }, + "minimum-stability": "dev", + + "require": { + "php": ">=5.4.0", + "yiisoft/yii2": ">=2.0.6", + "yiisoft/yii2-bootstrap": "*", + "yiisoft/yii2-swiftmailer": "*", + "dmstr/yii2-adminlte-asset": "2.*", + "yiisoft/yii2-jui": "^2.0", + "kartik-v/yii2-widget-select2": "@dev", + "mihaildev/yii2-ckeditor": "*", + "developeruz/yii2-db-rbac": "*", + "nodge/yii2-eauth": "*", + "yiisoft/yii2-imagine": "^2.0", + "mihaildev/yii2-elfinder": "^1.1", + "kartik-v/yii2-widget-colorinput": "*", + "2amigos/yii2-transliterator-helper": "*", + "rmrevin/yii2-comments": "1.4.*", + "bower-asset/admin-lte": "*", + "FortAwesome/Font-Awesome": "*", + "kartik-v/yii2-widget-datepicker": "*", + "unclead/yii2-multiple-input": "~1.0", + "codeception/codeception":"*", + "phpmailer/phpmailer": "^5.2", + "kartik-v/yii2-grid": "@dev", + "kartik-v/yii2-mpdf": "@dev", + "kartik-v/yii2-widget-fileinput": "@dev", + "maxmirazh33/yii2-uploadable-cropable-image": "*", + "iutbay/yii2-imagecache": "*", + "yurkinx/yii2-image": "dev-master", + "cics/yii2-video-embed-widget": "dev-master", + "sersid/yii2-owl-carousel-asset": "*", + "wbraganca/yii2-dynamicform": "dev-master", + "kartik-v/yii2-widget-rating": "*" + }, + "require-dev": { + "yiisoft/yii2-codeception": "*", + "yiisoft/yii2-debug": "*", + "yiisoft/yii2-gii": "*", + "yiisoft/yii2-faker": "*" + }, + "config": { + "process-timeout": 1800 + }, + "extra": { + "asset-installer-paths": { + "npm-asset-library": "vendor/npm", + "bower-asset-library": "vendor/bower" + } + } +} + diff --git a/console/config/.gitignore b/console/config/.gitignore new file mode 100755 index 0000000..8ded784 --- /dev/null +++ b/console/config/.gitignore @@ -0,0 +1,2 @@ +main-local.php +params-local.php \ No newline at end of file diff --git a/console/config/bootstrap.php b/console/config/bootstrap.php new file mode 100755 index 0000000..5005cb3 --- /dev/null +++ b/console/config/bootstrap.php @@ -0,0 +1,9 @@ + 'app-console', + 'basePath' => dirname(__DIR__), + 'bootstrap' => ['log'], + 'controllerNamespace' => 'console\controllers', + 'components' => [ + 'log' => [ + 'targets' => [ + [ + 'class' => 'yii\log\FileTarget', + 'levels' => ['error', 'warning'], + ], + ], + ], + ], + 'params' => $params, +]; diff --git a/console/config/params.php b/console/config/params.php new file mode 100755 index 0000000..4ee7a49 --- /dev/null +++ b/console/config/params.php @@ -0,0 +1,4 @@ + 'admin@example.com', +]; diff --git a/console/controllers/.gitkeep b/console/controllers/.gitkeep new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/console/controllers/.gitkeep diff --git a/console/controllers/ImportController.php b/console/controllers/ImportController.php new file mode 100755 index 0000000..776c8b9 --- /dev/null +++ b/console/controllers/ImportController.php @@ -0,0 +1,70 @@ +stderr('Task already executed'); + return Controller::EXIT_CODE_ERROR; + } + return fopen ($filename, 'r'); + } + + public function actionProducts() { + if (file_exists(Yii::getAlias('@uploadDir/goProducts.lock'))) { + $this->errors[] = 'Task already executed'; + return Controller::EXIT_CODE_ERROR; + } + $ff = fopen(Yii::getAlias('@uploadDir/goProducts.lock'), 'w+'); + fclose($ff); + $model = new Import(); + $model->goProducts(0, null); + unlink(Yii::getAlias('@uploadDir/goProducts.lock')); + return Controller::EXIT_CODE_NORMAL; + } + + public function actionPrices() { + if (file_exists(Yii::getAlias('@uploadDir/goPrices.lock'))) { + $this->stderr('Task already executed'); + return Controller::EXIT_CODE_ERROR; + } + $ff = fopen(Yii::getAlias('@uploadDir/goPrices.lock'), 'w+'); + fclose($ff); + $model = new Import(); + $data = $model->goPrices(0, null); + unlink(Yii::getAlias('@uploadDir/goPrices.lock')); + return Controller::EXIT_CODE_NORMAL; + } + + private function saveNotFoundRecord (array $line, $filename) + { + $str = implode (';', $line)."\n"; + $str = iconv ("UTF-8//TRANSLIT//IGNORE", "windows-1251", $str); + + $fg = fopen (Yii::getAlias('@uploadDir') .'/'. $filename, 'a+'); + fputs ($fg, $str); + fclose ($fg); + } +} \ No newline at end of file diff --git a/console/controllers/RbacController.php b/console/controllers/RbacController.php new file mode 100755 index 0000000..799002f --- /dev/null +++ b/console/controllers/RbacController.php @@ -0,0 +1,46 @@ +authManager; + + // add "createPost" permission + $createPost = $auth->createPermission('createPost'); + $createPost->description = 'Create a post'; + $auth->add($createPost); + + // add "updatePost" permission + $updatePost = $auth->createPermission('updatePost'); + $updatePost->description = 'Update post'; + $auth->add($updatePost); + +// // add "author" role and give this role the "createPost" permission + $author = $auth->createRole('author'); + $auth->add($author); + $auth->addChild($author, $createPost); +// +// // add "admin" role and give this role the "updatePost" permission +// // as well as the permissions of the "author" role + $admin = $auth->createRole('admin'); + $auth->add($admin); + $auth->addChild($admin, $updatePost); + $auth->addChild($admin, $author); +// +// // Assign roles to users. 1 and 2 are IDs returned by IdentityInterface::getId() +// // usually implemented in your User model. +// $auth->assign($author, 2); +// $auth->assign($admin, 1); + + + } +} + + + diff --git a/console/migrations/m130524_201442_init.php b/console/migrations/m130524_201442_init.php new file mode 100755 index 0000000..bb7e48a --- /dev/null +++ b/console/migrations/m130524_201442_init.php @@ -0,0 +1,33 @@ +db->driverName === 'mysql') { + // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + } + + $this->createTable('{{%user}}', [ + 'id' => $this->primaryKey(), + 'username' => $this->string()->notNull()->unique(), + 'auth_key' => $this->string(32)->notNull(), + 'password_hash' => $this->string()->notNull(), + 'password_reset_token' => $this->string()->unique(), + 'email' => $this->string()->notNull()->unique(), + + 'status' => $this->smallInteger()->notNull()->defaultValue(10), + 'created_at' => $this->integer()->notNull(), + 'updated_at' => $this->integer()->notNull(), + ], $tableOptions); + } + + public function down() + { + $this->dropTable('{{%user}}'); + } +} diff --git a/console/migrations/m160126_071717_rubrication.php b/console/migrations/m160126_071717_rubrication.php new file mode 100755 index 0000000..d88eb02 --- /dev/null +++ b/console/migrations/m160126_071717_rubrication.php @@ -0,0 +1,135 @@ +db->driverName === 'mysql') { + // Only for MySQL + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + + // @todo https://habrahabr.ru/post/138947/ + } elseif ($this->db->driverName === 'pgsql') { + // Only for PostgreSQL + // @todo use intarray field for tax_options + } + $this->createTable('{{%tax_group}}', [ + 'tax_group_id' => $this->primaryKey(), + 'alias' => $this->string(50)->notNull(), + 'name' => $this->string(255)->notNull(), + 'description' => $this->text(), + 'module' => $this->string(50)->notNull(), + 'hierarchical' => $this->boolean()->notNull()->defaultValue(false), + 'settings' => $this->text() + ], $tableOptions); + + $this->createTable('{{%tax_option}}', [ + 'tax_option_id' => $this->bigPrimaryKey(), + 'tax_group_id' => $this->integer()->notNull(), + 'parent_id' => $this->integer()->notNull()->defaultValue(0), + 'path' => $this->string(), + 'depth' => $this->integer(), + 'sort' => $this->integer()->notNull()->defaultValue(0), + 'default_value' => $this->integer(), + 'alias' => $this->string(50)->notNull()->defaultValue(''), + ], $tableOptions); + $this->addForeignKey('fki_tax_option_tax_group_id', 'tax_option', 'tax_group_id', 'tax_group', 'tax_group_id', 'CASCADE', 'CASCADE'); + + $this->createTable('{{%tax_group_to_group}}', [ + 'tax_group1_id' => $this->integer()->notNull(), + 'tax_group2_id' => $this->integer()->notNull(), + 'alias' => $this->string(50)->notNull(), + 'sort' => $this->integer(), + ], $tableOptions); + $this->addForeignKey('fki_tax_group_to_group1', 'tax_group_to_group', 'tax_group1_id', 'tax_group', 'tax_group_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('fki_tax_group_to_group2', 'tax_group_to_group', 'tax_group2_id', 'tax_group', 'tax_group_id', 'CASCADE', 'CASCADE'); + $this->addPrimaryKey('pki_tax_group_to_group', 'tax_group_to_group', ['tax_group1_id', 'tax_group2_id', 'alias']); + + $this->createTable('{{%tax_option_to_group}}', [ + 'tax_option_id' => $this->integer()->notNull(), + 'tax_group_id' => $this->integer()->notNull(), + 'alias' => $this->string(50)->notNull(), + 'sort' => $this->integer(), + ], $tableOptions); + $this->addForeignKey('tax_option_to_group_option_id', 'tax_option_to_group', 'tax_option_id', 'tax_option', 'tax_option_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('tax_option_to_group_group_id', 'tax_option_to_group', 'tax_group_id', 'tax_group', 'tax_group_id', 'CASCADE', 'CASCADE'); + $this->addPrimaryKey('pki_tax_option_to_group', 'tax_option_to_group', ['tax_option_id', 'tax_group_id', 'alias']); + + $this->createTable('{{%tax_option_to_option}}', [ + 'tax_option1_id' => $this->integer()->notNull(), + 'tax_option2_id' => $this->integer()->notNull(), + 'alias' => $this->string(50)->notNull(), + 'sort' => $this->integer(), + ], $tableOptions); + $this->addForeignKey('fki_tax_option_to_option1', 'tax_option_to_option', 'tax_option1_id', 'tax_option', 'tax_option_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('fki_tax_option_to_option2', 'tax_option_to_option', 'tax_option2_id', 'tax_option', 'tax_option_id', 'CASCADE', 'CASCADE'); + $this->addPrimaryKey('pki_tax_option_to_option', 'tax_option_to_option', ['tax_option1_id', 'tax_option2_id', 'alias']); + + /*$this->createTable('{{%tax_entity_relation}}', [ + 'tax_option_id' => $this->integer()->notNull(), + 'entity_id' => $this->integer()->notNull(), + 'entity_table_name' => $this->string(50)->notNull(), + 'entity_key_name' => $this->string(50)->notNull(), + 'alias' => $this->string(50)->notNull(), + ], $tableOptions); + $this->addForeignKey('fki_tax_entity_relation_option_id', 'tax_entity_relation', 'tax_option_id', 'tax_option', 'tax_option_id', 'CASCADE', 'CASCADE'); + $this->addPrimaryKey('pki_tax_entity_relation', 'tax_entity_relation', ['tax_option_id', 'entity_id', 'entity_table_name', 'entity_key_name', 'alias']);*/ + + $this->createTable('{{%tax_value_int}}', [ + 'tax_value_id' => $this->primaryKey(), + 'tax_option_id' => $this->integer()->notNull(), + 'value' => $this->integer(), + ], $tableOptions); + $this->addForeignKey('fki_tax_value_int_option_id', 'tax_value_int', 'tax_option_id', 'tax_option', 'tax_option_id', 'CASCADE', 'CASCADE'); + + $this->createTable('{{%tax_value_string}}', [ + 'tax_value_id' => $this->primaryKey(), + 'tax_option_id' => $this->integer()->notNull(), + 'value' => $this->string(), + ], $tableOptions); + $this->addForeignKey('fki_tax_value_string_option_id', 'tax_value_string', 'tax_option_id', 'tax_option', 'tax_option_id', 'CASCADE', 'CASCADE'); + + $this->createTable('{{%tax_value_text}}', [ + 'tax_value_id' => $this->primaryKey(), + 'tax_option_id' => $this->integer()->notNull(), + 'value' => $this->text(), + ], $tableOptions); + $this->addForeignKey('fki_tax_value_text_option_id', 'tax_value_text', 'tax_option_id', 'tax_option', 'tax_option_id', 'CASCADE', 'CASCADE'); + + $this->createTable('{{%tax_value_float}}', [ + 'tax_value_id' => $this->bigPrimaryKey(), + 'tax_option_id' => $this->integer()->notNull(), + 'value' => $this->float(), + ], $tableOptions); + $this->addForeignKey('fki_tax_value_float_option_id', 'tax_value_float', 'tax_option_id', 'tax_option', 'tax_option_id', 'CASCADE', 'CASCADE'); + } + + public function safeDown() + { + $this->dropTable('{{%tax_value_int}}'); + $this->dropTable('{{%tax_value_string}}'); + $this->dropTable('{{%tax_value_text}}'); + $this->dropTable('{{%tax_value_float}}'); +// $this->dropTable('{{%tax_entity_relation}}'); + $this->dropTable('{{%tax_group_to_group}}'); + $this->dropTable('{{%tax_option_to_group}}'); + $this->dropTable('{{%tax_option_to_option}}'); + $this->dropTable('{{%tax_option}}'); + $this->dropTable('{{%tax_group}}'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160128_101543_fields.php b/console/migrations/m160128_101543_fields.php new file mode 100755 index 0000000..0c6b960 --- /dev/null +++ b/console/migrations/m160128_101543_fields.php @@ -0,0 +1,29 @@ +createTable('{{%fields}}', [ + 'id' => $this->primaryKey(), + 'table_name' => $this->string(255)->notNull(), + 'table_id' => $this->integer(), + 'value' => $this->string(255), + 'field_name' => $this->string(), + 'field_type' => $this->string(32)->notNull(), + 'language' => $this->string(3), + 'key' => $this->integer(), + 'parent_key' => $this->integer() + ], $tableOptions); + + } + + public function down() + { + $this->dropTable('{{%fields}}'); + } +} diff --git a/console/migrations/m160208_111900_blog.php b/console/migrations/m160208_111900_blog.php new file mode 100755 index 0000000..12bcf1d --- /dev/null +++ b/console/migrations/m160208_111900_blog.php @@ -0,0 +1,30 @@ +createTable('{{%blog}}', [ + 'blog_id' => $this->primaryKey(), + 'user_id' => $this->integer()->notNull(), + 'name' => $this->string(255)->notNull(), + 'link' => $this->string(255), + 'date_add' => $this->timestamp()->notNull(), + 'user_add_id' => $this->integer(), + 'view_count' => $this->integer()->defaultValue(0), + 'description' => $this->text(), + 'cover' => $this->string(255), + ], $tableOptions); + + } + + public function down() + { + $this->dropTable('{{%blog}}'); + } + +} diff --git a/console/migrations/m160304_054017_realtion.php b/console/migrations/m160304_054017_realtion.php new file mode 100755 index 0000000..f1fe66b --- /dev/null +++ b/console/migrations/m160304_054017_realtion.php @@ -0,0 +1,44 @@ +db->driverName === 'mysql') { + // Only for MySQL + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + + // @todo https://habrahabr.ru/post/138947/ + } elseif ($this->db->driverName === 'pgsql') { + // Only for PostgreSQL + // @todo use intarray field for tax_options + } + $this->createTable('{{%relation}}', [ + 'alias' => $this->string(50)->notNull(), + 'entity1_id' => $this->integer()->notNull(), + 'entity2_id' => $this->integer()->notNull(), + ], $tableOptions); + $this->addPrimaryKey('relation_ukey', 'relation', ['alias', 'entity1_id', 'entity2_id']); + } + + public function down() + { + $this->dropTable('{{%relation}}'); + + return false; + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160304_065108_product.php b/console/migrations/m160304_065108_product.php new file mode 100755 index 0000000..41a175c --- /dev/null +++ b/console/migrations/m160304_065108_product.php @@ -0,0 +1,135 @@ +db->driverName === 'mysql') { + // Only for MySQL + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + + // @todo https://habrahabr.ru/post/138947/ + } elseif ($this->db->driverName === 'pgsql') { + // Only for PostgreSQL + // @todo use intarray field for tax_options + } + + $this->createTable('{{%category_name}}', [ + 'category_name_id' => $this->primaryKey(), + 'category_id' => $this->integer()->notNull(), + 'value' => $this->string(250), + ], $tableOptions); + + $this->createTable('{{%category}}', [ + 'category_id' => $this->primaryKey(), + 'parent_id' => $this->integer()->notNull()->defaultValue(0), + 'path' => 'INT[]', + 'depth' => $this->integer()->notNull()->defaultValue(0), + 'alias' => $this->string(250), + 'image' => $this->string(255), + 'meta_title' => $this->string(255), + 'meta_desc' => $this->text(), + 'meta_robots' => $this->string(50), + 'seo_text' => $this->text(), + 'category_name_id' => $this->integer(), + 'product_unit_id' => $this->integer() + ], $tableOptions); + + $this->addForeignKey('category_name_fkey', 'category', 'category_name_id', 'category_name', 'category_name_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('category_name_category_fkey', 'category_name', 'category_id', 'category', 'category_id', 'NO ACTION', 'NO ACTION'); + + $this->createTable('{{%product_category}}', [ + 'product_id' => $this->integer()->notNull(), + 'category_id' => $this->integer()->notNull(), + ], $tableOptions); + + $this->createTable('{{%brand_name}}', [ + 'brand_name_id' => $this->primaryKey(), + 'brand_id' => $this->integer()->notNull(), + 'value' => $this->string(250), + ], $tableOptions); + + $this->createTable('{{%brand}}', [ + 'brand_id' => $this->primaryKey(), + 'brand_name_id' => $this->integer(), + 'alias' => $this->string(250), + 'image' => $this->string(255), + 'meta_title' => $this->string(255), + 'meta_desc' => $this->text(), + 'meta_robots' => $this->string(50), + 'seo_text' => $this->text(), + ], $tableOptions); + + $this->addForeignKey('brand_name_fkey', 'brand', 'brand_name_id', 'brand_name', 'brand_name_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('brand_name_brand_fkey', 'brand_name', 'brand_id', 'brand', 'brand_id', 'NO ACTION', 'NO ACTION'); + + $this->createTable('{{%product}}', [ + 'product_id' => $this->primaryKey(), + 'name' => $this->string(255)->notNull(), + 'alias' => $this->string(255), + 'brand_id' => $this->integer(), + 'description' => $this->text(), + 'video' => $this->text(), + ], $tableOptions); + + $this->addForeignKey('fki_product_id', 'product_category', 'product_id', 'product', 'product_id', 'NO ACTION', 'NO ACTION'); + $this->addForeignKey('fki_category_id', 'product_category', 'category_id', 'category', 'category_id', 'NO ACTION', 'NO ACTION'); + $this->addForeignKey('fki_brand_id', 'product', 'brand_id', 'brand', 'brand_id', 'NO ACTION', 'CASCADE'); + + $this->createTable('{{%product_variant}}', [ + 'product_variant_id' => $this->primaryKey(), + 'product_id' => $this->integer()->notNull(), + 'name' => $this->string(255)->notNull(), + 'sku' => $this->string(255)->notNull(), + 'price' => $this->float(), + 'price_old' => $this->float(), + 'stock' => $this->float(), + 'product_unit_id' => $this->integer()->notNull(), + ], $tableOptions); + + $this->createTable('{{%product_unit}}', [ + 'product_unit_id' => $this->primaryKey(), + 'name' => $this->string(255)->notNull(), + 'code' => $this->string(50)->notNull(), + 'is_default' => $this->boolean() + ], $tableOptions); +// + $this->addForeignKey('product_variant_product_unit_fkey', 'product_variant', 'product_unit_id', 'product_unit', 'product_unit_id', 'CASCADE', 'NO ACTION'); + $this->addForeignKey('category_product_unit_fkey', 'category', 'product_unit_id', 'product_unit', 'product_unit_id', 'NO ACTION', 'NO ACTION'); + } + + public function down() + { + $this->dropForeignKey('category_name_fkey', 'category'); + $this->dropForeignKey('category_name_category_fkey', 'category_name'); + $this->dropForeignKey('brand_name_fkey', 'brand'); + $this->dropForeignKey('brand_name_brand_fkey', 'brand_name'); + $this->dropForeignKey('fki_product_id', 'product_category'); + $this->dropForeignKey('fki_category_id', 'product_category'); + $this->dropForeignKey('fki_brand_id', 'product'); + $this->dropForeignKey('product_variant_product_unit_fkey', 'product_variant'); + $this->dropForeignKey('category_product_unit_fkey', 'category'); + $this->dropTable('{{%category}}'); + $this->dropTable('{{%category_name}}'); + $this->dropTable('{{%product_category}}'); + $this->dropTable('{{%product}}'); + $this->dropTable('{{%product_variant}}'); + $this->dropTable('{{%product_unit}}'); + $this->dropTable('{{%brand_name}}'); + $this->dropTable('{{%brand}}'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160320_174258_customer.php b/console/migrations/m160320_174258_customer.php new file mode 100755 index 0000000..172287b --- /dev/null +++ b/console/migrations/m160320_174258_customer.php @@ -0,0 +1,35 @@ +db->driverName === 'mysql') { + // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + } + + $this->createTable('{{%customers}}', [ + 'id' => $this->primaryKey(), + 'username' => $this->string()->notNull(), + 'surname' => $this->string(), + 'auth_key' => $this->string(32)->notNull(), + 'password_hash' => $this->string()->notNull(), + 'password_reset_token' => $this->string()->unique(), + 'email' => $this->string()->notNull()->unique(), + 'phone' => $this->string()->notNull()->unique(), + 'status' => $this->smallInteger()->notNull()->defaultValue(10), + 'created_at' => $this->integer()->notNull(), + 'updated_at' => $this->integer()->notNull(), + ], $tableOptions); + } + + public function down() + { + $this->dropTable('{{%customers}}'); + } + +} diff --git a/console/migrations/m160321_232402_orders1.php b/console/migrations/m160321_232402_orders1.php new file mode 100755 index 0000000..13e6251 --- /dev/null +++ b/console/migrations/m160321_232402_orders1.php @@ -0,0 +1,49 @@ +db->driverName === 'mysql') { + // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + } + + $this->createTable('{{%orders}}', [ + 'order_id' => $this->primaryKey(), + 'customer_id' => $this->integer(), + 'name' => $this->string()->notNull(), + 'email' => $this->string()->notNull(), + 'phone' => $this->string(32)->notNull(), + 'delivery' => $this->integer(), + 'payment' => $this->integer(), + 'code' => $this->string(), + 'status' => $this->smallInteger(), + 'created_at' => $this->integer()->notNull(), + 'updated_at' => $this->integer()->notNull(), + ], $tableOptions); + + $this->createTable('{{%order_items}}', [ + 'order_items_id' => $this->primaryKey(), + 'order_id' => $this->integer(), + 'item_id' => $this->integer(), + 'item_count' => $this->integer(), + 'price' => $this->float(), + ], $tableOptions); + + $this->addForeignKey('orders_items_fk', '{{%order_items}}', 'order_id', '{{%orders}}', 'order_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('orders_items_items_fk', '{{%order_items}}', 'item_id', '{{%product}}', 'product_id', 'RESTRICT', 'RESTRICT'); + } + + public function down() + { + $this->dropForeignKey('orders_items_fk', '{{%order_items}}'); + $this->dropForeignKey('orders_items_items_fk', '{{%order_items}}'); + $this->dropTable('{{%orders}}'); + $this->dropTable('{{%order_items}}'); + } + +} diff --git a/console/migrations/m160323_234304_product_image.php b/console/migrations/m160323_234304_product_image.php new file mode 100755 index 0000000..9b5a4f0 --- /dev/null +++ b/console/migrations/m160323_234304_product_image.php @@ -0,0 +1,45 @@ +db->driverName === 'mysql') { + // Only for MySQL + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + + // @todo https://habrahabr.ru/post/138947/ + } elseif ($this->db->driverName === 'pgsql') { + // Only for PostgreSQL + // @todo use intarray field for tax_options + } + + $this->createTable('{{%product_image}}', [ + 'product_image_id' => $this->integer()->notNull(), + 'product_id' => $this->integer()->notNull(), + 'image' => $this->string(255), + 'alt' => $this->string(255), + 'title' => $this->string(255), + ], $tableOptions); + $this->addForeignKey('product_image_product_fkey', 'product_image', 'product_id', 'product', 'product_id', 'CASCADE', 'CASCADE'); + } + + public function down() + { + $this->dropTable('{{%product_image}}'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160324_075409_product_option.php b/console/migrations/m160324_075409_product_option.php new file mode 100755 index 0000000..54f0373 --- /dev/null +++ b/console/migrations/m160324_075409_product_option.php @@ -0,0 +1,44 @@ +db->driverName === 'mysql') { + // Only for MySQL + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + + // @todo https://habrahabr.ru/post/138947/ + } elseif ($this->db->driverName === 'pgsql') { + // Only for PostgreSQL + // @todo use intarray field for tax_options + } + + $this->createTable('{{%product_option}}', [ + 'product_id' => $this->integer()->notNull(), + 'option_id' => $this->integer()->notNull(), + ], $tableOptions); + $this->addPrimaryKey('product_option_pkey', 'product_option', ['product_id', 'option_id']); + $this->addForeignKey('product_option_product_fkey', 'product_option', 'product_id', 'product', 'product_id', 'NO ACTION', 'NO ACTION'); + $this->addForeignKey('product_option_option_fkey', 'product_option', 'option_id', 'tax_option', 'tax_option_id', 'NO ACTION', 'NO ACTION'); + } + + public function down() + { + $this->dropTable('{{%product_option}}'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160324_114404_orders_items_items_fk.php b/console/migrations/m160324_114404_orders_items_items_fk.php new file mode 100755 index 0000000..997b0ae --- /dev/null +++ b/console/migrations/m160324_114404_orders_items_items_fk.php @@ -0,0 +1,21 @@ +dropForeignKey('orders_items_items_fk', '{{%order_items}}'); + $this->addForeignKey('orders_items_items_fk', '{{%order_items}}', 'item_id', '{{%product_variant}}', 'product_variant_id', 'RESTRICT', 'RESTRICT'); + } + + public function down() + { + $this->dropForeignKey('orders_items_items_fk', '{{%order_items}}'); + $this->addForeignKey('orders_items_items_fk', '{{%order_items}}', 'item_id', '{{%product}}', 'product_id', 'RESTRICT', 'RESTRICT'); + + } + +} diff --git a/console/migrations/m160331_132149_slider.php b/console/migrations/m160331_132149_slider.php new file mode 100755 index 0000000..8113dec --- /dev/null +++ b/console/migrations/m160331_132149_slider.php @@ -0,0 +1,26 @@ +createTable('{{%slider}}', [ + 'slider_id' => $this->primaryKey(), + 'speed' => $this->integer(4), + 'duration' => $this->integer(4), + 'title' => $this->string(200), + 'status' => $this->smallInteger(1), + 'width' => $this->integer(4), + 'height' => $this->integer(4), + ]); + } + + public function down() + { + $this->dropTable('{{%slider}}'); + } + + +} diff --git a/console/migrations/m160404_081649_banner.php b/console/migrations/m160404_081649_banner.php new file mode 100755 index 0000000..29a67a8 --- /dev/null +++ b/console/migrations/m160404_081649_banner.php @@ -0,0 +1,26 @@ +createTable('{{%banner}}', [ + 'banner_id' => $this->primaryKey(), + 'image' => $this->string(255), + 'alt' => $this->string(255), + 'title' => $this->string(255), + 'url' => $this->string(255), + 'status' => $this->smallInteger(1), + 'width' => $this->integer(4), + 'height' => $this->integer(4), + ]); + } + + public function down() + { + $this->dropTable('{{%banner}}'); + } + +} diff --git a/console/migrations/m160405_101056_create_slider_images.php b/console/migrations/m160405_101056_create_slider_images.php new file mode 100755 index 0000000..6259c3b --- /dev/null +++ b/console/migrations/m160405_101056_create_slider_images.php @@ -0,0 +1,37 @@ +createTable('slider_image', [ + 'slider_image_id' => $this->primaryKey(), + 'slider_id' => $this->integer(), + 'image' => $this->string(255), + 'alt' => $this->string(255), + 'title' => $this->string(255), + 'url' => $this->string(255), + 'status' => $this->smallInteger(1), + 'sort' => $this->integer(6), + 'price' => $this->float(), + ]); + $this->addForeignKey('slider_slider_image_fk', 'slider_image', 'slider_id', 'slider', 'slider_id', 'CASCADE', 'CASCADE'); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropForeignKey('slider_slider_image_fk', '{{%slider_image}}'); + $this->dropTable('slider_image'); + } +} diff --git a/console/migrations/m160406_221846_create_page.php b/console/migrations/m160406_221846_create_page.php new file mode 100755 index 0000000..230ba43 --- /dev/null +++ b/console/migrations/m160406_221846_create_page.php @@ -0,0 +1,48 @@ +createTable('page', [ + 'id' => $this->primaryKey(), + 'name'=> $this->string(), + 'alias'=> $this->string(), + 'title' => $this->string(), + 'body'=> $this->text(), + 'meta_title'=> $this->string(), + 'description' => $this->string(), + 'h1'=> $this->string(), + 'seo_text'=> $this->text(), + + ]); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropTable('page'); + } +} diff --git a/console/migrations/m160407_185510_create_event.php b/console/migrations/m160407_185510_create_event.php new file mode 100755 index 0000000..9d0973f --- /dev/null +++ b/console/migrations/m160407_185510_create_event.php @@ -0,0 +1,38 @@ +createTable('event', [ + 'event_id' => $this->primaryKey(), + 'name'=> $this->string(), + 'alias'=> $this->string(), + 'body'=> $this->text(), + 'image' => $this->string(), + 'meta_title'=> $this->string(), + 'description' => $this->string(), + 'h1'=> $this->string(), + 'seo_text'=> $this->text(), + 'created_at' => $this->integer(), + 'updated_at' => $this->integer(), + 'end_at' => $this->integer(), + ]); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropTable('event'); + } +} diff --git a/console/migrations/m160411_211053_create_service.php b/console/migrations/m160411_211053_create_service.php new file mode 100755 index 0000000..4097776 --- /dev/null +++ b/console/migrations/m160411_211053_create_service.php @@ -0,0 +1,37 @@ +createTable('service', [ + 'service_id' => $this->primaryKey(), + 'name'=> $this->string()->notNull(), + 'alias'=> $this->string(), + 'body'=> $this->text()->notNull(), + 'image' => $this->string(), + 'meta_title'=> $this->string(), + 'description' => $this->string(), + 'h1'=> $this->string(), + 'seo_text'=> $this->text(), + 'created_at' => $this->integer(), + 'updated_at' => $this->integer(), + ]); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropTable('service'); + } +} diff --git a/console/migrations/m160411_215739_create_seo.php b/console/migrations/m160411_215739_create_seo.php new file mode 100755 index 0000000..713653f --- /dev/null +++ b/console/migrations/m160411_215739_create_seo.php @@ -0,0 +1,33 @@ +createTable('seo', [ + 'seo_id' => $this->primaryKey(), + 'url'=> $this->string()->notNull(), + 'title'=> $this->string(), + 'description' => $this->string(), + 'h1'=> $this->string(), + 'seo_text'=> $this->text(), + + ]); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropTable('seo'); + } +} diff --git a/console/migrations/m160412_133944_create_seo_category.php b/console/migrations/m160412_133944_create_seo_category.php new file mode 100755 index 0000000..3145f2a --- /dev/null +++ b/console/migrations/m160412_133944_create_seo_category.php @@ -0,0 +1,30 @@ +createTable('seo_category', [ + 'seo_category_id' => $this->primaryKey(), + 'name' => $this->string(), + 'controller' => $this->string(100), + 'status' => $this->smallInteger(1), + ]); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropTable('seo_category'); + } +} diff --git a/console/migrations/m160413_112158_create_seo_dynamic.php b/console/migrations/m160413_112158_create_seo_dynamic.php new file mode 100755 index 0000000..41ce24e --- /dev/null +++ b/console/migrations/m160413_112158_create_seo_dynamic.php @@ -0,0 +1,39 @@ +createTable('seo_dynamic', [ + 'seo_dynamic_id' => $this->primaryKey(), + 'seo_category_id' => $this->integer(), + 'name' => $this->string(200), + 'action' => $this->string(200), + 'fields' => $this->string(), + 'title' => $this->string(), + 'h1' => $this->string(), + 'description' => $this->string(), + 'seo_text' => $this->text(), + 'status' => $this->smallInteger() + ]); + + $this->addForeignKey('seo_category_seo_dynamic_fk', 'seo_dynamic', 'seo_category_id', 'seo_category', 'seo_category_id', 'CASCADE', 'CASCADE'); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropForeignKey('seo_category_seo_dynamic_fk', '{{%seo_dynamic}}'); + $this->dropTable('seo_dynamic'); + } +} diff --git a/console/migrations/m160414_101644_add_param_to_seo_dynamic.php b/console/migrations/m160414_101644_add_param_to_seo_dynamic.php new file mode 100755 index 0000000..59d896f --- /dev/null +++ b/console/migrations/m160414_101644_add_param_to_seo_dynamic.php @@ -0,0 +1,26 @@ +addColumn('seo_dynamic', 'param', $this->string()); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropColumn('seo_dynamic', 'param'); + } +} diff --git a/console/migrations/m160414_214745_add_key_to_seo_dynamic.php b/console/migrations/m160414_214745_add_key_to_seo_dynamic.php new file mode 100755 index 0000000..14780b1 --- /dev/null +++ b/console/migrations/m160414_214745_add_key_to_seo_dynamic.php @@ -0,0 +1,26 @@ +addColumn('seo_dynamic', 'key', $this->string()); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropColumn('seo_dynamic', 'key'); + } +} diff --git a/console/migrations/m160414_214746_add_level_to_tax_group.php b/console/migrations/m160414_214746_add_level_to_tax_group.php new file mode 100755 index 0000000..a44ba08 --- /dev/null +++ b/console/migrations/m160414_214746_add_level_to_tax_group.php @@ -0,0 +1,26 @@ +addColumn('tax_group', 'level', $this->integer()); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropColumn('tax_group', 'level'); + } +} diff --git a/console/migrations/m160505_202248_bg.php b/console/migrations/m160505_202248_bg.php new file mode 100755 index 0000000..99a5944 --- /dev/null +++ b/console/migrations/m160505_202248_bg.php @@ -0,0 +1,23 @@ +createTable('bg', [ + 'id' => $this->primaryKey(), + 'title' => $this->string(250)->notNull(), + 'url' => $this->string(250)->notNull(), + 'image' => $this->string(250)->notNull(), + ]); + } + + public function down() + { + $this->dropTable('bg'); + } + + +} diff --git a/console/migrations/m160505_235100_page.php b/console/migrations/m160505_235100_page.php new file mode 100755 index 0000000..689069e --- /dev/null +++ b/console/migrations/m160505_235100_page.php @@ -0,0 +1,49 @@ +createTable('page', [ + 'id' => $this->primaryKey(), + 'translit'=> $this->string(), + 'title'=> $this->string(), + 'body'=> $this->text(), + 'meta_title'=> $this->string(), + 'meta_keywords' => $this->string(), + 'meta_description'=> $this->string(), + 'seo_text'=> $this->text(), + 'h1'=> $this->string(), + + ]); + } + + /** + * @inheritdoc + */ + public function down() + { + $this->dropTable('page'); + } +} \ No newline at end of file diff --git a/console/migrations/m160509_121023_articles.php b/console/migrations/m160509_121023_articles.php new file mode 100755 index 0000000..de97e32 --- /dev/null +++ b/console/migrations/m160509_121023_articles.php @@ -0,0 +1,40 @@ +createTable('articles', [ + 'id' => $this->primaryKey(), + 'date'=> $this->date(), + 'title'=> $this->string()->notNull(), + 'body'=> $this->text()->notNull(), + 'image'=> $this->string()->notNull(), + 'translit'=> $this->string()->notNull(), + 'meta_title'=> $this->string(), + 'meta_keywords' => $this->string(), + 'meta_description'=> $this->string(), + 'seo_text'=> $this->text(), + 'h1'=> $this->string(), + + ]); + } + + public function down() + { + $this->dropTable('articles'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160509_214535_customer.php b/console/migrations/m160509_214535_customer.php new file mode 100755 index 0000000..21066ab --- /dev/null +++ b/console/migrations/m160509_214535_customer.php @@ -0,0 +1,44 @@ +createTable('{{%customer}}', [ + + + 'id' => $this->primaryKey(), + 'username' => $this->string()->notNull(), + 'password' => $this->string()->notNull(), + 'name' => $this->string()->notNull(), + 'surname' => $this->string(), + 'phone' => $this->string(), + 'date_time' => $this->date()->defaultExpression('NOW()'), + 'sex' => $this->string(32), + 'birth_day' => $this->integer(), + 'birth_month' => $this->integer(), + 'birth_year' => $this->integer(), + 'body' => $this->text(), + 'group_id' => $this->integer(), + ]); + } + + public function down() + { + $this->dropTable('{{%customer}}'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160509_231345_auth_assignment.php b/console/migrations/m160509_231345_auth_assignment.php new file mode 100755 index 0000000..737bff1 --- /dev/null +++ b/console/migrations/m160509_231345_auth_assignment.php @@ -0,0 +1,33 @@ +createTable('{{%auth_assignment}}', [ + + + 'item_name' => $this->string(), + 'user_id' => $this->integer(), + 'created_at' => $this->integer(), + ]); + } + + public function down() + { + $this->dropTable('{{%auth_assignment}}'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160512_153443_subscribe.php b/console/migrations/m160512_153443_subscribe.php new file mode 100755 index 0000000..2520be3 --- /dev/null +++ b/console/migrations/m160512_153443_subscribe.php @@ -0,0 +1,24 @@ +createTable('{{%subscribe}}', [ + + + 'id' => $this->primaryKey(), + 'email' => $this->string()->notNull(), + 'sale' => $this->integer()->notNull(), + 'sand' => $this->smallInteger()->notNull()->defaultValue(0), + ]); + } + + public function down() + { + $this->dropTable('{{%subscribe}}'); + } + +} diff --git a/console/migrations/m160516_222821_orders.php b/console/migrations/m160516_222821_orders.php new file mode 100755 index 0000000..80bf1ab --- /dev/null +++ b/console/migrations/m160516_222821_orders.php @@ -0,0 +1,72 @@ +db->driverName === 'mysql') { + // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + } + + + $this->createTable('{{%orders}}', [ + 'id' => $this->primaryKey(), + 'user_id' => $this->integer(), + 'name' => $this->string()->notNull(), + 'surname' => $this->string()->notNull(), + 'patronymic' => $this->string()->notNull(), + 'phone' => $this->string(), + 'phone2' => $this->string(), + 'email' => $this->string(), + 'adress' => $this->string(), + 'body' => $this->text(), + 'total' => $this->float(), + 'date_time' => $this->dateTime(), + 'date_dedline' => $this->date(), + 'reserve' => $this->string(), + 'status' => $this->string(), + 'comment' => $this->text(), + 'label' => $this->integer(), + 'pay' => $this->integer(), + 'numbercard' => $this->integer(), + 'delivery' => $this->string(), + 'declaration' => $this->string(), + 'stock' => $this->string(), + 'consignment' => $this->string(), + 'payment' => $this->string(), + 'insurance' => $this->string(), + 'amount_imposed' => $this->float(), + 'shipping_by' => $this->string(), + 'city' => $this->string(), + ], $tableOptions); + + + $this->createTable('{{%orders_products}}', [ + 'id' => $this->primaryKey(), + 'order_id' => $this->integer(), + 'mod_id' => $this->integer(), + 'product_name' => $this->string(), + 'name' => $this->string(), + 'sku' => $this->string(), + 'price' => $this->float(), + 'count' => $this->integer(), + 'sum_cost' => $this->float(), + ], $tableOptions); + + $this->addForeignKey('orders_products_fk', '{{%orders_products}}', 'order_id', '{{%orders}}', 'id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('orders_products_items_fk', '{{%orders_products}}', 'id', '{{%product}}', 'product_id', 'RESTRICT', 'RESTRICT'); + } + + public function down() + { + $this->dropForeignKey('orders_products_fk', '{{%orders_products}}'); + $this->dropForeignKey('orders_products_items_fk', '{{%orders_products}}'); + $this->dropTable('{{%orders}}'); + $this->dropTable('{{%orders_products}}'); + } + +} \ No newline at end of file diff --git a/console/migrations/m160516_234753_orders_delivery.php b/console/migrations/m160516_234753_orders_delivery.php new file mode 100755 index 0000000..29cff5b --- /dev/null +++ b/console/migrations/m160516_234753_orders_delivery.php @@ -0,0 +1,38 @@ +createTable('{{%orders_delivery}}', [ + 'id' => $this->primaryKey(), + 'parent_id' => $this->integer(), + 'title' => $this->string(), + 'title_ukr' => $this->string(), + 'value' => $this->integer(), + 'text' => $this->text(), + 'text_ukr' => $this->text(), + 'sort' => $this->integer(), + ]); + + } + + public function down() + { + $this->dropTable('{{%orders_delivery}}'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160517_072059_delete_product_fk.php b/console/migrations/m160517_072059_delete_product_fk.php new file mode 100755 index 0000000..28972f9 --- /dev/null +++ b/console/migrations/m160517_072059_delete_product_fk.php @@ -0,0 +1,30 @@ +dropForeignKey('orders_products_fk', '{{%orders_products}}'); + $this->dropForeignKey('orders_products_items_fk', '{{%orders_products}}'); + } + + public function down() + { + + $this->addForeignKey('orders_products_fk', '{{%orders_products}}', 'order_id', '{{%orders}}', 'id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('orders_products_items_fk', '{{%orders_products}}', 'id', '{{%product}}', 'product_id', 'RESTRICT', 'RESTRICT'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160517_073502_orders_label.php b/console/migrations/m160517_073502_orders_label.php new file mode 100755 index 0000000..104048e --- /dev/null +++ b/console/migrations/m160517_073502_orders_label.php @@ -0,0 +1,31 @@ +createTable('{{%orders_label}}', [ + 'id' => $this->primaryKey(), + 'name' => $this->string(), + 'label' => $this->string() + ]); + } + + public function down() + { + $this->dropTable('{{%orders_label}}'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160518_185644_change_order.php b/console/migrations/m160518_185644_change_order.php new file mode 100755 index 0000000..07dffdc --- /dev/null +++ b/console/migrations/m160518_185644_change_order.php @@ -0,0 +1,29 @@ +dropColumn('orders', 'surname'); + $this->dropColumn('orders', 'patronymic'); + } + + public function down() + { + $this->addColumn('orders', 'surname','string'); + $this->addColumn('orders', 'patronymic','string'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160721_152001_create_product_to_rating.php b/console/migrations/m160721_152001_create_product_to_rating.php new file mode 100755 index 0000000..5898e2f --- /dev/null +++ b/console/migrations/m160721_152001_create_product_to_rating.php @@ -0,0 +1,23 @@ +createTable('product_to_rating', [ + 'product_to_rating_id' => $this->primaryKey(), + 'product_id' => $this->integer()->notNull(), + 'value' => $this->float()->defaultValue(0), + ]); + + $this->addForeignKey('product_to_rating_product', 'product_to_rating', 'product_id', 'product', 'product_id', 'CASCADE', 'CASCADE'); + } + + public function down() + { + $this->dropForeignKey('product_to_rating_product', 'product_to_rating'); + $this->dropTable('product_to_rating'); + } +} diff --git a/console/migrations/m160722_150101_remove_product_option_option_fkey.php b/console/migrations/m160722_150101_remove_product_option_option_fkey.php new file mode 100755 index 0000000..9f60d86 --- /dev/null +++ b/console/migrations/m160722_150101_remove_product_option_option_fkey.php @@ -0,0 +1,19 @@ +dropForeignKey('product_option_option_fkey', '{{%product_option}}'); + + } + + public function down() + { + $this->addForeignKey('product_option_option_fkey', 'product_option', 'option_id', 'tax_option', 'tax_option_id', 'NO ACTION', 'NO ACTION'); + + } + +} diff --git a/console/migrations/m160722_150611_remove_product_variant_option_id.php b/console/migrations/m160722_150611_remove_product_variant_option_id.php new file mode 100755 index 0000000..babf023 --- /dev/null +++ b/console/migrations/m160722_150611_remove_product_variant_option_id.php @@ -0,0 +1,27 @@ +dropForeignKey('product_variant_option_id', '{{%product_variant_option}}'); + } + + public function down() + { + $this->addForeignKey('product_variant_option_id', 'product_variant_option', 'option_variant_id', 'tax_option', 'tax_option_id', 'NO ACTION', 'NO ACTION'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160722_150612_remove_option_product_variant_id.php b/console/migrations/m160722_150612_remove_option_product_variant_id.php new file mode 100755 index 0000000..213a477 --- /dev/null +++ b/console/migrations/m160722_150612_remove_option_product_variant_id.php @@ -0,0 +1,27 @@ +dropForeignKey('option_product_variant_id', '{{%product_variant_option}}'); + } + + public function down() + { + return false; + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160725_154511_remove_product_option_product_fkey.php b/console/migrations/m160725_154511_remove_product_option_product_fkey.php new file mode 100755 index 0000000..c59c6bb --- /dev/null +++ b/console/migrations/m160725_154511_remove_product_option_product_fkey.php @@ -0,0 +1,27 @@ +dropForeignKey('product_option_product_fkey', '{{%product_option}}'); + } + + public function down() + { + return false; + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160725_155127_remove_product_stock_product_variant_id_fkey.php b/console/migrations/m160725_155127_remove_product_stock_product_variant_id_fkey.php new file mode 100755 index 0000000..40eb68f --- /dev/null +++ b/console/migrations/m160725_155127_remove_product_stock_product_variant_id_fkey.php @@ -0,0 +1,27 @@ +dropForeignKey('product_stock_product_variant_id_fkey', '{{%product_stock}}'); + } + + public function down() + { + return false; + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160804_100209_create_article_to_rating.php b/console/migrations/m160804_100209_create_article_to_rating.php new file mode 100755 index 0000000..7d4ec15 --- /dev/null +++ b/console/migrations/m160804_100209_create_article_to_rating.php @@ -0,0 +1,23 @@ +createTable('article_to_rating', [ + 'article_to_rating_id' => $this->primaryKey(), + 'articles_id' => $this->integer()->notNull(), + 'value' => $this->float()->defaultValue(0), + ]); + + $this->addForeignKey('article_to_rating_article', 'article_to_rating', 'articles_id', 'articles', 'id', 'CASCADE', 'CASCADE'); + } + + public function down() + { + $this->dropForeignKey('article_to_rating_article', 'article_to_rating'); + $this->dropTable('article_to_rating'); + } +} diff --git a/console/migrations/m160810_074009_add_tax_option_sort.php b/console/migrations/m160810_074009_add_tax_option_sort.php new file mode 100755 index 0000000..9adaf71 --- /dev/null +++ b/console/migrations/m160810_074009_add_tax_option_sort.php @@ -0,0 +1,16 @@ +addColumn('tax_group', 'sort', $this->integer()->defaultValue(0)); + } + + public function down() + { + $this->dropColumn('tax_group', 'sort'); + } +} diff --git a/console/migrations/m160810_081231_add_tax_option_display.php b/console/migrations/m160810_081231_add_tax_option_display.php new file mode 100755 index 0000000..e21c4fe --- /dev/null +++ b/console/migrations/m160810_081231_add_tax_option_display.php @@ -0,0 +1,16 @@ +addColumn('tax_group', 'display', $this->boolean()->defaultValue(TRUE)); + } + + public function down() + { + $this->dropColumn('tax_group', 'display'); + } +} diff --git a/console/models/.gitkeep b/console/models/.gitkeep new file mode 100755 index 0000000..5e4debc --- /dev/null +++ b/console/models/.gitkeep @@ -0,0 +1 @@ +* diff --git a/console/runtime/.gitignore b/console/runtime/.gitignore new file mode 100755 index 0000000..a3a0c8b --- /dev/null +++ b/console/runtime/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/environments/dev/backend/config/main-local.php b/environments/dev/backend/config/main-local.php new file mode 100755 index 0000000..b909cc5 --- /dev/null +++ b/environments/dev/backend/config/main-local.php @@ -0,0 +1,25 @@ + [ + 'request' => [ + // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation + 'cookieValidationKey' => '', + ], + ], +]; + +if (!YII_ENV_TEST) { + // configuration adjustments for 'dev' environment + $config['bootstrap'][] = 'debug'; + $config['modules']['debug'] = [ + 'class' => 'yii\debug\Module', + ]; + + $config['bootstrap'][] = 'gii'; + $config['modules']['gii'] = [ + 'class' => 'yii\gii\Module', + ]; +} + +return $config; diff --git a/environments/dev/backend/config/params-local.php b/environments/dev/backend/config/params-local.php new file mode 100755 index 0000000..c1d2298 --- /dev/null +++ b/environments/dev/backend/config/params-local.php @@ -0,0 +1,3 @@ +run(); diff --git a/environments/dev/backend/web/index.php b/environments/dev/backend/web/index.php new file mode 100755 index 0000000..37d8378 --- /dev/null +++ b/environments/dev/backend/web/index.php @@ -0,0 +1,18 @@ +run(); diff --git a/environments/dev/common/config/main-local.php b/environments/dev/common/config/main-local.php new file mode 100755 index 0000000..45d5ebb --- /dev/null +++ b/environments/dev/common/config/main-local.php @@ -0,0 +1,20 @@ + [ + 'db' => [ + 'class' => 'yii\db\Connection', + 'dsn' => 'mysql:host=localhost;dbname=yii2advanced', + 'username' => 'root', + 'password' => '', + 'charset' => 'utf8', + ], + 'mailer' => [ + 'class' => 'yii\swiftmailer\Mailer', + 'viewPath' => '@common/mail', + // send all mails to a file by default. You have to set + // 'useFileTransport' to false and configure a transport + // for the mailer to send real emails. + 'useFileTransport' => true, + ], + ], +]; diff --git a/environments/dev/common/config/params-local.php b/environments/dev/common/config/params-local.php new file mode 100755 index 0000000..c1d2298 --- /dev/null +++ b/environments/dev/common/config/params-local.php @@ -0,0 +1,3 @@ + ['gii'], + 'modules' => [ + 'gii' => 'yii\gii\Module', + ], +]; diff --git a/environments/dev/console/config/params-local.php b/environments/dev/console/config/params-local.php new file mode 100755 index 0000000..c1d2298 --- /dev/null +++ b/environments/dev/console/config/params-local.php @@ -0,0 +1,3 @@ + [ + 'request' => [ + // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation + 'cookieValidationKey' => '', + ], + ], +]; + +if (!YII_ENV_TEST) { + // configuration adjustments for 'dev' environment + $config['bootstrap'][] = 'debug'; + $config['modules']['debug'] = [ + 'class' => 'yii\debug\Module', + ]; + $config['bootstrap'][] = 'gii'; + $config['modules']['gii'] = [ + 'class' => 'yii\gii\Module', + ]; +} + +return $config; diff --git a/environments/dev/frontend/config/params-local.php b/environments/dev/frontend/config/params-local.php new file mode 100755 index 0000000..c1d2298 --- /dev/null +++ b/environments/dev/frontend/config/params-local.php @@ -0,0 +1,3 @@ +run(); diff --git a/environments/dev/frontend/web/index.php b/environments/dev/frontend/web/index.php new file mode 100755 index 0000000..37d8378 --- /dev/null +++ b/environments/dev/frontend/web/index.php @@ -0,0 +1,18 @@ +run(); diff --git a/environments/dev/yii b/environments/dev/yii new file mode 100755 index 0000000..f3b4c13 --- /dev/null +++ b/environments/dev/yii @@ -0,0 +1,28 @@ +#!/usr/bin/env php +run(); +exit($exitCode); diff --git a/environments/index.php b/environments/index.php new file mode 100755 index 0000000..286620b --- /dev/null +++ b/environments/index.php @@ -0,0 +1,65 @@ + [ + * 'path' => 'directory storing the local files', + * 'skipFiles' => [ + * // list of files that should only copied once and skipped if they already exist + * ], + * 'setWritable' => [ + * // list of directories that should be set writable + * ], + * 'setExecutable' => [ + * // list of files that should be set executable + * ], + * 'setCookieValidationKey' => [ + * // list of config files that need to be inserted with automatically generated cookie validation keys + * ], + * 'createSymlink' => [ + * // list of symlinks to be created. Keys are symlinks, and values are the targets. + * ], + * ], + * ]; + * ``` + */ +return [ + 'Development' => [ + 'path' => 'dev', + 'setWritable' => [ + 'backend/runtime', + 'backend/web/assets', + 'frontend/runtime', + 'frontend/web/assets', + ], + 'setExecutable' => [ + 'yii', + 'tests/codeception/bin/yii', + ], + 'setCookieValidationKey' => [ + 'backend/config/main-local.php', + 'frontend/config/main-local.php', + ], + ], + 'Production' => [ + 'path' => 'prod', + 'setWritable' => [ + 'backend/runtime', + 'backend/web/assets', + 'frontend/runtime', + 'frontend/web/assets', + ], + 'setExecutable' => [ + 'yii', + ], + 'setCookieValidationKey' => [ + 'backend/config/main-local.php', + 'frontend/config/main-local.php', + ], + ], +]; diff --git a/environments/prod/backend/config/main-local.php b/environments/prod/backend/config/main-local.php new file mode 100755 index 0000000..d1c8993 --- /dev/null +++ b/environments/prod/backend/config/main-local.php @@ -0,0 +1,9 @@ + [ + 'request' => [ + // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation + 'cookieValidationKey' => '', + ], + ], +]; diff --git a/environments/prod/backend/config/params-local.php b/environments/prod/backend/config/params-local.php new file mode 100755 index 0000000..c1d2298 --- /dev/null +++ b/environments/prod/backend/config/params-local.php @@ -0,0 +1,3 @@ +run(); diff --git a/environments/prod/common/config/main-local.php b/environments/prod/common/config/main-local.php new file mode 100755 index 0000000..ea8ef35 --- /dev/null +++ b/environments/prod/common/config/main-local.php @@ -0,0 +1,16 @@ + [ + 'db' => [ + 'class' => 'yii\db\Connection', + 'dsn' => 'mysql:host=localhost;dbname=yii2advanced', + 'username' => 'root', + 'password' => '', + 'charset' => 'utf8', + ], + 'mailer' => [ + 'class' => 'yii\swiftmailer\Mailer', + 'viewPath' => '@common/mail', + ], + ], +]; diff --git a/environments/prod/common/config/params-local.php b/environments/prod/common/config/params-local.php new file mode 100755 index 0000000..c1d2298 --- /dev/null +++ b/environments/prod/common/config/params-local.php @@ -0,0 +1,3 @@ + [ + 'request' => [ + // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation + 'cookieValidationKey' => '', + ], + ], +]; diff --git a/environments/prod/frontend/config/params-local.php b/environments/prod/frontend/config/params-local.php new file mode 100755 index 0000000..c1d2298 --- /dev/null +++ b/environments/prod/frontend/config/params-local.php @@ -0,0 +1,3 @@ +run(); diff --git a/environments/prod/yii b/environments/prod/yii new file mode 100755 index 0000000..65c41d0 --- /dev/null +++ b/environments/prod/yii @@ -0,0 +1,28 @@ +#!/usr/bin/env php +run(); +exit($exitCode); diff --git a/frontend/assets/AppAsset.php b/frontend/assets/AppAsset.php new file mode 100755 index 0000000..d1552ea --- /dev/null +++ b/frontend/assets/AppAsset.php @@ -0,0 +1,38 @@ + + * @since 2.0 + */ +class AppAsset extends AssetBundle +{ + public $basePath = '@webroot'; + public $baseUrl = '@web'; + public $css = [ + 'css/style.css', + //'css/comments.css', + 'http://fonts.googleapis.com/css?family=Roboto', + ]; + public $js = [ + ]; + public $depends = [ + 'yii\web\JqueryAsset', + 'sersid\owlcarousel\Asset' + //'yii\web\YiiAsset', + //'yii\bootstrap\BootstrapAsset', + ]; + + public function init() { + $this->jsOptions['position'] = View::POS_END; + parent::init(); + } +} diff --git a/frontend/assets/IeAsset.php b/frontend/assets/IeAsset.php new file mode 100755 index 0000000..7ae917e --- /dev/null +++ b/frontend/assets/IeAsset.php @@ -0,0 +1,26 @@ + + * @since 2.0 + */ +class IeAsset extends AssetBundle +{ + public $basePath = '@webroot'; + public $baseUrl = '@web'; + public $cssOptions = ['condition' => 'lte IE9']; + public $css = [ + 'css/ie.css' + ]; + + +} diff --git a/frontend/components/BgWidget.php b/frontend/components/BgWidget.php new file mode 100755 index 0000000..bf78691 --- /dev/null +++ b/frontend/components/BgWidget.php @@ -0,0 +1,30 @@ +getView(); + $view->registerJs(" + var heightR = $('.f').height();// высота экрана + var widthR = $(window).width();// ширина экрана + + $('#bg').css({'height':heightR+100}); + ", View::POS_READY, 'bg'); + $this->bg = Bg::find()->orderBy('random()')->one(); + } + + public function run(){ + return ' +'; + } +} +?> \ No newline at end of file diff --git a/frontend/components/HreflangWidget.php b/frontend/components/HreflangWidget.php new file mode 100755 index 0000000..eb7adf4 --- /dev/null +++ b/frontend/components/HreflangWidget.php @@ -0,0 +1,52 @@ +requestedRoute, '/')], + Yii::$app->request->getQueryParams(), + [ + 'language' => $language, + ] + ); + return Url::to($params); + } + + public function run(){ + //$lang = (Yii::$app->language=='ru') ? 'en' : 'ru'; + $result = ''; + foreach (Yii::$app->urlManager->languages as $language) { + if ($language === Yii::$app->language) { + // skip current language + continue; + } + + $result.= Html::tag( + 'link', + '', + [ + 'rel' => 'alternate', + 'hreflang' => $language, + 'href' => $this->translateCurrentRequest($language), + ] + ); + } + return $result; + } +} +?> \ No newline at end of file diff --git a/frontend/components/SeoComponent.php b/frontend/components/SeoComponent.php new file mode 100755 index 0000000..060641f --- /dev/null +++ b/frontend/components/SeoComponent.php @@ -0,0 +1,37 @@ +request->isGet) { + \Yii::$app->on(\yii\base\Application::EVENT_BEFORE_REQUEST, function($event) { + $array = ['%21'=>'!','%22'=>'"','%23'=>'#','%24'=>'$','%25'=>'%','%26'=>'&','%27'=>'\'','%28'=>'(','%29'=>')','%2a'=>'*','%2b'=>'+','%2c'=>',','%2d'=>'-','%2e'=>'.','%2f'=>'/','%3a'=>':','%3b'=>';','%3c'=>'<','%3d'=>'=','%3e'=>'>','%3f'=>'?','%40'=>'@','%5b'=>'[','%5c'=>'\\','%5d'=>']','%5e'=>'^','%5f'=>'_','%60'=>'`','%7b'=>'{','%7c'=>'|','%7d'=>'}','%7e'=>'~']; + $url = mb_strtolower (\Yii::$app->request->url); + + $continue = true; + + foreach($array as $sym=>$sym_row){ + if(strpos($url, $sym)){ + $url = str_replace($sym, $sym_row, $url); + $continue = false; + + } + } + + if(!$continue){ + \Yii::$app->getResponse()->redirect($url); + } + }); + } + + return $app; + } + +} \ No newline at end of file diff --git a/frontend/components/Text.php b/frontend/components/Text.php new file mode 100755 index 0000000..1905d98 --- /dev/null +++ b/frontend/components/Text.php @@ -0,0 +1,16 @@ +$count) + { + //$pos = mb_strpos($text, ' ', $count, 'UTF-8'); + $text = mb_substr($text, 0, $count, 'UTF-8'); + return $text.'...'; + } + else + return $text; + } +} \ No newline at end of file diff --git a/frontend/config/.gitignore b/frontend/config/.gitignore new file mode 100755 index 0000000..8ded784 --- /dev/null +++ b/frontend/config/.gitignore @@ -0,0 +1,2 @@ +main-local.php +params-local.php \ No newline at end of file diff --git a/frontend/config/bootstrap.php b/frontend/config/bootstrap.php new file mode 100755 index 0000000..6fd199e --- /dev/null +++ b/frontend/config/bootstrap.php @@ -0,0 +1 @@ + 'app-frontend', + 'basePath' => dirname(__DIR__), + 'bootstrap' => [ + + 'frontend\components\SeoComponent', + ], + 'controllerNamespace' => 'frontend\controllers', + 'modules' => [ +// 'comment' => [ +// 'class' => 'common\modules\comment\Module', +// 'useRbac' => false, +// 'rbac' => [ +// 'rules' => [ +// \common\modules\comment\rbac\ArtboxCommentCreateRule::className(), +// \common\modules\comment\rbac\ArtboxCommentDeleteRule::className(), +// \common\modules\comment\rbac\ArtboxCommentUpdateRule::className(), +// \common\modules\comment\rbac\ArtboxCommentUpdateOwnRule::className(), +// \common\modules\comment\rbac\ArtboxCommentDeleteOwnRule::className(), +// ], +// 'permissions' => [ +// [ +// 'name' => common\modules\comment\Permissions::CREATE, +// 'description' => 'Can create comments', +// 'ruleName' =>(new \common\modules\comment\rbac\ArtboxCommentCreateRule())->name, +// ], +// [ +// 'name' => common\modules\comment\Permissions::UPDATE, +// 'description' => 'Can update comments', +// 'ruleName' =>(new \common\modules\comment\rbac\ArtboxCommentUpdateRule())->name, +// ], +// [ +// 'name' => common\modules\comment\Permissions::DELETE, +// 'description' => 'Can delete comments', +// 'ruleName' =>(new \common\modules\comment\rbac\ArtboxCommentDeleteRule())->name, +// ], +// [ +// 'name' => common\modules\comment\Permissions::UPDATE_OWN, +// 'description' => 'Can update own comments', +// 'ruleName' =>(new \common\modules\comment\rbac\ArtboxCommentUpdateOwnRule())->name, +// ], +// [ +// 'name' => common\modules\comment\Permissions::DELETE_OWN, +// 'description' => 'Can delete own comments', +// 'ruleName' =>(new \common\modules\comment\rbac\ArtboxCommentDeleteOwnRule())->name, +// ], +// ], +// ], +// +// ], + ], + 'components' => [ + + 'authManager' => [ + 'class' => 'yii\rbac\DbManager', + ], + 'user' => [ + 'identityClass' => 'common\models\Customer', + 'enableAutoLogin' => true, + 'loginUrl' => ['login'], + ], + 'request'=>[ + 'cookieValidationKey' => 'ndahjhjjidasuidrqeswuiuirqw89', + 'csrfParam' => '_frontendCSRF', + 'class' => 'common\components\Request', + + 'web'=> '/frontend/web' + + ], + + 'log' => [ + 'traceLevel' => YII_DEBUG ? 3 : 0, + 'targets' => [ + [ + 'class' => 'yii\log\FileTarget', + 'levels' => ['error', 'warning'], + ], + ], + ], + 'errorHandler' => [ + 'errorAction' => 'site/error', + ], + /*'imageCache' => [ + 'class' => 'iutbay\yii2imagecache\ImageCache', + 'sourcePath' => '@app/web/images', + 'sourceUrl' => '@web/images', + 'thumbsPath' => '@app/web/thumbs', + 'thumbsUrl' => '@web/thumbs', + 'resizeMode' => 'inset', + 'sizes' => [ + 'brandlist' => [128, 128], + 'product' => [300, 300], + 'product_trumb' => [80, 80], + 'product_trumb2' => [100, 100], + 'list' => [134, 200], + 'product_list2' => [130, 70], + 'product_variant' => [42, 42], + 'mainmenu' => [160, 170], + 'large' => [600, 600], + ], + ],*/ + 'urlManager' => [ + 'enablePrettyUrl' => true, + 'showScriptName' => false, + 'rules' => [ + '' => 'site/index', + 'login' => 'login/index', + 'iam' => 'iam/index', + 'text/' => 'text/index', + '/text/' => 'text/index', + [ + 'class' => '\common\modules\product\CatalogUrlManager', + 'route_map' => [ + 'catalog' => 'catalog/category', + 'product' => 'catalog/product', + + ] + ], + 'priceparam.xml' => 'site/priceparam', + 'price.xml' => 'site/price', + 'smstest' => 'site/sms', + 'search' => 'search/index', +// 'catalog' => 'catalog/all', +// 'catalog/' => 'catalog/index', +// 'products/search' => 'products/search', +// 'products/compare' => 'products/compare', +// 'products/' => 'products/index', +// 'products//-' => 'products/show', + 'news/-' => 'news/show', + 'brands' => 'catalog/brands', + 'brands/' => 'catalog/brand', + 'blog' => 'articles/index', + 'blog/-' => 'articles/show', + 'event' => 'event/index', + 'event/-' => 'event/show', + '///' => '//', + '//' => '/', + '/admin' => 'admin/default/index', + '/admin/users' => 'admin/users/index', + 'thumbs/' => 'site/thumb', + ], + + ], + + ], + 'params' => $params, +]; diff --git a/frontend/config/params.php b/frontend/config/params.php new file mode 100755 index 0000000..4ee7a49 --- /dev/null +++ b/frontend/config/params.php @@ -0,0 +1,4 @@ + 'admin@example.com', +]; diff --git a/frontend/controllers/ArticlesController.php b/frontend/controllers/ArticlesController.php new file mode 100755 index 0000000..c6645bf --- /dev/null +++ b/frontend/controllers/ArticlesController.php @@ -0,0 +1,42 @@ +groupBy('id')->orderBy('id DESC') ; + $countQuery = clone $query; + $pages = new Pagination(['totalCount' => $countQuery->count(), 'pageSize'=>18]); + $pages->forcePageParam = false; + $pages->pageSizeParam = false; + $news = $query->offset($pages->offset) + ->with(['comments.rating', 'averageRating']) + ->limit($pages->limit) + ->all(); + + return $this->render('index', [ + 'pages'=>$pages, + 'news'=>$news, + ]); + } + + public function actionShow(){ + if(!$news = Articles::find()->where(['id'=>$_GET['id']])->one()) + throw new HttpException(404, 'Данной странице не существует!'); + + return $this->render('show', [ + 'news'=>$news, + ]); + } + +} \ No newline at end of file diff --git a/frontend/controllers/BasketController.php b/frontend/controllers/BasketController.php new file mode 100755 index 0000000..ceeb021 --- /dev/null +++ b/frontend/controllers/BasketController.php @@ -0,0 +1,204 @@ +deleteBasketMod($_GET['deleteID']); + return Yii::$app->response->redirect(['basket/index']); + } + + if(isset($_POST['update']) && isset($_POST['ProductVariant'])){ + + foreach ($_POST['ProductVariant'] as $index=>$row) { + $modelOrder->updateBasket($row); + } + }elseif(isset($_POST['ProductVariant'])){ +// die(print_r($_POST)); + $body = ''; + foreach ($_POST['ProductVariant'] as $index=>$row) { + $body .= $row['product_name'].' '.$row['name'].' Кол:'.$row['count'].' Цена:'.$row['sum_cost']; + $body .= "\n\r"; + } + $body .= "\n\r"; + + if ($modelOrder->load(Yii::$app->request->post()) && $modelOrder->save()) { + $productV = $_POST['ProductVariant']; + + foreach ($productV as $index=>$row) { + $modelOrdersProducts = new OrdersProducts(); + $mod_id = $row['id']; + + $data['OrdersProducts'] = $row; + $data['OrdersProducts']['mod_id'] = $mod_id; + $data['OrdersProducts']['order_id'] = $modelOrder->id; + $product = ProductVariant::findOne($mod_id); + /** + * Проверяем товар на наличие + */ + + if(!$product->stock > 0 || !$product->price > 0 ){ + + /** + * Добавляем сообщение об ошибке + */ + \Yii::$app->getSession()->setFlash('error', 'К сожалению товара '.$product->name . ' нет в наличии'); + /** + * Удаляем заказ + */ + $modelOrder->delete(); + + $basket_mods = $modelOrder->getBasketMods(); + + return $this->render('index',[ + 'modelMod'=>$modelMod, + 'basket_mods'=>$basket_mods, + 'modelOrder'=>$modelOrder, + ]); + }else { + + /** + * Удаляем товар с массива и сохраняем в заказ + */ + unset($row['id']); + $productV[$index]['img'] = \common\components\artboximage\ArtboxImageHelper::getImageSrc($product->image->imageUrl, 'list'); + $modelOrdersProducts->load($data); + $modelOrdersProducts->validate(); + $modelOrdersProducts->save(); + } + + } + + /** + * Сохраняем заказ + */ + + + + if(!Yii::$app->user->id && !empty($modelOrder->email)){ + $modelUser = new Customer(); + $modelUser->role = 'person'; + $modelUser->username = $modelOrder->email; + $modelUser->name = $modelOrder->name; + $modelUser->phone = $modelOrder->phone; + $modelUser->password = Yii::$app->getSecurity()->generateRandomString(10); + $modelUser->group_id = 2; + $modelUser->save(); + } + $order = clone $modelOrder; + /** + * Чистим сессию корзины + */ + + $modelOrder->clearBasket(); + + Mailer::widget( + ['type' => 'order', + 'subject'=> 'Спасибо за покупку', + 'email' => $modelOrder->email, + 'params' => [ + 'order' => $order, + 'variants' => $productV, + ] + ]); + + $text = "# zakaz: ". $order->id .". V blijayshee vremya menedjer svyajetsya s Vami. (044) 303 90 15"; + Yii::$app->sms->send($order->phone, $text); + + Yii::$app->session['order_data']= ['order' => $order,'variants'=>$productV]; + + return $this->redirect(['basket/success', + ]); + } + } + + $basket_mods = $modelOrder->getBasketMods(); + + if(!empty(Yii::$app->user->id)){ + $user = Customer::findOne(Yii::$app->user->id); + $modelOrder->email = $user->username; + $modelOrder->phone = $user->phone; + $modelOrder->name = $user->name; + } + + + + return $this->render('index', [ + 'modelMod'=>$modelMod, + 'basket_mods'=>$basket_mods, + 'modelOrder'=>$modelOrder, + ]); + } + + public function actionItems(){ + $modelMod = new Orders; + + + if(!empty($_GET['deleteID'])){ + $modelMod->deleteBasketMod($_GET['deleteID']); + } + + if(isset($_POST['ProductVariant'])){ + foreach ($_POST['ProductVariant'] as $index=>$row) { + $modelMod->updateBasket($row); + } + } + $basket_mods = $modelMod->getBasketMods(); + return $this->renderAjax('ajax_items', [ + 'modelMod'=>$modelMod, + 'basket_mods'=>$basket_mods, + ]); + } + + public function actionInfo() + { + $modelMod = new Orders(); + $info = $modelMod->rowBasket(); + return $this->renderAjax('ajax_info', [ + 'info'=>$info, + ]); + } + + public function actionAdd(){ + $modelOrders = new Orders(); + if(isset($_GET['mod_id'],$_GET['count']) && $_GET['mod_id']>0 && $_GET['count']>0){ + $modelOrders->addBasket($_GET['mod_id'],$_GET['count']); + } + + Yii::$app->end(); + } + + + public function actionSuccess(){ + + $orderData = Yii::$app->session->get('order_data'); + unset($_SESSION['order_data']); + return $this->render('success',[ + + 'order' => $orderData['order'], + 'variants' => $orderData['variants'], + ]); + } + + + +} \ No newline at end of file diff --git a/frontend/controllers/CabinetController.php b/frontend/controllers/CabinetController.php new file mode 100755 index 0000000..e60d215 --- /dev/null +++ b/frontend/controllers/CabinetController.php @@ -0,0 +1,100 @@ + [ + 'class' => AccessControl::className(), + 'rules' => [ + [ + 'actions' => ['login', 'error'], + 'allow' => true, + ], + [ + 'actions' => ['logout', 'index', 'create', 'update', 'view', 'delete','my-orders','bookmarks'], + 'allow' => true, + 'roles' => ['@'], + ], + ], + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'logout' => ['post'], + ], + ], + ]; + } + + public function actionIndex(){ + return $this->render('index'); + } + + public function actionUpdate(){ + + + + $model = Yii::$app->user->identity; + + + if(Yii::$app->request->post()){ + + $model->load(Yii::$app->request->post()); + $model->validate(); + + if($model->validate()){ + $model->save(); + + } + + } + + + return $this->render('update',[ + 'model' =>$model + ]); + } + + + public function actionBookmarks(){ + return $this->render('bookmarks',[ + + ]); + } + + public function actionMyOrders(){ + return $this->render('my-orders',[ + + ]); + } + +} \ No newline at end of file diff --git a/frontend/controllers/CallController.php b/frontend/controllers/CallController.php new file mode 100755 index 0000000..f38c460 --- /dev/null +++ b/frontend/controllers/CallController.php @@ -0,0 +1,33 @@ +load(Yii::$app->request->post()) && $model->contact('borisenko.pavel@gmail.com')) { + + return Yii::$app->response->redirect(['call/success']); + } + + return $this->render('index', [ + 'model'=>$model, + ]); + } + + + public function actionSuccess(){ + return $this->render('success'); + } + +} \ No newline at end of file diff --git a/frontend/controllers/CatalogController.php b/frontend/controllers/CatalogController.php new file mode 100755 index 0000000..b34677e --- /dev/null +++ b/frontend/controllers/CatalogController.php @@ -0,0 +1,229 @@ +request->get('category'); + $filter = Yii::$app->request->get('filters', [ ]); + $filter_check = $filter; + + if(empty( $category->category_id ) && empty( $word )) { + return $this->render('catalog'); + } + + ProductHelper::addLastCategory($category->category_id); + + $params = [ ]; + + $optionsList = ArrayHelper::getColumn(TaxGroup::find() + ->where([ 'is_filter' => 'TRUE' ]) + ->all(), 'alias'); + + if(!empty( $filter[ 'brands' ] )) { + unset( $filter_check[ 'brands' ] ); + $brands = Brand::find() + ->select('brand_id') + ->where([ + 'in', + 'alias', + $filter[ 'brands' ], + ]) + ->all(); + $params[ 'brands' ] = [ ]; + foreach($brands as $brand) { + $params[ 'brands' ][] = $brand->brand_id; + } + } + + if(!empty( $filter[ 'special' ] )) { + unset( $filter_check[ 'special' ] ); + if(!is_array($filter[ 'special' ])) { + $filter[ 'special' ] = [ $filter[ 'special' ] ]; + } + if(in_array('new', $filter[ 'special' ])) { + $params[ 'special' ][ 'is_new' ] = true; + } + if(in_array('top', $filter[ 'special' ])) { + $params[ 'special' ][ 'is_top' ] = true; + } + if(in_array('promo', $filter[ 'special' ])) { + $params[ 'special' ][ 'akciya' ] = true; + } + } + + if(!empty( $filter[ 'prices' ] )) { + unset( $filter_check[ 'prices' ] ); + $params[ 'prices' ] = $filter[ 'prices' ]; + } + + foreach($optionsList as $optionList) { + + if(isset( $filter[ $optionList ] )) { + unset( $filter_check[ $optionList ] ); + $params[ $optionList ] = $filter[ $optionList ]; + } + + } + + if(!empty( $filter_check )) { + $filter = array_diff_key($filter, $filter_check); + Yii::$app->response->redirect([ + 'catalog/category', + 'category' => $category, + 'filters' => $filter, + ], 301); + } + + $productModel = new ProductFrontendSearch(); + //$productQuery = $productModel->getSearchQuery($category, $params); + $productProvider = $productModel->search($category, $params); + + $brandModel = new BrandSearch(); + $brands = $brandModel->getBrands($category, $params) + ->all(); + // Old filters + // $optionsQuery = $productModel->optionsForCategory($category, $params); + // $groups = []; + // + // + // foreach ($optionsQuery->all() as $option) { + // if (!isset($groups[$option->tax_group_id])) { + // $groups[$option->tax_group_id] = $option->taxGroup; + // $groups[$option->tax_group_id]->_options = []; + // } + // $groups[$option->tax_group_id]->_options[] = $option; + // } + // foreach($groups as $i => $group) { + // if (empty($group->_options)) + // unset($groups[$i]); + // } + // New filters + $groups = $category->getActiveFilters()->all(); + $groups = ArrayHelper::index($groups, null, 'name'); + + $priceLimits = $productModel->priceLimits($category, $params); + + /* + * Greedy search for comments and rating + */ + $query = $productProvider->query; + $query->with([ + 'comments', + 'averageRating', + ]); + /* + * End of greedy search for rating and comments + */ + + return $this->render('products', [ + 'category' => $category, + 'brandModel' => $brandModel, + 'brands' => $brands, + 'filter' => $filter, + 'params' => $params, + 'productModel' => $productModel, + 'productProvider' => $productProvider, + 'groups' => $groups, + 'priceLimits' => $priceLimits, + ]); + + } + + public function actionProduct() + { + /** @var Product $product */ + $product = Yii::$app->request->get('product'); + + if(!$product->enabledVariant) { + throw new HttpException(404, 'Товар не найден'); + } + + ProductHelper::addLastProsucts($product->product_id); + + $category = null; + $last_category_id = ProductHelper::getLastCategory(); + if(!empty($last_category_id)) { + $category = $product->getCategory()->andWhere(['category_id' => $last_category_id])->one(); + } + if(empty($category)) { + $category = $product->category; + } + + return $this->render('product', [ + 'product' => $product, + 'category' => $category, + ]); + } + + public function actionBrands() + { + $dataProvider = new ActiveDataProvider([ + 'query' => Brand::find() + ->joinWith('brandName') + ->orderBy('brand_name.value'), + 'pagination' => [ + 'pageSize' => -1, + ], + ]); + + return $this->render('brands', [ + 'dataProvider' => $dataProvider, + ]); + } + + public function actionBrand($brand) + { + $brand = BrandSearch::findByAlias($brand); + + $params = [ + 'brands' => $brand->brand_id, + ]; + + $productModel = new ProductFrontendSearch(); + $productProvider = $productModel->search(NULL, $params); + + $priceLimits = $productModel->priceLimits(NULL, $params); + + return $this->render('brand', [ + 'productModel' => $productModel, + 'productProvider' => $productProvider, + 'brand' => $brand, + 'priceLimits' => $priceLimits, + ]); + } + + } diff --git a/frontend/controllers/EventController.php b/frontend/controllers/EventController.php new file mode 100755 index 0000000..db7a575 --- /dev/null +++ b/frontend/controllers/EventController.php @@ -0,0 +1,48 @@ + Event::find() ]); + + return $this->render('index', [ + 'dataProvider' => $dataProvider, + ]); + } + + + + public function actionShow($alias) + { + + return $this->render('show', [ + 'model' => $this->findModel($alias), + ]); + } + + + protected function findModel($alias) + { + if (($model = Event::findOne(["alias"=>$alias])) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } + + +} \ No newline at end of file diff --git a/frontend/controllers/IamController.php b/frontend/controllers/IamController.php new file mode 100755 index 0000000..552ff00 --- /dev/null +++ b/frontend/controllers/IamController.php @@ -0,0 +1,161 @@ + [ + 'class' => AccessControl::className(), + //'only' => ['person'], + 'rules' => [ + [ + 'actions' => ['index','edit','myorders','show_order','share','price'], + 'allow' => true, + 'roles' => ['@'], + ], + ], + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'logout' => ['post'], + ], + ], + ]; + } + + + public function actionIndex() + { + return $this->render(Yii::$app->user->identity->role, [ + 'model' => Yii::$app->user->identity, + ]); + } + + public function actionEdit() + { + + + $model = User::findOne(Yii::$app->user->id); + + $model->scenario = 'edit_'.Yii::$app->user->identity->role; + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + + return Yii::$app->response->redirect(['/iam/index']); + + + } + + return $this->render('edit_'.Yii::$app->user->identity->role, [ + 'model' => $model, + ]); + } + + public function actionMyorders(){ + + + $model = Orders::find()->where(['user_id'=>Yii::$app->user->id])->orderBy('id DESC')->all(); + + return $this->render('myorders',['model'=>$model]); + + } + + public function actionShow_order() + { + $model = Orders::findOne($_GET['id']); + + + + $dataProvider = new ActiveDataProvider([ + 'query' => OrdersProducts::find()->where(['order_id'=>$_GET['id']]), + 'pagination' => [ + 'pageSize' => 20, + ], + ]); + return $this->render('show_order',['model'=>$model,'dataProvider'=>$dataProvider]); + } + + public function actionShare(){ + if(Yii::$app->request->get('id')) { + if(!$model = Share::find()->where('user_id=:user_id and product_id=:product_id',[':user_id'=>Yii::$app->user->id,':product_id'=>$_GET['id']])->one()) + $model = new Share; + + $model->product_id = Yii::$app->request->get('id'); + $model->save(); + + Yii::$app->getSession()->setFlash('success', 'Этот товар добавлен в закладку!'); + return $this->redirect(Yii::$app->request->referrer); + } + else { + /* $dataProvider = new ActiveDataProvider([ + 'query' => Share::find()->where(['user_id'=>Yii::$app->user->id])->orderBy('date_time DESC'), + 'pagination' => [ + 'pageSize' => 20, + ], + ]);*/ + if(Yii::$app->request->get('deleteID')) { + $model = Share::find()->where(['user_id'=>Yii::$app->user->id,'id'=>Yii::$app->request->get('deleteID')])->one(); + $model->delete(); + return $this->redirect(Yii::$app->request->referrer); + } + + $items = []; + foreach(Share::find()->where(['user_id' => Yii::$app->user->id])->all() as $item) { + $items[$item->date][] = $item; + } + + /* $query = Share::find()->where(['user_id'=>Yii::$app->user->id])->groupBy('date')->orderBy('date DESC'); + $countQuery = clone $query; + $pages = new Pagination(['totalCount' => $countQuery->count(), 'pageSize'=>20]); + $pages->forcePageParam = false; + $pages->pageSizeParam = false; + $share = $query->offset($pages->offset) + ->limit($pages->limit) + ->all();*/ + return $this->render('share', ['items' => $items]); + } + } + + + public function actionPrice(){ + if(!empty($_GET['id'])){ + if(!$model = Price::find()->where('user_id=:user_id and product_id=:product_id',[':user_id'=>Yii::$app->user->id,':product_id'=>$_GET['id']])->one()) + $model = new Price; + + $model->product_id = $_GET['id']; + $model->save(); + + Yii::$app->getSession()->setFlash('success', 'Этот товар добавлен в закладку Узнать о снижение цены!'); + return $this->redirect(Yii::$app->request->referrer); + } + else{ + $dataProvider = new ActiveDataProvider([ + 'query' => Price::find()->where(['user_id'=>Yii::$app->user->id])->orderBy('date_time DESC'), + 'pagination' => [ + 'pageSize' => 20, + ], + ]); + return $this->render('price',['dataProvider'=>$dataProvider]); + } + } + +} \ No newline at end of file diff --git a/frontend/controllers/LoginController.php b/frontend/controllers/LoginController.php new file mode 100755 index 0000000..0304395 --- /dev/null +++ b/frontend/controllers/LoginController.php @@ -0,0 +1,50 @@ +user->isGuest) { + return $this->goHome(); + } + + $model = new LoginForm(); + if ($model->load(Yii::$app->request->post()) && $model->login()) { + return $this->goBack(); + } else { + return $this->render('index', [ + 'model' => $model, + ]); + } + } + + public function actionLogout() + { + Yii::$app->user->logout(); + + return $this->goHome(); + } + + public function actionForgot(){ + + $model = new Customer; + if(!empty($_POST['User']['username'])){ + if($user = Customer::find()->where(['username'=>$_POST['User']['username']])->one()) + $user->sendMsg(); + Yii::$app->getSession()->setFlash('success', 'На указанный Вами эмейл отправленно письмо с паролем!'); + return $this->refresh(); + } + + return $this->render('forgot', [ + 'model' => $model, + ]); + } +} \ No newline at end of file diff --git a/frontend/controllers/NewsController.php b/frontend/controllers/NewsController.php new file mode 100755 index 0000000..dfc4a04 --- /dev/null +++ b/frontend/controllers/NewsController.php @@ -0,0 +1,41 @@ +orderBy('id DESC') ; + $countQuery = clone $query; + $pages = new Pagination(['totalCount' => $countQuery->count(), 'pageSize'=>18]); + $pages->forcePageParam = false; + $pages->pageSizeParam = false; + $news = $query->offset($pages->offset) + ->limit($pages->limit) + ->all(); + + return $this->render('index', [ + 'pages'=>$pages, + 'news'=>$news, + ]); + } + + public function actionShow(){ + if(!$news = News::find()->where(['id'=>$_GET['id']])->one()) + throw new HttpException(404, 'Данной странице не существует!'); + + return $this->render('show', [ + 'news'=>$news, + ]); + } + +} \ No newline at end of file diff --git a/frontend/controllers/PageController.php b/frontend/controllers/PageController.php new file mode 100755 index 0000000..a65088a --- /dev/null +++ b/frontend/controllers/PageController.php @@ -0,0 +1,20 @@ +getPageTranslit($translit)) + throw new \Exception(404,'The requested page does not exist.'); + return $this->render('show',['page'=>$page]); + } +} \ No newline at end of file diff --git a/frontend/controllers/PostController.php b/frontend/controllers/PostController.php new file mode 100755 index 0000000..8935ca7 --- /dev/null +++ b/frontend/controllers/PostController.php @@ -0,0 +1,20 @@ + 55]); + } + + public function actionView($id) + { + return 'actionView:'. $id; + } + +} diff --git a/frontend/controllers/ProductsController.php b/frontend/controllers/ProductsController.php new file mode 100755 index 0000000..56e1ff5 --- /dev/null +++ b/frontend/controllers/ProductsController.php @@ -0,0 +1,154 @@ +load ($_POST); + if (! $catalog = Catalog::find ()->where (['translit' => $_GET['translit']])->with ('parent')->one ()) + throw new HttpException(404, 'Данной странице не существует!'); + $query = Products::find ()->where ('catalog_id=:catalog_id OR catalog_parent_id=:catalog_parent_id', [':catalog_id' => $catalog->id, ':catalog_parent_id' => $catalog->id])->with (['catalog'])->innerJoinWith (['cost']); + if (! empty($_POST['Products']['minCost']) && ! empty($_POST['Products']['maxCost'])) $query->andWhere ('(cost>=:minCost and cost<=:maxCost)', [':minCost' => $_POST['Products']['minCost'], ':maxCost' => $_POST['Products']['maxCost']]); + if (! empty($_GET['brends'])) + { + $b = explode (';', $_GET['brends']); + $query->andWhere (['brend_id' => $b]); + } + if (! empty($_GET['filters'])) + { + $l = explode (';', $_GET['filters']); + $items = Filters::find ()->where (['parent_id' => 0])->all (); + foreach ($items as $key => $it) + { + $f = []; + foreach ($it->childs as $c) + { + if (in_array ($c['id'], $l)) $f[] = $c['id']; + } + if (count ($f) > 0) + $query->innerJoin ('productsFilters as filter_' . $key, 'filter_' . $key . '.product_id=products.id')->andWhere (['filter_' . $key . '.filter_id' => $f]); + // $childs->leftJoin('productsFilters as pf_'.$key, 'pf_'.$key.'.product_id = productsFilters.product_id')->andWhere(['pf_'.$key.'.filter_id'=>$f]); + } + } + if (! empty($modelProducts->fasovka)) + { + $query->innerJoinWith (['fasovka'])->andWhere ([ProductsFasovka::tableName () . '.fasovka_id' => $modelProducts->fasovka]); + } + if (! empty($modelProducts->type)) + { + $query->innerJoinWith (['type'])->andWhere ([ProductsType::tableName () . '.type_id' => $modelProducts->type]); + } + if (! empty($modelProducts->brends)) + { + $query->innerJoinWith (['brends'])->andWhere ([ProductsBrends::tableName () . '.brend_id' => $modelProducts->brends]); + } + $query->groupBy (['id']); + $countQuery = clone $query; + $pages = new Pagination(['totalCount' => $countQuery->count (), 'pageSize' => 15]); + $pages->forcePageParam = false; + $pages->pageSizeParam = false; + $products = $query->offset ($pages->offset) + ->limit ($pages->limit) + ->all (); + + return $this->render ('index', [ + 'modelProducts' => $modelProducts, + 'catalog' => $catalog, + 'pages' => $pages, + 'products' => $products, + ]); + } + + public function actionSearch () + { + $query = Products::find ()->innerJoinWith (['catalog'])->innerJoinWith (['cost'])->innerJoinWith (['brend']); + if (! empty($_GET['search_str'])) + { + $query->andWhere (['like', 'products.name', $_GET['search_str']]); + $query->orWhere (['like', 'catalog.name', $_GET['search_str']]); + $query->orWhere (['like', 'catalog_brends.name', $_GET['search_str']]); + $query->orWhere (['like', 'mod.art', $_GET['search_str']]); + } + $query->groupBy (['id']); + $countQuery = clone $query; + $pages = new Pagination(['totalCount' => $countQuery->count (), 'pageSize' => 20]); + $pages->forcePageParam = false; + $pages->pageSizeParam = false; + $products = $query->offset ($pages->offset) + ->limit ($pages->limit) + ->all (); + + return $this->render ('search', [ + 'pages' => $pages, + 'products' => $products, + ]); + } + + public function actionShow () + { + if (! $catalog = Catalog::find ()->where (['translit' => $_GET['translit_rubric']])->with ('parent')->one ()) + throw new HttpException(404, 'Данной странице не существует!'); + if (! $product = Products::find ()->where (['id' => $_GET['id']])->one ()) + throw new HttpException(404, 'Данной странице не существует!'); + ViewProduct::add ($product->id); + + return $this->render ('show', [ + 'catalog' => $catalog, + 'product' => $product, + ]); + } + + public function actionCompare () + { + $session = new Session; + $session->open (); + if (! empty($_GET['id'])) + { + $i = 0; + if (isset($session['compare'])) + { + foreach ($session['compare'] as $key => $compare) + { + if ($_GET['id'] == $compare) + { + $i++; + } + } + } + if ($i == 0) + { + $data[] = $_GET['id']; + $session['compare'] = $data; + } + Yii::$app->getSession ()->setFlash ('success', 'Этот товар добавлен к сравнению!'); + + return $this->redirect (Yii::$app->request->referrer); + } + else + { + //print_r($session['compare']); + $products = Products::find ()->where (['id' => $session['compare']])->all (); + + return $this->render ('compare', [ + 'products' => $products, + ]); + } + } +} \ No newline at end of file diff --git a/frontend/controllers/RegController.php b/frontend/controllers/RegController.php new file mode 100755 index 0000000..5d9a599 --- /dev/null +++ b/frontend/controllers/RegController.php @@ -0,0 +1,88 @@ + [ + 'class' => AccessControl::className(), + //'only' => ['person'], + 'rules' => [ + [ + 'actions' => ['person','captcha'], + 'allow' => true, + 'roles' => ['?'], + ], + ], + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'logout' => ['post'], + ], + ], + ]; + } + + public function actions() + { + return [ + 'captcha' => [ + 'class' => 'yii\captcha\CaptchaAction', + ], + ]; + } + + private function saveUser($scenario = null){ + + $model = (!empty($_GET['id'])) ? Customer::findOne($_GET['id']) : new Customer; + if(!empty($scenario))$model->scenario = $scenario; + + if ($model->load(Yii::$app->request->post())) { + $model->role = "person"; + $model->group_id = 1; + $model->save(); + $modelLogin = new LoginForm(); + $modelLogin->username = $model->username; + $modelLogin->password = $model->password; + $modelLogin->login(); + Mailer::widget( + ['type' => 'registration', + 'subject'=> 'Спасибо за регистрацию', + 'email' => $model->username, + 'params' => [ + 'name' => $model->username, + 'pass' => $model->password, + ] + ]); + $this->redirect(['/iam']); + } + + return $model; + } + + public function actionPerson() + { + + $model = $this->saveUser('person'); + + return $this->render('person', [ + 'model' => $model, + ]); + } + + + +} \ No newline at end of file diff --git a/frontend/controllers/SearchController.php b/frontend/controllers/SearchController.php new file mode 100755 index 0000000..a60e80c --- /dev/null +++ b/frontend/controllers/SearchController.php @@ -0,0 +1,76 @@ +request->get('word', '')); + + if (!empty($word)) + { + + + if( preg_match('/^\+?\d+$/', $word) && (iconv_strlen($word) > 4)){ + + $params['keywords'][] = $word; + + $categoriesQuery = Category::find() + ->innerJoin(ProductCategory::tableName(), ProductCategory::tableName() .'.category_id = '. Category::tableName() .'.category_id') + ->innerJoin(Product::tableName(), Product::tableName() .'.product_id = '. ProductCategory::tableName() .'.product_id') + ->innerJoin(ProductVariant::tableName(), ProductVariant::tableName() .'.product_id = '. ProductCategory::tableName() .'.product_id'); + $categoriesQuery->andWhere(['ilike', 'product.name', $params['keywords'][0]]); + $categories = $categoriesQuery->all(); + + } else { + + $params['keywords'] = explode(' ', preg_replace("|[\s,.!:&?~();-]|i", " ", $word)); + + foreach($params['keywords'] as $i => &$keyword) { + $keyword = trim($keyword); + if (empty($keyword)) { + unset($params['keywords'][$i]); + } + } + array_unshift($params['keywords'], $word); + + $categoriesQuery = Category::find() + ->innerJoin(ProductCategory::tableName(), ProductCategory::tableName() .'.category_id = '. Category::tableName() .'.category_id') + ->innerJoin(Product::tableName(), Product::tableName() .'.product_id = '. ProductCategory::tableName() .'.product_id') + ->innerJoin(ProductVariant::tableName(), ProductVariant::tableName() .'.product_id = '. ProductCategory::tableName() .'.product_id'); + foreach ($params['keywords'] as $keyword) { + $categoriesQuery->andWhere(['ilike', 'product.name', $keyword]); + } + $categoriesQuery->andWhere(['!=', ProductVariant::tableName() .'.stock', 0]); + $categories = $categoriesQuery->all(); + } + + $productModel = new ProductFrontendSearch(); + $productProvider = $productModel->search(null, $params); + + + return $this->render( + 'index', + [ + 'keywords' => $params['keywords'], + 'productModel' => $productModel, + 'productProvider' => $productProvider, + 'categories' => $categories, + ] + ); + } + else + { + throw new HttpException(404, 'Данной странице не существует!'); + } + } +} \ No newline at end of file diff --git a/frontend/controllers/ServiceController.php b/frontend/controllers/ServiceController.php new file mode 100755 index 0000000..1b50bf2 --- /dev/null +++ b/frontend/controllers/ServiceController.php @@ -0,0 +1,48 @@ + Service::find() ]); + + return $this->render('index', [ + 'dataProvider' => $dataProvider, + ]); + } + + + + public function actionView($alias) + { + + return $this->render('view', [ + 'model' => $this->findModel($alias), + ]); + } + + + protected function findModel($alias) + { + if (($model = Service::findOne(["alias"=>$alias])) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } + + +} \ No newline at end of file diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php new file mode 100755 index 0000000..e8f0ef6 --- /dev/null +++ b/frontend/controllers/SiteController.php @@ -0,0 +1,193 @@ + 'iutbay\yii2imagecache\ThumbAction', + ]; + } + + public function actionIndex() + { + + $modelText = Page::find()->where(['translit'=>'home'])->one(); + + return $this->render('index', [ + 'text'=>$modelText, + + ]); + } + + + public function actionRobots() + { + + $file = file_get_contents(robotsTxt, true);//получаем его содержимое + return $this->renderPartial('robots', [ + + ]); + } + + public function actionError(){ + + return $this->render('error', [ + 'code'=>'404', +// 'message'=>Yii::$app->errorHandler->exception->getMessage(), + ]); + } + + public function actionPriceparam () + { + $category_alias = Yii::$app->request->get('category'); + $is_count = Yii::$app->request->get('count', false); + + if ( !($category = CategorySearch::findByAlias($category_alias))) + { + throw new HttpException(404, 'Данной страницы не существует!'); + } + + $products = $category->products; + + if ($is_count) { + print (count($products)); + exit; + } + + set_time_limit (0); + header ("Content-Type: text/xml"); + print ''; + print ""; + print "" . date ("Y-m-d h:m") . ""; + print "Rukzachok"; + print ""; + print ""; + print ""; + + print ""; + print "" . $category->category_id . ""; + print ""; + print "" . $category->name . ""; + print ""; + + + print ""; + print ""; + /** @var Product $product */ + foreach ($products as $product) { + /** @var ProductVariant $variant */ + foreach ($product->enabledVariants as $variant) { + + print ""; + print "" . htmlspecialchars($variant->product_variant_id) . ""; + print "" . htmlspecialchars($product->category->category_id) . ""; + print "" . $product->brand->name . ""; + print "" . htmlspecialchars($variant->sku) . ""; + print "" . htmlspecialchars(substr($category->name, 0, -2)) . " "; + print "" . htmlspecialchars($product->name) . " "; + print "" . $variant->name . " "; + print "" . htmlspecialchars($product->description) . ""; + print "http://rukzachok.com.ua{$product->url}#{$variant->product_variant_id}"; + print "http://rukzachok.com.ua{$variant->imageUrl}"; + print "" . $variant->price . ""; + print "" . $variant->price_old . ""; + print ""; + print "В наличии"; + print ""; + print ""; + } + } + print ""; + + print ""; + } + + public function actionPrice() + { + $category_alias = Yii::$app->request->get('category'); + $is_count = Yii::$app->request->get('count', false); + + if ( !($category = CategorySearch::findByAlias($category_alias))) + { + throw new HttpException(404, 'Данной страницы не существует!'); + } + + $products = $category->products; + + if ($is_count) { + print (count($products)); + exit; + } + + +//var_dump($products);die(); + set_time_limit (0); + header ("Content-Type: text/xml"); + print ''; + print ""; + print "" . date ("Y-m-d h:m") . ""; + print "Rukzachok"; + print ""; + print ""; + print ""; + + print ""; + print "" . $category->category_id . ""; + print ""; + print "" . $category->name . ""; + print ""; + + print ""; + print ""; + /** @var Product $product */ + foreach ($products as $product) + { + /** @var ProductVariant $variant */ + foreach ($product->enabledVariants as $variant) { + + print ""; + print "" . htmlspecialchars($variant->product_variant_id) . ""; + print "" . htmlspecialchars($product->category->category_id) . ""; + print "" . $product->brand->name . ""; + print "" . htmlspecialchars($variant->sku) . ""; + print "" . htmlspecialchars($product->name)." " .htmlspecialchars($variant->name). " "; + print "" . htmlspecialchars($product->description) . ""; + print "http://rukzachok.com.ua{$product->url}#{$variant->product_variant_id}"; + print "http://rukzachok.com.ua{$variant->imageUrl}"; + print "" . $variant->price . ""; + print "" . $variant->price_old . ""; + print ""; + print "В наличии"; + print ""; + print ""; + + } + } + + + print ""; + + print ""; + + + } + + +} diff --git a/frontend/controllers/SubscribeController.php b/frontend/controllers/SubscribeController.php new file mode 100755 index 0000000..51aab8c --- /dev/null +++ b/frontend/controllers/SubscribeController.php @@ -0,0 +1,34 @@ +request->isAjax) { + Yii::$app->response->format = Response::FORMAT_JSON; + $model->load(Yii::$app->request->post()); + return ActiveForm::validate($model); + } else { + if ($model->load(Yii::$app->request->post()) && $model->save()) { + + Yii::$app->getSession()->setFlash('success', 'Вы успешно подписались на рассылку!'); + return $this->refresh(); + } + } + + return $this->render('index',['model'=>$model]); + } + +} \ No newline at end of file diff --git a/frontend/controllers/TextController.php b/frontend/controllers/TextController.php new file mode 100755 index 0000000..34e83bf --- /dev/null +++ b/frontend/controllers/TextController.php @@ -0,0 +1,24 @@ +where(['translit'=>$_GET['translit']])->one()) + throw new HttpException(404, 'Данной странице не существует!'); + + return $this->render('index', [ + 'text'=>$modelText, + ]); + } + +} \ No newline at end of file diff --git a/frontend/controllers/error_log b/frontend/controllers/error_log new file mode 100755 index 0000000..e13edb0 --- /dev/null +++ b/frontend/controllers/error_log @@ -0,0 +1 @@ +[23-Mar-2015 04:22:39 UTC] PHP Fatal error: Class 'yii\web\Controller' not found in /home/webplusn/public_html/yii2/controllers/SiteController.php on line 14 diff --git a/frontend/helpers/TextHelper.php b/frontend/helpers/TextHelper.php new file mode 100755 index 0000000..c247f64 --- /dev/null +++ b/frontend/helpers/TextHelper.php @@ -0,0 +1,24 @@ +

    ') + { + if ($asHtml) { + return static::truncateHtml($string, $length, $suffix, $encoding ?: Yii::$app->charset); + } + + if (mb_strlen($string, $encoding ?: Yii::$app->charset) > $length) { + return strip_tags(trim(mb_substr($string, 0, $length, $encoding ?: Yii::$app->charset)) . $suffix, $html); + } else { + return strip_tags($string, $html); + } + + + } +} diff --git a/frontend/models/ContactForm.php b/frontend/models/ContactForm.php new file mode 100755 index 0000000..845de8e --- /dev/null +++ b/frontend/models/ContactForm.php @@ -0,0 +1,59 @@ + 'Verification Code', + ]; + } + + /** + * Sends an email to the specified email address using the information collected by this model. + * + * @param string $email the target email address + * @return boolean whether the email was sent + */ + public function sendEmail($email) + { + return Yii::$app->mailer->compose() + ->setTo($email) + ->setFrom([$this->email => $this->name]) + ->setSubject($this->subject) + ->setTextBody($this->body) + ->send(); + } +} diff --git a/frontend/models/LoginForm.php b/frontend/models/LoginForm.php new file mode 100755 index 0000000..c7e7d6e --- /dev/null +++ b/frontend/models/LoginForm.php @@ -0,0 +1,89 @@ +'Логин', + 'password'=>'Пароль', + 'rememberMe'=>'Запомнить', + ]; + } + + /** + * Validates the password. + * This method serves as the inline validation for password. + * + * @param string $attribute the attribute currently being validated + * @param array $params the additional name-value pairs given in the rule + */ + public function validatePassword($attribute, $params) + { + if (!$this->hasErrors()) { + $user = $this->getUser(); + + if (!$user || !$user->validatePassword($this->password)) { + $this->addError($attribute, 'Incorrect username or password.'); + } + } + } + + /** + * Logs in a user using the provided username and password. + * @return boolean whether the user is logged in successfully + */ + public function login() + { + if ($this->validate()) { + return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0); + } else { + return false; + } + } + + /** + * Finds user by [[username]] + * + * @return Customer|null + */ + public function getUser() + { + if ($this->_user === false) { + $this->_user = Customer::findByUsername($this->username); + } + + return $this->_user; + } +} diff --git a/frontend/models/PasswordResetRequestForm.php b/frontend/models/PasswordResetRequestForm.php new file mode 100755 index 0000000..fb239c1 --- /dev/null +++ b/frontend/models/PasswordResetRequestForm.php @@ -0,0 +1,68 @@ + 'trim'], + ['email', 'required'], + ['email', 'email'], + ['email', 'exist', + 'targetClass' => '\common\models\User', + 'filter' => ['status' => User::STATUS_ACTIVE], + 'message' => 'There is no user with such email.' + ], + ]; + } + + /** + * Sends an email with a link, for resetting the password. + * + * @return boolean whether the email was send + */ + public function sendEmail() + { + /* @var $user User */ + $user = User::findOne([ + 'status' => User::STATUS_ACTIVE, + 'email' => $this->email, + ]); + + if (!$user) { + return false; + } + + if (!User::isPasswordResetTokenValid($user->password_reset_token)) { + $user->generatePasswordResetToken(); + } + + if (!$user->save()) { + return false; + } + + return Yii::$app + ->mailer + ->compose( + ['html' => 'passwordResetToken-html', 'text' => 'passwordResetToken-text'], + ['user' => $user] + ) + ->setFrom([\Yii::$app->params['supportEmail'] => \Yii::$app->name . ' robot']) + ->setTo($this->email) + ->setSubject('Password reset for ' . \Yii::$app->name) + ->send(); + } +} diff --git a/frontend/models/ProductFrontendSearch.php b/frontend/models/ProductFrontendSearch.php new file mode 100755 index 0000000..2f9bc9a --- /dev/null +++ b/frontend/models/ProductFrontendSearch.php @@ -0,0 +1,185 @@ + $this->getSearchQuery($category, $params), + 'pagination' => [ + 'pageSize' => 16, + ], + 'sort' => [ + 'attributes' => [ + 'name' => [ + 'asc' => ['name' => SORT_ASC], + 'desc' => ['name' => SORT_DESC], + 'default' => SORT_DESC, + 'label' => 'имени', + ], + 'price' => [ + 'asc' => [ProductVariant::tableName() .'.price' => SORT_ASC], + 'desc' => [ProductVariant::tableName() .'.price' => SORT_DESC], + 'default' => SORT_DESC, + 'label' => 'по цене', + ], + ], + ] + ]); + + if (!$this->validate()) { + return $dataProvider; + } + + + + return $dataProvider; + } + + public function getSearchQuery($category = null, $params = []) { + if (!empty($category)) { + /** @var ActiveQuery $query */ +// $query = $category->getRelations('product_categories'); + $query = $category->getProducts(); + } else { + $query = Product::find(); + } + $query->select(['product.*']); + $query->joinWith(['enabledVariants','brand', 'brand.brandName', 'category', 'category.categoryName']); + + $query->groupBy(['product.product_id', 'product_variant.price']); + + ProductHelper::_setQueryParams($query, $params); + + $query->andWhere(['!=', ProductVariant::tableName() .'.stock', 0]); + + return $query; + } + + public function optionsForCategory($category = null, $params = []) { + $query = TaxOption::find() + ->select([ + TaxOption::tableName() .'.*', + ]) + ->leftJoin(ProductOption::tableName(), ProductOption::tableName() .'.option_id='. TaxOption::tableName() .'.tax_option_id') + ->joinWith('taxGroup') + ->where([TaxGroup::tableName() .'.is_filter' => true]); + + $query->innerJoin('product_variant', 'product_variant.product_id = '. ProductOption::tableName() .'.product_id'); + $query->andWhere(['!=', 'product_variant.stock', 0]); + $query->groupBy(TaxOption::tableName() .'.tax_option_id'); +// $query->having(['>', 'COUNT(product_variant.product_variant_id)', 0]); + + if (!empty($category)) { + $query->innerJoin(ProductCategory::tableName(), ProductCategory::tableName() .'.product_id='. ProductOption::tableName() .'.product_id'); + $query->andWhere([ProductCategory::tableName() .'.category_id' => $category->category_id]); + } + + $query->orderBy(TaxOption::tableName() .'.sort', SORT_ASC); + $query->limit(null); + +// $queryCount = ProductOption::find() +// ->select(['COUNT('. ProductOption::tableName() .'.product_id)']) +// ->where(ProductOption::tableName() .'.option_id = '. TaxOption::tableName() .'.tax_option_id'); +// $queryCount->andWhere('(SELECT COUNT(pv.product_variant_id) FROM "product_variant" "pv" WHERE pv.stock != 0 AND pv.product_id = '. ProductOption::tableName() .'.product_id) > 0'); +// if (!empty($category)) { +// $queryCount->andWhere('(SELECT COUNT(pc.product_id) FROM product_category pc WHERE pc.product_id = '. ProductOption::tableName() .'.product_id AND pc.category_id = '. $category->category_id .') > 0'); +// } +// if (!empty($params['options'])) { +// $queryCount->innerJoin('tax_option', 'tax_option.tax_option_id = product_option.option_id'); +// $queryCount->innerJoin('tax_group', 'tax_group.tax_group_id = tax_option.tax_group_id'); +// foreach ($params['options'] as $group => $options) { +// $queryCount->andWhere([ +// 'tax_group.alias' => $group, +// 'tax_option.alias' => $options +// ]); +// } +// } +// if (!empty($params['brands'])) { +// $queryCount->innerJoin(Product::tableName(), 'product.product_id='. ProductOption::tableName() .'.product_id'); +// $queryCount->andWhere(['product.brand_id' => $params['brands']]); +// } +// if (!empty($params['prices'])) { +// if ($params['prices']['min'] > 0) { +// $queryCount->andWhere(['>=', 'pv.price', $params['prices']['min']]); +// } +// if ($params['prices']['max'] > 0) { +// $queryCount->andWhere(['<=', 'pv.price', $params['prices']['max']]); +// } +// } +// $query->addSelect(['_items_count' => $queryCount]); + + return $query; + } + + public function priceLimits($category = null, $params = []) { + if (!empty($category)) { + /** @var ActiveQuery $query */ +// $query = $category->getRelations('product_categories'); + $query = $category->getProducts(); + } else { + $query = Product::find(); + } + $query->joinWith('variant'); + + // Price filter fix + unset($params['prices']); + + ProductHelper::_setQueryParams($query, $params, false); + +// $query->select([ +// 'MIN('. ProductVariant::tableName() .'.price) AS priceMIN', +// 'MAX('. ProductVariant::tableName() .'.price) AS priceMAX', +// ]); + + return [ + 'min' => $query->min(ProductVariant::tableName() .'.price'), + 'max' => $query->max(ProductVariant::tableName() .'.price'), + ]; + } +} \ No newline at end of file diff --git a/frontend/models/ResetPasswordForm.php b/frontend/models/ResetPasswordForm.php new file mode 100755 index 0000000..d92b49e --- /dev/null +++ b/frontend/models/ResetPasswordForm.php @@ -0,0 +1,65 @@ +_user = User::findByPasswordResetToken($token); + if (!$this->_user) { + throw new InvalidParamException('Wrong password reset token.'); + } + parent::__construct($config); + } + + /** + * @inheritdoc + */ + public function rules() + { + return [ + ['password', 'required'], + ['password', 'string', 'min' => 6], + ]; + } + + /** + * Resets password. + * + * @return boolean if password was reset. + */ + public function resetPassword() + { + $user = $this->_user; + $user->setPassword($this->password); + $user->removePasswordResetToken(); + + return $user->save(false); + } +} diff --git a/frontend/models/SignupForm.php b/frontend/models/SignupForm.php new file mode 100755 index 0000000..7c7d9c0 --- /dev/null +++ b/frontend/models/SignupForm.php @@ -0,0 +1,106 @@ + 'trim'], + ['username', 'required'], + [['username','surname'], 'string', 'min' => 2, 'max' => 255], + + ['email', 'filter', 'filter' => 'trim'], + ['email', 'required'], + ['email', 'email'], + [['email','phone'], 'string', 'max' => 255], + ['email', 'unique', 'targetClass' => '\common\models\Customers', 'message' => Yii::t('app','message',[ + 'field' => 'Email' + ])], + + [['phone'], 'unique', 'targetClass' => '\common\models\Customers', 'message' => Yii::t('app','message',[ + 'field' => 'Телефон' + ])], + + ['password_repeat', 'required'], + ['password_repeat', 'compare', 'compareAttribute'=>'password', 'message'=> Yii::t('app', 'message_match_password') ], + + ['password', 'required'], + ['password', 'string', 'min' => 6], + + [ + 'verifyCode', + 'safe', + 'on'=>[SignupForm::SCENARIO_AJAX] + ], + [ + 'verifyCode', + 'captcha', + 'on'=>[SignupForm::SCENARIO_SUBMIT] + ], + [ + 'verifyCode', + 'captcha', + 'on'=>[SignupForm::SCENARIO_DEFAULT] + ], + + + + ]; + } + + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'verifyCode' => 'Verification Code', + ]; + } + + /** + * Signs user up. + * + * @return Customers|null the saved model or null if saving fails + */ + public function signup() + { + + if (!$this->validate()) { + return null; + } + + $user = new Customers(); + $user->username = $this->username; + $user->surname = $this->surname; + $user->email = $this->email; + $user->phone = $this->phone; + $user->setPassword($this->password); + $user->generateAuthKey(); + $user->validate(); + return $user->save() ? $user : null; + } +} diff --git a/frontend/page/show.php b/frontend/page/show.php new file mode 100755 index 0000000..b7febbd --- /dev/null +++ b/frontend/page/show.php @@ -0,0 +1,4 @@ +title = $page->title; +$this->params['breadcrumbs'][] = $this->title; +echo $page->body; \ No newline at end of file diff --git a/frontend/views/articles/index.php b/frontend/views/articles/index.php new file mode 100755 index 0000000..9a8b535 --- /dev/null +++ b/frontend/views/articles/index.php @@ -0,0 +1,85 @@ +getModule('artbox-comment'); + CommentAsset::register($this); +?> +title = 'Блог'; + $this->registerMetaTag([ + 'name' => 'description', + 'content' => 'Блог', + ]); + $this->registerMetaTag([ + 'name' => 'keywords', + 'content' => 'Блог', + ]); +?> + + + +
    + +
    +

    Блог

    + + +
    + + imageUrl, 'list'), [ 'class' => 'float-left' ]) ?> + + title ?>
    +
    + averageRating && $item->averageRating->value > 0 )) { + ?> +
    + +

    + comments); + echo Html::a(( $comment_count ? 'Отзывов: ' . count($item->comments) : "Оставить отзыв" ), [ + 'articles/show', + 'translit' => $item->translit, + 'id' => $item->id, + '#' => 'artbox-comment', + ]); + ?> +

    +
    + body, 600); ?> +
    +
    + + +
    + $pages, + 'registerLinkTags' => true, + ]); ?> + +
    + +
    \ No newline at end of file diff --git a/frontend/views/articles/show.php b/frontend/views/articles/show.php new file mode 100755 index 0000000..cf9b469 --- /dev/null +++ b/frontend/views/articles/show.php @@ -0,0 +1,63 @@ + +title = $news->meta_title; +$this->params['seo']['title'] = !empty($this->title) ?$this->title :$news->title; +$this->registerMetaTag(['name' => 'description', 'content' => $news->meta_description]); +?> + + + +
    + +
    +

    title?>

    +
    + averageRating ) && $news->averageRating->value) { + ?> +
    + +

    + comments); + if($comment_count) { + echo "Отзывов: " . $comment_count; + } else { + echo "Оставть отзыв"; + } + ?> +

    +
    + imageUrl, 'product'), ['class'=>'blog-show-img float-left'])?> + body?> +

    date?>

    +
    + +
    +
    + $news, + 'layout' => "{form} {reply_form} {list}" + ]); + ?> +
    +
    +
    + +
    \ No newline at end of file diff --git a/frontend/views/basket/_popup.php b/frontend/views/basket/_popup.php new file mode 100755 index 0000000..7bc62a6 --- /dev/null +++ b/frontend/views/basket/_popup.php @@ -0,0 +1,29 @@ + + \ No newline at end of file diff --git a/frontend/views/basket/ajax_info.php b/frontend/views/basket/ajax_info.php new file mode 100755 index 0000000..0c17748 --- /dev/null +++ b/frontend/views/basket/ajax_info.php @@ -0,0 +1,5 @@ + +Корзина count?> \ No newline at end of file diff --git a/frontend/views/basket/ajax_items.php b/frontend/views/basket/ajax_items.php new file mode 100755 index 0000000..77c89ca --- /dev/null +++ b/frontend/views/basket/ajax_items.php @@ -0,0 +1,33 @@ + + false, 'options' => [ + 'class' => 'basket_form2' +]]); ?> +$item):?> +
    + field($item,'['.$i.']id')->hiddenInput()->label(false); ?> +
    +
    + imageUrl, 'product_basket')?> +
    +
    +
    product_name?>
    +
    + price_old>0):?>
    price_old?> грн.
    +
    price?> грн.
    +
    +
    +
    + field($item,'['.$i.']count',['template'=>'{input}'])->textInput(['type'=>'number','class' => 'item_num','disabled1'=>true])->label(false); ?> +
    +
    sum_cost?> грн.
    +
    +
    + + +
    +
    Всего: getSumCost()?> грн.
    +
    + \ No newline at end of file diff --git a/frontend/views/basket/index.php b/frontend/views/basket/index.php new file mode 100755 index 0000000..89fce9f --- /dev/null +++ b/frontend/views/basket/index.php @@ -0,0 +1,193 @@ +title = 'Корзина'; +$this->registerMetaTag(['name' => 'description', 'content' => 'Корзина']); +$this->registerMetaTag(['name' => 'keywords', 'content' => 'Корзина']); + +$this->registerJsFile(Yii::$app->request->baseUrl.'/js/jquery.mask.js',['position'=>View::POS_END,'depends'=>['yii\web\YiiAsset']]); + +$this->registerJs(" +$('#orders-phone,#orders-phone2').mask('(000) 000-0000'); +", View::POS_READY, 'mask'); + + +$this->registerJs(" +$('#orders-delivery input[type=\"radio\"]').click(function(){ + $('.hidden_box').addClass('activeShow') + $('.delivery-data').hide(); + $('#delivery-data-'+$(this).val()).show(); +}); +", View::POS_READY, 'order-delivery'); +?> + + [ +// 'Корзина' +// ], +// ]) ?> + + + + + +
    + +

    Корзина

    +
    + session->getFlash ('success')): ?> +
    + + session->getFlash ('error')): ?> +
    + + false]); ?> +
    +
    +
    +
    контакты
    +
    + field($modelOrder, 'name', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> +
    +
    + field($modelOrder, 'phone', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> +
    +
    + field($modelOrder, 'phone2', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> +
    +
    + field($modelOrder, 'city', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> +
    +
    + field($modelOrder, 'adress', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> +
    +
    + field($modelOrder, 'email', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> +
    +
    + +
    +
    + where(['parent_id'=>0])->asArray()->all(), 'id', 'title'); + array_pop($deliveries); + echo $form->field($modelOrder, 'delivery') + ->radioList($deliveries,[ + 'item' => function($index, $label, $name, $checked, $value) { + $return = '
    '; + $return .= ''; + $return .= ''; + $return .= '
    '; + return $return; + }, + ]) + ?> +
    +
    + + +
    + +where(['parent_id'=>0])->all() as $item):?> +
    + text?> + field($modelOrder, 'delivery') + ->radioList(ArrayHelper::map(Delivery::find()->where(['parent_id'=>$item->id])->asArray()->all(), 'id', 'title'), [ + 'id'=> 'order-delivery-childs', + 'item' => function($index, $label, $name, $checked, $value) { + $return = '
    '; + $return .= ''; + $return .= ''; + $return .= '
    '; + return $return; + }, + ]);?> +
    + + +
    +
    + field($modelOrder, 'payment')->radioList(['Оплатить наличными'=>'Оплатить наличными','Оплатить на карту Приват Банка'=>'Оплатить на карту Приват Банка','Оплатить по безналичному расчету'=>'Оплатить по безналичному расчету','Оплатить Правекс-телеграф'=>'Оплатить Правекс-телеграф','Наложенным платежом'=>'Наложенным платежом'],[ + 'item' => function($index, $label, $name, $checked, $value) { + $return = '
    '; + $return .= ''; + $return .= ''; + $return .= '
    '; + return $return; + }, + ]); ?> +
    +
    + + + + + + +
    + field($modelOrder,'body')->textarea(['rows'=>7]); ?> +
    + 'submit4')); ?> +
    + +
    + +
    + +
    +
    +
    + + +$item):?> +
    + + imageUrl, 'product_basket')?> + +
    + product_name?> +

    Код: sku?>, цвет: name?>

    + field($item,'['.$i.']id')->hiddenInput()->label(false); ?> + field($item,'['.$i.']product_name')->hiddenInput()->label(false); ?> + field($item,'['.$i.']sku')->hiddenInput()->label(false); ?> + field($item,'['.$i.']name')->hiddenInput()->label(false); ?> + field($item,'['.$i.']price')->hiddenInput()->label(false); ?> + field($item,'['.$i.']sum_cost')->hiddenInput()->label(false); ?> +
    +
    цена за один price?> грн, цена sum_cost?> грн
    + field($item,'['.$i.']count')->textInput(['type'=>'number'])->label(false); ?>
    +
    + Удалить +
    +
    + + +
    + "update",'class'=>'submit4 fl ')); ?> +
    + + +
    + field($modelOrder, 'total')->hiddenInput(['value'=>$modelOrder->getSumCost()])->label(false); ?> + Общая сумма: getSumCost();?> грн. +
    +
    + 'btn-success cont_shopping']) ?> +
    +
    + + + +
    + +
    + + + +
    \ No newline at end of file diff --git a/frontend/views/basket/success.php b/frontend/views/basket/success.php new file mode 100755 index 0000000..0ec7e0f --- /dev/null +++ b/frontend/views/basket/success.php @@ -0,0 +1,52 @@ +title = 'Корзина'; +$this->registerMetaTag(['name' => 'description', 'content' => 'Корзина']); +$this->registerMetaTag(['name' => 'keywords', 'content' => 'Корзина']); + +if(isset($variants) && isset($order)){ + $orderData = " + ga('require', 'ecommerce'); + ga('ecommerce:addTransaction', { + 'id': {$order->id}, // где ID - транзакции, обязательно + });"; + + foreach($variants as $row){ + $orderData .= " + ga('ecommerce:addItem', { + 'id': {$order->id}, // ID - транзакции, обязательно + 'name': \"{$row['product_name']} {$row['name']}\", // Имя товара + 'price': {$row['price']}, // Цена товара + 'quantity': {$row['count']} // Количество + });"; + + } + $orderData .= "ga('ecommerce:send');"; + $this->registerJs ($orderData, View::POS_END); + +} + + +?> + + + + +
    + +

    Корзина

    +Ваш заказ принят! Большое Спасибо! Менеджер с Вами свяжется в ближайшее время. + +
    diff --git a/frontend/views/cabinet/bookmarks.php b/frontend/views/cabinet/bookmarks.php new file mode 100755 index 0000000..804d20d --- /dev/null +++ b/frontend/views/cabinet/bookmarks.php @@ -0,0 +1,24 @@ +title = 'Закладки'; +$this->params['breadcrumbs'][] = $this->title; +use yii\helpers\Html; +use yii\helpers\Url; +use yii\widgets\ActiveForm; +?> + +'' +]); ?> + + + + + + + \ No newline at end of file diff --git a/frontend/views/cabinet/index.php b/frontend/views/cabinet/index.php new file mode 100755 index 0000000..0cd910e --- /dev/null +++ b/frontend/views/cabinet/index.php @@ -0,0 +1,18 @@ +title = 'Moй кабинет'; +$this->params['breadcrumbs'][] = $this->title; + +?> + +
    +
    Имя
    +
    e-mail
    +
    Телефон
    +
    + +
    + +
    user->identity->name ?>
    +
    user->identity->email ?>
    +
    user->identity->phone ?>
    +
    \ No newline at end of file diff --git a/frontend/views/cabinet/my-orders.php b/frontend/views/cabinet/my-orders.php new file mode 100755 index 0000000..72f32c9 --- /dev/null +++ b/frontend/views/cabinet/my-orders.php @@ -0,0 +1,24 @@ +title = 'Мои заказы'; +$this->params['breadcrumbs'][] = $this->title; +use yii\helpers\Html; +use yii\helpers\Url; +use yii\widgets\ActiveForm; +?> + +'' +]); ?> + + + + + + + \ No newline at end of file diff --git a/frontend/views/cabinet/update.php b/frontend/views/cabinet/update.php new file mode 100755 index 0000000..dbb8439 --- /dev/null +++ b/frontend/views/cabinet/update.php @@ -0,0 +1,56 @@ +title = 'Редактировать личные данные'; + $this->params['breadcrumbs'][] = $this->title; + use yii\helpers\Html; + use yii\helpers\Url; + use yii\widgets\ActiveForm; +?> + +'' +]); ?> + + + + + + + \ No newline at end of file diff --git a/frontend/views/call/index.php b/frontend/views/call/index.php new file mode 100755 index 0000000..a4c7685 --- /dev/null +++ b/frontend/views/call/index.php @@ -0,0 +1,34 @@ + +title = 'Обратный звонок'; +$this->registerMetaTag(['name' => 'description', 'content' => 'Обратный звонок']); +$this->registerMetaTag(['name' => 'keywords', 'content' => 'Обратный звонок']); +?> + + + [ +// 'Обратный звонок' +// ], +// ]) ?> + + + +
    + +
    +

    Обратный звонок

    + + +errorSummary($model); ?> + +
    + +
    \ No newline at end of file diff --git a/frontend/views/call/success.php b/frontend/views/call/success.php new file mode 100755 index 0000000..daf91d5 --- /dev/null +++ b/frontend/views/call/success.php @@ -0,0 +1,32 @@ + +title = 'Обратный звонок'; +$this->registerMetaTag(['name' => 'description', 'content' => 'Обратный звонок']); +$this->registerMetaTag(['name' => 'keywords', 'content' => 'Обратный звонок']); +?> + + + +
    + +
    +

    Обратный звонок

    + + Мы получили от Вас сообщение! Мы свяжемся с Вами в ближайшее время. + +
    + +
    \ No newline at end of file diff --git a/frontend/views/catalog/_catalog_box.php b/frontend/views/catalog/_catalog_box.php new file mode 100755 index 0000000..fa669ce --- /dev/null +++ b/frontend/views/catalog/_catalog_box.php @@ -0,0 +1,20 @@ + +
    + +
    \ No newline at end of file diff --git a/frontend/views/catalog/all.php b/frontend/views/catalog/all.php new file mode 100755 index 0000000..9aa7c4f --- /dev/null +++ b/frontend/views/catalog/all.php @@ -0,0 +1,39 @@ +title = 'Каталог'; +$this->registerMetaTag(['name' => 'description', 'content' => 'Каталог']); +$this->registerMetaTag(['name' => 'keywords', 'content' => 'Каталог']); + +?> + +
    +
    +

    Каталог

    + +
    + + name;?> +
    + + + + +
    +
    diff --git a/frontend/views/catalog/brand.php b/frontend/views/catalog/brand.php new file mode 100755 index 0000000..75cee4b --- /dev/null +++ b/frontend/views/catalog/brand.php @@ -0,0 +1,50 @@ +title = $brand->name; +$this->params['breadcrumbs'][] = ['label' => Yii::t('products', 'Brands'), 'url' => ['catalog/brands']]; +$this->params['breadcrumbs'][] = $brand->name; + +$this->params['seo']['fields']['name'] = $brand->name; + +$this->registerCssFile (Yii::getAlias('@web/css/ion.rangeSlider.css')); +$this->registerCssFile (Yii::getAlias('@web/css/ion.rangeSlider.skinHTML5.css')); +$this->registerJsFile (Yii::getAlias('@web/js/ion.rangeSlider.js')); +?> + + + +
    + +
    +

    name ?>

    +
    +
      + models as $product) :?> + + +
    +
    +
    + totalCount > $productProvider->pagination->pageSize) :?> + $productProvider->pagination, + 'options' => ['class' => 'pagination pull-right'], + 'registerLinkTags' => true, + ]); + ?> + +
    +
    +
    + + +
    \ No newline at end of file diff --git a/frontend/views/catalog/brands.php b/frontend/views/catalog/brands.php new file mode 100755 index 0000000..a3f2f50 --- /dev/null +++ b/frontend/views/catalog/brands.php @@ -0,0 +1,28 @@ +params['breadcrumbs'][] = Yii::t('product', 'Brands'); + +$this->params['seo']['seo_text'] = 'Brands SEO-text'; +$this->params['seo']['h1'] = Yii::t('product', 'Brands'); +$this->params['seo']['description'] = 'Brands DESCRIPTION'; +$this->params['seo']['fields']['name'] = 'Brands NAME FROM FIELD'; +$this->params['seo']['key']= 'brands'; +?> + + + +
    +

    params['seo']['h1']?>

    + +
    +
    \ No newline at end of file diff --git a/frontend/views/catalog/catalog.php b/frontend/views/catalog/catalog.php new file mode 100755 index 0000000..9d1a618 --- /dev/null +++ b/frontend/views/catalog/catalog.php @@ -0,0 +1,21 @@ +title = 'Каталог'; +$this->params['breadcrumbs'][] = ['label' => 'Каталог']; +?> + + +
    +
    +

    Каталог

    + 'rubrics', 'includes' => [130,131,132,133,134]])?> +
    +
    + + 'promo'])?> + 'new'])?> + 'top'])?> + +
    diff --git a/frontend/views/catalog/categories.php b/frontend/views/catalog/categories.php new file mode 100755 index 0000000..cefd71b --- /dev/null +++ b/frontend/views/catalog/categories.php @@ -0,0 +1,45 @@ +title = $category->name; +foreach($category->getParents()->all() as $parent) { + $this->params['breadcrumbs'][] = ['label' => $parent->name, 'url' => ['catalog/category', 'category' => $parent]]; +} +$this->params['breadcrumbs'][] = $this->title; +?> +

    title ?>

    + +
    + +
    + + getAllChildrenTree(2, [], 'categoryName') as $category) :?> +
    +
    + image)) :?> + <?= $category['item']->name?> + + + +
    name?>
    + + + +
    + +
    + +
    + +
    + + + +
    + +
    \ No newline at end of file diff --git a/frontend/views/catalog/index.php b/frontend/views/catalog/index.php new file mode 100755 index 0000000..d376416 --- /dev/null +++ b/frontend/views/catalog/index.php @@ -0,0 +1,45 @@ + +title = $catalog->meta_title; +$this->params['seo']['fields']['meta-title'] = $catalog->meta_title; +$this->registerMetaTag(['name' => 'description', 'content' => $catalog->meta_description]); +$this->registerMetaTag(['name' => 'keywords', 'content' => $catalog->meta_keywords]); +//?> + + [ ['label'=>'Каталог','url'=>['catalog/all']], +// $catalog->name], +// ]) ?> + + + +
    + + +
    + render('_catalog_box',['catalog'=>$catalog]) ?> + +
    +
    +

    name?>

    +
    + + childs as $item):?> +
    + + name?> +
    + +
    + + body?> + +
    + + +
    \ No newline at end of file diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php new file mode 100755 index 0000000..5450f51 --- /dev/null +++ b/frontend/views/catalog/product.php @@ -0,0 +1,316 @@ +params[ 'seo' ][ 'key' ] = $category->categoryName->value; + $this->params[ 'seo' ][ 'fields' ][ 'name' ] = $product->fullname; + $this->params[ 'seo' ][ 'h1' ] = !empty( Seo::widget([ 'row' => 'h1' ]) ) ? Seo::widget([ 'row' => 'h1' ]) : $product->fullname; + + //$this->params['seo']['title'] = "Купить " . substr($product->category->categoryName->value, 0, -2) . " " . $product->fullname . " в Киеве, Харькове, Украине: цены, отзывы - Rukzachok.com.ua"; + //$this->params['seo']['description'] = "Заказать " . substr($product->category->categoryName->value, 0, -2) . " " . $product->fullname . " - самые модные и стильные рюкзаки в Украине по лучшим ценам. Интернет магазин рюкзаков Rukzachok.com.ua"; + $this->title = $product->fullname; + //$this->title = (! empty($product->meta_title)) ? $product->meta_title : $product->fullname; + //$this->registerMetaTag (['name' => 'description', 'content' => ((! empty($product->meta_description)) ? $product->meta_description : $product->fullname)]); + //$this->registerMetaTag (['name' => 'keywords', 'content' => $product->meta_keywords]); + + //foreach($product->category->getParents()->all() as $parent) { + // $this->params['breadcrumbs'][] = ['label' => $parent->categoryName->value, 'url' => ['catalog/category', 'category' => $parent]]; + //} + $this->params[ 'breadcrumbs' ][] = [ + 'label' => 'Каталог', + 'url' => [ 'catalog/category' ], + ]; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $category->categoryName->value, + 'url' => [ + 'catalog/category', + 'category' => $category, + ], + ]; + $this->params[ 'breadcrumbs' ][] = $product->fullname . ' #' . $product->enabledVariants[ 0 ]->sku; + + $this->registerJs(' + + var checkData = function($index) + { + var sourceNew = $(".productLeftBar .product_mod > li").eq($index); + $(".productLeftBar .product_mod > li").removeClass("active") + sourceNew.addClass("active"); + var $source = sourceNew.find("a"); + var $target = $(".productLeftBar .cost_box"); + + $("#cost").text($source.data("cost")); + $("#old_cost").text($source.data("old_cost")); + + if (parseInt ($source.data("old_cost")) == 0) + { + $target.find("strike").hide(); + } + else + { + $target.find("strike").show(); + } + + $("#product_id").val($source.data("id")); + $("#art").text($source.data("art")); + $("#color").text($source.data("color")); + $("#pic").attr("src",$source.data("image")); + $("#picoriginal").attr("href",$source.data("imageoriginal")); + } + + $(".product_mod > li").click(function() + { + checkData($(this).index()); + + Shadowbox.setup($("#picoriginal")); + + return false; + }); + + checkData(0); + + ', View::POS_READY, 'fasovka'); + + $this->registerJs(" + $('#nav_product li a').addClass('active'); + $('#nav_product li').find('.info').toggle(); + + $('#nav_product li a').bind('click',function() + { + if($(this).parent().find('.info').css('display')=='none')$(this).addClass('active'); + else $(this).removeClass('active'); + $(this).parent().find('.info').toggle(); + + return false; + }); + ", View::POS_READY, 'nav_product'); + + $this->registerCssFile(Yii::$app->request->BaseUrl . '/js/shadowbox-3.0.3/shadowbox.css'); + $this->registerJsFile(Yii::$app->request->baseUrl . '/js/shadowbox-3.0.3/shadowbox.js', [ + 'position' => View::POS_END, + 'depends' => [ 'yii\web\JqueryAsset' ], + ]); + $this->registerJs(" + Shadowbox.init({ + + }); + ", View::POS_READY, 'Shadowbox'); +?> + +session->getFlash('success')): ?> +
    + +
    +
    +
    +

    'h1' ]) ?>

    + enabledVariantsGrouped as $variantGroup) : ?> +
    name2 ?>
    + +
    + + +
    +
    +
    код:
    цвет: +
    +
    +
    + price_old ?> грн. + price ?> грн. + +
    + + Купить +
    +
    +
    + + +
    + averageRating ) && $product->averageRating->value) { + ?> +
    + averageRating->value; ?> + comments); ?> +
    +
    + +

    + comments); + if($comment_count) { + echo "Отзывов: " . $comment_count; + } else { + echo "Оставть отзыв"; + } + ?> +

    +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    +
    + + +
    */ ?> +
    + +
    + +
    + +
    +
    + $product, + ]); + ?> +
    +
    +
    +
    + $product ]) ?> + 'promo' ]) ?> + 'new' ]) ?> + 'top' ]) ?> + + +registerJs(" + var productHash = window.location.hash; + productHash = productHash.replace('#','') + + var productUl = $('ul.product_mod li') + var productA = productUl.find('a#'+productHash) + productUl.removeClass('active') + productA.parent().addClass('active') + var dataLink = productA.attr('data-imageoriginal') + var dataImg = productA.attr('data-image') + + $('#pic').attr('src',dataImg) + $('#pic').parent().attr('href',dataLink) + ", View::POS_READY, 'new_script'); +?> \ No newline at end of file diff --git a/frontend/views/catalog/product_item.php b/frontend/views/catalog/product_item.php new file mode 100755 index 0000000..9560e7e --- /dev/null +++ b/frontend/views/catalog/product_item.php @@ -0,0 +1,113 @@ +getModule('artbox-comment'); + CommentAsset::register($this); +?> +
  • +
    + + is_top ) || !empty( $product->is_new ) || !empty( $product->akciya )) : ?> +
      + is_top )) : ?> +
    • +
      top
      +
    • + + is_new )) : ?> +
    • +
      new
      +
    • + + akciya )) : ?> +
    • +
      promo
      +
    • + +
    + +
    + averageRating && $product->averageRating->value > 0)) { + ?> +
    + +

    + comments); + echo Html::a(( $comment_count ? 'Отзывов: ' . count($product->comments) : "Оставить отзыв" ), [ + 'catalog/product', + 'product' => $product, + '#' => 'artbox-comment', + ]); + ?> +

    +
    + + + '; + + // есть скидка + echo '

    '; + if($product->enabledVariants[ 0 ]->price_old != 0 && $product->enabledVariants[ 0 ]->price_old != $product->enabledVariants[ 0 ]->price) { + echo '' . $product->enabledVariants[0]->price_old . ' грн. '; + echo $product->enabledVariants[0]->price . ' грн.

    '; + } else { + echo ''.$product->enabledVariants[0]->price . ' грн.

    '; + } + echo ''; + echo '
    '; + + ?> + + Купить + + +
  • \ No newline at end of file diff --git a/frontend/views/catalog/products.php b/frontend/views/catalog/products.php new file mode 100755 index 0000000..5aabb59 --- /dev/null +++ b/frontend/views/catalog/products.php @@ -0,0 +1,233 @@ +title = $category->categoryName->value; +$this->params['seo']['title'] = !empty($category->meta_title) ? $category->meta_title : ''; + +$this->params['seo']['fields']['meta-title'] = $category->meta_title; +$this->params['seo']['h1'] = !empty($category->h1) ? $category->h1 : $category->name; +$this->params['seo']['seo_text'] = $category->seo_text; +$this->params['seo']['description'] = $category->meta_desc; +$this->params['seo']['meta'] = $category->meta_robots; +$this->params['seo']['category_name'] = $category->name; +//foreach($category->getParents()->all() as $parent) { +// $this->params['breadcrumbs'][] = ['label' => $parent->categoryName->value, 'url' => ['catalog/category', 'category' => $parent]]; +//} +$this->params['breadcrumbs'][] = ['label' => 'Каталог', 'url' => Url::to(['catalog/category']),'itemprop' => 'url', ]; +$this->params['breadcrumbs'][] = $category->categoryName->value; + + +$this->registerCssFile (Yii::getAlias('@web/css/ion.rangeSlider.css')); +$this->registerCssFile (Yii::getAlias('@web/css/ion.rangeSlider.skinHTML5.css')); +$this->registerJsFile(Yii::getAlias('@web/js/ion.rangeSlider.js'),[ + 'position' => View::POS_END, + 'depends' => ['yii\web\JqueryAsset'] +]); +?> + + + +
    +
    + request->baseUrl ?>/img/new_coll.png" width="112" height="22"/>
    + + */?> +
    +
      +
    • + $category, 'filters' => FilterHelper::getFilterForOption($filter, 'special', 'new', $checked)]); + ?> + onchange="document.location=''" /> + +
    • +
    • + $category, 'filters' => FilterHelper::getFilterForOption($filter, 'special', 'top', $checked)]); + ?> + onchange="document.location=''" /> + +
    • +
    • + $category, 'filters' => FilterHelper::getFilterForOption($filter, 'special', 'promo', $checked)]); + ?> + onchange="document.location=''" /> + +
    • +
    +
    +
    + + + + +
    +
    Бренды
    +
      + alias, $filter['brands']); +// + $option_url = Url::to(['catalog/category', 'category' => $category, 'filters' => FilterHelper::getFilterForOption($filter, 'brands', $brand->alias, $checked)]); + ?> +
    • + /> + name?> +
    • + +
    +
    + + + + $group) { + ?> +
    +
    +
      + $category, 'filters' => FilterHelper::getFilterForOption($filter, $option['group_alias'], $option['option_alias'], $checked)]); + ?> +
    • + /> + + +
    • + +
    +
    + + +
    +
    +
      + _options as $option) : + $checked = (isset($filter[$group->alias]) && in_array($option->alias, $filter[$group->alias])); + $option_url = Url::to(['catalog/category', 'category' => $category, 'filters' => FilterHelper::getFilterForOption($filter, $option->taxGroup->alias, $option->alias, $checked)]); + ?> +
    • + /> + + ValueRenderHTML?> +
    • + +
    +
    + + + + +
    +
    Цена
    +
    +
    + +
    +
    +
    + +
    +
    + +
    +

    'h1'])?>

    +
    + +
    + Сортировка: + $productProvider->sort, + 'attributes' => [ + 'price', + ] + ]); + ?> +
    + +
    +
    +
      + models as $product) :?> + render('product_item', ['product' => $product])?> + +
    +
    +
    + totalCount > $productProvider->pagination->pageSize) :?> + $productProvider->pagination, + 'options' => ['class' => 'pagination pull-right'], + 'registerLinkTags' => true, + ]); + ?> + +
    +
    + +
    + + + 'promo'])?> + 'new'])?> + 'top'])?> + +
    + +'seo_text']); + if($seo_text){ +?> + + \ No newline at end of file diff --git a/frontend/views/event/_objects.php b/frontend/views/event/_objects.php new file mode 100755 index 0000000..29166a6 --- /dev/null +++ b/frontend/views/event/_objects.php @@ -0,0 +1,13 @@ + + \ No newline at end of file diff --git a/frontend/views/event/index.php b/frontend/views/event/index.php new file mode 100755 index 0000000..d485c3c --- /dev/null +++ b/frontend/views/event/index.php @@ -0,0 +1,42 @@ + +title = 'Акции'; +$this->registerMetaTag(['name' => 'description', 'content' => 'Акции']); +$this->registerMetaTag(['name' => 'keywords', 'content' => 'Акции']); +?> + + + +
    + +
    +

    Акции

    + $dataProvider, + 'itemView'=>'_objects', + 'summary'=>'' + ] ); + ?> + +
    + + +
    + +
    \ No newline at end of file diff --git a/frontend/views/event/show.php b/frontend/views/event/show.php new file mode 100755 index 0000000..10b2d32 --- /dev/null +++ b/frontend/views/event/show.php @@ -0,0 +1,30 @@ + +title = $model->name; + +?> + + + +
    + +
    +

    name?>

    + image){?> + imageUrl, 'product_view', ['align' => 'left'])?> + + body?> +
    + +
    \ No newline at end of file diff --git a/frontend/views/iam/1person.php b/frontend/views/iam/1person.php new file mode 100755 index 0000000..47262e4 --- /dev/null +++ b/frontend/views/iam/1person.php @@ -0,0 +1,47 @@ +title = 'Профиль'; + + +?> + + +
    +
    +
    +
    Мой кабинет
    + render('_tabs')?> +
    +
    + +
    +
    +
    +
    Имя
    name) . ' ' . Html::encode($model->surname);?>
    +
    Электронная почта
    username)?>
    +
    Телефон
    phone)?>
    +
    +
    +
    +
    'dotted'])?>
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/frontend/views/iam/_tabs.php b/frontend/views/iam/_tabs.php new file mode 100755 index 0000000..4f7c8be --- /dev/null +++ b/frontend/views/iam/_tabs.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/frontend/views/iam/admin.php b/frontend/views/iam/admin.php new file mode 100755 index 0000000..3209060 --- /dev/null +++ b/frontend/views/iam/admin.php @@ -0,0 +1 @@ +Вы зашли как Админ! У вас нет личного кабинета! \ No newline at end of file diff --git a/frontend/views/iam/company.php b/frontend/views/iam/company.php new file mode 100755 index 0000000..12fe878 --- /dev/null +++ b/frontend/views/iam/company.php @@ -0,0 +1,65 @@ +title = 'Профиль - Бычок'; +$this->params['breadcrumbs'][] = 'Профиль'; + +?> +
    +
    + + + +
    + +time_online>time()):?>online + +

    company)?>

    + name) . ' ' . Html::encode($model->surname);?>
    + username)?>
    + phone)?>
    + + +'btn btn-primary'])?> +  +'btn btn-success'])?> +
    +
    +username))$p +=20; +if(!empty($model->name))$p +=20; +if(!empty($model->phone))$p +=20; +if(!empty($model->company))$p +=20; + + +if(!empty($model->body))$p +=20; +echo 'Ваш профиль заполнен на '.round($p).'%:'; +echo Progress::widget([ + 'percent' => round($p), + 'barOptions' => ['class' => 'progress-bar-success'], + 'options' => ['class' => 'progress-striped','style'=>'width:400px;'] +]);?> + + +
    О компании:
    +

    body))?nl2br(Html::encode($model->body)):'Не заполненно!'?>

    + + +
    +
    + active==0):?> +
    Ваш Профиль пока не проверен Бычком!
    + +
    Поздравляем!
    Ваш Профиль проверен Бычком!
    + + 'btn btn-success btn-lg btn-block'])?> + 'btn btn-default btn-lg btn-block'])?> + + +
    +
    diff --git a/frontend/views/iam/customer.php b/frontend/views/iam/customer.php new file mode 100755 index 0000000..60b5313 --- /dev/null +++ b/frontend/views/iam/customer.php @@ -0,0 +1,68 @@ +title = 'Профиль - Бычок'; +$this->params['breadcrumbs'][] = 'Профиль'; + +?> +
    +
    + + + +
    + +time_online>time()):?>online + +

    name) . ' ' . Html::encode($model->surname);?>

    + username)?>
    + phone)?>
    + sex)?>
    + status)?>
    + children)?>
    + old;?> лет
    +'btn btn-primary'])?> +  +'btn btn-success'])?> +
    +
    +username))$p +=14.5; +if(!empty($model->name))$p +=14.5; +if(!empty($model->phone))$p +=14.5; +if(!empty($model->sex))$p +=14.5; +if(!empty($model->status))$p +=14.5; +if(!empty($model->children))$p +=14.5; +if(!empty($model->old))$p +=14.5; + +if(!empty($model->body))$p +=14.5; +echo 'Ваш профиль заполнен на '.round($p).'%:'; +echo Progress::widget([ + 'percent' => round($p), + 'barOptions' => ['class' => 'progress-bar-success'], + 'options' => ['class' => 'progress-striped','style'=>'width:400px;'] +]);?> + + +
    О себе:
    +

    body))?nl2br(Html::encode($model->body)):'Не заполненно!'?>

    + + +
    +
    + active==0):?> +
    Ваш Профиль пока не проверен Бычком!
    + +
    Поздравляем!
    Ваш Профиль проверен Бычком!
    + + 'btn btn-success btn-lg btn-block'])?> + 'btn btn-default btn-lg btn-block'])?> + + +
    +
    diff --git a/frontend/views/iam/edit_company.php b/frontend/views/iam/edit_company.php new file mode 100755 index 0000000..3a6e9be --- /dev/null +++ b/frontend/views/iam/edit_company.php @@ -0,0 +1,58 @@ +title = 'Редактирование Исполнителя - Компании'; +$this->params['breadcrumbs'][] = ['label'=>'Профиль','url'=>['/iam/index']]; +$this->params['breadcrumbs'][] = $this->title; + +$this->registerJsFile(Yii::$app->request->baseUrl.'/js/jquery.mask.js',['position'=>View::POS_END,'depends'=>['yii\web\YiiAsset']]); + +$this->registerJs(" +$('#user-phone').mask('(000) 000-0000'); +", View::POS_READY, 'mask'); +?> +
    +

    title) ?>

    + + 'reg-form', + 'options' => ['class' => 'form-vertical','enctype' => 'multipart/form-data'], + 'fieldConfig' => [ + //'template' => "{label}\n
    {input}
    \n
    {error}
    ", + //'labelOptions' => ['class' => 'col-lg-2 control-label'], + ], + ]); ?> + + field($model, 'company') ?> + + field($model, 'password')->passwordInput() ?> + + field($model, 'password_repeat')->passwordInput(['value'=>$model->password]) ?> + + field($model, 'name') ?> + + field($model, 'surname') ?> + + + + + field($model, 'body')->textArea(['rows' => '6']) ?> + + field($model, 'image')->fileInput() ?> + + field($model, 'old_image')->hiddenInput(['value'=>$model->image])->label(false); ?> + + field($model, 'role')->hiddenInput(['value'=>'company'])->label(false); ?> +
    + 'btn btn-primary btn-lg btn-block', 'name' => 'login-button']) ?> +
    + + + +
    + \ No newline at end of file diff --git a/frontend/views/iam/edit_customer.php b/frontend/views/iam/edit_customer.php new file mode 100755 index 0000000..6fe3560 --- /dev/null +++ b/frontend/views/iam/edit_customer.php @@ -0,0 +1,86 @@ +title = 'Редактирование Заказчика'; +$this->params['breadcrumbs'][] = ['label'=>'Профиль','url'=>['/iam/index']]; +$this->params['breadcrumbs'][] = $this->title; + +$this->registerJsFile(Yii::$app->request->baseUrl.'/js/jquery.mask.js',['position'=>View::POS_END,'depends'=>['yii\web\YiiAsset']]); + +$this->registerJs(" +$('#user-phone').mask('(000) 000-0000'); +", View::POS_READY, 'mask'); +?> +
    +

    title) ?>

    + + 'reg-form', + 'options' => ['class' => 'form-vertical','enctype' => 'multipart/form-data'], + 'fieldConfig' => [ + //'template' => "{label}\n
    {input}
    \n
    {error}
    ", + //'labelOptions' => ['class' => 'col-lg-2 control-label'], + ], + ]); ?> + + + field($model, 'password')->passwordInput() ?> + + field($model, 'password_repeat')->passwordInput(['value'=>$model->password]) ?> + + field($model, 'name') ?> + + field($model, 'surname') ?> + + +
    + field($model, 'birth_day')->dropDownList($day,['prompt'=>'День'])->label(false); + ?> + + field($model, 'birth_mouth')->dropDownList(['1'=>'Январь','2'=>'Февраль','3'=>'Март','4'=>'Апрель','5'=>'Май','6'=>'Июнь','7'=>'Июль','8'=>'Август','9'=>'Сентябрь','10'=>'Октябрь','11'=>'Ноябрь','12'=>'Декабрь'],['prompt'=>'Месяц'])->label(false); + ?> + + + =1920;$i--){ + $year[$i] = $i; + } + + echo $form->field($model, 'birth_year')->dropDownList($year,['prompt'=>'Год'])->label(false); + ?> +
    + field($model, 'phone') ?> + + field($model, 'sex')->dropDownList(['мужской' => 'мужской', 'женский' => 'женский'],['prompt'=>'...']); ?> + + field($model, 'status')->dropDownList(['Не женат' => 'Не женат','Не замужем'=>'Не замужем', 'Женат' => 'Женат','Замужем'=>'Замужем'],['prompt'=>'...']); ?> + + field($model, 'children')->dropDownList(['есть' => 'есть', 'нет' => 'нет'],['prompt'=>'...']); ?> + + + field($model, 'body')->textArea(['rows' => '6']) ?> + + field($model, 'image')->fileInput() ?> + + field($model, 'old_image')->hiddenInput(['value'=>$model->image])->label(false); ?> + + field($model, 'role')->hiddenInput(['value'=>'customer'])->label(false); ?> +
    + 'btn btn-primary btn-lg btn-block', 'name' => 'login-button']) ?> +
    + + + +
    + \ No newline at end of file diff --git a/frontend/views/iam/edit_person.php b/frontend/views/iam/edit_person.php new file mode 100755 index 0000000..3ccab5d --- /dev/null +++ b/frontend/views/iam/edit_person.php @@ -0,0 +1,102 @@ +title = 'Редактирование профиля'; +$this->params['breadcrumbs'][] = ['label'=>'Профиль','url'=>['/iam/index']]; +$this->params['breadcrumbs'][] = $this->title; + +$this->registerJsFile(Yii::$app->request->baseUrl.'/js/jquery.mask.js',['position'=>View::POS_END,'depends'=>['yii\web\YiiAsset']]); + +$this->registerJs(" +$('#user-phone').mask('(000) 000-0000'); +", View::POS_READY, 'mask'); +?> + +
    +

    Редактировать личные данные

    +
    +
    +
    +
    +
    Мой кабинет
    + render('_tabs')?> +
    +
    + +
    + + 'reg-form', + 'options' => ['class' => 'form-vertical','enctype' => 'multipart/form-data'], + 'fieldConfig' => [ + //'template' => "{label}\n
    {input}
    \n
    {error}
    ", + //'labelOptions' => ['class' => 'col-lg-2 control-label'], + ], + ]); ?> + + + field($model, 'password')->passwordInput() ?> + + field($model, 'password_repeat')->passwordInput(['value'=>$model->password]) ?> + + field($model, 'name') ?> + + field($model, 'surname') ?> + + +
    + field($model, 'birth_day')->dropDownList($day,['prompt'=>'День'])->label(false); + ?> + + field($model, 'birth_mouth')->dropDownList(['1'=>'Январь','2'=>'Февраль','3'=>'Март','4'=>'Апрель','5'=>'Май','6'=>'Июнь','7'=>'Июль','8'=>'Август','9'=>'Сентябрь','10'=>'Октябрь','11'=>'Ноябрь','12'=>'Декабрь'],['prompt'=>'Месяц'])->label(false); + ?> + + + =1920;$i--){ + $year[$i] = $i; + } + + echo $form->field($model, 'birth_year')->dropDownList($year,['prompt'=>'Год'])->label(false); + ?> +
    +
    + field($model, 'phone') ?> + + field($model, 'sex')->dropDownList(['мужской' => 'мужской', 'женский' => 'женский'],['prompt'=>'...']); ?> + + + field($model, 'body')->textArea(['rows' => '6']) ?> + + + field($model, 'role')->hiddenInput(['value'=>'person'])->label(false); ?> +
    +
    + + 'submit4 bottom3', 'name' => 'login-button']) ?> + +
    +
    + + + +
    + \ No newline at end of file diff --git a/frontend/views/iam/myorders.php b/frontend/views/iam/myorders.php new file mode 100755 index 0000000..2ed0c82 --- /dev/null +++ b/frontend/views/iam/myorders.php @@ -0,0 +1,85 @@ +title = 'Мои заказы'; +$this->params['breadcrumbs'][] = $this->title; + +$this->registerJs(" + + $('.orders_view').hide(); + $('.fav_point .link').click(function(){ + $(this).parent().parent().find('.orders_view').toggle(); + return false; + }); + +", View::POS_READY, 'orders_view'); +?> + +
    +

    Мои заказы

    +
    +
    +
    +
    +
    Мой кабинет
    + render('_tabs')?> +
    +
    + +
    + + +
    +
    + +
    + +
    date_time?>
    +
    на total?> грн
    +
    status?>
    +
    + +
    + products as $item_p): + ?> + + price)):?> +
    +
    + productVariant->image->imageUrl, 'product_trumb2')?> + +
    +
    product_name?>
    +
    Кол-во: count?>
    +
    price?> грн.
    +

    +
    + + + +
    +
    +
    + + +
    + +
    + + + + + + +
    +
    diff --git a/frontend/views/iam/person.php b/frontend/views/iam/person.php new file mode 100755 index 0000000..d14ae55 --- /dev/null +++ b/frontend/views/iam/person.php @@ -0,0 +1,47 @@ +title = 'Профиль'; +?> + + +
    +

    Личные данные

    +
    +
    +
    +
    +
    Мой кабинет
    + render('_tabs')?> +
    +
    + +
    +
    +
    +
    Имя
    name) . ' ' . Html::encode($model->surname);?>
    +
    Электронная почта
    username)?>
    +
    Телефон
    phone)?>
    +
    +
    +
    +
    'dotted'])?>
    + + +
    +
    +
    +
    +
    +
    + diff --git a/frontend/views/iam/price.php b/frontend/views/iam/price.php new file mode 100755 index 0000000..f9c7ab7 --- /dev/null +++ b/frontend/views/iam/price.php @@ -0,0 +1,40 @@ +title = 'Пожелания'; +$this->registerMetaTag(['name' => 'description', 'content' => 'Пожелания']); +$this->registerMetaTag(['name' => 'keywords', 'content' => 'Пожелания']); + +?> + +

    Пожелания

    + +
    + $dataProvider, + 'columns' => [ + [ + 'attribute' => 'id', + 'value'=>'id', + 'contentOptions'=>['style'=>'width: 70px;'] + ], + [ + 'attribute' => 'date_time', + 'value'=>'date_time', + 'contentOptions'=>['style'=>'width: 150px;'] + ], + [ + 'attribute' => 'product_name', + 'value'=>function($data){ + return (!empty($data->product->name))?Html::a($data->product->name, ['products/show','translit_rubric'=>$data->product->catalog->translit,'translit'=>$data->product->translit,'id'=>$data->product->id]):'Этот товар удален с сайта'; + }, + 'format'=>'raw', + ], + + + + ], +]) ?> \ No newline at end of file diff --git a/frontend/views/iam/share.php b/frontend/views/iam/share.php new file mode 100755 index 0000000..b316dc4 --- /dev/null +++ b/frontend/views/iam/share.php @@ -0,0 +1,68 @@ +title = 'Мои закладки'; +$this->registerMetaTag(['name' => 'description', 'content' => 'Мои закладки']); +$this->registerMetaTag(['name' => 'keywords', 'content' => 'Мои закладки']); + +$this->registerJs(" + + $('.orders_view').hide(); + $('.fav_point .link').click(function(){ + $(this).parent().parent().find('.orders_view').toggle(); + return false; + }); + +", View::POS_READY, 'orders_view'); +?> + +
    +

    Мои закладки

    +
    +
    +
    +
    +
    Мой кабинет
    + render('_tabs')?> +
    +
    + +
    +
    +
    + $_items): $i++;?> +
    + +
    +
    + +
    + product)):?> + +
    +
    + + + product->variants[0])):?>
    product->variants[0]->price?> грн.
    +

    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    diff --git a/frontend/views/iam/show_order.php b/frontend/views/iam/show_order.php new file mode 100755 index 0000000..824f7da --- /dev/null +++ b/frontend/views/iam/show_order.php @@ -0,0 +1,55 @@ +title = 'Заказ №'.$model->id; +$this->params['breadcrumbs'][] = $this->title; +?> +

    Заказ №id?>

    + +
    + $dataProvider, + 'columns' => [ + [ + 'attribute' => 'id', + 'value'=>'id', + 'contentOptions'=>['style'=>'width: 70px;'] + ], + [ + 'attribute' => 'art', + 'value'=>'art', + 'contentOptions'=>['style'=>'width: 50px;'] + ], + [ + 'attribute' => 'product_name', + 'value'=>'product_name', + //'contentOptions'=>['style'=>'max-width: 300px;'] + ], + [ + 'attribute' => 'name', + 'value'=>'name', + //'contentOptions'=>['style'=>'max-width: 300px;'] + ], + [ + 'attribute' => 'cost', + 'value'=>'cost', + 'contentOptions'=>['style'=>'width: 100px;'] + ], + [ + 'attribute' => 'count', + 'value'=>'count', + 'contentOptions'=>['style'=>'width: 30px;'] + ], + [ + 'attribute' => 'sum_cost', + 'value'=>'sum_cost', + 'contentOptions'=>['style'=>'width: 100px;'] + ], + + + ], +]) ?> + diff --git a/frontend/views/layouts/main-menu.php b/frontend/views/layouts/main-menu.php new file mode 100755 index 0000000..375fd55 --- /dev/null +++ b/frontend/views/layouts/main-menu.php @@ -0,0 +1,12 @@ + + + + diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php new file mode 100755 index 0000000..95dca86 --- /dev/null +++ b/frontend/views/layouts/main.php @@ -0,0 +1,477 @@ +registerJs (" + $('.phone .more').bind('click',function(){ + $('.phone .more_block').toggle(); + }); +", View::POS_READY, 'phone'); +//$this->registerCssFile(Yii::$app->request->BaseUrl.'/css/style.css'); +$this->registerJsFile (Yii::$app->request->baseUrl . '/js/basket.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]); +$this->registerJs (" + $('#basket').basket(); +", View::POS_READY, 'basket'); +$this->registerJsFile (Yii::$app->request->baseUrl . '/js/call.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]); +$this->registerJs (" + $('#call').call({token:'" . Yii::$app->request->getCsrfToken () . "'}); +", View::POS_READY, 'call'); + +$this->registerJsFile (Yii::$app->request->baseUrl . '/js/fix_height.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]); +$this->registerJs (" + var activeTab = $('.social li:first a').attr('id'); + $('.'+activeTab+'_box').show(); + $('.social li').click(function(){ + $('.hide').hide(); + var activeTab = $(this).find('a').attr('id'); + //alert(activeTab); + $('.'+activeTab+'_box').show(); + return false; +}); +", View::POS_READY, 'social'); + +// AssetBundle jcarousel :D + +// jquery-migrate +$this->registerJsFile('http://code.jquery.com/jquery-migrate-1.3.0.js',[ + 'position' => View::POS_END, + 'depends' => ['yii\web\JqueryAsset'] +]); + +// jcarousel +$this->registerCssFile(Yii::$app->request->BaseUrl.'/js/jsor-jcarousel-7bb2e0a/skins/tango/skin.css'); +$this->registerJsFile(Yii::$app->request->baseUrl.'/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.min.js',[ + 'position' => View::POS_END, + 'depends' => ['yii\web\JqueryAsset'] +]); + +$this->registerJs(" + $('.jcarousel').jcarousel({ + vertical: true, + scroll: 1 + }); + ", View::POS_READY); + + +// AssetBundle jcarousel :D [close] + +?> +beginPage () ?> + + + + + + <?= Seo::widget([ 'row'=>'title'])?> + 'description'])?> + 'meta'])?> + + head () ?> + + + + + + + + + + + + + + + + + + + + beginBody () ?> + + + + + render ('/basket/_popup') ?> + + + + + +
    + +
    +
    +
    + (044) 303 90 15
    + (093) 911 05 03
    + (095) 004 56 55
    + (068) 083 62 01 +
    + rukza4ok@eltrade.com.ua + +
    +
    +
    Корзина 0
    + +
    +
    +
    +
    +
    + + Загрузка... + +
    + + + +
    +
    + +
    + + + + +
    + + + + + + + + + + + + + +
    Режим работы:
    пн-пт с 10.00 - 19.00
    сб с 10.00 - 17.00
    вс выходной
    +
    +
    + + + +
    +
    + + + + +
    + params['breadcrumbs'])):?> + + + + +
    + +
    + +
    +
    +
    + + +
    +
    + + + +
    + +
    +
    +
    + +
    + +
    +
    + +
    + + + +
    +
    + +
    +
    + + + +
    +
    Пока нет!
    + +
    + '; + + $ids = ViewProduct::listView (); + if (! empty($ids)) + { + $products = Products::find ()->where (['id' => ViewProduct::listView ()])->all (); + echo 'Вы просматривали'; + } + else + { + $products = Products::find ()->where (['new' => '1'])->orderBy ('id DESC')->innerJoinWith (['cost'])->groupBy ('id')->limit (4)->all (); + echo 'Товары со скидкой'; + } + echo '

    '; + + echo ' + '; + */ + ?> +
    + +
    + + + +
    + (044) 303 90 15
    + (093) 911 05 03
    + (095) 004 56 55
    + (068) 083 62 01 +
    + + rukza4ok@eltrade.com.ua + +
    + +
    +

    Подписаться на акции

    + '/subscribe']); + ?> + field ($subscribe, 'email')->textInput (['placeholder' => 'E-mail', 'enableAjaxValidation' => true])->label (false); ?> + field ($subscribe, 'sale')->dropDownList (['10' => '10%', '20' => '20%'], ['prompt' => 'Скидка', 'enableAjaxValidation' => true])->label (false); ?> +
    укажите желаемый размер скидки
    + 'submit4m']); ?> + + + + + +
    + +
    + +
    + +
    + +
    + + +
    +
    +
    © Rukzachok. Все права защищены.
    + +
    +
    +
    + + endBody () ?> + + +endPage () ?> \ No newline at end of file diff --git a/frontend/views/login/error_log b/frontend/views/login/error_log new file mode 100755 index 0000000..cfb8a9d --- /dev/null +++ b/frontend/views/login/error_log @@ -0,0 +1 @@ +[23-Feb-2015 22:24:19 UTC] PHP Fatal error: Using $this when not in object context in /home/webplusn/public_html/yii2/modules/admin/views/login/index.php on line 9 diff --git a/frontend/views/login/forgot.php b/frontend/views/login/forgot.php new file mode 100755 index 0000000..3f4d96e --- /dev/null +++ b/frontend/views/login/forgot.php @@ -0,0 +1,38 @@ +title = 'Забыли пароль?'; +$this->registerMetaTag(['name' => 'description', 'content' => 'Забыли пароль?']); +$this->registerMetaTag(['name' => 'keywords', 'content' => 'Забыли пароль?']); + +?> + + +
    +

    title) ?>

    +

    Если Вы по каким то причинам забыли свой пароль, то введите пожалуйста свой логин. После чего Вам на почтовый ящик прейдет письмо с вашим паролем.

    + + + + + 'login-form', + 'options' => ['class' => 'well form-vertical'], + 'enableClientScript' => false, + ]); ?> + + field($model, 'username') ?> + + + 'btn btn-primary', 'name' => 'login-button']) ?> + + + + + +
    \ No newline at end of file diff --git a/frontend/views/login/index.php b/frontend/views/login/index.php new file mode 100755 index 0000000..d6e5cc4 --- /dev/null +++ b/frontend/views/login/index.php @@ -0,0 +1,36 @@ +title = 'Вход в личный кабинет'; +$this->params['breadcrumbs'][] = $this->title; +?> +
    +

    title) ?>

    + + 'login-form', + 'options' => ['class' => 'well form-vertical'], + 'enableClientScript' => false, + ]); ?> + + field($model, 'username') ?> + + field($model, 'password')->passwordInput() ?> + + field($model, 'rememberMe')->checkbox() ?> + + + + 'btn btn-primary', 'name' => 'login-button']) ?> + + + + + +
    diff --git a/frontend/views/modal/consultation_modal.php b/frontend/views/modal/consultation_modal.php new file mode 100755 index 0000000..0f05bc2 --- /dev/null +++ b/frontend/views/modal/consultation_modal.php @@ -0,0 +1,19 @@ + +
    + +
    \ No newline at end of file diff --git a/frontend/views/modal/forgot_password_form_model_window.php b/frontend/views/modal/forgot_password_form_model_window.php new file mode 100755 index 0000000..eabe848 --- /dev/null +++ b/frontend/views/modal/forgot_password_form_model_window.php @@ -0,0 +1,15 @@ +
    + + + +
    \ No newline at end of file diff --git a/frontend/views/modal/login_window_model_window.php b/frontend/views/modal/login_window_model_window.php new file mode 100755 index 0000000..02ed6a0 --- /dev/null +++ b/frontend/views/modal/login_window_model_window.php @@ -0,0 +1,52 @@ +title = 'Login'; +$this->params['breadcrumbs'][] = $this->title; +?> + \ No newline at end of file diff --git a/frontend/views/modal/registration_window_model_window.php b/frontend/views/modal/registration_window_model_window.php new file mode 100755 index 0000000..160f165 --- /dev/null +++ b/frontend/views/modal/registration_window_model_window.php @@ -0,0 +1,60 @@ + + \ No newline at end of file diff --git a/frontend/views/news/index.php b/frontend/views/news/index.php new file mode 100755 index 0000000..dcc3cc1 --- /dev/null +++ b/frontend/views/news/index.php @@ -0,0 +1,42 @@ + +title = 'Новости'; +$this->registerMetaTag(['name' => 'description', 'content' => 'Новости']); +$this->registerMetaTag(['name' => 'keywords', 'content' => 'Новости']); +?> + + + +
    + +
    +

    Новости

    + + +
    + + title?> + body,200);?> +
    + + +
    + $pages, + 'registerLinkTags' => true + ]);?> + +
    + +
    \ No newline at end of file diff --git a/frontend/views/news/show.php b/frontend/views/news/show.php new file mode 100755 index 0000000..578736d --- /dev/null +++ b/frontend/views/news/show.php @@ -0,0 +1,30 @@ + +title = $news->meta_title; +$this->registerMetaTag(['name' => 'description', 'content' => $news->meta_description]); +$this->registerMetaTag(['name' => 'keywords', 'content' => $news->meta_keywords]); +?> + + + +
    + +
    +

    title?>

    + + + body?> +

    date?>

    +
    + +
    \ No newline at end of file diff --git a/frontend/views/orders/basket-step-01.php b/frontend/views/orders/basket-step-01.php new file mode 100755 index 0000000..3a57a2d --- /dev/null +++ b/frontend/views/orders/basket-step-01.php @@ -0,0 +1,104 @@ +title = 'Оформление заказа'; +$this->params['breadcrumbs'][] = $this->title; +?> + + +

    Оформление заказа

    + + + 'basket_order_01_form' + ]); ?> + + +
    + +

    Личные данные

    + +
    + field($model, 'name',[ + 'template' => '', + ])->textInput() ?> +
    + +
    + field($model, 'email',[ + 'template' => '', + ])->textInput() ?> +
    + +
    + field($model, 'phone',[ + 'template' => '', + ])->textInput() ?> +
    + +
    + +
    + +
    +

    Доставка

    + + + field($model, 'delivery', [ + ])->radioList([ + '1' => '

    Курьерска доставка по Киеву и области

    ', + '2' => '

    В любой регион Украины

    ', + '3' => '

    Самовывоз (бесплатно)

    уточните подробности по телефону 044 ХХХ-ХХ-ХХ', + ], [ + 'item' => function ($index, $label, $name, $checked, $value) { + return '
    '; + }, + ])->label(false); + + + ?> + + +
    + +
    +

    Оплата

    + + field($model, 'payment', [ + ])->radioList([ + '1' => '

    Оплата наличными

    ', + '2' => '

    Оплата по безналичному расчету. Код ЕГРПОУ

    ', + '3' => '

    Приват 24

    ', + '4' => '

    Согласовать с менеджером

    ', + ], [ + 'item' => function ($index, $label, $name, $checked, $value) use ($model) { + if($index != 1){ + return '
    '; + } else { + return '
    '.Html::activeTextInput($model,'code').'
    '; + } + + }, + ])->label(false); + + + ?> + +
    + +
    + 'order_01_btn', 'name' => 'signup-button']) ?> +
    + + \ No newline at end of file diff --git a/frontend/views/orders/basket-step-02.php b/frontend/views/orders/basket-step-02.php new file mode 100755 index 0000000..beaf0b4 --- /dev/null +++ b/frontend/views/orders/basket-step-02.php @@ -0,0 +1,83 @@ +title = 'Оформление заказа'; +$this->params['breadcrumbs'][] = $this->title; + +?> +
    + 'basket_order_01_form' + ]); ?> + +

    Оформление заказа

    +
    +

    Номер заказа

    +
      + + +
    • +
      +
      +
      + product->image)) :?> + + + <?= $item['item']->product->image->alt ? $item['item']->product->image->alt : $item['item']->product->name?> + +
      +
      + name?> + Код: 45885-01016049 +
      +
      +
      + +
      +
      +
      +
      -
      +
      +
      +
      price * $item['num'] ?>грн.
      +
      +
      +
    • + + +
    +
    +
    +

    Всего товаров:

    +

    Сумма: грн.

    +
    +
    +
    + +
    +

    Детали

    +
    + Имяname ?> +
    +
    + E-mailemail ?> +
    +
    + Телефонphone ?> +
    +

    Способ оплаты

    +
    Оплата наличными
    +

    Доставка

    +
    Курьерска доставка по Киеву и области
    +
    + +
    + 'order_01_btn', 'name' => 'signup-button']) ?> +
    + + +
    + diff --git a/frontend/views/orders/basket-step-03.php b/frontend/views/orders/basket-step-03.php new file mode 100755 index 0000000..0c6deaf --- /dev/null +++ b/frontend/views/orders/basket-step-03.php @@ -0,0 +1,10 @@ +title = 'Оформление заказа'; +$this->params['breadcrumbs'][] = $this->title; + +?> +

    Спасибо за ваш заказ!

    diff --git a/frontend/views/page/show.php b/frontend/views/page/show.php new file mode 100755 index 0000000..dfcec53 --- /dev/null +++ b/frontend/views/page/show.php @@ -0,0 +1,7 @@ +title = $page->title; +$this->params['breadcrumbs'][] = $this->title; +echo Html::tag('h1',$page->h1 ? $page->h1 : $page->title ); +echo $page->body; \ No newline at end of file diff --git a/frontend/views/reg/company.php b/frontend/views/reg/company.php new file mode 100755 index 0000000..c2e6afd --- /dev/null +++ b/frontend/views/reg/company.php @@ -0,0 +1,56 @@ +title = 'Регистрация Исполнителя - Компания'; +$this->params['breadcrumbs'][] = $this->title; + +$this->registerJsFile(Yii::$app->request->baseUrl.'/js/jquery.mask.js',['position'=>View::POS_END,'depends'=>['yii\web\YiiAsset']]); + +$this->registerJs(" +$('#user-phone').mask('(000) 000-0000'); +", View::POS_READY, 'mask'); +?> +
    +

    title) ?>

    + +
    Потратив пару минут для регистрации на Бычок, вы сможете создавать услуги и находить заказчиков.
    + + 'reg-form', + 'options' => ['class' => 'form-vertical'], + 'fieldConfig' => [ + //'template' => "{label}\n
    {input}
    \n
    {error}
    ", + //'labelOptions' => ['class' => 'col-lg-2 control-label'], + ], + ]); ?> + + field($model, 'username') ?> + + field($model, 'password')->passwordInput() ?> + + field($model, 'password_repeat')->passwordInput() ?> + + field($model, 'name') ?> + + field($model, 'surname') ?> + + field($model, 'company') ?> + + field($model, 'phone') ?> + + field($model, 'verifyCode')->widget(Captcha::className(),['captchaAction'=>'reg/captcha']) ?> + + field($model, 'role')->hiddenInput(['value'=>'company'])->label(false); ?> +
    + 'btn btn-primary btn-lg btn-block', 'name' => 'login-button']) ?> +
    + + + +
    + \ No newline at end of file diff --git a/frontend/views/reg/customer.php b/frontend/views/reg/customer.php new file mode 100755 index 0000000..d8781b0 --- /dev/null +++ b/frontend/views/reg/customer.php @@ -0,0 +1,54 @@ +title = 'Регистрация Заказчика'; +$this->params['breadcrumbs'][] = $this->title; + +$this->registerJsFile(Yii::$app->request->baseUrl.'/js/jquery.mask.js',['position'=>View::POS_END,'depends'=>['yii\web\YiiAsset']]); + +$this->registerJs(" +$('#user-phone').mask('(000) 000-0000'); +", View::POS_READY, 'mask'); +?> +
    +

    title) ?>

    + +
    Потратив пару минут для регистрации на Бычок, вы сможете создавать заказы и находить исполнителей.
    + + 'reg-form', + 'options' => ['class' => 'form-vertical'], + 'fieldConfig' => [ + //'template' => "{label}\n
    {input}
    \n
    {error}
    ", + //'labelOptions' => ['class' => 'col-lg-2 control-label'], + ], + ]); ?> + + field($model, 'username') ?> + + field($model, 'password')->passwordInput() ?> + + field($model, 'password_repeat')->passwordInput() ?> + + field($model, 'name') ?> + + field($model, 'surname') ?> + + field($model, 'phone') ?> + + field($model, 'verifyCode')->widget(Captcha::className(),['captchaAction'=>'reg/captcha']) ?> + + field($model, 'role')->hiddenInput(['value'=>'customer'])->label(false); ?> +
    + 'btn btn-primary btn-lg btn-block', 'name' => 'login-button']) ?> +
    + + + +
    + \ No newline at end of file diff --git a/frontend/views/reg/person.php b/frontend/views/reg/person.php new file mode 100755 index 0000000..3bb6a64 --- /dev/null +++ b/frontend/views/reg/person.php @@ -0,0 +1,47 @@ +title = 'Регистрация'; +$this->params['breadcrumbs'][] = $this->title; + +$this->registerJsFile(Yii::$app->request->baseUrl.'/js/jquery.mask.js',['position'=>View::POS_END,'depends'=>['yii\web\YiiAsset']]); + +$this->registerJs(" +$('#customer-phone').mask('(000) 000-0000'); +", View::POS_READY, 'mask'); +?> +
    +

    title) ?>

    + + 'reg-form', + 'options' => ['class' => 'form-vertical'] + ]); ?> + + field($model, 'username') ?> + + field($model, 'password')->passwordInput() ?> + + field($model, 'password_repeat')->passwordInput() ?> + + field($model, 'name') ?> + + field($model, 'surname') ?> + + field($model, 'phone') ?> + + field($model, 'verifyCode')->widget(Captcha::className(),['captchaAction'=>'reg/captcha']) ?> + +
    + 'btn btn-primary btn-lg btn-block', 'name' => 'login-button']) ?> +
    + + + +
    + \ No newline at end of file diff --git a/frontend/views/search/index.php b/frontend/views/search/index.php new file mode 100755 index 0000000..4285ff0 --- /dev/null +++ b/frontend/views/search/index.php @@ -0,0 +1,57 @@ + implode(' ', $keywords), +]; + +$this->params['breadcrumbs'][] = ['label' => 'Поиск', 'url' => ['catalog/category', 'word' => implode(' ', $keywords)]]; + + +//$this->params['seo']['seo_text'] = 'TEST SEO TEXT'; +//$this->params['seo']['h1'] = 'TEST H1'; +//$this->params['seo']['description'] = 'TEST DESCRIPTION'; +//$this->params['seo']['fields']['name'] = 'TEST NAME FROM FIELD'; +$this->params['seo']['meta']= 'noindex,follow'; +?> + +
    + +
    +
    +
    +
    Категории
    +
      + category_id == $_category->category_id; + $option_url = $checked ? Url::to(['catalog/category', 'word' => implode(' ', $keywords)]) : Url::to(['catalog/category', 'category' => $_category, 'word' => implode(' ', $keywords)]); + ?> +
    • + onchange="document.location=''" /> + name?> +
    • + +
    +
    +
    +
    + +
    +

    Поиск

    +
    +
    +
      + models as $product) :?> + render('/catalog/product_item.php', ['product' => $product])?> + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/frontend/views/service/_objects.php b/frontend/views/service/_objects.php new file mode 100755 index 0000000..d9a48cb --- /dev/null +++ b/frontend/views/service/_objects.php @@ -0,0 +1,35 @@ + +
    +
    + +
    +
    + minImg($model->image, '200','200')),Url::toRoute(['service/view', 'alias' =>$model->alias ])) ?> +
    +
    + +
    + + +
    name,Url::toRoute(['service/view', 'alias' =>$model->alias ])) ?>
    +
    +

    + body, 200, '...') ?> +

    +
    + + + + + + + +
    Заказать консультацию
    +
    +
    +
    \ No newline at end of file diff --git a/frontend/views/service/index.php b/frontend/views/service/index.php new file mode 100755 index 0000000..07d5468 --- /dev/null +++ b/frontend/views/service/index.php @@ -0,0 +1,13 @@ +params['breadcrumbs'][] = ['label' => 'Услуги', 'url' => ['index']]; +?> + $dataProvider, + 'itemView'=>'_objects', + 'summary'=>'', + 'layout' => "
    {items}
    +
    {pager}
    " + ] ); +?> diff --git a/frontend/views/service/view.php b/frontend/views/service/view.php new file mode 100755 index 0000000..ab983bb --- /dev/null +++ b/frontend/views/service/view.php @@ -0,0 +1,20 @@ +title = $model->name; +$this->params['breadcrumbs'][] = ['label' => 'Услуги', 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; + +?> +
    +

    name?>

    + minImg($model->image, '940','480')) ?> +
    + body?> +
    +
    diff --git a/frontend/views/site/_index.php b/frontend/views/site/_index.php new file mode 100755 index 0000000..5999ad3 --- /dev/null +++ b/frontend/views/site/_index.php @@ -0,0 +1,97 @@ +title = 'My Yii Application'; +?> +
    + +
    +

    Congratulations!

    + + ' Yii2.0']) ?> + +

    You have successfully created your Yii-powered application.

    + +

    Get started with Yii

    +
    + + + + +field($model, 'term')->widget(\yii\jui\AutoComplete::classname(), [ + 'clientOptions' => [ + 'source' => Url::to(['site/term']), + ], + 'options'=>[ + 'class'=>'form-control' + ] +]) ?> +field($model, 'term2')->widget(\yii\jui\AutoComplete::classname(), [ + 'clientOptions' => [ + 'source' => Url::to(['site/term']), + ], + 'options'=>[ + 'class'=>'form-control' + ] +]) ?> +field($model,'date')->widget(\yii\jui\DatePicker::className(),['clientOptions' => [],'options' => ['class'=>'form-control']]) ?> +field($model,'date_do')->widget(\yii\jui\DatePicker::className(),['clientOptions' => [],'options' => ['class'=>'form-control']]) ?> +field($model, 'peoples')->widget(\yii\jui\Spinner::classname(), [ + 'clientOptions' => ['step' => 1], + +]) ?> +field($model, 'username')->widget(CKEditor::className(),[ +'editorOptions' => ElFinder::ckeditorOptions('elfinder',[/* Some CKEditor Options */]), +]); +?> + + +
    + +
    +
    +

    Heading

    + +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur.

    + +

    Yii Documentation »

    +
    +
    +

    Heading

    + +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur.

    + +

    Yii Forum »

    +
    +
    +

    Heading

    + +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur.

    + +

    Yii Extensions »

    +
    +
    + +
    +
    diff --git a/frontend/views/site/about.php b/frontend/views/site/about.php new file mode 100755 index 0000000..13d85a6 --- /dev/null +++ b/frontend/views/site/about.php @@ -0,0 +1,16 @@ +title = 'About'; +$this->params['breadcrumbs'][] = $this->title; +?> +
    +

    title) ?>

    + +

    + This is the About page. You may modify the following file to customize its content: +

    + + +
    diff --git a/frontend/views/site/contact.php b/frontend/views/site/contact.php new file mode 100755 index 0000000..e964a34 --- /dev/null +++ b/frontend/views/site/contact.php @@ -0,0 +1,57 @@ +title = 'Contact'; +$this->params['breadcrumbs'][] = $this->title; +?> +
    +

    title) ?>

    + + session->hasFlash('contactFormSubmitted')): ?> + +
    + Thank you for contacting us. We will respond to you as soon as possible. +
    + +

    + Note that if you turn on the Yii debugger, you should be able + to view the mail message on the mail panel of the debugger. + mailer->useFileTransport): ?> + Because the application is in development mode, the email is not sent but saved as + a file under mailer->fileTransportPath) ?>. + Please configure the useFileTransport property of the mail + application component to be false to enable email sending. + +

    + + + +

    + If you have business inquiries or other questions, please fill out the following form to contact us. Thank you. +

    + +
    +
    + 'contact-form']); ?> + field($model, 'name') ?> + field($model, 'email') ?> + field($model, 'subject') ?> + field($model, 'body')->textArea(['rows' => 6]) ?> + field($model, 'verifyCode')->widget(Captcha::className(), [ + 'template' => '
    {image}
    {input}
    ', + ]) ?> +
    + 'btn btn-primary', 'name' => 'contact-button']) ?> +
    + +
    +
    + + +
    diff --git a/frontend/views/site/error.php b/frontend/views/site/error.php new file mode 100755 index 0000000..69c6a65 --- /dev/null +++ b/frontend/views/site/error.php @@ -0,0 +1,105 @@ +title = 'Ошибка '.$code; +?> + + + +
    +
    +
    +

    Добро пожаловать на страницу 404!
    + Вы находитесь здесь, потому что ввели адрес страницы,
    + которая уже не существует или была перемещена по другому адресу

    +
    + +
    +

    … Возможно, запрашиваемая Вами страница была перенесена или удалена.
    + Также возможно, Вы допустили небольшую опечатку при вводе адреса – такое случается даже с нами, поэтому еще раз внимательно проверьте

    +
    + + + +
    \ No newline at end of file diff --git a/frontend/views/site/error_log b/frontend/views/site/error_log new file mode 100755 index 0000000..f1b177f --- /dev/null +++ b/frontend/views/site/error_log @@ -0,0 +1 @@ +[20-Feb-2015 18:28:38 UTC] PHP Fatal error: Using $this when not in object context in /home/webplusn/public_html/yii2/views/site/index.php on line 3 diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php new file mode 100755 index 0000000..94c8c10 --- /dev/null +++ b/frontend/views/site/index.php @@ -0,0 +1,85 @@ +params['seo']['seo_text'] = 'TEST SEO TEXT'; +//$this->params['seo']['h1'] = 'TEST H1'; +//$this->params['seo']['description'] = 'TEST DESCRIPTION'; +//$this->params['seo']['fields']['name'] = 'TEST NAME FROM FIELD'; +$this->params['seo']['title'] = 'Купить городской рюкзак Киев | Купить рюкзаки Dakine Украина | Rukzachok.com.ua'; +$this->registerJsFile ( + Yii::$app->request->baseUrl . '/js/slides.min.jquery.js', + ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]); + +?> + +'; + echo SliderWidget::widget(["title"=>"HOME_SLIDER"]); + echo BannerWidget::widget(['title' => 'HOME_RIGHT']); + + echo '
    '; + echo BannerWidget::widget(['title' => 'HOME_UNDER_SLIDER_1']); + echo BannerWidget::widget(['title' => 'HOME_UNDER_SLIDER_2']); + echo BannerWidget::widget(['title' => 'HOME_UNDER_SLIDER_3']); + echo '
    '; + +echo '
    ' +?> + + 'rubrics', 'includes' => [130,131,132,133,134]])?> + + 'promo'])?> + 'new'])?> + 'top'])?> + + +
    + +
      +
    • +
      Только брендовые товары. Мы не торгуем подделками — только проверенное качество.
      +
    • +
    • +
      Скидки постоянным клиентам. Постоянные клиенты получают гарантированную скидку на неакционные товары.
      +
    • +
    • +
      Удобная оплата: наличными курьеру или же банковский перевод.
      +
    • +
    • +
      Квалифицированные менеджеры всегда рады помочь с выбором и консультацией.
      +
    • +
    • +
      100% гарантия возврата. Если товар не подойдет, мы вернем деньги.
      +
    • +
    • +
      Отслеживание статуса заказа и доставки.
      +
    • +
    +
    +
    + + + + 'HOME_CENTER']);?> + + +'seo_text']); +if($seo_text){ + ?> + + + + + + diff --git a/frontend/views/site/login.php b/frontend/views/site/login.php new file mode 100755 index 0000000..916be98 --- /dev/null +++ b/frontend/views/site/login.php @@ -0,0 +1,46 @@ +title = 'Login'; +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/frontend/views/site/requestPasswordResetToken.php b/frontend/views/site/requestPasswordResetToken.php new file mode 100755 index 0000000..9f6822e --- /dev/null +++ b/frontend/views/site/requestPasswordResetToken.php @@ -0,0 +1,31 @@ +title = 'Request password reset'; +$this->params['breadcrumbs'][] = $this->title; +?> +
    +

    title) ?>

    + +

    Please fill out your email. A link to reset password will be sent there.

    + +
    +
    + 'request-password-reset-form']); ?> + + field($model, 'email')->textInput(['autofocus' => true]) ?> + +
    + 'btn btn-primary']) ?> +
    + + +
    +
    +
    diff --git a/frontend/views/site/resetPassword.php b/frontend/views/site/resetPassword.php new file mode 100755 index 0000000..36ef452 --- /dev/null +++ b/frontend/views/site/resetPassword.php @@ -0,0 +1,31 @@ +title = 'Reset password'; +$this->params['breadcrumbs'][] = $this->title; +?> +
    +

    title) ?>

    + +

    Please choose your new password:

    + +
    +
    + 'reset-password-form']); ?> + + field($model, 'password')->passwordInput(['autofocus' => true]) ?> + +
    + 'btn btn-primary']) ?> +
    + + +
    +
    +
    diff --git a/frontend/views/site/signup.php b/frontend/views/site/signup.php new file mode 100755 index 0000000..de9dad6 --- /dev/null +++ b/frontend/views/site/signup.php @@ -0,0 +1,35 @@ +title = 'Signup'; +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/frontend/views/subscribe/index.php b/frontend/views/subscribe/index.php new file mode 100755 index 0000000..1beab84 --- /dev/null +++ b/frontend/views/subscribe/index.php @@ -0,0 +1,37 @@ +title = 'Подписка'; +$this->registerMetaTag(['name' => 'description', 'content' => 'Подписка']); +$this->registerMetaTag(['name' => 'keywords', 'content' => 'Подписка']); + +?> + + + + + +
    + +
    +

    Подписаться на акции

    + + + +errorSummary($model); ?> + +
    + +
    diff --git a/frontend/views/text/index.php b/frontend/views/text/index.php new file mode 100755 index 0000000..51a275e --- /dev/null +++ b/frontend/views/text/index.php @@ -0,0 +1,19 @@ + +title = $text->meta_title; +$this->registerMetaTag(['name' => 'description', 'content' => $text->meta_description]); +$this->registerMetaTag(['name' => 'keywords', 'content' => $text->meta_keywords]); +?> + + +

    title;?>

    +
    +body;?> +
    \ No newline at end of file diff --git a/frontend/web/.gitignore b/frontend/web/.gitignore new file mode 100755 index 0000000..a6e95c8 --- /dev/null +++ b/frontend/web/.gitignore @@ -0,0 +1,2 @@ +/index.php +/index-test.php diff --git a/frontend/web/css/begunok.css b/frontend/web/css/begunok.css new file mode 100755 index 0000000..af53de4 --- /dev/null +++ b/frontend/web/css/begunok.css @@ -0,0 +1,97 @@ +/* это правила оформления. К скрипту отношения не имеют */ +.cost_box form { + width: 250px; + position: relative; + margin: 0px; + +} + +.formCost { + float: left; + margin-bottom: 10px; +} +.formCost div{float:left;} +.formCost label { + float: left; + font-size: 14px; + color:#929292; + font-weight: bold; + margin-right: 5px; + margin-top:5px; + position: relative; + top: 2px; +} +.formCost input { + float: left; + text-align: right; + font-size: 14px; + font-weight: bold; + width: 55px; + height: 20px;padding:5px; + background: none; + border: 1px solid #d2d2d2; + margin-right: 10px; + border-radius:5px; +} + +.sliderCont { margin-top:20px; + width: 178px; + height: 27px; + float: left; +} + +/* А это правила для скрипта: */ +#slider { + width: 200px; +} + +.ui-slider { + position: relative; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 15px; + height: 15px; + background: url(../img/begunok_slider.png) no-repeat; + cursor: pointer +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + overflow: hidden; +} +.ui-slider-horizontal { + height: 4px; +} +.ui-slider-horizontal .ui-slider-handle { + top: -5px; + margin-left: -6px; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} +.ui-widget-content { + border: 3px solid #d2d2d2; + background: #fff; +} +.ui-widget-header { + border: 1px solid #D4D4D4; + background: #F00; +} +.ui-corner-all { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} + diff --git a/frontend/web/css/comments.css b/frontend/web/css/comments.css new file mode 100755 index 0000000..7587ab6 --- /dev/null +++ b/frontend/web/css/comments.css @@ -0,0 +1 @@ +@import "https://fonts.googleapis.com/css?family=Roboto:400,700,500&subset=cyrillic-ext,latin,cyrillic,latin-ext";.input_bl,.area_bl,.form-comm-wr,.user_name,.user_txt,.comment-panel,.answer-form,.comments-start input,.comments-start textarea,.submit_btn button,.input_bl label{box-sizing:border-box}.comments-border{width:100%;margin-top:25px;margin-bottom:27px;height:1px;background:#d2d2d2}.comments-start{width:730px;margin:0 auto;font-family:'Roboto',sans-serif;font-weight:400;color:#333}.form-comm-wr{width:100%;background:#f5f5f5;padding:20px;float:left}.input_bl{margin-top:15px;float:left}.area_bl,.input_bl{position:relative}.input_bl input,.input_bl textarea,.answer-form textarea{width:258px;height:30px;border:1px solid #d2d2d2;background:#fff;outline:none!important;border-radius:4px;padding-left:10px}.area_bl textarea,.answer-form textarea{resize:none!important;height:140px;width:585px;padding-top:7px}.input_bl input:focus,.input_bl textarea:focus,.answer-form textarea:focus{box-shadow:1px 2px 2px 0 rgba(215,215,215,0.75) inset;transition:.1s}.input_bl label{font-size:12px;color:#7d7d7d;font-weight:400;text-transform:uppercase;position:relative;width:105px;float:left;text-align:right;padding-right:10px;margin-top:9px}.input_bl:nth-child(2) label{width:69px}.submit_btn{float:right;margin-top:27px}.submit_btn button,.answer-form button{padding:0 17px;height:32px;font-weight:500;font-size:15px;color:#fff;border-top:0;border-left:0;border-right:0;border-bottom:2px solid #799920;background:#95ba2f;border-radius:4px;cursor:pointer;outline:none!important}.submit_btn button:hover,.answer-form button:hover{border-bottom:2px solid #95ba2f}.submit_btn button:active,.answer-form button:active{border-bottom:2px solid #799920;background:#799920}.answer-form button{float:right;margin-top:27px}.comments-wr,.comment-answer{min-height:64px;position:relative;float:left;width:100%}.answer-form{float:left;width:100%}.user-ico{width:80px;height:80px;float:left;overflow:hidden;border-radius:50%;position:absolute;top:0;left:0}.user-ico img{width:100%;height:100%}.user_data{margin-top:-2px;font-size:12px;color:#636363}.user_name{margin-top:6px;font-weight:700;font-size:15px}.user_name,.user_txt,.comment-panel,.answer-form,.user_data{width:100%;float:left;padding-left:100px}.user_txt{margin-top:8px;font-size:13px;line-height:18px}.comment-panel{width:100%;float:left;margin-top:11px}.comment-panel a:first-child{margin-left:0}.btn-comm-answer,.btn-comm-delete{font-size:13px;color:#799920;border-bottom:1px dotted #799920}.btn-comm-answer,.btn-comm-delete,.btn-comm-like,.btn-comm-dislike{float:left;margin-left:10px;text-decoration:none}.btn-comm-answer,.btn-comm-delete{height:16px;line-height:16px}.btn-comm-answer:hover,.btn-comm-delete:hover{text-decoration:none;border-bottom:0}.btn-comm-like,.btn-comm-dislike{width:14px;height:16px;background-image:url(../images/like_dislike.png);background-repeat:no-repeat}.btn-comm-like{background-position:0 0}.btn-comm-like:hover{background-position:0 -16px}.btn-comm-dislike:hover{background-position:-14px -16px}.btn-comm-dislike{background-position:-14px 0}.btn-comm-like:active,.btn-comm-dislike:active{opacity:.7}.comment-answer{margin-top:40px}.comment-answer .user-ico{left:100px}.comment-answer .user_name,.comment-answer .user_txt,.comment-answer .comment-panel,.comment-answer .answer-form,.comment-answer .user_data{padding-left:200px}.comments-wr{margin-top:40px}.answer-form{margin-top:20px}.answer-form textarea{width:100%;height:90px}.input_bl.has-error input,.input_bl.has-error textarea,.answer-form .has-error textarea{box-shadow:1px 2px 2px 0 rgba(212,0,0,0.2) inset}.required label{color:#d40000}.input_bl .help-block,.answer-form .help-block{display:none}.required label:before{display:block;content:"*";color:#d40000;position:absolute;top:0;right:-7px}.comments-start ul.pagination{list-style:none;text-align:center;margin-top:40px;width:100%;float:left}.comments-start ul.pagination li{display:inline}.comments-start ul.pagination li.prev.disabled span{display:none}.comments-start ul.pagination li a{padding:3px;color:#82a02f;font-size:15px;margin:0;text-decoration:none}.comments-start ul.pagination li.active a{color:#333} \ No newline at end of file diff --git a/frontend/web/css/ion.rangeSlider.css b/frontend/web/css/ion.rangeSlider.css new file mode 100755 index 0000000..68fd119 --- /dev/null +++ b/frontend/web/css/ion.rangeSlider.css @@ -0,0 +1,150 @@ +/* Ion.RangeSlider +// css version 2.0.3 +// © 2013-2014 Denis Ineshin | IonDen.com +// ===================================================================================================================*/ + +/* ===================================================================================================================== +// RangeSlider */ + +.irs { + position: relative; display: block; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + .irs-line { + position: relative; display: block; + overflow: hidden; + outline: none !important; + } + .irs-line-left, .irs-line-mid, .irs-line-right { + position: absolute; display: block; + top: 0; + } + .irs-line-left { + left: 0; width: 11%; + } + .irs-line-mid { + left: 9%; width: 82%; + } + .irs-line-right { + right: 0; width: 11%; + } + + .irs-bar { + position: absolute; display: block; + left: 0; width: 0; + } + .irs-bar-edge { + position: absolute; display: block; + top: 0; left: 0; + } + + .irs-shadow { + position: absolute; display: none; + left: 0; width: 0; + } + + .irs-slider { + position: absolute; display: block; + cursor: default; + z-index: 1; + } + .irs-slider.single { + + } + .irs-slider.from { + + } + .irs-slider.to { + + } + .irs-slider.type_last { + z-index: 2; + } + + .irs-min { + position: absolute; display: block; + left: 0; + cursor: default; + } + .irs-max { + position: absolute; display: block; + right: 0; + cursor: default; + } + + .irs-from, .irs-to, .irs-single { + position: absolute; display: block; + top: 0; left: 0; + cursor: default; + white-space: nowrap; + } + +.irs-grid { + position: absolute; display: none; + bottom: 0; left: 0; + width: 100%; height: 20px; +} +.irs-with-grid .irs-grid { + display: block; +} + .irs-grid-pol { + position: absolute; + top: 0; left: 0; + width: 1px; height: 8px; + background: #000; + } + .irs-grid-pol.small { + height: 4px; + } + .irs-grid-text { + position: absolute; + bottom: 0; left: 0; + white-space: nowrap; + text-align: center; + font-size: 9px; line-height: 9px; + padding: 0 3px; + color: #000; + } + +.irs-disable-mask { + position: absolute; display: block; + top: 0; left: -1%; + width: 102%; height: 100%; + cursor: default; + background: rgba(0,0,0,0.0); + z-index: 2; +} +.lt-ie9 .irs-disable-mask { + background: #000; + filter: alpha(opacity=0); + cursor: not-allowed; +} + +.irs-disabled { + opacity: 0.4; +} + + +.irs-hidden-input { + position: absolute !important; + display: block !important; + top: 0 !important; + left: 0 !important; + width: 0 !important; + height: 0 !important; + font-size: 0 !important; + line-height: 0 !important; + padding: 0 !important; + margin: 0 !important; + overflow: hidden; + outline: none !important; + z-index: -9999 !important; + background: none !important; + border-style: solid !important; + border-color: transparent !important; +} diff --git a/frontend/web/css/ion.rangeSlider.skinHTML5.css b/frontend/web/css/ion.rangeSlider.skinHTML5.css new file mode 100755 index 0000000..1fd2d73 --- /dev/null +++ b/frontend/web/css/ion.rangeSlider.skinHTML5.css @@ -0,0 +1,159 @@ +/* Ion.RangeSlider, Simple Skin +// css version 2.0.3 +// © Denis Ineshin, 2014 https://github.com/IonDen +// © guybowden, 2014 https://github.com/guybowden +// ===================================================================================================================*/ + +/* ===================================================================================================================== +// Skin details */ + +.irs { + height: 55px; +} +.irs-with-grid { + height: 75px; +} +.irs-line { + height: 10px; top: 33px; + background: #EEE; + /*background: linear-gradient(to bottom, #DDD -50%, #FFF 150%); !* W3C *!*/ + border: 1px solid #CCC; + border-radius: 16px; + -moz-border-radius: 16px; +} + .irs-line-left { + height: 8px; + } + .irs-line-mid { + height: 8px; + } + .irs-line-right { + height: 8px; + } + +.irs-bar { + height: 10px; top: 33px; + border-top: 1px solid #F75D50; + border-bottom: 1px solid #F75D50; + background: #F75D50; + /*background: linear-gradient(to top, rgba(66,139,202,1) 0%,rgba(127,195,232,1) 100%); !* W3C *!*/ +} + .irs-bar-edge { + height: 10px; top: 33px; + width: 14px; + border: 1px solid #F75D50; + border-right: 0; + background: #F75D50; + background: linear-gradient(to top, rgba(66,139,202,1) 0%,rgba(127,195,232,1) 100%); /* W3C */ + border-radius: 16px 0 0 16px; + -moz-border-radius: 16px 0 0 16px; + } + +.irs-shadow { + height: 2px; top: 38px; + background: #000; + opacity: 0.3; + border-radius: 5px; + -moz-border-radius: 5px; +} +.lt-ie9 .irs-shadow { + filter: alpha(opacity=30); +} + +.irs-slider { + top: 25px; + width: 27px; height: 27px; + border: 1px solid #AAA; + background: #DDD; + background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(220,220,220,1) 20%,rgba(255,255,255,1) 100%); /* W3C */ + border-radius: 27px; + -moz-border-radius: 27px; + box-shadow: 1px 1px 3px rgba(0,0,0,0.3); + cursor: pointer; +} + +.irs-slider.state_hover, .irs-slider:hover { + background: #FFF; +} + +.irs-min, .irs-max { + color: #333; + font-size: 12px; line-height: 1.333; + text-shadow: none; + top: 0; + padding: 1px 5px; + background: rgba(0,0,0,0.1); + border-radius: 3px; + -moz-border-radius: 3px; +} + +.lt-ie9 .irs-min, .lt-ie9 .irs-max { + background: #ccc; +} + +.irs-from, .irs-to, .irs-single { + color: #fff; + font-size: 14px; line-height: 1.333; + text-shadow: none; + padding: 1px 5px; + background: #F75D50; + border-radius: 3px; + -moz-border-radius: 3px; +} +.lt-ie9 .irs-from, .lt-ie9 .irs-to, .lt-ie9 .irs-single { + background: #999; +} + +.irs-grid { + height: 27px; +} +.irs-grid-pol { + opacity: 0.5; + background: #F75D50; +} +.irs-grid-pol.small { + background: #999; +} + +.irs-grid-text { + bottom: 5px; + color: #99a4ac; +} + +.irs-disabled { +} + + +.irs-slider { + top: 27px; + width: 20px; height: 20px; + background: #6BA034; + border-radius: 4px; + -moz-border-radius: 27px; + box-shadow: 1px 1px 3px rgba(0,0,0,0.3); + cursor: pointer; +} +.irs-slider:after { + content: ""; + position: absolute; + width: 6px; + height: 6px; + z-index: 2; + bottom: 7px; + right: 7px; + background: white; +} +.irs-slider.state_hover, .irs-slider:hover { + background: #8ECC4E; +} + +.irs-min, .irs-max { + color: #333; + font-size: 12px; line-height: 1.333; + text-shadow: none; + top: 0; + padding: 1px 5px; + background: rgba(0,0,0,0.1); + border-radius: 3px; + -moz-border-radius: 3px; +} diff --git a/frontend/web/css/style.css b/frontend/web/css/style.css new file mode 100755 index 0000000..b66f416 --- /dev/null +++ b/frontend/web/css/style.css @@ -0,0 +1 @@ +#call,a,nav.top a{color:#6a6a6a}.basket,.menu ul li a{text-transform:uppercase}.basket_item .info,.content,.content2{overflow:hidden}.pic a,.pic a img,.pixbox a,.pixbox img,ul.product_colors li a,ul.product_mod li a,ul.product_mod li img,ul.why_list li div{vertical-align:middle}body,form,html{padding:0;margin:0;font-family:Roboto;font-size:14px;color:#333;height:100%}h1,h2,h3{margin:0;padding:0 0 10px}.fl{float:left}.fotter .wrap .fr{float:right;width:180px;height:50px;position:relative;font-size:12px}.phone,.search,nav.top ul li{float:left}.fotter .wrap .fr img{position:absolute;top:50%;margin-top:-10px;right:0}.fotter .wrap .fl{line-height:50px;font-size:12px}.both{clear:both}h1{margin:10px 0;font-size:24px}h3{margin-bottom:30px}p{margin:3px 0;padding:0}a{font-size:14px;text-decoration:underline}#login,nav.top,nav.top ul li a{font-size:12px}#call,.menu ul li a,nav.top a{text-decoration:none}a:hover{color:#799920}.wrap{width:960px;margin:0 auto}.f{background:#fff}.br{-webkit-box-shadow:-1px 5px 14px 0 rgba(50,46,50,.46);-moz-box-shadow:-1px 5px 14px 0 rgba(50,46,50,.46);box-shadow:-1px 5px 14px 0 rgba(50,46,50,.46);padding:20px}nav.top{background:#f5f5f5;padding:10px 0;border-bottom:1px solid #d2d2d2}nav.top ul{list-style:none;margin:0;padding:0}#help,#login,nav.top ul li{padding-right:20px}#help{background:url(../img/help.png) right no-repeat}#help span,#login span{border-bottom:1px dotted #6a6a6a}#login{background:url(../img/login.png) right no-repeat}.search{margin:-5px 0 -5px 100px}nav input[type=text]{width:325px;outline:0;border:1px solid #d8d6d6;border-radius:5px;padding:5px 0;font-size:14px;text-indent:10px}nav input[type=submit]{width:35px;height:29px;border:none;background:url(../img/lupa_sub.png) center no-repeat;margin-left:-35px;cursor:pointer}.header{margin:0 0 20px}.phone{position:relative;text-align:center}.phone .tel{font-size:23px}.phone .tel span.more{margin-bottom:3px}.more_block{background:#fff;border:1px solid #d2d2d2;padding:10px;position:absolute;font-size:20px;display:none;z-index:99}.more{background:url(../img/more.png) no-repeat;width:12px;height:7px;display:inline-block;cursor:pointer;margin-bottom:5px}.logo{margin:0 auto;width:193px;padding-top:22px}.logo a{display:block;width:193px;height:84px;background:url(../img/logo.png) no-repeat}.logo a span{display:none}#call{border-bottom:1px dotted #6a6a6a}.basket{float:right;position:relative;border:1px solid #d2d2d2;border-radius:5px;padding:15px 20px;font-size:18px}.basket .info{float:left;border-right:1px solid #d2d2d2;padding-right:10px;margin-right:17px}.basket .info span{color:#f75d50;font-size:22px}.basket a:link,.basket a:visited{text-decoration:none;color:#000;font-size:18px}.basket span.more{margin-bottom:-1px}.menu ul,.menu_childs ul{margin:0;list-style:none}.menu{background:#596065;border:1px solid #e8e8e8}.menu ul{padding:0}.menu ul li{float:left;border-left:1px solid #8b9094;height:43px}.menu ul li:first-child{border-left:none}.menu ul li a{width:100%;height:100%;line-height:43px;float:left;box-sizing:border-box;padding:0 19px;color:#fff;font-size:15px;font-weight:600}.menu_childs ul li a,.rubrics ul li a{font-weight:700;text-decoration:none;float:left;text-transform:uppercase}.menu ul li:hover{background:#3e454b}.menu ul li.active a{background:#f5f5f5;color:#596065}.menu ul li.active a:hover{cursor:default}.menu_childs{background:#f5f5f5;border:1px solid #e8e8e8;border-bottom:2px solid #596065}.menu_childs ul{padding:0}.menu_childs ul li{float:left}.menu_childs ul li a{padding:15px 23px;color:#596065;font-size:14px}.menu_childs ul li a:hover{color:#878b8e}.fr ul li{border:none}.akciya a{background:#f75d50;color:#fff}.brands a{background:#95ba2f;color:#fff}a.myorders{color:#f75d50}.sub{margin:2px 0 0}.sub img{float:left;margin-right:2px}.rubrics{margin:60px 0 0;padding-bottom:27px}.rubrics ul{list-style:none;margin:0;padding:0}.rubrics ul li{float:left;margin:0 35px}.rubrics ul li a{width:120px;padding-top:130px;text-align:center;color:#494949}.rubrics ul li.item_ryukzaki a{background:url(../img/ico1.png) no-repeat}.rubrics ul li.item_sumki a{background:url(../img/ico2.png) no-repeat}.rubrics ul li.item_chehly a{background:url(../img/ico3.png) no-repeat}.rubrics ul li.item_nesessery a{background:url(../img/ico4.png) no-repeat}.rubrics ul li.item_koshelki a{background:url(../img/ico5.png) no-repeat}.products{padding-bottom:30px;padding-top:20px}.products,.why_me_{border-top:1px solid #d2d2d2}.products ul{list-style:none;margin:0;padding:0}.products ul li.item{float:left;width:192px;margin:0 0 50px;text-align:center;position:relative}.products ul li a.name,.special-products a.name{display:block;color:#799920;font-size:15px;text-decoration:none;margin:15px 0 0;height:35px;overflow:hidden;box-sizing:border-box;padding:0 10px}.products ul li a.name:hover,.special-products a.name:hover{text-decoration:underline}.products ul li .info{text-align:left}a.more_map,h3,ul.product_colors li,ul.product_mod li{text-align:center}.pn{border:none}.cost,.product_read_price #cost{color:#f75d50;margin:0;padding:0}strike,strike span#old_cost{font-size:14px;color:#333}.checkout_basket button,.submit4,.submit4m,a.link_buy{background:#95ba2f;border-radius:4px;height:29px;text-transform:uppercase;color:#fff;text-decoration:none;font-weight:600;text-align:center;border-bottom:3px solid #799920;font-size:12px}.basket .submit4.bottom3,.submit4.bottom3{font-size:12px!important;display:block}.basket .submit4.bottom3{margin-top:10px}.checkout_basket button,a.link_buy{display:block;margin:0 auto 10px;width:122px;line-height:32px}.checkout_basket button,.submit4{margin:0;padding:0 20px;line-height:31px;width:auto;border-top:0;border-left:0;border-right:0;cursor:pointer}ul.mycarousel,ul.mycarousel li{margin:0;padding:0}.btn-primary:hover,.checkout_basket button:hover,.submit4:hover,.submit4m:hover,a.link_buy:hover{border-bottom:3px solid #95ba2f}.btn-primary:active,.checkout_basket button:active,.submit4:active,.submit4m:active,a.link_buy:active{background:#799920;border-bottom:3px solid #799920}.checkout_basket button:focus,.submit4:focus{outline:0}.mycarousel{position:absolute;right:22px;top:13px}ul.mycarousel{list-style:none}h3{text-transform:uppercase;font-size:20px}span.why{width:213px;background:url(../img/logo-why.png) no-repeat;margin:0 auto;padding:0 0 20px;height:29px;display:block}ul.why_list{list-style:none;margin:0;padding:0}ul.why_list li{float:left;margin-left:58px;width:288px;height:96px;box-sizing:border-box;padding-left:110px;margin-top:20px}ul.why_list li div{display:table-cell;height:96px}ul.why_list li span{font-weight:700;color:#799920}ul.why_list li.item1{background:url(../img/why_item1.png) left no-repeat}ul.why_list li.item2{background:url(../img/why_item2.png) left no-repeat}ul.why_list li.item3{background:url(../img/why_item3.png) left no-repeat}ul.why_list li.item4{background:url(../img/why_item4.png) left no-repeat}ul.why_list li.item5{background:url(../img/why_item5.png) left no-repeat}ul.why_list li.item6{background:url(../img/why_item6.png) left no-repeat}.banner_akciya{margin:50px 0}.bottom{background:#4d5458;padding:40px 0;color:#fff}.bottom .leftbar{float:left;width:210px}.bottom ul{list-style:none;margin:0;padding:0;line-height:23px}.bottom ul a{color:#fff;font-size:15px;text-decoration:none}.bottom ul a:hover{color:#799920}.phones{margin-top:50px;line-height:23px;font-size:18px}.map{padding:5px 0 5px 25px;background:url(../img/map.png) left no-repeat;margin-bottom:7px}a.more_map{color:#99a5ad;border-bottom:1px dotted #99a5ad;text-decoration:none;font-size:11px}.bread-crumbs{padding:0 0 0 20px;border-bottom:1px solid #d2d2d2;height:29px}.bread-crumbs ul{list-style:none;margin:0;padding:0;height:29px}.leftbar,.rightbar.basket_rightbar{margin-right:20px}.bread-crumbs ul li{float:left;padding-left:20px;height:100%;line-height:29px;color:#7d7d7d;position:relative;font-size:12px}* html .content,* html .content2{height:1%}.bread-crumbs ul li:first-child{padding-left:0}.bread-crumbs ul li a{font-size:12px;display:block;color:#7d7d7d}.bread-crumbs ul li a:link,.bread-crumbs ul li a:visited{color:#7d7d7d;text-decoration:underline}.bread-crumbs ul li a:hover{color:#464646;text-decoration:none}.breadcrumb>li+li:before{color:#ccc;content:"/";position:absolute;top:0;left:8px}.loyout{padding:20px 0}.leftbar{float:left;width:172px}.rightbar{float:right;width:380px;margin-left:40px}.rightbar2{float:right;width:320px}.filters{border-top:1px solid #d2d2d2;padding:20px 0 0;margin-top:20px}.filters .begin{text-transform:uppercase;font-weight:700;font-size:12px}.filters ul{list-style:none;margin:6px 0 0;padding:0;line-height:22px}.filters ul li{position:relative;box-sizing:border-box;padding-left:24px;line-height:16px;margin-top:7px}.filters ul li:first-child{margin-top:0}.filters ul li>input{position:absolute;left:4px;margin:0;top:3px}.filters ul li a{color:#464646;text-decoration:none;font-size:13px;line-height:16px}.filters ul li a:hover{text-decoration:underline}.productLeftBar{float:left;width:228px;margin-left:20px;margin-right:20px}.productRightBar{float:right;width:260px;margin:0 20px}.productLeftBar h1{font-size:24px;border-bottom:1px solid #d2d2d2;margin-bottom:10px}ul.product_mod{list-style:none;margin:10px 0 0;padding:0;float:left}ul.product_mod li{float:left;width:46px;height:46px;background:#fff;border:1px solid #d2d2d2;margin:5px 5px 0 0;position:relative}ul.product_mod li.active:before{width:48px;height:48px;position:absolute;content:'';background:0 0;border:2px solid #95ba2f;top:-1px;left:-1px;box-sizing:border-box}ul.product_mod li a{width:46px;height:46px;display:table-cell}ul.product_mod li a:focus{outline:0}ul.product_mod li img{max-width:46px;max-height:46px}ul.product_colors{list-style:none;margin:30px 0 0;padding:0;float:left}ul.product_colors li{float:left;margin:10px 10px 0 0;width:98px;height:98px;border:1px solid #d2d2d2}ul.product_colors li a{width:98px;height:98px;display:table-cell}ul.product_colors li img{max-width:98px;max-height:98px;vertical-align:middle}.productLeftBar .begin{text-transform:uppercase;font-weight:700;font-size:12px}.cost_box{border-top:1px solid #d2d2d2;border-bottom:1px solid #d2d2d2;margin:10px 0;padding:10px 0}.cost_box .w{float:left;margin-right:20px;padding-top:5px}.product_service ul{list-style:none;margin:0;padding:0}.product_service ul li a{color:#799920;text-decoration:none;border-bottom:1px dotted #799920;font-size:12px}.product_service ul li.item1{background:url(../img/li1.png) left no-repeat;padding:3px 23px}.product_service ul li.item2{background:url(../img/li2.png) left no-repeat;padding:3px 23px}.product_service ul li.item3{background:url(../img/li3.png) left no-repeat;padding:3px 23px}#nav_product{list-style:none;margin:0;padding:0;line-height:23px}#nav_product li a{background:url(../img/li_plus.png) left no-repeat;padding:3px 15px;color:#000;text-transform:uppercase;text-decoration:none;font-weight:700;font-size:12px}#nav_product li a.active{background:url(../img/li_minus.png) left no-repeat}#nav_product li .info{display:none;border-bottom:1px solid #d2d2d2;padding:10px 0;margin-bottom:10px}#nav_product li .info,#nav_product li .info p{font-size:12px;line-height:16px}.modal_box{position:fixed;left:0;top:0;width:100%;height:100%;z-index:999;background:#000;filter:alpha(opacity=50);-moz-opacity:.5;-khtml-opacity:.5;opacity:.5}#data_box{position:absolute;top:100px;z-index:1000;width:400px;background:#fff;-webkit-box-shadow:0 0 15px #000;-moz-box-shadow:0 0 15px #000;box-shadow:0 0 15px #000;border:7px solid #1b9bb6;border-radius:5px}#data_box .data_wrp hr,#data_box .data_wrp hr.hr{height:1px;border:none;color:#000;background:#000}#data_box .data_wrp{padding:25px 15px 15px}#data_box .data_wrp h1{text-transform:uppercase}#data_box .data_wrp hr{margin:45px 0 20px}#data_box .data_wrp hr.hr{margin:20px 0}#data_box .pic-tango{margin-right:7px;margin-bottom:7px}#modal_close{cursor:pointer;margin-top:-80px;margin-right:-50px}.rightbar .control-label,.textareagroup .control-label{float:left;width:80px;padding-top:5px}.form-control{outline:0;border:1px solid #d8d6d6;border-radius:5px;padding:5px 0;font-size:14px;text-indent:10px;margin-bottom:3px;width:250px}.form-control:focus{border:1px solid #1b9bb6;box-shadow:0 0 10px #1b9bb6;-webkit-box-shadow:0 0 10px #1b9bb6;-moz-box-shadow:0 0 10px #1b9bb6}.help-block{color:red;font-size:12px;margin-bottom:5px}.basket_item{padding:10px 0;border-bottom:1px solid #b7b7b7;clear:both}.basket_item img{margin-right:20px}.basket_item .count{margin:20px 0}.basket_item .fr{margin-top:13px}.basket_item>a{display:block;float:left}a.del:link,a.del:visited{background:url(../img/del.png) left center no-repeat;padding:2px 25px;font-size:12px;font-weight:400;color:#787878;text-decoration:underline}.btn-primary,.submit4m{background:#95ba2f;height:29px;line-height:29px}a.del:hover{color:#a52828;text-decoration:underline}.total{text-align:right;color:#87476a;font-size:20px;margin:10px 0}._form_checkbox_reset,.basket_item input,.basket_title_,.color_variants .variant,.compare,.content ul.pagination,.jcarousel-skin-tango .jcarousel-item,.lay_title .center,.orders_view .order,.pixbox,.price,.product p,.special-products .item,ul.brends_list li{text-align:center}.btn-primary,.submit4m,a.logout:link,a.logout:visited{color:#fff;cursor:pointer;text-transform:uppercase}.submit4m{font-family:Roboto;border:none;border-radius:4px;font-size:10px;width:102px;border-bottom:3px solid #799920}.submit4m:active,.submit4m:focus{outline:0}.btn-primary{border-bottom:3px solid #799920;border-top:0;border-right:0;border-left:0;margin-top:5px;padding:0 15px;border-radius:4px;text-decoration:none;font-size:12px;font-weight:700}.btn-primary:active,.btn-primary:focus{outline:0}a.logout:link,a.logout:visited{border:none;padding:3px 5px;background:#f75d50;border-radius:5px;text-decoration:none;font-size:11px;font-weight:400}.txtb1,.txtf,a.btn-success{font-size:14px}a.logout:hover{background:#95ba2f}.boy_box{border-bottom:1px solid #b7b7b7;padding:0 0 15px}.boy_box div{padding-top:10px}.content_product .info{padding:0 0 20px}a.btn-success{display:inline-block;border:2px solid #d8d6d6;color:#95ba2f;border-radius:5px;padding:5px;margin-bottom:10px;text-decoration:none}a.btn-success:hover{border:2px solid #95ba2f;color:#f75d50}.txtf,.txtfb{color:#87476a;font-weight:700}.txtb1{font-weight:700}.txtfb{font-size:20px}.count{margin:20px 0}.count input[type=number]{outline:0;width:50px;border:1px solid #d8d6d6;border-radius:5px;padding:5px 0;font-size:14px;text-indent:10px;margin-bottom:7px}a.link2:link,a.link2:visited{font-size:14px;font-weight:700;color:#95ba2f;text-decoration:none}a.link2:hover{color:#f75d50;text-decoration:underline}.well{margin:50px auto;width:400px;background:#f5f5f5;border:1px solid #e8e8e8;padding:20px;border-radius:5px}.control-label{float:left;width:100px;padding-top:5px}#user-verifycode-image{display:block}.form-inline{display:inline}.form-inline .form-group{float:left;margin-right:10px}.form-inline .form-group select{width:100px}.form-group{margin-bottom:10px}.table-bordered{width:100%;border:1px solid silver}.table-bordered th{background:#B3D1FD;padding:5px}.table-bordered tr td{border:1px solid silver;padding:5px}.table-bordered .filters{display:none}.formCost label{float:left;width:30px}.pic,.pic a{width:392px;height:365px}ul.brends_list{list-style:none;margin:0;padding:0}ul.brends_list li{float:left;margin:0 15px 20px}.compare a:link,.compare a:visited{font-size:12px;text-decoration:underline}.alert-success{margin:10px 0;padding:10px;border:1px solid #3ed824;border-radius:5px;background:#c0feb5}#subscribe-sale,.news_item img{margin-right:20px}.news_item,.txts{margin-bottom:20px}.news_item{padding-bottom:20px;border-bottom:1px solid silver}.block_content .item,.borderbottom,.content ul.pagination{border-bottom:1px solid #d2d2d2}.news_item a{font-size:16px}.pic a{display:table-cell}.pic a img{max-width:392px;max-height:365px}input#subscribe-email::-webkit-input-placeholder{color:#596065}input#subscribe-email::-moz-placeholder{color:#596065}input#subscribe-email:-ms-input-placeholder{color:#596065}input#subscribe-sale::-webkit-input-placeholder{color:#596065}input#subscribe-sale::-moz-placeholder{color:#596065}input#subscribe-sale:-ms-input-placeholder{color:#596065}#subscribe-email,#subscribe-sale{color:#596065}#subscribe-sale{width:100px;float:left;height:28px}.saletxt{width:150px;float:left;color:#fff;font-size:12px}#subscribe-email{width:370px}.txts{color:#9da9b1;font-size:18px}.content ul.pagination{list-style:none;margin:0 0 16px;padding:0 0 20px}.content ul.pagination li{display:inline}.content ul.pagination li a{padding:3px;color:#82a02f;font-size:15px;margin:0;text-decoration:none}.footer .fl,.fotter a{font-size:12px}.content ul.pagination li a:hover{text-decoration:underline}.content ul.pagination li.active a{color:#333}.boxitem{height:318px}ul.social{margin-top:20px}.social{list-style:none;margin:10px;padding:0;height:48px}.social li{display:inline-block;margin-right:7px;padding-bottom:10px}.social li a{width:36px;height:36px;display:block;margin:0;padding:0;text-indent:-9999px;background:url(../img/social-ico-two.png) no-repeat #bcbcbc;border-radius:48px;-moz-border-radius:48px;-webkit-border-radius:48px;-webkit-transition:all .5s ease-out;-moz-transition:all .5s ease-out;transition:all .5s ease-out}.content2 br,.hide{display:none}.social .fb{background-position:-44px 0;cursor:pointer}.social .vk{cursor:pointer}.social .vk:hover{background-color:#5B7FA6}.social .fb:hover{background-color:#354f89}.social .gp{background-position:-132px 0;cursor:pointer}.social .gp:hover{background-color:#c72f21}.social .tw{background-position:-144px 0;cursor:pointer}.social .tw:hover{background-color:#6398c9}.social .ok{background-position:-89px 0;cursor:pointer}.social .ok:hover{background-color:#f88f15}.social ul li a:hover{background-color:#065baa}.socialbox{margin:10px 0}.fotter{background:#484f55;height:50px;color:#98a3ab}.fotter a{color:#98a3ab;line-height:50px;float:left}.view_products2{list-style:none;overflow:auto;height:400px}.view_products2 img{float:left;margin-right:20px}.view_products2 li{margin:10px 0}.pixbox{width:160px;margin:0 auto;height:200px;overflow:hidden}.form-order{background:#f5f5f5;padding:0 20px 20px}#order-delivery,#order-payment{float:right;width:280px}.delivery-data{margin-bottom:27px;position:relative;background:#95ba2f;display:none;border-radius:5px;float:left;box-sizing:border-box;padding:14px 20px;color:#fff;font-size:13px}.edit_menu a,.mycabinet a{color:#799920;text-decoration:none}.jcarousel-next-disabled,.jcarousel-prev-disabled{opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"}.pixbox a{width:160px;height:200px;display:table-cell}.pixbox img{max-width:160px;max-height:200px}.pagination li.next.disabled span,.pagination li.prev.disabled span{display:none}.fr{float:right}.nobottom{border-bottom:none!important}.dotted a{border-bottom:1px dotted grey}.mycabinet{padding-left:20px;margin-top:20px}.mycabinet .begin{text-transform:uppercase;font-size:13px;font-weight:700;padding-bottom:15px}.mycabinet ul{margin:0;padding:0;list-style:none}.mycabinet ul li{padding-top:10px;padding-bottom:10px}.lay_title .uppercase{text-transform:uppercase}.lay_title{padding-top:15px;font-size:24px}.edit_menu,.user_data .data,.user_data .title,.user_data_editing .data,.user_data_editing .title{float:left;font-size:13px}.user_data{width:390px;border-right:1px solid #d2d2d2;float:left}.user_data .col{padding-bottom:35px}.user_data .col.last{padding-bottom:0}.user_data .title{text-transform:uppercase;font-weight:700;width:170px}.edit_menu{padding-left:60px}.edit_menu div{padding-bottom:20px}.edit_menu .dotted{border-bottom:1px dotted #799920}.user_edit_area{padding-top:30px}.user_data_editing{float:left}.inputs .col{padding-bottom:12px!important}.user_data_editing .col{padding-bottom:35px;width:432px}.user_data_editing .title{text-transform:uppercase;font-weight:700;width:170px}.user_data_editing .data{width:262px}.user_data_editing input[type=text]{padding:7px 10px;margin:-10px 0 0;border:1px solid #d2d2d2;border-radius:4px;font-size:12px;width:240px}#cancel,.user_data_editing .add{border-bottom:1px dotted #799920;color:#799920;text-decoration:none}.add_more{padding-bottom:24px;padding-left:170px}.delete{float:right}.delete_button{background:url(../img/ico_close.png) right no-repeat;width:16px;height:16px;float:right}.content_area{width:450px}#cancel{font-size:13px;float:left;margin-left:40px}.buttons{display:inline-flex;align-items:center}.favorites{background-color:#f5f5f5;padding:5px;font-size:14px}.favorites .fav_point{background-color:#fff;border:1px solid #d2d2d2;border-radius:3px;margin-top:5px;padding:10px 20px}.favorites .fav_point .left{float:left;padding-right:0;width:178px}.favorites .fav_point .right{float:right;padding-right:0;padding-left:0}.favorites .link{color:#799920;text-decoration:none;border-bottom:1px dotted #799920}.redtext{color:#f75d50}.greentext{color:#95ba2f}.hold .orders_view{display:none!important}.orders_view{width:680px;margin-top:13px;padding-top:13px;padding-bottom:5px;border-top:1px solid #d2d2d2;display:block}.orders_view .order{float:left;width:225px}.orders_view .order .order_price{color:#f75d50;font-weight:700;font-size:15px}.orders_view .order .order_price span{font-size:24px}.orders_view .order img{padding-bottom:22px}.orders_view .order .note{font-size:13px}.orders_view .order .note span{color:#f75d50}.basket_hovered{position:absolute;border:1px solid #d2d2d2;border-radius:5px;padding:15px 20px;background-color:#fff;right:-1px;margin-top:10px;width:640px;display:none;z-index:1111}.open .basket_hovered{display:block}.open,.open .basket_hovered{-moz-box-shadow:0 0 5px rgba(149,149,149,.75);-webkit-box-shadow:0 0 5px rgba(149,149,149,.75);box-shadow:0 0 5px rgba(149,149,149,.75)}.basket_hovered1:before{position:absolute;left:0;content:' ';width:100%;background-color:#fff;height:10px;top:45px;z-index:1112}.basket_item input{border:1px solid #d2d2d2;border-radius:4px;padding:9px;width:26px;font-size:18px;font-weight:700;background-color:#fff;color:#000;margin:7px}.minus,.plus{width:15px;height:15px;display:inline-block;cursor:pointer}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.minus{background:url(../img/minus.png) no-repeat}.plus{background:url(../img/plus.png) no-repeat}.black,.black:before{width:100%;height:100%}.basket_sum{padding-top:15px}.basket_sum .sum_text{font-size:15px;text-transform:none;float:right!important;padding-top:1px;margin-bottom:11px}.item_added_win h2,.left_block .begin,.note_prod,.title_spoiler,.uppercase,ul.product-special li div{text-transform:uppercase}.basket_sum .sum_text span{font-size:18px;color:#f75d50;font-weight:700}.basket_sum a{color:#fff!important;font-size:15px!important;float:right}.black{z-index:9999;position:absolute;display:block;padding-top:6%}.black:before{content:'';background-color:rgba(0,0,0,.5);position:fixed;top:0}.black.hidden{display:none}.black_close,.left_block .links li{display:inline-block;cursor:pointer}.black .item_added_win{background-color:#fff;width:640px;margin:auto;position:relative}.black_close{position:absolute;top:30px;right:30px;background:url(../img/ico_close2.png) no-repeat;width:22px;height:22px}.block_content{padding-left:20px;padding-right:20px}.item_added_win h2{text-align:center;padding:30px}.block_content .item{padding-top:20px;padding-bottom:20px}.w230{width:230px}.w260{width:260px}.w430{width:430px}.left_block .begin{font-size:13px;font-weight:700;padding-bottom:15px}.color_variants .variant{border:1px solid #d2d2d2;float:left;margin-right:5px;margin-bottom:5px}.variant:hover{cursor:pointer}.color_variants{margin-top:14px;margin-bottom:-5px}.color_variants .variant.active{width:44px;height:44px;border:2px solid #95ba2f}.color_variants .variant.active a{width:44px;height:44px}.tobasket{margin-top:20px;margin-bottom:20px}.tobasket:hover{color:#fff}.variant{width:46px;height:46px}.variant.active{width:44px;height:44px}.layout{margin-top:15px}.left_block{float:left}.right_block{float:right}.center_block{float:left;margin-left:23px}.left_block .links{margin-top:25px}.left_block .links li{list-style:none;padding-left:25px;height:20px}.left_block .links ul{margin:0;padding:0}.left_block .links a{font-size:13.5px;text-decoration:none;color:#8ba73e}.links .add_bookmarks{background:url(../img/ico_add_bookmark.png) center left no-repeat}.links .what_price{background:url(../img/ico_price.png) center left no-repeat}.links .add_compare{background:url(../img/ico_scales.png) center left no-repeat}.spoiler_one{padding-top:15px;padding-bottom:15px;border-bottom:1px solid #d2d2d2}.spoiler_one .spoiler_content{margin-top:15px;font-size:13px}.spoiler_one .spoiler_content.hidden{display:none}.title_spoiler:hover{cursor:pointer}.title_spoiler{background:url(../img/ico_open.png) center left no-repeat;padding-left:17px;font-size:13px;color:#333;font-weight:700;text-decoration:none}.title_spoiler.closed{background:url(../img/ico_close3.png) center left no-repeat}.features{list-style:none;padding:0;margin:0;font-size:13px}.features a{font-size:13px;text-decoration:none;border-bottom:1px dotted #8ba73e;color:#8ba73e}.features li{padding-top:5px;padding-bottom:4px}.note_prod .blue,.note_prod .red,.note_prod .yellow{padding:5px 5px 5px 10px;float:left}.note_prod{width:225px;height:23px;overflow:hidden;border-radius:5px;display:table;font-size:11px;font-weight:700}.note_prod .blue:after,.note_prod .red:after,.note_prod .yellow:after{width:0;height:0;border-top:13px solid transparent;border-bottom:13px solid transparent;top:-1px;margin-left:5px;content:''}.note_prod .one{z-index:999}.note_prod .two{z-index:998}.note_prod .blue{background-color:#42b9f6;position:relative}.note_prod .blue:after{border-left:5px solid #42b9f6;position:absolute}.note_prod .red{background-color:#f75d50;position:relative;color:#fff}.note_prod .red:after{border-left:5px solid #f75d50;position:absolute}.note_prod .yellow{background-color:#fbc665;position:relative}.note_prod .yellow:after{border-left:5px solid #fbc665;position:absolute}.products_block .product{float:left;width:190px;vertical-align:bottom}.product .image{height:225px;position:relative}.product .image img{position:absolute;bottom:0;left:15px}.price{font-size:18px;color:#f75d50;font-weight:700}.product{padding-bottom:30px;position:relative}.product p{font-size:15px;margin-top:15px}.left52{margin-left:52px}.product a{color:#fff}.mrg1{margin-top:25px;margin-bottom:15px}.products_martopbot{margin-top:60px;margin-bottom:100px}.cont_shop_but{display:table-cell;vertical-align:middle;padding:35px}.cont_shop{text-decoration:none;font-size:12px;border-bottom:1px dotted #799920;color:#799920}.icons{width:45px;height:50%;position:absolute;z-index:9;right:0;padding-top:25px;padding-right:15px}.icons a{width:44px;height:44px;float:left;border:1px solid #d2d2d2;margin-bottom:5px;background-color:#fff}a:hover{cursor:pointer}.basket_item .form-group{display:inline}.HOME_RIGHT,.sort_block,.sort_block ul,.sort_block ul li{display:inline-block}.basket.open:after{content:'';position:absolute;top:43px;width:100%;height:10px;background-color:#fff;left:0;z-index:9990}.basket_hovered .basket_sum{float:left}a.active{font-weight:700;text-decoration:underline}.HOME_RIGHT{vertical-align:top;margin-left:10px;position:absolute}#HOME_UNDER_SLIDER>div{display:inline-block;margin-right:3px;margin-top:3px}.sort_block ul{margin:0;padding:0}.special-products,.why_me_{padding-top:30px}.sort_block ul li{margin:0 .5em;list-style:none}.sort_block ul li a.asc:after,.sort_block ul li a.desc:after{display:block;width:5px;height:3px;position:absolute;top:50%;margin-top:-1px;right:-10px;content:'';background:url(../img/arrow_sort_asc_desc.png) no-repeat}.sort_block ul li a.asc:after{background-position:0 0}.sort_block ul li a.desc:after{background-position:0 -3px}.home_banner_up{margin-top:20px}.home_banner_up .HOME_RIGHT{display:block;float:right;position:static;margin-left:0}#HOME_SLIDER .jssorb03 .av,#HOME_SLIDER .jssorb03 div,#HOME_SLIDER .jssorb03 div:hover{width:6px;height:6px;border-radius:50%;line-height:6px;background:#fff;border:2px solid #fff;box-shadow:0 0 5px 0 rgba(54,54,54,.75)}#HOME_SLIDER .jssorb03 .av,#HOME_SLIDER .jssorb03 div.av:active,#HOME_SLIDER .jssorb03 div.av:hover{cursor:default;background:#95BA2F}.special-products .link_buy{margin-bottom:0}.special-products .item{margin-bottom:0!important}.why_me_{overflow:hidden;margin-bottom:60px}.why_me_ .why_list{width:1038px;margin-left:-58px}.seo_text p{margin:12px 0 0;font-size:13px!important;color:#333!important;font-family:Roboto!important}.seo_text p:first-child{margin-top:0}.product-special{position:absolute}.jcarousel-skin-tango .jcarousel-item{width:38px;height:38px;border:1px solid #d2d2d2;background:#fff}.jcarousel-skin-tango .jcarousel-item a{display:table-cell;width:38px;height:38px;vertical-align:middle}.mycarousel img{max-width:38px;max-height:38px;border:0;vertical-align:middle}.jcarousel-skin-tango .jcarousel-clip-vertical,.jcarousel-skin-tango .jcarousel-container-vertical{height:175px}.jcarousel-skin-tango .jcarousel-container-vertical{padding:0}.jcarousel-skin-tango .jcarousel-prev-vertical{top:-13px}.jcarousel-skin-tango .jcarousel-next-vertical{bottom:-13px}.jcarousel-skin-tango .jcarousel-next-vertical,.jcarousel-skin-tango .jcarousel-prev-vertical{left:0;width:42px;background-position:14px 0}.products.pn>ul,ul.product-special li{width:100%;float:left}.jcarousel-skin-tango .jcarousel-next-vertical:hover,.jcarousel-skin-tango .jcarousel-prev-vertical:hover{background-position:14px 0;left:0}ul.product-special{position:absolute;top:0;left:16px}ul.product-special li div{color:#333;font-size:10px;font-weight:700;height:22px;line-height:24px;padding:0 9px;position:relative;border-top-left-radius:4px;border-bottom-left-radius:4px;margin-top:8px;float:left}ul.product-special li:first-child{margin-top:0}ul.product-special li.top div{background:#fbc665}ul.product-special li.top div:after{content:'';position:absolute;right:-19px;top:3px;border:11px solid transparent;border-top:5px solid #fbc665;transform:rotate(-90deg)}ul.product-special li.new div:after,ul.product-special li.promo div:after{content:'';position:absolute;right:-18px;top:2px;transform:rotate(-90deg)}ul.product-special li.new div{background:#42b9f6}ul.product-special li.new div:after{border:11px solid transparent;border-top:5px solid #42b9f6}ul.product-special li.promo div{background:#f75d50}ul.product-special li.promo div:after{border:11px solid transparent;border-top:5px solid #f75d50}.cost-block{margin-top:1px}.products.pn a.link_buy{margin-bottom:0}.products.pn{padding-bottom:0}.products.pn>ul{margin-bottom:-3px}._form_checkbox_reset,.sort_block,.sort_block ul li a{font-size:12px}.filter_accept_bloc{margin-top:13px;margin-bottom:0}._form_checkbox_reset{color:#6a6a6a;display:block;width:128px;height:28px;border:1px solid #d2d2d2;line-height:28px;border-radius:4px;text-decoration:none;margin:0 auto}.irs-max,.irs-min,.irs-slider:after{display:none}.footer-mail,input.custom-radio+label:hover{text-decoration:underline}._form_checkbox_reset:hover{border:1px solid #95ba2f;color:#6a6a6a}._form_checkbox_reset:active{border:1px solid #95ba2f;background:#95ba2f;color:#fff}.sort_block ul li a{color:#8fa951;position:relative}.sort_block ul li a:hover{color:#333}#HOME_SLIDER .jssora03l,#HOME_SLIDER .jssora03r{width:36px;height:340px;background:url(../img/new_arrows_.png) no-repeat}#HOME_SLIDER .jssora03l,#HOME_SLIDER .jssora03l:hover{background-position:0 50%;left:0;top:0}#HOME_SLIDER .jssora03r,#HOME_SLIDER .jssora03r:hover{background-position:-36px 50%;right:0;top:0}.loyout ._prd_spec-wr{margin-top:10px}.loyout .special-products:first-child{border-top:0;padding-top:0}.irs-slider{width:13px;height:13px;top:25px;border-radius:100%;box-shadow:none;border:1px solid #d2d2d2;background:#fff;background:-moz-linear-gradient(top,#fff 0,#ebebeb 100%);background:-webkit-linear-gradient(top,#fff 0,#ebebeb 100%);background:linear-gradient(to bottom,#fff 0,#ebebeb 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ebebeb', GradientType=0 )}.irs-slider.state_hover,.irs-slider:hover{background:#fff}.irs-slider:before{content:"";position:absolute;width:5px;height:5px;z-index:2;border:1px solid #d2d2d2;border-radius:100%;background:#799920;top:3px;left:3px}.delivery-data:after,.irs-line:before,.owl-controls .owl-buttons div:before{content:''}.irs-bar{height:3px;top:30px}.irs-line{height:9px;background:#ebebeb;border:1px solid #d2d2d2;top:27px}.irs-line:before{width:166px;height:5px;position:absolute;top:2px;left:2px;background:#d2d2d2;border-radius:5px}.irs{height:49px}.price_filter.first_price_li{margin-top:8px}.product_read_ .w{width:110px;overflow:hidden;margin:0;padding-top:0;display:table-cell;vertical-align:middle;height:32px;float:none}.cont_shopping-wr,.field-orders-body .control-label,.field-orders-delivery .control-label,.field-orders-payment .control-label,.textareagroup .control-label{float:left;width:100%}.product_read_ .w .cost,.product_read_ .w strike{width:100%;float:left}.product_read_price .link_buy{width:118px;position:absolute;top:50%;right:0;margin:-16px 0 0}.product_read_price{position:relative;min-height:32px;margin-top:10px}.special-products.products h3{margin-bottom:10px}.special-products.products li.item{margin-top:30px}.productLeftBar .cost_box{border-top:0;padding:10px 0 0}.productLeftBar .product_mod{width:100%;float:left;border-bottom:1px solid #d2d2d2;padding-bottom:15px}.cont_shopping-wr{margin-top:10px}.cont_shopping-wr .cont_shopping{float:right}.cont_shopping{display:block!important;border-top:0!important;border-left:0!important;border-right:0!important;border-bottom:1px dashed #799920!important;color:#799920!important;margin:0!important;padding:0!important;font-size:12px!important;float:left;border-radius:0!important}.delivery-data .field-order-delivery-childs .control-label,.jcarousel-skin-tango>li,.owl-pagination,input.custom-check,input.custom-radio{display:none}.info.product-thumb-video{width:100%;height:100%}.info.product-thumb-video embed,.info.product-thumb-video iframe{width:100%!important;height:auto!important}.input-blocks,.input-blocks-wrapper{width:100%;float:left}.form-order .input-blocks-wrapper{margin-top:6px}.input-blocks label{font-size:13px;color:#333}.basket_input_2 label{height:30px;line-height:30px;float:left;width:70px!important;padding-top:0!important}.custom-input-2{width:100%;height:30px;outline:0;line-height:30px;padding-left:8px;margin-top:5px;background:#fff;border-radius:4px}.custom-area-2,.custom-input-2,.textareagroup textarea{border:1px solid #d2d2d2;box-sizing:border-box;font-size:13px;color:#636363}.custom-area-2,.textareagroup textarea{min-height:128px;max-height:128px;resize:none;width:100%;max-width:100%;outline:0;padding-left:8px;padding-top:8px;margin-top:8px}.basket_input_2 .custom-input-2{width:270px;float:right;margin-top:0}.custom-area-3:focus,.custom-input-2:focus,.textareagroup textarea:focus{box-shadow:1px 2px 2px 0 rgba(215,215,215,.75) inset;transition:.1s}.textareagroup textarea:focus{border:1px solid #d2d2d2}.radio_grp label.control-label,.textareagroup .control-label,.title_groups{font-size:12px;font-weight:700;text-transform:uppercase;margin-bottom:12px}.input-blocks-group{width:100%;float:left;border-bottom:1px solid #d2d2d2;padding-bottom:20px;margin-top:18px}.custom-form-buttons{width:100%;float:left}input.custom-check+label,input.custom-radio+label{font-size:13px;cursor:pointer;margin-left:6px}input.custom-radio+label span{width:16px;height:16px;background:url(../img/radio_new.png) no-repeat;float:left;transition:.2s;margin-top:1px}input.custom-radio:checked+label span,input.custom-radio:checked+label:hover span{background:url(../img/radio_new-active.png) no-repeat}.custom-form-buttons{margin-top:7px}.custom-form-buttons:first-child{margin-top:0}.checkout_basket{width:100%;float:left}.checkout_basket button{margin:0 auto}.input-blocks-wrapper .help-block{padding-left:71px;padding-top:4px;width:100%;float:left;box-sizing:border-box;margin-bottom:0}.cont_shop_but-wr{height:33px;margin-top:35px;padding-bottom:29px}.cont_shop_but-wr .cont_shop{margin-top:8px;float:left}.cont_shop_but-wr .submit4.bottom3{float:right}._qqq_ .params{font-size:12px}.activeShow{border-bottom:0!important}.delivery-data:after,.special-products{border-bottom:1px solid #d2d2d2}.delivery-data:after{width:100%;position:absolute;bottom:-27px;left:0}.img_ajax_basket img{margin-right:0!important;max-width:90px;max-height:90px;vertical-align:middle}#login-form{margin:50px auto 0}#bg{top:0!important;z-index:1!important}.bottom,.fotter,.top,.wrap{position:relative;z-index:2}.owl-controls .owl-buttons div{width:34px!important;height:50px!important;background:#596065!important;top:50%!important;margin:-25px 0 0!important;opacity:1!important;border-radius:0!important;padding:0!important;position:absolute}.owl-controls .owl-buttons div:hover{background:#acafb2!important;transition:.2s!important}.owl-controls .owl-buttons .owl-prev{border-top-right-radius:4px!important;border-bottom-right-radius:4px!important;left:-20px}.owl-controls .owl-buttons .owl-next{border-top-left-radius:4px!important;border-bottom-left-radius:4px!important;right:-20px}.owl-controls .owl-buttons div:before{position:absolute;width:8px;height:22px;background:url(../img/arrows_blocks.png) no-repeat;top:50%;margin-top:-11px;left:50%;margin-left:-4px}.owl-controls .owl-buttons .owl-prev:before{background-position:0 0}.owl-controls .owl-buttons .owl-next:before{background-position:-8px 0}.basket_input_2.required .control-label{position:relative}.basket_input_2.required .control-label:before{position:absolute;top:0;content:'*';color:#D60000;left:-11px;padding-top:2px}.float-left{float:left}.blog-show-img{padding-right:20px}.text_seo.hidden_seo{height:178px;overflow:hidden;position:relative}.text_seo.hidden_seo div{height:162px;overflow:hidden;position:relative}.text_seo.hidden_seo a{position:absolute;bottom:0;right:0;font-size:16px}.text_seo.hidden_seo div:before{content:'';display:block;position:absolute;bottom:0;right:0;left:0;height:120px;background:-moz-linear-gradient(top,rgba(255,255,255,0) 0,#fff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(255,255,255,0)),color-stop(100%,#fff));background:-webkit-linear-gradient(top,rgba(255,255,255,0) 0,#fff 100%);background:-o-linear-gradient(top,rgba(255,255,255,0) 0,#fff 100%);background:-ms-linear-gradient(top,rgba(255,255,255,0) 0,#fff 100%);background:linear-gradient(top,rgba(255,255,255,0) 0,#fff 100%)}.checkout_basket button,.submit4,a.link_buy{font-size:15px}.cost,.product_read_price #cost{font-size:20px}.cost span,.cost span.valute,.product_read_price .valute{font-size:15px}.comment_display_block{height:35px}.basket{margin-top:34px!important}.header-time{float:right;margin-right:25px}.header-time table{border:0;padding:0;outline:0;height:129px}.header-time table td{font-size:14px;line-height:14px}.header-time table td span{font-size:16px}.header-time table table{height:auto}.header-time.footer_time{width:100%;float:left;margin-top:68px}.header-time.footer_time table td{vertical-align:top}.footer-mail{color:#99a5ad}.footer-mail:hover{color:#fff}.labels_block .labels_item{display:inline-block;width:49%}.article_comment_description{margin:-10px 0 10px}.article_list_comment{height:auto;margin:10px 0} \ No newline at end of file diff --git a/frontend/web/css/style.dev.css b/frontend/web/css/style.dev.css new file mode 100755 index 0000000..44a3130 --- /dev/null +++ b/frontend/web/css/style.dev.css @@ -0,0 +1,1641 @@ +html,form, +body { + padding:0; + margin:0; + font-family: 'Roboto'; + font-size:14px;color:#333;height:100%; +} +h1,h2,h3{margin:0px;padding:0px 0px 10px 0px;} +.fl{float:left;} +.fotter .wrap .fr{float:right; width: 180px; height: 50px; position: relative;font-size: 12px;} +.fotter .wrap .fr img{position: absolute; top: 50%; margin-top: -10px; right: 0;} +.fotter .wrap .fl {line-height: 50px;font-size: 12px;} +.both{clear:both;} +h1{margin:10px 0;font-size:24px;} +h3{margin-bottom:30px;} +p{margin:3px 0px;padding:0px;} + +a{color:#6a6a6a;font-size:14px;text-decoration:underline;} +a:hover{color:#799920;} + +.wrap { + width:960px;margin:0px auto; +} +.f{background: #ffffff;} + +.br{-webkit-box-shadow: -1px 5px 14px 0px rgba(50, 46, 50, 0.46); + -moz-box-shadow: -1px 5px 14px 0px rgba(50, 46, 50, 0.46); + box-shadow: -1px 5px 14px 0px rgba(50, 46, 50, 0.46); + padding:20px;} + +nav.top{background:#f5f5f5;padding:10px 0px;border-bottom:1px solid #d2d2d2;font-size:12px;} +nav.top ul{list-style:none;margin:0px;padding:0px;} +nav.top ul li{float:left;padding-right:20px;} +nav.top ul li a{font-size: 12px;} +nav.top a{color:#6a6a6a;text-decoration:none;} + +#help{background:url('../img/help.png') right no-repeat;padding-right:20px;} +#help span{border-bottom:1px dotted #6a6a6a;} + +#login{background:url('../img/login.png') right no-repeat;padding-right:20px; font-size: 12px;} +#login span{border-bottom:1px dotted #6a6a6a;} + +.search{margin:-5px 0px -5px 100px;float:left;} +nav input[type="text"]{width:325px;outline:0;border:1px solid #d8d6d6;border-radius:5px;padding:5px 0px 5px 0px;font-size:14px;text-indent:10px;} +nav input[type="submit"]{width:35px;height:29px;border:none;background:url('../img/lupa_sub.png') center no-repeat;margin-left:-35px;cursor:pointer;} + + + +.header{margin:0px 0px 20px;} + +.phone{float:left;position:relative;text-align:center;} +.phone .tel{font-size:23px;} +.phone .tel span.more{margin-bottom: 3px} +.more_block{background:#ffffff;border:1px solid #d2d2d2;padding:10px;position:absolute;font-size:20px;display:none;z-index:99;} + +.more{background:url('../img/more.png') no-repeat;width:12px;height:7px;display:inline-block;cursor:pointer;margin-bottom:5px;} + + +.logo{margin:0px auto 0px;width:193px;padding-top: 22px;} +.logo a{display:block;width:193px;height:84px;background:url('../img/logo.png') no-repeat;} +.logo a span{display:none;} + +#call{color:#6a6a6a;text-decoration:none;border-bottom:1px dotted #6a6a6a;} + +.basket{float:right;position:relative;border:1px solid #d2d2d2;border-radius:5px;padding:15px 20px;font-size:18px;text-transform: uppercase;margin-top:13px;} +.basket .info{float:left;border-right:1px solid #d2d2d2;padding-right:10px;margin-right:17px;} +.basket .info span{color:#f75d50;font-size:22px;} +.basket a:link,.basket a:visited{text-decoration:none;color:#000000;font-size:18px;} + +.basket span.more {margin-bottom: -1px} +.menu{ + background:#596065; + border:1px solid #e8e8e8; +} +.menu ul{margin:0px;padding:0px;list-style:none;} +.menu ul li{float:left;border-left:1px solid #8b9094; height: 43px;} +.menu ul li:first-child{border-left:none;} +.menu ul li a{width: 100%; height:100%;line-height:43px;float:left;box-sizing:border-box; padding:0 19px;text-transform: uppercase;color:#ffffff;font-size:15px;text-decoration: none;font-weight: 600;} +.menu ul li:hover{background: #3e454b;} +.menu ul li.active a{background:#f5f5f5;color:#596065;} +.menu ul li.active a:hover{cursor: default;} + +.menu_childs{background:#f5f5f5;border:1px solid #e8e8e8;border-bottom:2px solid #596065;} +.menu_childs ul{margin:0px;padding:0px;list-style:none;} +.menu_childs ul li{float:left;} +.menu_childs ul li a{float:left;padding:15px 23px 15px 23px;text-transform: uppercase;color:#596065;font-size:14px;font-weight:bold;text-decoration: none;} +.menu_childs ul li a:hover{color:#878b8e;} + +.fr ul li{border:none;} +.akciya a{background:#f75d50;color:#ffffff;} +.brands a{background:#95ba2f;color:#ffffff;} + +a.myorders{color:#f75d50} + +.sub{margin:2px 0px 0px 0px;} +.sub img{float:left;margin-right:2px;} + +.rubrics{margin:60px 0 0 0;padding-bottom:27px;} +.rubrics ul{list-style:none;margin:0px;padding:0px;} +.rubrics ul li{float:left;margin:0px 35px;} +.rubrics ul li a{float:left;width:120px;padding-top:130px;text-align:center;text-transform: uppercase;color:#494949;text-decoration:none;font-weight:bold;} +.rubrics ul li.item_ryukzaki a{background:url('../img/ico1.png') no-repeat;} +.rubrics ul li.item_sumki a{background:url('../img/ico2.png') no-repeat;} +.rubrics ul li.item_chehly a{background:url('../img/ico3.png') no-repeat;} +.rubrics ul li.item_nesessery a{background:url('../img/ico4.png') no-repeat;} +.rubrics ul li.item_koshelki a{background:url('../img/ico5.png') no-repeat;} + + +.products{padding-bottom:30px;padding-top:20px;} +.why_me_, .products { + border-top: 1px solid #d2d2d2; +} +.products ul{list-style:none;margin:0;padding:0;} +.products ul li.item{float:left;width:192px;margin:0 0 50px 0;text-align:center;position:relative;} +.products ul li a.name, .special-products a.name {display:block;color:#799920;font-size: 15px;text-decoration:none;margin:15px 0 0 0;height:35px;overflow: hidden; box-sizing: border-box;padding: 0 10px;} +.products ul li a.name:hover, .special-products a.name:hover {text-decoration: underline} +.products ul li .info{text-align: left;} +.pn{border:none;} + +.cost, .product_read_price #cost {color:#f75d50;font-size:18px;margin:0;padding:0;} +.cost span, .cost span.valute, .product_read_price .valute {font-size: 14px;} +strike, strike span#old_cost{font-size:14px; color: #333} + + +.submit4m, a.link_buy, .checkout_basket button, .submit4 { + background: #95ba2f; + border-radius:4px; + height: 29px; + text-transform: uppercase; + color:#ffffff; + text-decoration:none; + font-weight:600; + text-align:center; + border-bottom: 3px solid #799920; + font-size: 12px; +} +.submit4.bottom3 {font-size: 12px !important;display: block;} +.basket .submit4.bottom3 {font-size: 12px !important;display: block; margin-top: 10px;} +a.link_buy, .checkout_basket button { + + display:block; + margin:0 auto 10px auto; + width:122px; + line-height:32px; +} +.checkout_basket button, .submit4{ + margin: 0; + padding: 0 20px; + line-height: 31px; + width: auto; + border-top: 0; + border-left: 0; + border-right: 0; + cursor: pointer; +} +a.link_buy:hover, .submit4m:hover, .checkout_basket button:hover, .submit4:hover, .btn-primary:hover { + border-bottom: 3px solid #95ba2f;; +} +a.link_buy:active, .submit4m:active,.checkout_basket button:active, .submit4:active, .btn-primary:active { + background: #799920; + border-bottom: 3px solid #799920; + +} +.checkout_basket button:focus, .submit4:focus { outline: none;} +.mycarousel{position:absolute;right:22px;top:13px;} +ul.mycarousel{list-style:none;margin:0px;padding:0px;} +ul.mycarousel li{margin:0px;padding:0px;} +.mycarousel img{border:1px solid #d2d2d2;} + +h3{text-align:center;text-transform: uppercase;font-size:20px;} +span.why {width:213px;height:49px;background:url('../img/logo-why.png') no-repeat;margin:0px auto; padding: 0 0 20px 0; height: 29px; + display: block;} + +ul.why_list{list-style:none;margin:0px;padding:0px;} +ul.why_list li{float:left;margin-left:58px; width: 288px; height:96px;box-sizing: border-box;padding-left: 110px; margin-top: 20px;} +ul.why_list li div { + display: table-cell; + height: 96px; + vertical-align: middle; +} +ul.why_list li span{font-weight:bold;color:#799920;} +ul.why_list li.item1{background:url('../img/why_item1.png') left no-repeat;} +ul.why_list li.item2{background:url('../img/why_item2.png') left no-repeat;} +ul.why_list li.item3{background:url('../img/why_item3.png') left no-repeat;} +ul.why_list li.item4{background:url('../img/why_item4.png') left no-repeat;} +ul.why_list li.item5{background:url('../img/why_item5.png') left no-repeat;} +ul.why_list li.item6{background:url('../img/why_item6.png') left no-repeat;} + +.banner_akciya{margin:50px 0px;} + +.bottom{background:#4d5458;padding:40px 0px;color:#ffffff;} +.bottom .leftbar{float:left;width:210px; } +.bottom ul{list-style:none;margin:0px;padding:0px;line-height: 23px;} +.bottom ul a{color:#ffffff;font-size:15px;text-decoration:none;} +.bottom ul a:hover{color:#799920;} + +.phones{margin-top:50px;line-height: 23px;font-size: 18px;} +.map{padding:5px 0px 5px 25px;background:url('../img/map.png') left no-repeat; margin-bottom: 7px;} +a.more_map{color:#99a5ad;border-bottom:1px dotted #99a5ad;text-decoration:none;font-size:11px;text-align:center;} + +.bread-crumbs{padding:0 0 0 20px;border-bottom:1px solid #d2d2d2; height: 29px;} +.bread-crumbs ul{list-style:none;margin:0 0 0 0;padding:0; height: 29px;} +.bread-crumbs ul li{float:left;padding-left:20px;height: 100%; line-height: 29px; color: #7d7d7d; position: relative; font-size: 12px;} +.bread-crumbs ul li:first-child {padding-left: 0} +.bread-crumbs ul li a {font-size: 12px; display: block; color: #7d7d7d} +.bread-crumbs ul li a:visited,.bread-crumbs ul li a:link{color:#7d7d7d;text-decoration:underline;} +.bread-crumbs ul li a:hover{color:#464646;text-decoration: none;} +.breadcrumb > li + li:before { + color: #ccc; + content: "/"; + position: absolute; + top: 0; + left: 8px; +} + + +.loyout{padding:20px 0px;} +.leftbar{float:left;width:172px;margin-right: 20px; } +.rightbar{float:right;width:380px;margin-left:40px;} +.rightbar.basket_rightbar{margin-right: 20px;} +.rightbar2{float:right;width:320px;} +.content {overflow:hidden;} +* html .content{height:1%;} +.content2 {overflow:hidden;} +* html .content2{height:1%;} + +.filters{border-top:1px solid #d2d2d2;padding:20px 0px 0px;margin-top:20px;} +.filters .begin{text-transform: uppercase;font-weight:bold; font-size: 12px;} +.filters ul{list-style:none;margin:0px;padding:0px;line-height:22px; margin-top: 6px;} +.filters ul li { + position: relative; + box-sizing: border-box; + padding-left: 24px; + line-height: 16px; + margin-top: 7px; +} +.filters ul li:first-child {margin-top: 0} +.filters ul li>input { + position: absolute; + left: 4px; + margin: 0px 0 0 ; + top: 3px; +} +.filters ul li a{color:#464646;text-decoration:none; font-size: 13px; line-height: 16px;} +.filters ul li a:hover{text-decoration:underline;} + +.productLeftBar{float:left;width:228px;margin-left:20px;margin-right:20px;} +.productRightBar{float:right;width:260px;margin:0 20px;} +.productLeftBar h1{font-size:24px;border-bottom:1px solid #d2d2d2;margin-bottom:10px;} + +ul.product_mod{list-style:none;margin:10px 0 0 0;padding:0; float: left;} +ul.product_mod li{ + float:left; + width: 46px; + height: 46px; + background: #fff; + border: 1px solid #d2d2d2; + margin: 5px 5px 0 0; + text-align: center; + position: relative; +} +ul.product_mod li.active:before { + width: 48px; + height: 48px; + position: absolute; + content: ''; + background: none; + border: 2px solid #95ba2f; + top: -1px; + left: -1px; + box-sizing: border-box; +} +ul.product_mod li a{ + width: 46px; + height: 46px; + display: table-cell; + vertical-align: middle; +} +ul.product_mod li a:focus { + outline: none; +} +ul.product_mod li img{ + vertical-align: middle; + max-width: 46px; + max-height: 46px; +} + +ul.product_colors{list-style:none;margin:30px 0 0 0 ;padding:0; float: left;} +ul.product_colors li{ + float:left; + margin:10px 10px 0 0; + width: 98px; + height: 98px; + text-align: center; + border: 1px solid #d2d2d2; +} +ul.product_colors li a { + width: 98px; + height: 98px; + vertical-align: middle; + display: table-cell; +} +ul.product_colors li img{ + max-width: 98px; + max-height: 98px; + vertical-align: middle; +} +.productLeftBar .begin{text-transform: uppercase;font-weight:bold; font-size: 12px;} + +.cost_box{border-top:1px solid #d2d2d2;border-bottom:1px solid #d2d2d2;margin:10px 0px;padding:10px 0px;} +.cost_box .w{float:left;margin-right:20px;padding-top:5px;} + +.product_service ul{list-style:none;margin:0px;padding:0px;} +.product_service ul li a{color:#799920;text-decoration:none;border-bottom:1px dotted #799920;font-size:12px;} +.product_service ul li.item1{background:url('../img/li1.png') left no-repeat;padding:3px 23px;} +.product_service ul li.item2{background:url('../img/li2.png') left no-repeat;padding:3px 23px;} +.product_service ul li.item3{background:url('../img/li3.png') left no-repeat;padding:3px 23px;} + +#nav_product{list-style:none;margin:0px;padding:0px;line-height:23px;} +#nav_product li a{background:url('../img/li_plus.png') left no-repeat;padding:3px 15px;color:#000000;text-transform: uppercase;text-decoration:none;font-weight:bold; font-size: 12px;} +#nav_product li a.active{background:url('../img/li_minus.png') left no-repeat;} +#nav_product li .info{display:none;border-bottom:1px solid #d2d2d2;padding:10px 0px;margin-bottom:10px;} + +#nav_product li .info, #nav_product li .info p {font-size: 12px; line-height: 16px;} +.modal_box{ + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 999; + + background: #000; + filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50); /* IE 5.5+*/ + -moz-opacity: 0.5; /* Mozilla 1.6 Р С‘ РЅРёР¶Рµ */ + -khtml-opacity: 0.5; /* Konqueror 3.1, Safari 1.1 */ + opacity: 0.5; + +} +#data_box{position:absolute;top:100px;z-index:1000;width:400px;background:#ffffff; + -webkit-box-shadow: 0 0 15px #000; + -moz-box-shadow: 0 0 15px #000; + box-shadow: 0 0 15px #000; + border:7px solid #1b9bb6; + border-radius:5px; +} +#data_box .data_wrp{padding:25px 15px 15px 15px;} +#data_box .data_wrp h1{text-transform: uppercase;} +#data_box .data_wrp hr{height: 1px;border: none;color: #000000;background: #000000;margin: 45px 0px 20px 0px;} +#data_box .data_wrp hr.hr{height: 1px;border: none;color: #000000;background: #000000;margin: 20px 0px 20px 0px;} +#data_box .pic-tango{margin-right:7px;margin-bottom:7px;} +#modal_close{cursor:pointer;margin-top:-80px;margin-right:-50px;} + + +.rightbar .control-label, .textareagroup .control-label {float:left;width:80px;padding-top:5px;} +.form-control{outline:0;border:1px solid #d8d6d6;border-radius:5px;padding:5px 0px 5px 0px;font-size:14px;text-indent:10px;margin-bottom:3px;width:250px;} +.form-control:focus { + border:#1b9bb6 1px solid; + box-shadow: 0 0 10px #1b9bb6; + -webkit-box-shadow: 0 0 10px #1b9bb6; + -moz-box-shadow: 0 0 10px #1b9bb6; +} +.help-block{color:red;font-size:12px;margin-bottom:5px;} + +.basket_item{padding:10px 0px;border-bottom:1px solid #b7b7b7;clear: both} +.basket_item img{margin-right:20px;} +.basket_item .count{margin:20px 0px;} +.basket_item .fr{margin-top:13px;} +.basket_item .info{overflow:hidden;} +.basket_item > a{display: block; + float: left;} +a.del:visited,a.del:link{background:url('../img/del.png') left center no-repeat;padding:2px 25px;font-size:12px;font-weight:normal;color:#787878;text-decoration: underline;} +a.del:hover{color:#a52828;text-decoration: underline;} + +.total{text-align:right;color:#87476a;font-size:20px;margin:10px 0px;} + +/*.submit4{margin-top:5px;border:none;padding:8px 13px;background:#95ba2f;border-radius:5px;color:#ffffff;text-transform: uppercase;text-decoration:none;font-size:14px;cursor:pointer;}*/ +/*.submit4:hover{background:#f75d50;}*/ + +.submit4m {font-family: Roboto;border:none;background:#95ba2f;border-radius:4px;color:#ffffff;text-transform: uppercase;font-size:10px;cursor:pointer; width:102px; height: 29px; border-bottom: 3px solid #799920; line-height: 29px;} +.submit4m:active,.submit4m:focus {outline: none} + +.btn-primary{ + border-bottom: 3px solid #799920; + border-top:0;border-right: 0;border-left: 0; + margin-top:5px; + padding:0 15px; + background:#95ba2f; + border-radius:4px; + color:#ffffff; + text-transform: uppercase; + text-decoration:none; + font-size:12px; + font-weight:bold; + cursor:pointer; + height: 29px; + line-height: 29px; +} +.btn-primary:active, .btn-primary:focus {outline: none;} + +a.logout:visited,a.logout:link{border:none;padding:3px 5px;background:#f75d50;border-radius:5px;color:#ffffff;text-transform: uppercase;text-decoration:none;font-size:11px;font-weight:normal;cursor:pointer;} +a.logout:hover{background:#95ba2f;} + +.boy_box{border-bottom:1px solid #b7b7b7;padding:0px 0px 15px 0px;} +.boy_box div{padding-top:10px;} + +.content_product .info{padding:0px 0px 20px 0px;} + +a.btn-success{display:inline-block;border:2px solid #d8d6d6;color:#95ba2f;border-radius:5px;padding:5px;margin-bottom:10px;text-decoration:none;font-size:14px;} +a.btn-success:hover{border:#95ba2f 2px solid;color:#f75d50;} + + +.txtb1{font-size:14px;font-weight:bold;} +.txtf{font-size:14px;font-weight:bold;color:#87476a;} +.txtfb{font-size:20px;font-weight:bold;color:#87476a;} + +.count{margin:20px 0px;} +.count input[type="number"]{outline:0;width:50px;border:1px solid #d8d6d6;border-radius:5px;padding:5px 0px 5px 0px;font-size:14px;text-indent:10px;margin-bottom:7px;} + +a.link2:visited,a.link2:link{font-size:14px;font-weight:bold;color:#95ba2f;text-decoration: none;} +a.link2:hover{color:#f75d50;text-decoration: underline;} + + + +.well{margin:50px auto;width:400px;background:#f5f5f5;border:1px solid #e8e8e8;padding:20px;border-radius:5px;} +.control-label{float:left;width:100px;padding-top:5px;} +#user-verifycode-image{display:block;} +.form-inline{display:inline;} +.form-inline .form-group{float:left;margin-right:10px;} +.form-inline .form-group select{width:100px;} +.form-group{margin-bottom: 10px;} +.table-bordered{width:100%;border:1px solid silver;} +.table-bordered th{background: #B3D1FD;padding:5px;} +.table-bordered tr td{border:1px solid silver;padding:5px;} +.table-bordered .filters{display: none;} + +.formCost label{float:left;width:30px;} + +ul.brends_list{list-style: none;margin:0px;padding:0px;} +ul.brends_list li{float:left;text-align:center;margin:0px 15px 20px 15px;} + +.compare{text-align: center;} +.compare a:visited,.compare a:link{font-size:12px;text-decoration: underline;} + +.alert-success{margin:10px 0px;padding:10px;border:1px solid #3ed824;border-radius: 5px;background: #c0feb5;} + +.news_item{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid silver;} +.news_item img{margin-right:20px;} +.news_item a{font-size:16px;} + +.pic{ + width: 392px; + height: 365px; +} +.pic a { + width: 392px; + height: 365px; + display: table-cell; + vertical-align: middle; +} +.pic a img { + max-width: 392px; + max-height: 365px; + vertical-align: middle; +} +input#subscribe-email::-webkit-input-placeholder { + color: #596065 +} + +input#subscribe-email::-moz-placeholder { + color: #596065 +} + + +input#subscribe-email:-ms-input-placeholder { + color: #596065 +} +input#subscribe-sale::-webkit-input-placeholder { + color: #596065 +} + +input#subscribe-sale::-moz-placeholder { + color: #596065 +} + + +input#subscribe-sale:-ms-input-placeholder { + color: #596065 +} +#subscribe-email, #subscribe-sale {color: #596065} +#subscribe-sale{width:100px;float:left;margin-right:20px;height: 28px;} +.saletxt{width:150px;float:left;color:#ffffff; font-size: 12px;} +#subscribe-email{width:370px;} + +.txts{color:#9da9b1;font-size:18px;margin-bottom:20px;} + +.content ul.pagination{list-style:none;text-align:center; margin: 0 0 16px 0;padding: 0 0 20px 0; border-bottom: 1px solid #d2d2d2;} +.content ul.pagination li{display:inline;} +.content ul.pagination li a{padding:3px;color:#82a02f;font-size: 15px;margin:0; text-decoration: none; } +.content ul.pagination li a:hover {text-decoration: underline} +.content ul.pagination li.active a{color: #333333;} +.boxitem{ + height:318px; +} +ul.social {margin-top: 20px;} +.social{list-style: none;margin: 10px;padding: 0px;height:48px;} +.social li{display:inline-block;margin-right:7px;padding-bottom: 10px;} +.social li a{ + width:36px; + height:36px; + display:block; + margin:0;padding:0; + text-indent:-9999px; + background:#bcbcbc url(../img/social-ico-two.png) no-repeat 0 0; + border-radius:48px; + -moz-border-radius:48px; + -webkit-border-radius:48px; + -webkit-transition: all 0.5s ease-out; + -moz-transition: all 0.5s ease-out; + transition: all 0.5s ease-out; +} +.social .fb{background-position:-44px 0; + cursor: pointer; +} +.social .vk{ + cursor: pointer; +} +.social .vk:hover{background-color:#5B7FA6;} +.social .fb:hover{background-color:#354f89; +} +.social .gp{background-position:-132px 0; + cursor: pointer;} +.social .gp:hover{background-color:#c72f21;} +.social .tw{background-position:-144px 0; + cursor: pointer;} +.social .tw:hover{background-color:#6398c9;} +.social .ok{background-position:-89px 0; + cursor: pointer;} +.social .ok:hover{background-color:#f88f15;} +.social ul li a:hover{ + background-color:#065baa; +} + +.socialbox{margin:10px 0px;} +.hide{display:none;} + + +.footer .fl{font-size: 12px;} +.fotter{background: #484f55;height: 50px;color:#98a3ab;} +.fotter a{color:#98a3ab; line-height: 50px; float: left; font-size: 12px;} + + +.view_products2{list-style: none;overflow:auto;height:400px;} +.view_products2 img{float:left;margin-right:20px;} +.view_products2 li{margin:10px 0px;} + + +.pixbox{width:160px;margin:0 auto;height:200px;overflow: hidden;text-align: center;} + + +.form-order{background:#f5f5f5;padding:0 20px 20px 20px;} +#order-payment{float:right;width:280px;} +#order-delivery{float:right;width:280px;} + +.delivery-data{margin-bottom:27px;position:relative;background: #95ba2f;display:none;border-radius: 5px;float: left;box-sizing: border-box; padding: 14px 20px; color: #fff; font-size: 13px;} + +.jcarousel-next-disabled, .jcarousel-prev-disabled {opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";} +.content2 br {display: none;} +.pixbox a { + width: 160px; + height: 200px; + display: table-cell; + vertical-align: middle; +} +.pixbox img { + max-width: 160px; + max-height: 200px; + vertical-align: middle; +} +.pagination li.prev.disabled span { + /*padding: 9px;*/ + /*border-radius: 10%;*/ + /*color: #4D5458;*/ + /*font-size: 14px;*/ + /*margin: 0px;*/ + /*border: 1px solid #4d5458;*/ + display: none; +} +.pagination li.next.disabled span { + display: none; +} +.fr {float: right;} + +.nobottom{border-bottom:none !important;} + +.dotted a{border-bottom: 1px dotted #808080;} + +.mycabinet{padding-left:20px;margin-top:20px;} +.mycabinet .begin{text-transform:uppercase;font-size: 13px;font-weight:bold; padding-bottom:15px;} +.mycabinet ul{margin:0px;padding:0px;list-style:none;} +.mycabinet ul li{padding-top:10px;padding-bottom:10px;} +.mycabinet a{color:#799920;text-decoration:none;} + +.lay_title .uppercase{text-transform:uppercase;} +.lay_title .center{text-align:center;} +.lay_title{padding-top:15px;font-size:24px;} + +.user_data{width:390px;border-right:1px solid #d2d2d2;float:left;} +.user_data .col{padding-bottom:35px;} +.user_data .col.last{padding-bottom:0px;} +.user_data .title{text-transform:uppercase;font-weight:bold;width:170px;float:left;font-size:13px;} +.user_data .data{float:left;font-size:13px;} + +.edit_menu{float:left;padding-left:60px;font-size:13px;} +.edit_menu div{padding-bottom:20px;} +.edit_menu a{color:#799920;text-decoration:none;} +.edit_menu .dotted{border-bottom:1px dotted #799920;} + +.user_edit_area{padding-top:30px;} + +/* part two */ + +.user_data_editing{float:left;} +.inputs .col{padding-bottom:12px !important;} +.user_data_editing .col{padding-bottom:35px; width:432px;} +.user_data_editing .title{text-transform:uppercase;font-weight:bold;width:170px;float:left;font-size:13px;} +.user_data_editing .data{float:left;font-size:13px; width:262px;} + +.user_data_editing input[type="text"] { + padding:0; + margin:0; + border:1px solid #d2d2d2; + padding-top:7px; + padding-bottom:7px; + padding-left:10px; + padding-right:10px; + border-radius:4px; + font-size:12px; + margin-top:-10px; + width: 240px; +} + +.user_data_editing .add {color:#799920; text-decoration:none;border-bottom:1px dotted #799920;} +.add_more{padding-bottom:24px; padding-left:170px;} + +.delete{float:right;} +.delete_button{background: url('../img/ico_close.png') right no-repeat; width:16px;height:16px;float:right;} + +.content_area{width:450px;} + +/*.bottom3{border-top:3px solid #95ba2f !important;border-bottom:3px solid #799920 !important; float:left;font-size:15px;}*/ +/*.bottom3:hover{border-top:3px solid #f75d50 !important;border-bottom:3px solid #c33327 !important;}*/ +#cancel{text-decoration:none;color:#799920;font-size:13px;border-bottom:1px dotted #799920;float:left;margin-left:40px;} + +.buttons{ + display: inline-flex; + align-items: center;} + +/* part three */ + +.favorites{background-color:#f5f5f5; padding:5px;font-size:14px;} +.favorites .fav_point{background-color:#ffffff;border:1px solid #d2d2d2;border-radius:3px;padding-top:10px;padding-bottom:10px;padding-left:20px;padding-right:20px; margin-top:5px;} +.favorites .fav_point .left{float:left; padding-right:0; width:178px;} +.favorites .fav_point .right{float:right; padding-right:0; padding-left:0;} + +.favorites .link{color:#799920; text-decoration:none;border-bottom:1px dotted #799920;} + +.redtext{color:#f75d50;} +.greentext{color:#95ba2f;} + +/* part three one */ +.hold .orders_view{display:none !important;} +.orders_view{width:680px;margin-top:13px;padding-top:13px;padding-bottom:5px;border-top:1px solid #d2d2d2;display:block;} +.orders_view .order{float:left;width:225px;text-align:center;} +.orders_view .order .order_price{color:#f75d50;font-weight:bold;font-size:15px;} +.orders_view .order .order_price span{font-size:24px;} +.orders_view .order img{padding-bottom:22px;} +.orders_view .order .note{font-size:13px;} +.orders_view .order .note span{color:#f75d50;} + +.basket_hovered{ + position:absolute; + border:1px solid #d2d2d2;border-radius:5px;padding:15px 20px; + background-color:white; + right:-1px; + margin-top:10px; + width:640px; + display:none; + z-index:1111; +} + + +.open .basket_hovered{ + display:block; +} + +.open, .open .basket_hovered { + -moz-box-shadow: 0px 0px 5px rgba(149,149,149,0.75); + -webkit-box-shadow: 0px 0px 5px rgba(149,149,149,0.75); + box-shadow: 0px 0px 5px rgba(149,149,149,0.75); +} +.basket_hovered1:before{ + position:absolute; + left:0; + content:' '; + width:100%; + background-color:white; + height:10px; + top:45px; + z-index:1112; +} + +.basket_item input{ + border: 1px solid #d2d2d2; + border-radius: 4px; + padding:9px; + width:26px; + font-size:18px; + font-weight:bold; + text-align:center; + background-color:white; + color: black; + margin:7px; +} +input[type=number]::-webkit-inner-spin-button, +input[type=number]::-webkit-outer-spin-button {-webkit-appearance: none; + margin:0;} + + +.minus{background:url('../img/minus.png') no-repeat;width:15px;height:15px;display:inline-block;cursor:pointer;} +.plus{background:url('../img/plus.png') no-repeat;width:15px;height:15px;display:inline-block;cursor:pointer;} + +.basket_sum{padding-top:15px;} + +.basket_sum .sum_text{font-size:15px; text-transform:none;padding-top:12px;float: right !important;padding-top: 1px;margin-bottom: 11px;} +.basket_sum .sum_text span{font-size:18px; color:#f75d50; font-weight:bold;} +.basket_sum a{color:white !important; font-size:15px !important; float:right;} + + +.black{z-index:9999; width:100%;height:100%;position:absolute;display:block;padding-top:6%;} +.black:before { + content: ''; + background-color: rgba(0,0,0,0.5); + width: 100%; + height: 100%; + position: fixed; + top: 0; +} +.black.hidden{display:none;} +.black .item_added_win{background-color:#ffffff;width:640px; margin:auto;position:relative;} + +.black_close{position:absolute; top:30px;right:30px;background:url('../img/ico_close2.png') no-repeat;width:22px;height:22px;display:inline-block;cursor:pointer;} + +.block_content{padding-left:20px;padding-right:20px;} +.item_added_win h2{text-transform:uppercase;text-align:center;padding:30px;} + +.block_content .item{padding-top:20px;padding-bottom:20px;border-bottom:1px solid #d2d2d2;} + +.uppercase{text-transform:uppercase;} + +.w230{width:230px;} +.w260{width:260px;} +.w430{width:430px;} +.borderbottom{border-bottom:1px solid #d2d2d2;} +.left_block .begin{text-transform:uppercase;font-size: 13px;font-weight:bold; padding-bottom:15px;} + +.color_variants .variant{ + text-align:center; + border:1px solid #d2d2d2; + float:left; + margin-right:5px; + margin-bottom:5px; +} +.variant:hover{cursor:pointer;} +.color_variants{margin-top:14px;margin-bottom:-5px;} +.color_variants .variant.active{width:44px;height:44px;border:2px solid #95ba2f;} +.color_variants .variant.active a{width:44px;height:44px;} + +.tobasket{margin-top:20px;margin-bottom:20px;} +.tobasket:hover{color:white;} + +.variant{width:46px;height:46px;} +.variant.active{width:44px;height:44px;} + +.layout{margin-top:15px;} +.left_block{float:left;} +.right_block{float:right;} +.center_block{float:left;margin-left:23px;} + +.left_block .links{margin-top:25px;} + +.left_block .links li{list-style: none; padding-left:25px;display:inline-block;cursor:pointer;height:20px;} +.left_block .links ul{margin:0;padding:0;} +.left_block .links a{font-size:13.5px;text-decoration:none; color:#8ba73e;} + + +.links .add_bookmarks{background:url('../img/ico_add_bookmark.png') no-repeat center left; } +.links .what_price{background:url('../img/ico_price.png') no-repeat center left; } +.links .add_compare{background:url('../img/ico_scales.png') no-repeat center left; } + +.spoiler_one{padding-top:15px;padding-bottom:15px;border-bottom:1px solid #d2d2d2;} +.spoiler_one .spoiler_content{margin-top:15px;font-size:13px;} +.spoiler_one .spoiler_content.hidden{display:none;} + +.title_spoiler:hover {cursor: pointer} + +.title_spoiler{ + background:url('../img/ico_open.png') no-repeat center left; + padding-left: 17px; + font-size:13px; + text-transform:uppercase; + color:#333333; + font-weight:bold; + text-decoration:none; +} +.title_spoiler.closed{ + background:url('../img/ico_close3.png') no-repeat center left; +} + +.features{ + list-style:none; + padding:0; + margin:0; + font-size:13px; +} +.features a{ + font-size:13px; + text-decoration:none; + border-bottom:1px dotted #8ba73e; + color:#8ba73e; +} +.features li{ + padding-top:5px; + padding-bottom:4px; +} + +.note_prod{ + width:225px; + height:23px; + overflow:hidden; + border-radius:5px; + display:table; + text-transform:uppercase; + font-size:11px; + font-weight:bold; +} + +.note_prod .one{ + z-index:999; +} +.note_prod .two{ + z-index:998; +} + +.note_prod .blue{ + float:left; + padding-top:5px; + padding-bottom:5px; + background-color:#42b9f6; + padding-left:10px; + padding-right:5px; + position:relative; +} + +.note_prod .blue:after{ + content:''; + width: 0; + height: 0; + border-top: 13px solid transparent; + border-left: 5px solid #42b9f6; + border-bottom: 13px solid transparent; + position:absolute; + top:-1px; + margin-left:5px; +} +.note_prod .red{ + float:left; + padding-top:5px; + padding-bottom:5px; + background-color:#f75d50; + padding-left:10px; + padding-right:5px; + position:relative; + color:#ffffff; +} +.note_prod .red:after{ + content:''; + width: 0; + height: 0; + border-top: 13px solid transparent; + border-left: 5px solid #f75d50; + border-bottom: 13px solid transparent; + position:absolute; + top:-1px; + margin-left:5px; +} +.note_prod .yellow{ + float:left; + padding-top:5px; + padding-bottom:5px; + background-color:#fbc665; + padding-left:10px; + padding-right:5px; + position:relative; +} +.note_prod .yellow:after{ + content:''; + width: 0; + height: 0; + border-top: 13px solid transparent; + border-left: 5px solid #fbc665; + border-bottom: 13px solid transparent; + position:absolute; + top:-1px; + margin-left:5px; +} + + +.products_block .product{float:left; width:190px; vertical-align:bottom;} +.product .image{height:225px;position:relative;} +.product .image img{position:absolute;bottom:0;left:15px;} + +.price{ + font-size: 18px; + color: #f75d50; + font-weight: bold; + text-align:center;} + +.product{padding-bottom:30px;position:relative;} +.product p{font-size:15px; text-align:center; margin-top:15px;} +.left52{margin-left:52px;} +.product a{color:#ffffff;} +.mrg1{margin-top: 25px; margin-bottom: 15px;} + +.products_martopbot{margin-top:60px;margin-bottom:100px;} + +.cont_shop_but{display:table-cell;vertical-align:middle;padding:35px;} +.cont_shop{text-decoration:none;font-size:12px;border-bottom:1px dotted #799920;color:#799920;} + +.icons{ + width:45px; + height:50%; + position:absolute; + z-index:9; + right:0; + padding-top:25px; + padding-right:15px; +} +.icons a{ + width:44px; + height:44px; + float: left; + border: 1px solid #d2d2d2; + margin-bottom: 5px; + background-color: white; +} +a:hover{cursor:pointer;} + + +.basket_item .form-group{display:inline;} + +.basket.open:after{ + content: ''; + position: absolute; + top: 43px; + width: 100%; + height: 10px; + background-color: white; + left: 0; + z-index: 9990; +} + +.basket_hovered .basket_sum{float:left;} + +a.active{font-weight:bold;text-decoration: underline;} + +/* + ==== BANNER ==== +*/ + +.HOME_RIGHT { + display: inline-block; + vertical-align: top; + margin-left: 10px; + position: absolute; +} + +#HOME_UNDER_SLIDER > div { + display: inline-block; + margin-right: 3px; + margin-top: 3px; +} + +.sort_block { + display: inline-block; +} +.sort_block ul { + display: inline-block; + margin: 0; + padding: 0; +} +.sort_block ul li { + display: inline-block; + margin: 0 0.5em; + list-style: none; +} +.sort_block ul li a.asc:after, .sort_block ul li a.desc:after { + display: block; + width: 5px; + height: 3px; + position: absolute; + top: 50%; + margin-top: -1px; + right: -10px; + content: ''; + background: url("../img/arrow_sort_asc_desc.png") no-repeat; +} +.sort_block ul li a.asc:after { + background-position: 0 0; +} +.sort_block ul li a.desc:after { + background-position: 0 -3px; +} +/*************/ +.home_banner_up {margin-top: 20px;} +.home_banner_up .HOME_RIGHT { + display: block; + float: right; + position: static; + margin-left: 0; +} +#HOME_SLIDER .jssorb03 div, #HOME_SLIDER .jssorb03 div:hover, #HOME_SLIDER .jssorb03 .av { + width: 6px; + height: 6px; + border-radius: 50%; + line-height: 6px; + background: #fff; + border: 2px solid #fff; + box-shadow: 0px 0px 5px 0px rgba(54, 54, 54, 0.75); +} + +#HOME_SLIDER .jssorb03 div.av:hover, #HOME_SLIDER .jssorb03 div.av:active, #HOME_SLIDER .jssorb03 .av { + cursor: default; + background: #95BA2F; +} +.special-products { + padding-top: 30px; +} +.special-products .link_buy { + margin-bottom: 0; +} +.special-products .item { + margin-bottom: 0 !important; + text-align: center; +} +.why_me_ {padding-top: 30px; overflow: hidden; margin-bottom: 60px;} +.why_me_ .why_list {width: 1038px; margin-left: -58px} +.seo_text { + +} +.seo_text p { + margin: 12px 0 0 0; + font-size: 13px !important; + color: #333 !important; + font-family: Roboto !important; +} +.seo_text p:first-child {margin-top: 0} +.product-special {position: absolute} +.jcarousel-skin-tango .jcarousel-item { + width: 38px; + height: 38px; + border: 1px solid #d2d2d2; + text-align: center; + background: #fff; +} +.jcarousel-skin-tango .jcarousel-item a { + display: table-cell; + width: 38px; + height: 38px; + vertical-align: middle; +} +.mycarousel img { + max-width: 38px; + max-height: 38px; + border: 0; + vertical-align: middle; +} +.jcarousel-skin-tango .jcarousel-clip-vertical, .jcarousel-skin-tango .jcarousel-container-vertical { + height: 175px; +} +.jcarousel-skin-tango .jcarousel-container-vertical { + padding: 0; +} +.jcarousel-skin-tango .jcarousel-prev-vertical { + top:-13px; +} +.jcarousel-skin-tango .jcarousel-next-vertical { + bottom: -13px; +} +.jcarousel-skin-tango .jcarousel-prev-vertical, .jcarousel-skin-tango .jcarousel-next-vertical { + left: 0; + width: 42px; + background-position: 14px 0; +} +.jcarousel-skin-tango .jcarousel-prev-vertical:hover, .jcarousel-skin-tango .jcarousel-next-vertical:hover { + background-position: 14px 0; + left: 0; +} +ul.product-special { + position: absolute; + top: 0; + left: 16px; +} +ul.product-special li { + width: 100%; + float: left; +} +ul.product-special li div { + color: #333; + font-size: 10px; + text-transform: uppercase; + font-weight: 700; + height: 22px; + line-height: 24px; + padding: 0 9px; + position: relative; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + margin-top: 8px; + float: left; +} +ul.product-special li:first-child {margin-top: 0} +ul.product-special li.top div { + background: #fbc665; +} +ul.product-special li.top div:after { + content: ''; + position: absolute; + right: -19px; + top: 3px; + border: 11px solid transparent; + border-top: 5px solid #fbc665; + transform: rotate(-90deg); +} +ul.product-special li.new div{ + background: #42b9f6; +} + +ul.product-special li.new div:after { + content: ''; + position: absolute; + right: -18px; + top: 2px; + border: 11px solid transparent; + border-top: 5px solid #42b9f6; + transform: rotate(-90deg); +} +ul.product-special li.promo div { + background: #f75d50; +} +ul.product-special li.promo div:after { + content: ''; + position: absolute; + right: -18px; + top: 2px; + border: 11px solid transparent; + border-top: 5px solid #f75d50; + transform: rotate(-90deg); +} +.cost-block { + margin-top: 1px; +} +.products.pn a.link_buy { + margin-bottom: 0; +} +.products.pn { + padding-bottom: 0; +} +.products.pn>ul { + width: 100%; + float: left; + margin-bottom: -3px; +} + +._form_checkbox_reset, .sort_block ul li a, .sort_block { + font-size: 12px; +} +.filter_accept_bloc {margin-top: 13px; margin-bottom: 0;} +._form_checkbox_reset { + color: #6a6a6a; + display: block; + width: 128px; + height: 28px; + border: 1px solid #d2d2d2; + line-height: 28px; + text-align: center; + border-radius: 4px; + text-decoration: none; + margin: 0 auto; +} +._form_checkbox_reset:hover { + border: 1px solid #95ba2f; + color: #6a6a6a; +} +._form_checkbox_reset:active { + border: 1px solid #95ba2f; + background: #95ba2f; + color: #fff; +} +.sort_block ul li a { + color: #8fa951; + position: relative; +} +.sort_block ul li a:hover { + color: #333; +} +#HOME_SLIDER .jssora03l, #HOME_SLIDER .jssora03r { + width: 36px; + height: 340px; + background: url('../img/new_arrows_.png') no-repeat; +} +#HOME_SLIDER .jssora03l, #HOME_SLIDER .jssora03l:hover { + background-position: 0 50%; + left: 0; + top: 0; +} +#HOME_SLIDER .jssora03r, #HOME_SLIDER .jssora03r:hover { + background-position: -36px 50%; + right: 0; + top: 0; +} +.loyout ._prd_spec-wr {margin-top: 10px;} +.loyout .special-products:first-child { + border-top: 0; + padding-top: 0; + +} +.irs-slider { + width: 13px; + height: 13px; + top: 25px; + border-radius: 100%; + box-shadow: none; + border: 1px solid #d2d2d2; + background: #ffffff; + background: -moz-linear-gradient(top, #ffffff 0%, #ebebeb 100%); + background: -webkit-linear-gradient(top, #ffffff 0%,#ebebeb 100%); + background: linear-gradient(to bottom, #ffffff 0%,#ebebeb 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ebebeb',GradientType=0 ); +} +.irs-slider.state_hover, .irs-slider:hover { + background: #ffffff; +} +.irs-slider:after { + display: none; +} +.irs-slider:before { + content: ""; + position: absolute; + width: 5px; + height: 5px; + z-index: 2; + border: 1px solid #d2d2d2; + border-radius: 100%; + background: #799920; + top: 3px; + left: 3px; +} +.irs-bar { + height: 3px; + top: 30px; +} +.irs-line { + height: 9px; + background: #ebebeb; + border: 1px solid #d2d2d2; + top: 27px; +} +.irs-line:before { + width: 166px; + height: 5px; + position: absolute; + content: ''; + top: 2px; + left: 2px; + background: #d2d2d2; + border-radius: 5px; +} +.irs-min, .irs-max {display: none;} +.irs {height: 49px;} +.price_filter.first_price_li {margin-top: 8px;} +.product_read_ .w{ + width: 110px; + overflow: hidden; + margin: 0; + padding-top: 0; + display: table-cell; + vertical-align: middle; + height: 32px; + float: none; +} +.product_read_ .w strike, .product_read_ .w .cost { + width: 100%; + float: left; + /*line-height: 15px;*/ +} + +.product_read_price .link_buy { + width: 118px; + position: absolute; + top: 50%; + right: 0; + margin: -16px 0 0 0; +} +.product_read_price { position: relative; min-height: 32px;margin-top: 10px;} +.special-products.products h3 {margin-bottom: 10px;} +.special-products.products li.item { + margin-top: 30px; +} +.productLeftBar .cost_box { + border-top: 0; + padding: 10px 0 0 0; +} +.productLeftBar .product_mod { + width: 100%; + float: left; + border-bottom: 1px solid #d2d2d2; + padding-bottom: 15px; +} +#login-form .btn-primary { +} +.field-orders-delivery .control-label, .field-orders-payment .control-label, .field-orders-body .control-label, .textareagroup .control-label { + width: 100%; + float: left; +} +.basket_title_ { + text-align: center; +} +.cont_shopping-wr { + width: 100%; + float: left; + margin-top: 10px; +} +.cont_shopping-wr .cont_shopping { + float: right; +} +.cont_shopping { + display: block !important; + border-top: 0!important; + border-left: 0!important; + border-right: 0!important; + border-bottom: 1px dashed #799920!important; + color: #799920!important; + margin: 0!important; + padding: 0!important; + font-size: 12px!important; + float: left; + border-radius: 0 !important; +} +.info.product-thumb-video { + width: 100%; + height: 100%; +} +.info.product-thumb-video iframe, .info.product-thumb-video embed { + width: 100% !important; + height: auto !important; +} +.input-blocks-wrapper, .input-blocks { + width: 100%; + float: left; +} +.form-order .input-blocks-wrapper { + margin-top: 6px; +} +.input-blocks label { + font-size: 13px; + color: #333; +} +.basket_input_2 label { + height: 30px; + line-height: 30px; + float: left; + width: 70px !important; + padding-top: 0 !important; +} + +.custom-input-2 { + width: 100%; + height: 30px; + box-sizing: border-box; + outline: none; + line-height: 30px; + padding-left: 8px; + margin-top: 5px; + background: #fff; + border-radius: 4px; +} +.custom-input-2, .custom-area-2, .textareagroup textarea { + border: 1px solid #d2d2d2; + box-sizing: border-box; + font-size: 13px; + color: #636363; +} +.custom-area-2, .textareagroup textarea { + min-height: 128px; + max-height: 128px; + resize: none; + width: 100%; + max-width: 100%; + outline: none; + padding-left: 8px; + padding-top: 8px; + margin-top: 8px; +} +.basket_input_2 .custom-input-2 { + width: 270px; + float: right; + margin-top: 0; +} +.custom-input-2:focus, .custom-area-3:focus, .textareagroup textarea:focus {box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s} +.textareagroup textarea:focus{border: 1px solid #d2d2d2;} +.title_groups, .radio_grp label.control-label, .textareagroup .control-label { + font-size: 12px; + font-weight: bold; + text-transform: uppercase; + margin-bottom: 12px; +} +.input-blocks-group { + width: 100%; + float: left; + border-bottom: 1px solid #d2d2d2; + padding-bottom: 20px; + margin-top: 18px; +} +.custom-form-buttons { + width: 100%; + float: left; +} +input.custom-radio + label, input.custom-check + label { + font-size: 13px; + cursor: pointer; + margin-left: 6px; +} +/***radio***/ +input.custom-radio, input.custom-check {display: none} +input.custom-radio + label span{ + width: 16px; + height: 16px; + background: url('../img/radio_new.png') no-repeat; + float: left; + transition: .2s; + margin-top: 1px; +} +input.custom-radio:checked + label span, input.custom-radio:checked + label:hover span { + background: url('../img/radio_new-active.png') no-repeat; +} + +input.custom-radio + label:hover { + text-decoration: underline; +} +.custom-form-buttons { + margin-top: 7px; +} +.custom-form-buttons:first-child {margin-top: 0} +.delivery-data .field-order-delivery-childs .control-label {display: none;} +.checkout_basket { + width: 100%; + float: left; +} +.checkout_basket button { + margin: 0 auto; +} +.input-blocks-wrapper .help-block { + padding-left: 71px; + padding-top: 4px; + width: 100%; + float: left; + box-sizing: border-box; + margin-bottom: 0; +} +.cont_shop_but-wr { + height: 33px; + margin-top: 35px; + padding-bottom: 29px; +} +.cont_shop_but-wr .cont_shop { + margin-top: 8px; + float: left; +} +.cont_shop_but-wr .submit4.bottom3 {float: right;} +._qqq_ .params {font-size: 12px;} +.activeShow {border-bottom: 0 !important;} +.delivery-data:after { + width: 100%; + border-bottom: 1px solid #d2d2d2; + position: absolute; + content: ''; + bottom: -27px; + left: 0; +} +.img_ajax_basket img { + margin-right: 0!important; + max-width: 90px; + max-height: 90px; + vertical-align: middle; +} +.jcarousel-skin-tango>li{display: none;} +#login-form { + margin: 50px auto 0 auto; +} +.wrapper_all {} +#bg { + top: 0 !important; + z-index: 1 !important; +} +.top, .wrap, .bottom, .fotter { + position: relative; + z-index: 2; +} +.owl-pagination {display: none;} +.owl-controls .owl-buttons div { + width: 34px !important; + height: 50px !important; + background: #596065 !important; + top:50% !important; + margin: -25px 0 0 0 !important; + opacity: 1 !important; + border-radius: 0 !important; + padding: 0!important; + position: absolute; +} +.owl-controls .owl-buttons div:hover { + background: #acafb2 !important; + transition: 0.2s!important; +} +.owl-controls .owl-buttons .owl-prev { + border-top-right-radius: 4px !important; + border-bottom-right-radius: 4px !important; + left: -20px; + +} +.owl-controls .owl-buttons .owl-next { + border-top-left-radius: 4px !important; + border-bottom-left-radius: 4px !important; + right: -20px; + +} +.owl-controls .owl-buttons div:before { + position: absolute; + content: ''; + width: 8px; + height: 22px; + background: url("../img/arrows_blocks.png") no-repeat; + top:50%; + margin-top: -11px; + left: 50%; + margin-left: -4px; +} +.owl-controls .owl-buttons .owl-prev:before { + background-position: 0 0; +} +.owl-controls .owl-buttons .owl-next:before { + background-position: -8px 0; +} +.basket_input_2.required .control-label {position: relative} +.basket_input_2.required .control-label:before { + position: absolute; + top: 0; + content: '*'; + color: #D60000; + left: -11px; + padding-top: 2px; +} + + +.float-left{ + float: left; +} + +.blog-show-img{ + padding-right: 20px; +} + +.text_seo.hidden_seo{ + height: 178px; + overflow: hidden; + position: relative; + +} +.text_seo.hidden_seo div { + height: 162px; + overflow: hidden; + position: relative; +} +.text_seo.hidden_seo a { + position: absolute; + bottom: 0; + right: 0; + font-size: 16px; +} +.text_seo.hidden_seo div:before { + content: ''; + display: block; + position: absolute; + bottom: 0; + right: 0; + left: 0; + height: 120px; + background: -moz-linear-gradient(top, rgba(255, 255, 255, 0) 0%, #fff 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(100%, #fff)); + background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, #fff 100%); + background: -o-linear-gradient(top, rgba(255, 255, 255, 0) 0%, #fff 100%); + background: -ms-linear-gradient(top, rgba(255, 255, 255, 0) 0%, #fff 100%); + background: linear-gradient(top, rgba(255, 255, 255, 0) 0%, #fff 100%); +} +.special-products{border-bottom:1px solid #d2d2d2}a.link_buy,.checkout_basket button,.submit4{font-size:15px}.cost,.product_read_price #cost{font-size:20px}.cost span,.cost span.valute,.product_read_price .valute{font-size:15px} +.comment_display_block { + height: 35px; +} +.basket{margin-top:34px!important} +.header-time{float:right;margin-right:25px} +.header-time table{border:0;padding:0;outline:none;height:129px} +.header-time table td{font-size:14px;line-height:14px} +.header-time table td span{font-size:16px} +.header-time table table{height:auto} +.header-time.footer_time {width: 100%;float: left;margin-top: 68px;} +.header-time.footer_time table td{vertical-align: top} +.footer-mail {color: #99a5ad; text-decoration: underline;} +.footer-mail:hover {color: #fff;} +.labels_block .labels_item { + display: inline-block; + width: 49%; +} + +.article_comment_description { + margin: -10px 0 10px 0; +} +.article_list_comment { + height: auto; + margin: 10px 0 10px 0; +} \ No newline at end of file diff --git a/frontend/web/favicon.ico b/frontend/web/favicon.ico new file mode 100755 index 0000000..580ed73 Binary files /dev/null and b/frontend/web/favicon.ico differ diff --git a/frontend/web/files/.tmb/l1_c2l0ZV9leHRyZW1fbmV3X25ld3NfYnV0dG9uXzIuanBn1437031556.png b/frontend/web/files/.tmb/l1_c2l0ZV9leHRyZW1fbmV3X25ld3NfYnV0dG9uXzIuanBn1437031556.png new file mode 100755 index 0000000..61480af Binary files /dev/null and b/frontend/web/files/.tmb/l1_c2l0ZV9leHRyZW1fbmV3X25ld3NfYnV0dG9uXzIuanBn1437031556.png differ diff --git a/frontend/web/files/site_extrem_new_news_button_2.jpg b/frontend/web/files/site_extrem_new_news_button_2.jpg new file mode 100755 index 0000000..8921176 Binary files /dev/null and b/frontend/web/files/site_extrem_new_news_button_2.jpg differ diff --git a/frontend/web/img/404.png b/frontend/web/img/404.png new file mode 100755 index 0000000..d496e2e Binary files /dev/null and b/frontend/web/img/404.png differ diff --git a/frontend/web/img/_logo.png b/frontend/web/img/_logo.png new file mode 100755 index 0000000..832dd10 Binary files /dev/null and b/frontend/web/img/_logo.png differ diff --git a/frontend/web/img/arrow-next.png b/frontend/web/img/arrow-next.png new file mode 100755 index 0000000..5730386 Binary files /dev/null and b/frontend/web/img/arrow-next.png differ diff --git a/frontend/web/img/arrow-prev.png b/frontend/web/img/arrow-prev.png new file mode 100755 index 0000000..38cec55 Binary files /dev/null and b/frontend/web/img/arrow-prev.png differ diff --git a/frontend/web/img/arrow_sort_asc_desc.png b/frontend/web/img/arrow_sort_asc_desc.png new file mode 100755 index 0000000..73920f5 Binary files /dev/null and b/frontend/web/img/arrow_sort_asc_desc.png differ diff --git a/frontend/web/img/arrows_blocks.png b/frontend/web/img/arrows_blocks.png new file mode 100755 index 0000000..7091b05 Binary files /dev/null and b/frontend/web/img/arrows_blocks.png differ diff --git a/frontend/web/img/artweb.png b/frontend/web/img/artweb.png new file mode 100755 index 0000000..1ff9b54 Binary files /dev/null and b/frontend/web/img/artweb.png differ diff --git a/frontend/web/img/banner1.jpg b/frontend/web/img/banner1.jpg new file mode 100755 index 0000000..9c9dff0 Binary files /dev/null and b/frontend/web/img/banner1.jpg differ diff --git a/frontend/web/img/banner_akciya.jpg b/frontend/web/img/banner_akciya.jpg new file mode 100755 index 0000000..1d1ce8c Binary files /dev/null and b/frontend/web/img/banner_akciya.jpg differ diff --git a/frontend/web/img/begunok_slider.png b/frontend/web/img/begunok_slider.png new file mode 100755 index 0000000..9554960 Binary files /dev/null and b/frontend/web/img/begunok_slider.png differ diff --git a/frontend/web/img/buy.png b/frontend/web/img/buy.png new file mode 100755 index 0000000..10dc778 Binary files /dev/null and b/frontend/web/img/buy.png differ diff --git a/frontend/web/img/children_sub.jpg b/frontend/web/img/children_sub.jpg new file mode 100755 index 0000000..0ac48bb Binary files /dev/null and b/frontend/web/img/children_sub.jpg differ diff --git a/frontend/web/img/close_modal.jpg b/frontend/web/img/close_modal.jpg new file mode 100755 index 0000000..912fe9c Binary files /dev/null and b/frontend/web/img/close_modal.jpg differ diff --git a/frontend/web/img/del.png b/frontend/web/img/del.png new file mode 100755 index 0000000..4774115 Binary files /dev/null and b/frontend/web/img/del.png differ diff --git a/frontend/web/img/favicon.ico b/frontend/web/img/favicon.ico new file mode 100755 index 0000000..8b86c2b Binary files /dev/null and b/frontend/web/img/favicon.ico differ diff --git a/frontend/web/img/help.png b/frontend/web/img/help.png new file mode 100755 index 0000000..2bbf994 Binary files /dev/null and b/frontend/web/img/help.png differ diff --git a/frontend/web/img/ico1.png b/frontend/web/img/ico1.png new file mode 100755 index 0000000..efa6356 Binary files /dev/null and b/frontend/web/img/ico1.png differ diff --git a/frontend/web/img/ico2.png b/frontend/web/img/ico2.png new file mode 100755 index 0000000..cc4125d Binary files /dev/null and b/frontend/web/img/ico2.png differ diff --git a/frontend/web/img/ico3.png b/frontend/web/img/ico3.png new file mode 100755 index 0000000..2f39c68 Binary files /dev/null and b/frontend/web/img/ico3.png differ diff --git a/frontend/web/img/ico4.png b/frontend/web/img/ico4.png new file mode 100755 index 0000000..17ba48a Binary files /dev/null and b/frontend/web/img/ico4.png differ diff --git a/frontend/web/img/ico5.png b/frontend/web/img/ico5.png new file mode 100755 index 0000000..e8173fd Binary files /dev/null and b/frontend/web/img/ico5.png differ diff --git a/frontend/web/img/ico_close.png b/frontend/web/img/ico_close.png new file mode 100755 index 0000000..d3e87b9 Binary files /dev/null and b/frontend/web/img/ico_close.png differ diff --git a/frontend/web/img/ico_close2.png b/frontend/web/img/ico_close2.png new file mode 100755 index 0000000..d3e87b9 Binary files /dev/null and b/frontend/web/img/ico_close2.png differ diff --git a/frontend/web/img/ico_pic.jpg b/frontend/web/img/ico_pic.jpg new file mode 100755 index 0000000..4f33db3 Binary files /dev/null and b/frontend/web/img/ico_pic.jpg differ diff --git a/frontend/web/img/ico_pic2.jpg b/frontend/web/img/ico_pic2.jpg new file mode 100755 index 0000000..d0b72bb Binary files /dev/null and b/frontend/web/img/ico_pic2.jpg differ diff --git a/frontend/web/img/icon_100_original_01.png b/frontend/web/img/icon_100_original_01.png new file mode 100755 index 0000000..a06c951 Binary files /dev/null and b/frontend/web/img/icon_100_original_01.png differ diff --git a/frontend/web/img/icon_100_quaranty_01.png b/frontend/web/img/icon_100_quaranty_01.png new file mode 100755 index 0000000..5a4b121 Binary files /dev/null and b/frontend/web/img/icon_100_quaranty_01.png differ diff --git a/frontend/web/img/li1.png b/frontend/web/img/li1.png new file mode 100755 index 0000000..f02d9a6 Binary files /dev/null and b/frontend/web/img/li1.png differ diff --git a/frontend/web/img/li2.png b/frontend/web/img/li2.png new file mode 100755 index 0000000..83d323f Binary files /dev/null and b/frontend/web/img/li2.png differ diff --git a/frontend/web/img/li3.png b/frontend/web/img/li3.png new file mode 100755 index 0000000..ea42367 Binary files /dev/null and b/frontend/web/img/li3.png differ diff --git a/frontend/web/img/li_minus.png b/frontend/web/img/li_minus.png new file mode 100755 index 0000000..07df77c Binary files /dev/null and b/frontend/web/img/li_minus.png differ diff --git a/frontend/web/img/li_plus.png b/frontend/web/img/li_plus.png new file mode 100755 index 0000000..eeb0038 Binary files /dev/null and b/frontend/web/img/li_plus.png differ diff --git a/frontend/web/img/login.png b/frontend/web/img/login.png new file mode 100755 index 0000000..ef52742 Binary files /dev/null and b/frontend/web/img/login.png differ diff --git a/frontend/web/img/logo-why.png b/frontend/web/img/logo-why.png new file mode 100755 index 0000000..fd03391 Binary files /dev/null and b/frontend/web/img/logo-why.png differ diff --git a/frontend/web/img/logo.png b/frontend/web/img/logo.png new file mode 100755 index 0000000..e28c51c Binary files /dev/null and b/frontend/web/img/logo.png differ diff --git a/frontend/web/img/lupa_sub.png b/frontend/web/img/lupa_sub.png new file mode 100755 index 0000000..328455d Binary files /dev/null and b/frontend/web/img/lupa_sub.png differ diff --git a/frontend/web/img/man_sub.jpg b/frontend/web/img/man_sub.jpg new file mode 100755 index 0000000..660bb11 Binary files /dev/null and b/frontend/web/img/man_sub.jpg differ diff --git a/frontend/web/img/map.jpg b/frontend/web/img/map.jpg new file mode 100755 index 0000000..af5d539 Binary files /dev/null and b/frontend/web/img/map.jpg differ diff --git a/frontend/web/img/map.png b/frontend/web/img/map.png new file mode 100755 index 0000000..cbeff6d Binary files /dev/null and b/frontend/web/img/map.png differ diff --git a/frontend/web/img/minus.png b/frontend/web/img/minus.png new file mode 100755 index 0000000..ce49162 Binary files /dev/null and b/frontend/web/img/minus.png differ diff --git a/frontend/web/img/more.png b/frontend/web/img/more.png new file mode 100755 index 0000000..61b63f7 Binary files /dev/null and b/frontend/web/img/more.png differ diff --git a/frontend/web/img/new_arrows_.png b/frontend/web/img/new_arrows_.png new file mode 100755 index 0000000..4a9f3e5 Binary files /dev/null and b/frontend/web/img/new_arrows_.png differ diff --git a/frontend/web/img/new_coll.png b/frontend/web/img/new_coll.png new file mode 100755 index 0000000..a82c96d Binary files /dev/null and b/frontend/web/img/new_coll.png differ diff --git a/frontend/web/img/no_photo.png b/frontend/web/img/no_photo.png new file mode 100755 index 0000000..aef9e08 Binary files /dev/null and b/frontend/web/img/no_photo.png differ diff --git a/frontend/web/img/no_photo_big.png b/frontend/web/img/no_photo_big.png new file mode 100755 index 0000000..fc71420 Binary files /dev/null and b/frontend/web/img/no_photo_big.png differ diff --git a/frontend/web/img/notpic.gif b/frontend/web/img/notpic.gif new file mode 100755 index 0000000..a3d732f Binary files /dev/null and b/frontend/web/img/notpic.gif differ diff --git a/frontend/web/img/pagination.png b/frontend/web/img/pagination.png new file mode 100755 index 0000000..9593831 Binary files /dev/null and b/frontend/web/img/pagination.png differ diff --git a/frontend/web/img/phone.png b/frontend/web/img/phone.png new file mode 100755 index 0000000..4e965a4 Binary files /dev/null and b/frontend/web/img/phone.png differ diff --git a/frontend/web/img/pic.jpg b/frontend/web/img/pic.jpg new file mode 100755 index 0000000..3006b3e Binary files /dev/null and b/frontend/web/img/pic.jpg differ diff --git a/frontend/web/img/plus.png b/frontend/web/img/plus.png new file mode 100755 index 0000000..e1d2047 Binary files /dev/null and b/frontend/web/img/plus.png differ diff --git a/frontend/web/img/pro.png b/frontend/web/img/pro.png new file mode 100755 index 0000000..e31f0fc Binary files /dev/null and b/frontend/web/img/pro.png differ diff --git a/frontend/web/img/radio_new-active.png b/frontend/web/img/radio_new-active.png new file mode 100755 index 0000000..9476303 Binary files /dev/null and b/frontend/web/img/radio_new-active.png differ diff --git a/frontend/web/img/radio_new.png b/frontend/web/img/radio_new.png new file mode 100755 index 0000000..e1ee3e9 Binary files /dev/null and b/frontend/web/img/radio_new.png differ diff --git a/frontend/web/img/sale30.jpg b/frontend/web/img/sale30.jpg new file mode 100755 index 0000000..e006190 Binary files /dev/null and b/frontend/web/img/sale30.jpg differ diff --git a/frontend/web/img/slider.jpg b/frontend/web/img/slider.jpg new file mode 100755 index 0000000..22bdea6 Binary files /dev/null and b/frontend/web/img/slider.jpg differ diff --git a/frontend/web/img/social-ico-two.png b/frontend/web/img/social-ico-two.png new file mode 100755 index 0000000..d18479b Binary files /dev/null and b/frontend/web/img/social-ico-two.png differ diff --git a/frontend/web/img/social-ico.png b/frontend/web/img/social-ico.png new file mode 100755 index 0000000..1982290 Binary files /dev/null and b/frontend/web/img/social-ico.png differ diff --git a/frontend/web/img/user-noimage.png b/frontend/web/img/user-noimage.png new file mode 100755 index 0000000..e5f6720 Binary files /dev/null and b/frontend/web/img/user-noimage.png differ diff --git a/frontend/web/img/v_next.png b/frontend/web/img/v_next.png new file mode 100755 index 0000000..e5056d1 Binary files /dev/null and b/frontend/web/img/v_next.png differ diff --git a/frontend/web/img/v_next2.png b/frontend/web/img/v_next2.png new file mode 100755 index 0000000..600203b Binary files /dev/null and b/frontend/web/img/v_next2.png differ diff --git a/frontend/web/img/v_prev.png b/frontend/web/img/v_prev.png new file mode 100755 index 0000000..36c087e Binary files /dev/null and b/frontend/web/img/v_prev.png differ diff --git a/frontend/web/img/v_prev2.png b/frontend/web/img/v_prev2.png new file mode 100755 index 0000000..791e630 Binary files /dev/null and b/frontend/web/img/v_prev2.png differ diff --git a/frontend/web/img/why.png b/frontend/web/img/why.png new file mode 100755 index 0000000..5e624ab Binary files /dev/null and b/frontend/web/img/why.png differ diff --git a/frontend/web/img/why_item1.png b/frontend/web/img/why_item1.png new file mode 100755 index 0000000..840d762 Binary files /dev/null and b/frontend/web/img/why_item1.png differ diff --git a/frontend/web/img/why_item2.png b/frontend/web/img/why_item2.png new file mode 100755 index 0000000..223b49a Binary files /dev/null and b/frontend/web/img/why_item2.png differ diff --git a/frontend/web/img/why_item3.png b/frontend/web/img/why_item3.png new file mode 100755 index 0000000..127a7f1 Binary files /dev/null and b/frontend/web/img/why_item3.png differ diff --git a/frontend/web/img/why_item4.png b/frontend/web/img/why_item4.png new file mode 100755 index 0000000..47de446 Binary files /dev/null and b/frontend/web/img/why_item4.png differ diff --git a/frontend/web/img/why_item5.png b/frontend/web/img/why_item5.png new file mode 100755 index 0000000..3bf7f51 Binary files /dev/null and b/frontend/web/img/why_item5.png differ diff --git a/frontend/web/img/why_item6.png b/frontend/web/img/why_item6.png new file mode 100755 index 0000000..5c33e90 Binary files /dev/null and b/frontend/web/img/why_item6.png differ diff --git a/frontend/web/img/woman_sub.jpg b/frontend/web/img/woman_sub.jpg new file mode 100755 index 0000000..877150b Binary files /dev/null and b/frontend/web/img/woman_sub.jpg differ diff --git a/frontend/web/js/basket.js b/frontend/web/js/basket.js new file mode 100755 index 0000000..bf99b20 --- /dev/null +++ b/frontend/web/js/basket.js @@ -0,0 +1,161 @@ +(function($){ + + $.fn.basket = function(callerSettings) { + + var basket_id = this; + + var find_products = function(){ + $("a[rel~='product']").each(function (i) { + $(this).bind('click',function(){ + var rel = $(this).attr('rel'); + var id = $('#product_id').val(); + var count = 1; + go_product({mod_id : id,count:count}); + return false; + }) + }) + } + + var go_product = function(data){ + var product_id = data.product_id; + $.get("/basket/add/", data , + function(data){ + //alert_msg("Товар добавлен
    в корзину",product_id); + popup(0,'.black'); + start_basket(); + }); + } + + + var update = function(data,form,w){ + console.log(data); + $('.basket_items').html(data); + $('.basket_items .delete_button').click(function(){ + var id =$(this).data('id'); + $.get("/basket/items/", {deleteID : id},function(data){ + popup(w,form); + start_basket(w,form); + }); + return false; + }); + $(".item_num").bind('input',function(){ + sendformitems(w,form); + }); + $(".minus").click(function(){ + var a = $(this).parent().find(".item_num").attr("value"); + if (a == 1) { + /* минимум 1 элемент */ + } + else{ + a--; + $(this).parent().find('.item_num').val(a); + sendformitems(w,form); + } + }); + $(".plus").click(function(){ + var a = $(this).parent().find(".item_num").attr("value"); + if (a == 10) { + /* минимум 1 элемент */ + } + else{ + a++; + $(this).parent().find('.item_num').val(a); + sendformitems(w,form); + } + }); + }; + + var popup = function(w,form){ + $.get("/basket/items/", {} ,function(data){ + update(data,form,w); + }); + if(w==0) { + $(".black").removeClass("hidden"); + $(".black_close").click(function (event) { + event.preventDefault(); + $(this).parent().parent().addClass("hidden"); + }); + $(".cont_shop").click(function () { + $(".black").addClass("hidden"); + }); + } + } + + var sendformitems = function(w,form){ + //var data_form = $(form+' .basket_form2').serialize(); + $.post('/basket/items/', $.param($(form+' .basket_form2').serializeArray()), function(data) { + update(data,form,w); + start_basket(); + }); + //$.ajax({ + // type: 'POST', + // url: "/basket/items/", + // dataType: "json", + // data: data_form, + // done: function(data) { + // + // }, + //}); + } + + var start_basket = function(){ + $.get("/basket/info/", + function(data){ + $(basket_id).html(data); + }); + + } + + var alert_msg = function(msg,product_id){ + winW = document.body.offsetWidth; + winH = document.body.offsetHeight + $('.modal_box').remove(); + $('#data_box').remove(); + $('body').append(''); + $('body').append('
    '); + $('#data_box').append('
    '); + $('#data_box').css( "left", ((winW-400)/2)+'px' ); + + var scrollTop = document.documentElement.scrollTop + if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) { + scrollTop = document.body.scrollTop; + } + $('#data_box').css( "top", (scrollTop+150)+'px' ); + + app = '
    '; + app +='

    '+msg+'

    '; + app += '
     '; + app += ''; + app += '
    '; + $('#data_box .data_wrp').append(app); + + + $(".modal_box, #modal_close, #p_close").click(function() { + $('.modal_box').remove(); + $('#data_box').remove(); + }); + } + + find_products(); + start_basket(); + + + + $(".more").click(function(){ + if($(this).hasClass("hideico")){ + $(this).removeClass("hideico"); + $(this).parent().addClass("open"); + $(this).parent().removeClass("open"); + } + else{ + $(this).addClass("hideico"); + $(this).parent().addClass("open"); + popup(1,'.basket_hovered'); + } + }) + + + + } + +})(jQuery); \ No newline at end of file diff --git a/frontend/web/js/basket2.js b/frontend/web/js/basket2.js new file mode 100755 index 0000000..5a2bcc1 --- /dev/null +++ b/frontend/web/js/basket2.js @@ -0,0 +1,193 @@ +$(function(){ + $('body').on('click', '#basket_button', function(event){ + event.preventDefault(); + $(".black").removeClass("hidden"); + }); + $(".black_close").click(function () { + $(this).parent().parent().addClass("hidden"); + }); + $(".cont_shop").click(function () { + $(".black").addClass("hidden"); + }); +}); +$(document).ready(function(){ + + var result_block = $('.basket_result'); + var one_item_block = $('.busket_block'); + + function countItems(){ + var length = $('.busket_modal_01').find('.order_list_li').length; + if(length >= 1){ + $('.head_basket_count').html(length); + $('.all_count').html(length); + } else { + $('.head_basket_count').html(''); + $('.all_count').html(''); + } + } + + + + function changeAjaxPrice(id, num){ + $.post( "/orders/buy-items", {id: id, num:num}, function( data ) { + }); + } + + function countPrise(block){ + var totalBlock = block.parents('.order_list'); + var total_price = 0; + totalBlock.find('.price_val').each(function(){ + total_price += +$(this).html(); + }); + $('.all_price_span').html(total_price); + } + + + $('.item').on('click', '.basket_add_but', function(e){ + var id = $('#product_id').val(); + $.post( "/orders/buy-items", {id: id, num:1}, function( data ) { + $('.basket_result').each(function(){ + $(this).html(data); + countItems(); + }); + + }); + + }); + + $('.main_cont_wrap').on('click', '.cart_btn', function(e){ + var id = $(this).data('id'); + var num = one_item_block.find('.buy_one_item').val(); + $.post( "/orders/buy-items", {id: id, num:num}, function( data ) { + $('.basket_result').each(function(){ + $(this).html(data) + }); + }); + + }); + + result_block.on('click', '.delete_item_btn', function(){ + var block = $(this).parents('.order_list_li'); + + + var id = block.data('id'); + + $.post( "/orders/delete", {id: id}, function( data ) { + }); + var forCount = block.parents('ul'); + $('.order_list_li[data-id='+id+']').each(function(){ + var block = $(this); + block.remove(); + }); + countPrise(forCount); + countItems(); + + + + }); + + result_block.on('click', '.button_minus', function(){ + var block = $(this).parents('.order_list_li'); + var price_block = block.find('.price_val'); + var input = block.find('input'); + var number = input.val(); + var id = block.data('id'); + + if(number > 1){ + number--; + input.val(number); + var price = price_block.data('price'); + var new_price = number * +price; + price_block.html(new_price); + changeAjaxPrice(id, number); + synchronizationPriceData(id, number); + } + + countPrise(block); + }); + + + result_block.on('click', '.button_plus', function(){ + var block = $(this).parents('.order_list_li'); + var price_block = block.find('.price_val'); + var input = block.find('input'); + var number = input.val(); + var id = block.data('id'); + + number++; + input.val(number); + var price = price_block.data('price'); + var new_price = number * +price; + price_block.html(new_price); + + changeAjaxPrice(id, number); + synchronizationPriceData(id, number); + countPrise(block); + }); + + result_block.on('change', '.buy_one_item', function(){ + var block = $(this).parents('.order_list_li'); + var num = $(this).val(); + var price_block = block.find('.price_val'); + var price = price_block.data('price'); + var id = block.data('id'); + + var new_price = num * +price; + price_block.html(new_price); + changeAjaxPrice(id, num); + synchronizationPriceData(id, num); + countPrise(block); + }); + + function synchronizationPriceData(id, number){ + $('.order_list_li[data-id='+id+']').each(function(){ + var block = $(this); + block.find('input').val(number); + var price_block = block.find('.price_val'); + var price = price_block.data('price'); + var new_price = number * +price; + price_block.html(new_price); + }); + } + + + + one_item_block.on('click', '.button_minus', function(){ + var input = one_item_block.find('.buy_one_item'); + var number = input.val(); + if(number > 1){ + number--; + input.val(number); + } + }); + + + one_item_block.on('click', '.button_plus', function(){ + var input = one_item_block.find('.buy_one_item'); + var number = input.val(); + number++; + input.val(number); + }); + + /****************************compare and bookmarks********************************************/ + + function addItemToCompare(id){ + $.post( "/orders/compare", {id: id}, function( data ) { + }); + } + + $('#add_to_compare').click(function (event) { + event.preventDefault(); + var id = $('#one_item_block').data('id'); + addItemToCompare(id); + }); + + $('#add_to_bookmarks').click(function(event){ + event.preventDefault(); + var id = $('#one_item_block').data('id'); + $.post( "/orders/bookmarks", {id: id}, function( data ) { + }); + }); + + +}); \ No newline at end of file diff --git a/frontend/web/js/begunok.js b/frontend/web/js/begunok.js new file mode 100755 index 0000000..03b3cac --- /dev/null +++ b/frontend/web/js/begunok.js @@ -0,0 +1,78 @@ +jQuery(document).ready(function(){ + + +/* слайдер цен */ + +jQuery("#begunok").slider({ + min: 0, + max: $('#max').val(), + values: [0,$('#max').val()], + range: true, + stop: function(event, ui) { + jQuery("input#products-mincost").val(jQuery("#begunok").slider("values",0)); + jQuery("input#products-maxcost").val(jQuery("#begunok").slider("values",1)); + + }, + slide: function(event, ui){ + jQuery("input#products-mincost").val(jQuery("#begunok").slider("values",0)); + jQuery("input#products-maxcost").val(jQuery("#begunok").slider("values",1)); + } +}); + +var min_cost = function(){ + var value1=jQuery("input#products-mincost").val(); + var value2=jQuery("input#products-maxcost").val(); + + if(parseInt(value1) > parseInt(value2)){ + value1 = value2; + jQuery("input#products-mincost").val(value1); + } + jQuery("#begunok").slider("values",0,value1); +} + +jQuery("input#minCost").change(function(){ + + min_cost(); +}); +min_cost(); + +var max_cost = function(){ + var value1=jQuery("input#products-mincost").val(); + var value2=jQuery("input#products-maxcost").val(); + + if (value2 > $('#max').val()) { value2 = $('#max').val(); jQuery("input#products-maxcost").val($('#max').val())} + + if(parseInt(value1) > parseInt(value2)){ + value2 = value1; + jQuery("input#products-maxcost").val(value2); + } + jQuery("#begunok").slider("values",1,value2); +} + +jQuery("input#maxCost").change(function(){ + max_cost(); + +}); +max_cost(); + + +// фильтрация ввода в поля + jQuery('input').keypress(function(event){ + var key, keyChar; + if(!event) var event = window.event; + + if (event.keyCode) key = event.keyCode; + else if(event.which) key = event.which; + + if(key==null || key==0 || key==8 || key==13 || key==9 || key==46 || key==37 || key==39 ) return true; + keyChar=String.fromCharCode(key); + + if(!/\d/.test(keyChar)) return false; + + }); + + +}); + + + diff --git a/frontend/web/js/call.js b/frontend/web/js/call.js new file mode 100755 index 0000000..9dd472b --- /dev/null +++ b/frontend/web/js/call.js @@ -0,0 +1,48 @@ +(function($){ + + $.fn.call = function(callerSettings) { + + var login_id = this; + + $(login_id).bind('click',function(){ + winW = document.body.offsetWidth; + winH = document.body.offsetHeight + $('.modal_box').remove(); + $('#data_box').remove(); + $('body').append(''); + $('body').append('
    '); + $('#data_box').append('
    '); + $('#data_box').css( "left", ((winW-350)/2)+'px' ); + + var scrollTop = document.documentElement.scrollTop + if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { + scrollTop = document.body.scrollTop; + } + $('#data_box').css( {"top" : (scrollTop+200)+'px',"width":"350px"} ); + + $('#data_box .data_wrp').append(''); + app = '

    Обратный звонок

    '; + app += '
    '; + app += '
    '; + app += ''; + app += ''; + app += ''; + app += ''; + app += ''; + app += ''; + app += '
    '; + app += '
    '; + app += '
    '; + + $('#data_box .data_wrp').append(app); + + $(".modal_box, #modal_close").click(function() { + $('.modal_box').remove(); + $('#data_box').remove(); + }); + return false; + }) + + } + +})(jQuery); \ No newline at end of file diff --git a/frontend/web/js/fix_height.js b/frontend/web/js/fix_height.js new file mode 100755 index 0000000..8bfaf18 --- /dev/null +++ b/frontend/web/js/fix_height.js @@ -0,0 +1,45 @@ +$(document).ready(function () { + // $( ".wrapper_all" ).append( $('.text_seo_products') ); + $('.read_more_seo').click(function (e) { + e.preventDefault() + $('.text_seo').removeClass('hidden_seo') + $(this).remove() + }) +}) + +window.onload = function() { + autoHeight(); + function autoHeight() { + + footerBottom(); + resizeFooterBottom(); + + function footerBottom(){ + var heightHeader1 = $('nav.top').outerHeight() + var heightHeader2 = $('.header').outerHeight() + var heightHeader3 = $('.menu').outerHeight() + var heightHeader = (heightHeader1+heightHeader2+heightHeader3) + var heightFooter1 = $('.bottom').outerHeight() + var heightFooter2 = $('.fotter').outerHeight() + var heightFooter = (heightFooter1+heightFooter2) + var windowHeight = $(window).height() + $('.wrapper_all').css({minHeight:(windowHeight-heightHeader-heightFooter)-60}) + if(($('.wrapper_all .site-error').length)>=1) { + $('.wrapper_all').css({minHeight:(windowHeight-heightHeader-heightFooter)-70}) + } + $('#bg').css({minHeight:windowHeight}) + } + + function resizeFooterBottom(){ + $(window).resize(function(){ + footerBottom(); + }) + } + } +} + + + + + + diff --git a/frontend/web/js/ion.rangeSlider.js b/frontend/web/js/ion.rangeSlider.js new file mode 100755 index 0000000..ea0b5ea --- /dev/null +++ b/frontend/web/js/ion.rangeSlider.js @@ -0,0 +1,2317 @@ +// Ion.RangeSlider +// version 2.1.4 Build: 355 +// © Denis Ineshin, 2016 +// https://github.com/IonDen +// +// Project page: http://ionden.com/a/plugins/ion.rangeSlider/en.html +// GitHub page: https://github.com/IonDen/ion.rangeSlider +// +// Released under MIT licence: +// http://ionden.com/a/plugins/licence-en.html +// ===================================================================================================================== + +(function (factory) { + if (typeof define === 'function' && define.amd) { + define(['jquery'], function ($) { + factory($, document, window, navigator); + }); + } else { + factory(jQuery, document, window, navigator); + } +} (function ($, document, window, navigator, undefined) { + "use strict"; + + // ================================================================================================================= + // Service + + var plugin_count = 0; + + // IE8 fix + var is_old_ie = (function () { + var n = navigator.userAgent, + r = /msie\s\d+/i, + v; + if (n.search(r) > 0) { + v = r.exec(n).toString(); + v = v.split(" ")[1]; + if (v < 9) { + $("html").addClass("lt-ie9"); + return true; + } + } + return false; + } ()); + if (!Function.prototype.bind) { + Function.prototype.bind = function bind(that) { + + var target = this; + var slice = [].slice; + + if (typeof target != "function") { + throw new TypeError(); + } + + var args = slice.call(arguments, 1), + bound = function () { + + if (this instanceof bound) { + + var F = function(){}; + F.prototype = target.prototype; + var self = new F(); + + var result = target.apply( + self, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return self; + + } else { + + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + + } + + }; + + return bound; + }; + } + if (!Array.prototype.indexOf) { + Array.prototype.indexOf = function(searchElement, fromIndex) { + var k; + if (this == null) { + throw new TypeError('"this" is null or not defined'); + } + var O = Object(this); + var len = O.length >>> 0; + if (len === 0) { + return -1; + } + var n = +fromIndex || 0; + if (Math.abs(n) === Infinity) { + n = 0; + } + if (n >= len) { + return -1; + } + k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); + while (k < len) { + if (k in O && O[k] === searchElement) { + return k; + } + k++; + } + return -1; + }; + } + + + + // ================================================================================================================= + // Template + + var base_html = + '' + + '' + + '01' + + '000' + + '' + + '' + + ''; + + var single_html = + '' + + '' + + ''; + + var double_html = + '' + + '' + + '' + + ''; + + var disable_html = + ''; + + + + // ================================================================================================================= + // Core + + /** + * Main plugin constructor + * + * @param input {Object} link to base input element + * @param options {Object} slider config + * @param plugin_count {Number} + * @constructor + */ + var IonRangeSlider = function (input, options, plugin_count) { + this.VERSION = "2.1.4"; + this.input = input; + this.plugin_count = plugin_count; + this.current_plugin = 0; + this.calc_count = 0; + this.update_tm = 0; + this.old_from = 0; + this.old_to = 0; + this.old_min_interval = null; + this.raf_id = null; + this.dragging = false; + this.force_redraw = false; + this.no_diapason = false; + this.is_key = false; + this.is_update = false; + this.is_start = true; + this.is_finish = false; + this.is_active = false; + this.is_resize = false; + this.is_click = false; + + // cache for links to all DOM elements + this.$cache = { + win: $(window), + body: $(document.body), + input: $(input), + cont: null, + rs: null, + min: null, + max: null, + from: null, + to: null, + single: null, + bar: null, + line: null, + s_single: null, + s_from: null, + s_to: null, + shad_single: null, + shad_from: null, + shad_to: null, + edge: null, + grid: null, + grid_labels: [] + }; + + // storage for measure variables + this.coords = { + // left + x_gap: 0, + x_pointer: 0, + + // width + w_rs: 0, + w_rs_old: 0, + w_handle: 0, + + // percents + p_gap: 0, + p_gap_left: 0, + p_gap_right: 0, + p_step: 0, + p_pointer: 0, + p_handle: 0, + p_single_fake: 0, + p_single_real: 0, + p_from_fake: 0, + p_from_real: 0, + p_to_fake: 0, + p_to_real: 0, + p_bar_x: 0, + p_bar_w: 0, + + // grid + grid_gap: 0, + big_num: 0, + big: [], + big_w: [], + big_p: [], + big_x: [] + }; + + // storage for labels measure variables + this.labels = { + // width + w_min: 0, + w_max: 0, + w_from: 0, + w_to: 0, + w_single: 0, + + // percents + p_min: 0, + p_max: 0, + p_from_fake: 0, + p_from_left: 0, + p_to_fake: 0, + p_to_left: 0, + p_single_fake: 0, + p_single_left: 0 + }; + + + + /** + * get and validate config + */ + var $inp = this.$cache.input, + val = $inp.prop("value"), + config, config_from_data, prop; + + // default config + config = { + type: "single", + + min: 10, + max: 100, + from: null, + to: null, + step: 1, + + min_interval: 0, + max_interval: 0, + drag_interval: false, + + values: [], + p_values: [], + + from_fixed: false, + from_min: null, + from_max: null, + from_shadow: false, + + to_fixed: false, + to_min: null, + to_max: null, + to_shadow: false, + + prettify_enabled: true, + prettify_separator: " ", + prettify: null, + + force_edges: false, + + keyboard: false, + keyboard_step: 5, + + grid: false, + grid_margin: true, + grid_num: 4, + grid_snap: false, + + hide_min_max: false, + hide_from_to: false, + + prefix: "", + postfix: "", + max_postfix: "", + decorate_both: true, + values_separator: " — ", + + input_values_separator: ";", + + disable: false, + + onStart: null, + onChange: null, + onFinish: null, + onUpdate: null + }; + + + + // config from data-attributes extends js config + config_from_data = { + type: $inp.data("type"), + + min: $inp.data("min"), + max: $inp.data("max"), + from: $inp.data("from"), + to: $inp.data("to"), + step: $inp.data("step"), + + min_interval: $inp.data("minInterval"), + max_interval: $inp.data("maxInterval"), + drag_interval: $inp.data("dragInterval"), + + values: $inp.data("values"), + + from_fixed: $inp.data("fromFixed"), + from_min: $inp.data("fromMin"), + from_max: $inp.data("fromMax"), + from_shadow: $inp.data("fromShadow"), + + to_fixed: $inp.data("toFixed"), + to_min: $inp.data("toMin"), + to_max: $inp.data("toMax"), + to_shadow: $inp.data("toShadow"), + + prettify_enabled: $inp.data("prettifyEnabled"), + prettify_separator: $inp.data("prettifySeparator"), + + force_edges: $inp.data("forceEdges"), + + keyboard: $inp.data("keyboard"), + keyboard_step: $inp.data("keyboardStep"), + + grid: $inp.data("grid"), + grid_margin: $inp.data("gridMargin"), + grid_num: $inp.data("gridNum"), + grid_snap: $inp.data("gridSnap"), + + hide_min_max: $inp.data("hideMinMax"), + hide_from_to: $inp.data("hideFromTo"), + + prefix: $inp.data("prefix"), + postfix: $inp.data("postfix"), + max_postfix: $inp.data("maxPostfix"), + decorate_both: $inp.data("decorateBoth"), + values_separator: $inp.data("valuesSeparator"), + + input_values_separator: $inp.data("inputValuesSeparator"), + + disable: $inp.data("disable") + }; + config_from_data.values = config_from_data.values && config_from_data.values.split(","); + + for (prop in config_from_data) { + if (config_from_data.hasOwnProperty(prop)) { + if (!config_from_data[prop] && config_from_data[prop] !== 0) { + delete config_from_data[prop]; + } + } + } + + + + // input value extends default config + if (val) { + val = val.split(config_from_data.input_values_separator || options.input_values_separator || ";"); + + if (val[0] && val[0] == +val[0]) { + val[0] = +val[0]; + } + if (val[1] && val[1] == +val[1]) { + val[1] = +val[1]; + } + + if (options && options.values && options.values.length) { + config.from = val[0] && options.values.indexOf(val[0]); + config.to = val[1] && options.values.indexOf(val[1]); + } else { + config.from = val[0] && +val[0]; + config.to = val[1] && +val[1]; + } + } + + + + // js config extends default config + $.extend(config, options); + + + // data config extends config + $.extend(config, config_from_data); + this.options = config; + + + + // validate config, to be sure that all data types are correct + this.validate(); + + + + // default result object, returned to callbacks + this.result = { + input: this.$cache.input, + slider: null, + + min: this.options.min, + max: this.options.max, + + from: this.options.from, + from_percent: 0, + from_value: null, + + to: this.options.to, + to_percent: 0, + to_value: null + }; + + + + this.init(); + }; + + IonRangeSlider.prototype = { + + /** + * Starts or updates the plugin instance + * + * @param is_update {boolean} + */ + init: function (is_update) { + this.no_diapason = false; + this.coords.p_step = this.convertToPercent(this.options.step, true); + + this.target = "base"; + + this.toggleInput(); + this.append(); + this.setMinMax(); + + if (is_update) { + this.force_redraw = true; + this.calc(true); + + // callbacks called + this.callOnUpdate(); + } else { + this.force_redraw = true; + this.calc(true); + + // callbacks called + this.callOnStart(); + } + + this.updateScene(); + }, + + /** + * Appends slider template to a DOM + */ + append: function () { + var container_html = ''; + this.$cache.input.before(container_html); + this.$cache.input.prop("readonly", true); + this.$cache.cont = this.$cache.input.prev(); + this.result.slider = this.$cache.cont; + + this.$cache.cont.html(base_html); + this.$cache.rs = this.$cache.cont.find(".irs"); + this.$cache.min = this.$cache.cont.find(".irs-min"); + this.$cache.max = this.$cache.cont.find(".irs-max"); + this.$cache.from = this.$cache.cont.find(".irs-from"); + this.$cache.to = this.$cache.cont.find(".irs-to"); + this.$cache.single = this.$cache.cont.find(".irs-single"); + this.$cache.bar = this.$cache.cont.find(".irs-bar"); + this.$cache.line = this.$cache.cont.find(".irs-line"); + this.$cache.grid = this.$cache.cont.find(".irs-grid"); + + if (this.options.type === "single") { + this.$cache.cont.append(single_html); + this.$cache.edge = this.$cache.cont.find(".irs-bar-edge"); + this.$cache.s_single = this.$cache.cont.find(".single"); + this.$cache.from[0].style.visibility = "hidden"; + this.$cache.to[0].style.visibility = "hidden"; + this.$cache.shad_single = this.$cache.cont.find(".shadow-single"); + } else { + this.$cache.cont.append(double_html); + this.$cache.s_from = this.$cache.cont.find(".from"); + this.$cache.s_to = this.$cache.cont.find(".to"); + this.$cache.shad_from = this.$cache.cont.find(".shadow-from"); + this.$cache.shad_to = this.$cache.cont.find(".shadow-to"); + + this.setTopHandler(); + } + + if (this.options.hide_from_to) { + this.$cache.from[0].style.display = "none"; + this.$cache.to[0].style.display = "none"; + this.$cache.single[0].style.display = "none"; + } + + this.appendGrid(); + + if (this.options.disable) { + this.appendDisableMask(); + this.$cache.input[0].disabled = true; + } else { + this.$cache.cont.removeClass("irs-disabled"); + this.$cache.input[0].disabled = false; + this.bindEvents(); + } + + if (this.options.drag_interval) { + this.$cache.bar[0].style.cursor = "ew-resize"; + } + }, + + /** + * Determine which handler has a priority + * works only for double slider type + */ + setTopHandler: function () { + var min = this.options.min, + max = this.options.max, + from = this.options.from, + to = this.options.to; + + if (from > min && to === max) { + this.$cache.s_from.addClass("type_last"); + } else if (to < max) { + this.$cache.s_to.addClass("type_last"); + } + }, + + /** + * Determine which handles was clicked last + * and which handler should have hover effect + * + * @param target {String} + */ + changeLevel: function (target) { + switch (target) { + case "single": + this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_single_fake); + break; + case "from": + this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_from_fake); + this.$cache.s_from.addClass("state_hover"); + this.$cache.s_from.addClass("type_last"); + this.$cache.s_to.removeClass("type_last"); + break; + case "to": + this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_to_fake); + this.$cache.s_to.addClass("state_hover"); + this.$cache.s_to.addClass("type_last"); + this.$cache.s_from.removeClass("type_last"); + break; + case "both": + this.coords.p_gap_left = this.toFixed(this.coords.p_pointer - this.coords.p_from_fake); + this.coords.p_gap_right = this.toFixed(this.coords.p_to_fake - this.coords.p_pointer); + this.$cache.s_to.removeClass("type_last"); + this.$cache.s_from.removeClass("type_last"); + break; + } + }, + + /** + * Then slider is disabled + * appends extra layer with opacity + */ + appendDisableMask: function () { + this.$cache.cont.append(disable_html); + this.$cache.cont.addClass("irs-disabled"); + }, + + /** + * Remove slider instance + * and ubind all events + */ + remove: function () { + this.$cache.cont.remove(); + this.$cache.cont = null; + + this.$cache.line.off("keydown.irs_" + this.plugin_count); + + this.$cache.body.off("touchmove.irs_" + this.plugin_count); + this.$cache.body.off("mousemove.irs_" + this.plugin_count); + + this.$cache.win.off("touchend.irs_" + this.plugin_count); + this.$cache.win.off("mouseup.irs_" + this.plugin_count); + + if (is_old_ie) { + this.$cache.body.off("mouseup.irs_" + this.plugin_count); + this.$cache.body.off("mouseleave.irs_" + this.plugin_count); + } + + this.$cache.grid_labels = []; + this.coords.big = []; + this.coords.big_w = []; + this.coords.big_p = []; + this.coords.big_x = []; + + cancelAnimationFrame(this.raf_id); + }, + + /** + * bind all slider events + */ + bindEvents: function () { + if (this.no_diapason) { + return; + } + + this.$cache.body.on("touchmove.irs_" + this.plugin_count, this.pointerMove.bind(this)); + this.$cache.body.on("mousemove.irs_" + this.plugin_count, this.pointerMove.bind(this)); + + this.$cache.win.on("touchend.irs_" + this.plugin_count, this.pointerUp.bind(this)); + this.$cache.win.on("mouseup.irs_" + this.plugin_count, this.pointerUp.bind(this)); + + this.$cache.line.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); + this.$cache.line.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); + + if (this.options.drag_interval && this.options.type === "double") { + this.$cache.bar.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "both")); + this.$cache.bar.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "both")); + } else { + this.$cache.bar.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); + this.$cache.bar.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); + } + + if (this.options.type === "single") { + this.$cache.single.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "single")); + this.$cache.s_single.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "single")); + this.$cache.shad_single.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); + + this.$cache.single.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "single")); + this.$cache.s_single.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "single")); + this.$cache.edge.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); + this.$cache.shad_single.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); + } else { + this.$cache.single.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, null)); + this.$cache.single.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, null)); + + this.$cache.from.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "from")); + this.$cache.s_from.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "from")); + this.$cache.to.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "to")); + this.$cache.s_to.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "to")); + this.$cache.shad_from.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); + this.$cache.shad_to.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); + + this.$cache.from.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "from")); + this.$cache.s_from.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "from")); + this.$cache.to.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "to")); + this.$cache.s_to.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "to")); + this.$cache.shad_from.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); + this.$cache.shad_to.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); + } + + if (this.options.keyboard) { + this.$cache.line.on("keydown.irs_" + this.plugin_count, this.key.bind(this, "keyboard")); + } + + if (is_old_ie) { + this.$cache.body.on("mouseup.irs_" + this.plugin_count, this.pointerUp.bind(this)); + this.$cache.body.on("mouseleave.irs_" + this.plugin_count, this.pointerUp.bind(this)); + } + }, + + /** + * Mousemove or touchmove + * only for handlers + * + * @param e {Object} event object + */ + pointerMove: function (e) { + if (!this.dragging) { + return; + } + + var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX; + this.coords.x_pointer = x - this.coords.x_gap; + + this.calc(); + }, + + /** + * Mouseup or touchend + * only for handlers + * + * @param e {Object} event object + */ + pointerUp: function (e) { + if (this.current_plugin !== this.plugin_count) { + return; + } + + if (this.is_active) { + this.is_active = false; + } else { + return; + } + + this.$cache.cont.find(".state_hover").removeClass("state_hover"); + + this.force_redraw = true; + + if (is_old_ie) { + $("*").prop("unselectable", false); + } + + this.updateScene(); + this.restoreOriginalMinInterval(); + + // callbacks call + if ($.contains(this.$cache.cont[0], e.target) || this.dragging) { + this.is_finish = true; + this.callOnFinish(); + } + + this.dragging = false; + }, + + /** + * Mousedown or touchstart + * only for handlers + * + * @param target {String|null} + * @param e {Object} event object + */ + pointerDown: function (target, e) { + e.preventDefault(); + var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX; + if (e.button === 2) { + return; + } + + if (target === "both") { + this.setTempMinInterval(); + } + + if (!target) { + target = this.target; + } + + this.current_plugin = this.plugin_count; + this.target = target; + + this.is_active = true; + this.dragging = true; + + this.coords.x_gap = this.$cache.rs.offset().left; + this.coords.x_pointer = x - this.coords.x_gap; + + this.calcPointerPercent(); + this.changeLevel(target); + + if (is_old_ie) { + $("*").prop("unselectable", true); + } + + this.$cache.line.trigger("focus"); + + this.updateScene(); + }, + + /** + * Mousedown or touchstart + * for other slider elements, like diapason line + * + * @param target {String} + * @param e {Object} event object + */ + pointerClick: function (target, e) { + e.preventDefault(); + var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX; + if (e.button === 2) { + return; + } + + this.current_plugin = this.plugin_count; + this.target = target; + + this.is_click = true; + this.coords.x_gap = this.$cache.rs.offset().left; + this.coords.x_pointer = +(x - this.coords.x_gap).toFixed(); + + this.force_redraw = true; + this.calc(); + + this.$cache.line.trigger("focus"); + }, + + /** + * Keyborard controls for focused slider + * + * @param target {String} + * @param e {Object} event object + * @returns {boolean|undefined} + */ + key: function (target, e) { + if (this.current_plugin !== this.plugin_count || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) { + return; + } + + switch (e.which) { + case 83: // W + case 65: // A + case 40: // DOWN + case 37: // LEFT + e.preventDefault(); + this.moveByKey(false); + break; + + case 87: // S + case 68: // D + case 38: // UP + case 39: // RIGHT + e.preventDefault(); + this.moveByKey(true); + break; + } + + return true; + }, + + /** + * Move by key. Beta + * @todo refactor than have plenty of time + * + * @param right {boolean} direction to move + */ + moveByKey: function (right) { + var p = this.coords.p_pointer; + + if (right) { + p += this.options.keyboard_step; + } else { + p -= this.options.keyboard_step; + } + + this.coords.x_pointer = this.toFixed(this.coords.w_rs / 100 * p); + this.is_key = true; + this.calc(); + }, + + /** + * Set visibility and content + * of Min and Max labels + */ + setMinMax: function () { + if (!this.options) { + return; + } + + if (this.options.hide_min_max) { + this.$cache.min[0].style.display = "none"; + this.$cache.max[0].style.display = "none"; + return; + } + + if (this.options.values.length) { + this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])); + this.$cache.max.html(this.decorate(this.options.p_values[this.options.max])); + } else { + this.$cache.min.html(this.decorate(this._prettify(this.options.min), this.options.min)); + this.$cache.max.html(this.decorate(this._prettify(this.options.max), this.options.max)); + } + + this.labels.w_min = this.$cache.min.outerWidth(false); + this.labels.w_max = this.$cache.max.outerWidth(false); + }, + + /** + * Then dragging interval, prevent interval collapsing + * using min_interval option + */ + setTempMinInterval: function () { + var interval = this.result.to - this.result.from; + + if (this.old_min_interval === null) { + this.old_min_interval = this.options.min_interval; + } + + this.options.min_interval = interval; + }, + + /** + * Restore min_interval option to original + */ + restoreOriginalMinInterval: function () { + if (this.old_min_interval !== null) { + this.options.min_interval = this.old_min_interval; + this.old_min_interval = null; + } + }, + + + + // ============================================================================================================= + // Calculations + + /** + * All calculations and measures start here + * + * @param update {boolean=} + */ + calc: function (update) { + if (!this.options) { + return; + } + + this.calc_count++; + + if (this.calc_count === 10 || update) { + this.calc_count = 0; + this.coords.w_rs = this.$cache.rs.outerWidth(false); + + this.calcHandlePercent(); + } + + if (!this.coords.w_rs) { + return; + } + + this.calcPointerPercent(); + var handle_x = this.getHandleX(); + + if (this.target === "click") { + this.coords.p_gap = this.coords.p_handle / 2; + handle_x = this.getHandleX(); + + if (this.options.drag_interval) { + this.target = "both_one"; + } else { + this.target = this.chooseHandle(handle_x); + } + } + + switch (this.target) { + case "base": + var w = (this.options.max - this.options.min) / 100, + f = (this.result.from - this.options.min) / w, + t = (this.result.to - this.options.min) / w; + + this.coords.p_single_real = this.toFixed(f); + this.coords.p_from_real = this.toFixed(f); + this.coords.p_to_real = this.toFixed(t); + + this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max); + this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max); + this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max); + + this.coords.p_single_fake = this.convertToFakePercent(this.coords.p_single_real); + this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real); + this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real); + + this.target = null; + + break; + + case "single": + if (this.options.from_fixed) { + break; + } + + this.coords.p_single_real = this.convertToRealPercent(handle_x); + this.coords.p_single_real = this.calcWithStep(this.coords.p_single_real); + this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max); + + this.coords.p_single_fake = this.convertToFakePercent(this.coords.p_single_real); + + break; + + case "from": + if (this.options.from_fixed) { + break; + } + + this.coords.p_from_real = this.convertToRealPercent(handle_x); + this.coords.p_from_real = this.calcWithStep(this.coords.p_from_real); + if (this.coords.p_from_real > this.coords.p_to_real) { + this.coords.p_from_real = this.coords.p_to_real; + } + this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max); + this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, "from"); + this.coords.p_from_real = this.checkMaxInterval(this.coords.p_from_real, this.coords.p_to_real, "from"); + + this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real); + + break; + + case "to": + if (this.options.to_fixed) { + break; + } + + this.coords.p_to_real = this.convertToRealPercent(handle_x); + this.coords.p_to_real = this.calcWithStep(this.coords.p_to_real); + if (this.coords.p_to_real < this.coords.p_from_real) { + this.coords.p_to_real = this.coords.p_from_real; + } + this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max); + this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, "to"); + this.coords.p_to_real = this.checkMaxInterval(this.coords.p_to_real, this.coords.p_from_real, "to"); + + this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real); + + break; + + case "both": + if (this.options.from_fixed || this.options.to_fixed) { + break; + } + + handle_x = this.toFixed(handle_x + (this.coords.p_handle * 0.1)); + + this.coords.p_from_real = this.convertToRealPercent(handle_x) - this.coords.p_gap_left; + this.coords.p_from_real = this.calcWithStep(this.coords.p_from_real); + this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max); + this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, "from"); + this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real); + + this.coords.p_to_real = this.convertToRealPercent(handle_x) + this.coords.p_gap_right; + this.coords.p_to_real = this.calcWithStep(this.coords.p_to_real); + this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max); + this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, "to"); + this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real); + + break; + + case "both_one": + if (this.options.from_fixed || this.options.to_fixed) { + break; + } + + var real_x = this.convertToRealPercent(handle_x), + from = this.result.from_percent, + to = this.result.to_percent, + full = to - from, + half = full / 2, + new_from = real_x - half, + new_to = real_x + half; + + if (new_from < 0) { + new_from = 0; + new_to = new_from + full; + } + + if (new_to > 100) { + new_to = 100; + new_from = new_to - full; + } + + this.coords.p_from_real = this.calcWithStep(new_from); + this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max); + this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real); + + this.coords.p_to_real = this.calcWithStep(new_to); + this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max); + this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real); + + break; + } + + if (this.options.type === "single") { + this.coords.p_bar_x = (this.coords.p_handle / 2); + this.coords.p_bar_w = this.coords.p_single_fake; + + this.result.from_percent = this.coords.p_single_real; + this.result.from = this.convertToValue(this.coords.p_single_real); + + if (this.options.values.length) { + this.result.from_value = this.options.values[this.result.from]; + } + } else { + this.coords.p_bar_x = this.toFixed(this.coords.p_from_fake + (this.coords.p_handle / 2)); + this.coords.p_bar_w = this.toFixed(this.coords.p_to_fake - this.coords.p_from_fake); + + this.result.from_percent = this.coords.p_from_real; + this.result.from = this.convertToValue(this.coords.p_from_real); + this.result.to_percent = this.coords.p_to_real; + this.result.to = this.convertToValue(this.coords.p_to_real); + + if (this.options.values.length) { + this.result.from_value = this.options.values[this.result.from]; + this.result.to_value = this.options.values[this.result.to]; + } + } + + this.calcMinMax(); + this.calcLabels(); + }, + + + /** + * calculates pointer X in percent + */ + calcPointerPercent: function () { + if (!this.coords.w_rs) { + this.coords.p_pointer = 0; + return; + } + + if (this.coords.x_pointer < 0 || isNaN(this.coords.x_pointer) ) { + this.coords.x_pointer = 0; + } else if (this.coords.x_pointer > this.coords.w_rs) { + this.coords.x_pointer = this.coords.w_rs; + } + + this.coords.p_pointer = this.toFixed(this.coords.x_pointer / this.coords.w_rs * 100); + }, + + convertToRealPercent: function (fake) { + var full = 100 - this.coords.p_handle; + return fake / full * 100; + }, + + convertToFakePercent: function (real) { + var full = 100 - this.coords.p_handle; + return real / 100 * full; + }, + + getHandleX: function () { + var max = 100 - this.coords.p_handle, + x = this.toFixed(this.coords.p_pointer - this.coords.p_gap); + + if (x < 0) { + x = 0; + } else if (x > max) { + x = max; + } + + return x; + }, + + calcHandlePercent: function () { + if (this.options.type === "single") { + this.coords.w_handle = this.$cache.s_single.outerWidth(false); + } else { + this.coords.w_handle = this.$cache.s_from.outerWidth(false); + } + + this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100); + }, + + /** + * Find closest handle to pointer click + * + * @param real_x {Number} + * @returns {String} + */ + chooseHandle: function (real_x) { + if (this.options.type === "single") { + return "single"; + } else { + var m_point = this.coords.p_from_real + ((this.coords.p_to_real - this.coords.p_from_real) / 2); + if (real_x >= m_point) { + return this.options.to_fixed ? "from" : "to"; + } else { + return this.options.from_fixed ? "to" : "from"; + } + } + }, + + /** + * Measure Min and Max labels width in percent + */ + calcMinMax: function () { + if (!this.coords.w_rs) { + return; + } + + this.labels.p_min = this.labels.w_min / this.coords.w_rs * 100; + this.labels.p_max = this.labels.w_max / this.coords.w_rs * 100; + }, + + /** + * Measure labels width and X in percent + */ + calcLabels: function () { + if (!this.coords.w_rs || this.options.hide_from_to) { + return; + } + + if (this.options.type === "single") { + + this.labels.w_single = this.$cache.single.outerWidth(false); + this.labels.p_single_fake = this.labels.w_single / this.coords.w_rs * 100; + this.labels.p_single_left = this.coords.p_single_fake + (this.coords.p_handle / 2) - (this.labels.p_single_fake / 2); + this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single_fake); + + } else { + + this.labels.w_from = this.$cache.from.outerWidth(false); + this.labels.p_from_fake = this.labels.w_from / this.coords.w_rs * 100; + this.labels.p_from_left = this.coords.p_from_fake + (this.coords.p_handle / 2) - (this.labels.p_from_fake / 2); + this.labels.p_from_left = this.toFixed(this.labels.p_from_left); + this.labels.p_from_left = this.checkEdges(this.labels.p_from_left, this.labels.p_from_fake); + + this.labels.w_to = this.$cache.to.outerWidth(false); + this.labels.p_to_fake = this.labels.w_to / this.coords.w_rs * 100; + this.labels.p_to_left = this.coords.p_to_fake + (this.coords.p_handle / 2) - (this.labels.p_to_fake / 2); + this.labels.p_to_left = this.toFixed(this.labels.p_to_left); + this.labels.p_to_left = this.checkEdges(this.labels.p_to_left, this.labels.p_to_fake); + + this.labels.w_single = this.$cache.single.outerWidth(false); + this.labels.p_single_fake = this.labels.w_single / this.coords.w_rs * 100; + this.labels.p_single_left = ((this.labels.p_from_left + this.labels.p_to_left + this.labels.p_to_fake) / 2) - (this.labels.p_single_fake / 2); + this.labels.p_single_left = this.toFixed(this.labels.p_single_left); + this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single_fake); + + } + }, + + + + // ============================================================================================================= + // Drawings + + /** + * Main function called in request animation frame + * to update everything + */ + updateScene: function () { + if (this.raf_id) { + cancelAnimationFrame(this.raf_id); + this.raf_id = null; + } + + clearTimeout(this.update_tm); + this.update_tm = null; + + if (!this.options) { + return; + } + + this.drawHandles(); + + if (this.is_active) { + this.raf_id = requestAnimationFrame(this.updateScene.bind(this)); + } else { + this.update_tm = setTimeout(this.updateScene.bind(this), 300); + } + }, + + /** + * Draw handles + */ + drawHandles: function () { + this.coords.w_rs = this.$cache.rs.outerWidth(false); + + if (!this.coords.w_rs) { + return; + } + + if (this.coords.w_rs !== this.coords.w_rs_old) { + this.target = "base"; + this.is_resize = true; + } + + if (this.coords.w_rs !== this.coords.w_rs_old || this.force_redraw) { + this.setMinMax(); + this.calc(true); + this.drawLabels(); + if (this.options.grid) { + this.calcGridMargin(); + this.calcGridLabels(); + } + this.force_redraw = true; + this.coords.w_rs_old = this.coords.w_rs; + this.drawShadow(); + } + + if (!this.coords.w_rs) { + return; + } + + if (!this.dragging && !this.force_redraw && !this.is_key) { + return; + } + + if (this.old_from !== this.result.from || this.old_to !== this.result.to || this.force_redraw || this.is_key) { + + this.drawLabels(); + + this.$cache.bar[0].style.left = this.coords.p_bar_x + "%"; + this.$cache.bar[0].style.width = this.coords.p_bar_w + "%"; + + if (this.options.type === "single") { + this.$cache.s_single[0].style.left = this.coords.p_single_fake + "%"; + + this.$cache.single[0].style.left = this.labels.p_single_left + "%"; + + if (this.options.values.length) { + this.$cache.input.prop("value", this.result.from_value); + } else { + this.$cache.input.prop("value", this.result.from); + } + this.$cache.input.data("from", this.result.from); + } else { + this.$cache.s_from[0].style.left = this.coords.p_from_fake + "%"; + this.$cache.s_to[0].style.left = this.coords.p_to_fake + "%"; + + if (this.old_from !== this.result.from || this.force_redraw) { + this.$cache.from[0].style.left = this.labels.p_from_left + "%"; + } + if (this.old_to !== this.result.to || this.force_redraw) { + this.$cache.to[0].style.left = this.labels.p_to_left + "%"; + } + + this.$cache.single[0].style.left = this.labels.p_single_left + "%"; + + if (this.options.values.length) { + this.$cache.input.prop("value", this.result.from_value + this.options.input_values_separator + this.result.to_value); + } else { + this.$cache.input.prop("value", this.result.from + this.options.input_values_separator + this.result.to); + } + this.$cache.input.data("from", this.result.from); + this.$cache.input.data("to", this.result.to); + } + + if ((this.old_from !== this.result.from || this.old_to !== this.result.to) && !this.is_start) { + this.$cache.input.trigger("change"); + } + + this.old_from = this.result.from; + this.old_to = this.result.to; + + // callbacks call + if (!this.is_resize && !this.is_update && !this.is_start && !this.is_finish) { + this.callOnChange(); + } + if (this.is_key || this.is_click) { + this.is_key = false; + this.is_click = false; + this.callOnFinish(); + } + + this.is_update = false; + this.is_resize = false; + this.is_finish = false; + } + + this.is_start = false; + this.is_key = false; + this.is_click = false; + this.force_redraw = false; + }, + + /** + * Draw labels + * measure labels collisions + * collapse close labels + */ + drawLabels: function () { + if (!this.options) { + return; + } + + var values_num = this.options.values.length, + p_values = this.options.p_values, + text_single, + text_from, + text_to; + + if (this.options.hide_from_to) { + return; + } + + if (this.options.type === "single") { + + if (values_num) { + text_single = this.decorate(p_values[this.result.from]); + this.$cache.single.html(text_single); + } else { + text_single = this.decorate(this._prettify(this.result.from), this.result.from); + this.$cache.single.html(text_single); + } + + this.calcLabels(); + + if (this.labels.p_single_left < this.labels.p_min + 1) { + this.$cache.min[0].style.visibility = "hidden"; + } else { + this.$cache.min[0].style.visibility = "visible"; + } + + if (this.labels.p_single_left + this.labels.p_single_fake > 100 - this.labels.p_max - 1) { + this.$cache.max[0].style.visibility = "hidden"; + } else { + this.$cache.max[0].style.visibility = "visible"; + } + + } else { + + if (values_num) { + + if (this.options.decorate_both) { + text_single = this.decorate(p_values[this.result.from]); + text_single += this.options.values_separator; + text_single += this.decorate(p_values[this.result.to]); + } else { + text_single = this.decorate(p_values[this.result.from] + this.options.values_separator + p_values[this.result.to]); + } + text_from = this.decorate(p_values[this.result.from]); + text_to = this.decorate(p_values[this.result.to]); + + this.$cache.single.html(text_single); + this.$cache.from.html(text_from); + this.$cache.to.html(text_to); + + } else { + + if (this.options.decorate_both) { + text_single = this.decorate(this._prettify(this.result.from), this.result.from); + text_single += this.options.values_separator; + text_single += this.decorate(this._prettify(this.result.to), this.result.to); + } else { + text_single = this.decorate(this._prettify(this.result.from) + this.options.values_separator + this._prettify(this.result.to), this.result.to); + } + text_from = this.decorate(this._prettify(this.result.from), this.result.from); + text_to = this.decorate(this._prettify(this.result.to), this.result.to); + + this.$cache.single.html(text_single); + this.$cache.from.html(text_from); + this.$cache.to.html(text_to); + + } + + this.calcLabels(); + + var min = Math.min(this.labels.p_single_left, this.labels.p_from_left), + single_left = this.labels.p_single_left + this.labels.p_single_fake, + to_left = this.labels.p_to_left + this.labels.p_to_fake, + max = Math.max(single_left, to_left); + + if (this.labels.p_from_left + this.labels.p_from_fake >= this.labels.p_to_left) { + this.$cache.from[0].style.visibility = "hidden"; + this.$cache.to[0].style.visibility = "hidden"; + this.$cache.single[0].style.visibility = "visible"; + + if (this.result.from === this.result.to) { + if (this.target === "from") { + this.$cache.from[0].style.visibility = "visible"; + } else if (this.target === "to") { + this.$cache.to[0].style.visibility = "visible"; + } else if (!this.target) { + this.$cache.from[0].style.visibility = "visible"; + } + this.$cache.single[0].style.visibility = "hidden"; + max = to_left; + } else { + this.$cache.from[0].style.visibility = "hidden"; + this.$cache.to[0].style.visibility = "hidden"; + this.$cache.single[0].style.visibility = "visible"; + max = Math.max(single_left, to_left); + } + } else { + this.$cache.from[0].style.visibility = "visible"; + this.$cache.to[0].style.visibility = "visible"; + this.$cache.single[0].style.visibility = "hidden"; + } + + if (min < this.labels.p_min + 1) { + this.$cache.min[0].style.visibility = "hidden"; + } else { + this.$cache.min[0].style.visibility = "visible"; + } + + if (max > 100 - this.labels.p_max - 1) { + this.$cache.max[0].style.visibility = "hidden"; + } else { + this.$cache.max[0].style.visibility = "visible"; + } + + } + }, + + /** + * Draw shadow intervals + */ + drawShadow: function () { + var o = this.options, + c = this.$cache, + + is_from_min = typeof o.from_min === "number" && !isNaN(o.from_min), + is_from_max = typeof o.from_max === "number" && !isNaN(o.from_max), + is_to_min = typeof o.to_min === "number" && !isNaN(o.to_min), + is_to_max = typeof o.to_max === "number" && !isNaN(o.to_max), + + from_min, + from_max, + to_min, + to_max; + + if (o.type === "single") { + if (o.from_shadow && (is_from_min || is_from_max)) { + from_min = this.convertToPercent(is_from_min ? o.from_min : o.min); + from_max = this.convertToPercent(is_from_max ? o.from_max : o.max) - from_min; + from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min)); + from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max)); + from_min = from_min + (this.coords.p_handle / 2); + + c.shad_single[0].style.display = "block"; + c.shad_single[0].style.left = from_min + "%"; + c.shad_single[0].style.width = from_max + "%"; + } else { + c.shad_single[0].style.display = "none"; + } + } else { + if (o.from_shadow && (is_from_min || is_from_max)) { + from_min = this.convertToPercent(is_from_min ? o.from_min : o.min); + from_max = this.convertToPercent(is_from_max ? o.from_max : o.max) - from_min; + from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min)); + from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max)); + from_min = from_min + (this.coords.p_handle / 2); + + c.shad_from[0].style.display = "block"; + c.shad_from[0].style.left = from_min + "%"; + c.shad_from[0].style.width = from_max + "%"; + } else { + c.shad_from[0].style.display = "none"; + } + + if (o.to_shadow && (is_to_min || is_to_max)) { + to_min = this.convertToPercent(is_to_min ? o.to_min : o.min); + to_max = this.convertToPercent(is_to_max ? o.to_max : o.max) - to_min; + to_min = this.toFixed(to_min - (this.coords.p_handle / 100 * to_min)); + to_max = this.toFixed(to_max - (this.coords.p_handle / 100 * to_max)); + to_min = to_min + (this.coords.p_handle / 2); + + c.shad_to[0].style.display = "block"; + c.shad_to[0].style.left = to_min + "%"; + c.shad_to[0].style.width = to_max + "%"; + } else { + c.shad_to[0].style.display = "none"; + } + } + }, + + + + // ============================================================================================================= + // Callbacks + + callOnStart: function () { + if (this.options.onStart && typeof this.options.onStart === "function") { + this.options.onStart(this.result); + } + }, + callOnChange: function () { + if (this.options.onChange && typeof this.options.onChange === "function") { + this.options.onChange(this.result); + } + }, + callOnFinish: function () { + if (this.options.onFinish && typeof this.options.onFinish === "function") { + this.options.onFinish(this.result); + } + }, + callOnUpdate: function () { + if (this.options.onUpdate && typeof this.options.onUpdate === "function") { + this.options.onUpdate(this.result); + } + }, + + + + // ============================================================================================================= + // Service methods + + toggleInput: function () { + this.$cache.input.toggleClass("irs-hidden-input"); + }, + + /** + * Convert real value to percent + * + * @param value {Number} X in real + * @param no_min {boolean=} don't use min value + * @returns {Number} X in percent + */ + convertToPercent: function (value, no_min) { + var diapason = this.options.max - this.options.min, + one_percent = diapason / 100, + val, percent; + + if (!diapason) { + this.no_diapason = true; + return 0; + } + + if (no_min) { + val = value; + } else { + val = value - this.options.min; + } + + percent = val / one_percent; + + return this.toFixed(percent); + }, + + /** + * Convert percent to real values + * + * @param percent {Number} X in percent + * @returns {Number} X in real + */ + convertToValue: function (percent) { + var min = this.options.min, + max = this.options.max, + min_decimals = min.toString().split(".")[1], + max_decimals = max.toString().split(".")[1], + min_length, max_length, + avg_decimals = 0, + abs = 0; + + if (percent === 0) { + return this.options.min; + } + if (percent === 100) { + return this.options.max; + } + + + if (min_decimals) { + min_length = min_decimals.length; + avg_decimals = min_length; + } + if (max_decimals) { + max_length = max_decimals.length; + avg_decimals = max_length; + } + if (min_length && max_length) { + avg_decimals = (min_length >= max_length) ? min_length : max_length; + } + + if (min < 0) { + abs = Math.abs(min); + min = +(min + abs).toFixed(avg_decimals); + max = +(max + abs).toFixed(avg_decimals); + } + + var number = ((max - min) / 100 * percent) + min, + string = this.options.step.toString().split(".")[1], + result; + + if (string) { + number = +number.toFixed(string.length); + } else { + number = number / this.options.step; + number = number * this.options.step; + + number = +number.toFixed(0); + } + + if (abs) { + number -= abs; + } + + if (string) { + result = +number.toFixed(string.length); + } else { + result = this.toFixed(number); + } + + if (result < this.options.min) { + result = this.options.min; + } else if (result > this.options.max) { + result = this.options.max; + } + + return result; + }, + + /** + * Round percent value with step + * + * @param percent {Number} + * @returns percent {Number} rounded + */ + calcWithStep: function (percent) { + var rounded = Math.round(percent / this.coords.p_step) * this.coords.p_step; + + if (rounded > 100) { + rounded = 100; + } + if (percent === 100) { + rounded = 100; + } + + return this.toFixed(rounded); + }, + + checkMinInterval: function (p_current, p_next, type) { + var o = this.options, + current, + next; + + if (!o.min_interval) { + return p_current; + } + + current = this.convertToValue(p_current); + next = this.convertToValue(p_next); + + if (type === "from") { + + if (next - current < o.min_interval) { + current = next - o.min_interval; + } + + } else { + + if (current - next < o.min_interval) { + current = next + o.min_interval; + } + + } + + return this.convertToPercent(current); + }, + + checkMaxInterval: function (p_current, p_next, type) { + var o = this.options, + current, + next; + + if (!o.max_interval) { + return p_current; + } + + current = this.convertToValue(p_current); + next = this.convertToValue(p_next); + + if (type === "from") { + + if (next - current > o.max_interval) { + current = next - o.max_interval; + } + + } else { + + if (current - next > o.max_interval) { + current = next + o.max_interval; + } + + } + + return this.convertToPercent(current); + }, + + checkDiapason: function (p_num, min, max) { + var num = this.convertToValue(p_num), + o = this.options; + + if (typeof min !== "number") { + min = o.min; + } + + if (typeof max !== "number") { + max = o.max; + } + + if (num < min) { + num = min; + } + + if (num > max) { + num = max; + } + + return this.convertToPercent(num); + }, + + toFixed: function (num) { + num = num.toFixed(9); + return +num; + }, + + _prettify: function (num) { + if (!this.options.prettify_enabled) { + return num; + } + + if (this.options.prettify && typeof this.options.prettify === "function") { + return this.options.prettify(num); + } else { + return this.prettify(num); + } + }, + + prettify: function (num) { + var n = num.toString(); + return n.replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g, "$1" + this.options.prettify_separator); + }, + + checkEdges: function (left, width) { + if (!this.options.force_edges) { + return this.toFixed(left); + } + + if (left < 0) { + left = 0; + } else if (left > 100 - width) { + left = 100 - width; + } + + return this.toFixed(left); + }, + + validate: function () { + var o = this.options, + r = this.result, + v = o.values, + vl = v.length, + value, + i; + + if (typeof o.min === "string") o.min = +o.min; + if (typeof o.max === "string") o.max = +o.max; + if (typeof o.from === "string") o.from = +o.from; + if (typeof o.to === "string") o.to = +o.to; + if (typeof o.step === "string") o.step = +o.step; + + if (typeof o.from_min === "string") o.from_min = +o.from_min; + if (typeof o.from_max === "string") o.from_max = +o.from_max; + if (typeof o.to_min === "string") o.to_min = +o.to_min; + if (typeof o.to_max === "string") o.to_max = +o.to_max; + + if (typeof o.keyboard_step === "string") o.keyboard_step = +o.keyboard_step; + if (typeof o.grid_num === "string") o.grid_num = +o.grid_num; + + if (o.max < o.min) { + o.max = o.min; + } + + if (vl) { + o.p_values = []; + o.min = 0; + o.max = vl - 1; + o.step = 1; + o.grid_num = o.max; + o.grid_snap = true; + + + for (i = 0; i < vl; i++) { + value = +v[i]; + + if (!isNaN(value)) { + v[i] = value; + value = this._prettify(value); + } else { + value = v[i]; + } + + o.p_values.push(value); + } + } + + if (typeof o.from !== "number" || isNaN(o.from)) { + o.from = o.min; + } + + if (typeof o.to !== "number" || isNaN(o.from)) { + o.to = o.max; + } + + if (o.type === "single") { + + if (o.from < o.min) { + o.from = o.min; + } + + if (o.from > o.max) { + o.from = o.max; + } + + } else { + + if (o.from < o.min || o.from > o.max) { + o.from = o.min; + } + if (o.to > o.max || o.to < o.min) { + o.to = o.max; + } + if (o.from > o.to) { + o.from = o.to; + } + + } + + if (typeof o.step !== "number" || isNaN(o.step) || !o.step || o.step < 0) { + o.step = 1; + } + + if (typeof o.keyboard_step !== "number" || isNaN(o.keyboard_step) || !o.keyboard_step || o.keyboard_step < 0) { + o.keyboard_step = 5; + } + + if (typeof o.from_min === "number" && o.from < o.from_min) { + o.from = o.from_min; + } + + if (typeof o.from_max === "number" && o.from > o.from_max) { + o.from = o.from_max; + } + + if (typeof o.to_min === "number" && o.to < o.to_min) { + o.to = o.to_min; + } + + if (typeof o.to_max === "number" && o.from > o.to_max) { + o.to = o.to_max; + } + + if (r) { + if (r.min !== o.min) { + r.min = o.min; + } + + if (r.max !== o.max) { + r.max = o.max; + } + + if (r.from < r.min || r.from > r.max) { + r.from = o.from; + } + + if (r.to < r.min || r.to > r.max) { + r.to = o.to; + } + } + + if (typeof o.min_interval !== "number" || isNaN(o.min_interval) || !o.min_interval || o.min_interval < 0) { + o.min_interval = 0; + } + + if (typeof o.max_interval !== "number" || isNaN(o.max_interval) || !o.max_interval || o.max_interval < 0) { + o.max_interval = 0; + } + + if (o.min_interval && o.min_interval > o.max - o.min) { + o.min_interval = o.max - o.min; + } + + if (o.max_interval && o.max_interval > o.max - o.min) { + o.max_interval = o.max - o.min; + } + }, + + decorate: function (num, original) { + var decorated = "", + o = this.options; + + if (o.prefix) { + decorated += o.prefix; + } + + decorated += num; + + if (o.max_postfix) { + if (o.values.length && num === o.p_values[o.max]) { + decorated += o.max_postfix; + if (o.postfix) { + decorated += " "; + } + } else if (original === o.max) { + decorated += o.max_postfix; + if (o.postfix) { + decorated += " "; + } + } + } + + if (o.postfix) { + decorated += o.postfix; + } + + return decorated; + }, + + updateFrom: function () { + this.result.from = this.options.from; + this.result.from_percent = this.convertToPercent(this.result.from); + if (this.options.values) { + this.result.from_value = this.options.values[this.result.from]; + } + }, + + updateTo: function () { + this.result.to = this.options.to; + this.result.to_percent = this.convertToPercent(this.result.to); + if (this.options.values) { + this.result.to_value = this.options.values[this.result.to]; + } + }, + + updateResult: function () { + this.result.min = this.options.min; + this.result.max = this.options.max; + this.updateFrom(); + this.updateTo(); + }, + + + // ============================================================================================================= + // Grid + + appendGrid: function () { + if (!this.options.grid) { + return; + } + + var o = this.options, + i, z, + + total = o.max - o.min, + big_num = o.grid_num, + big_p = 0, + big_w = 0, + + small_max = 4, + local_small_max, + small_p, + small_w = 0, + + result, + html = ''; + + + + this.calcGridMargin(); + + if (o.grid_snap) { + big_num = total / o.step; + big_p = this.toFixed(o.step / (total / 100)); + } else { + big_p = this.toFixed(100 / big_num); + } + + if (big_num > 4) { + small_max = 3; + } + if (big_num > 7) { + small_max = 2; + } + if (big_num > 14) { + small_max = 1; + } + if (big_num > 28) { + small_max = 0; + } + + for (i = 0; i < big_num + 1; i++) { + local_small_max = small_max; + + big_w = this.toFixed(big_p * i); + + if (big_w > 100) { + big_w = 100; + + local_small_max -= 2; + if (local_small_max < 0) { + local_small_max = 0; + } + } + this.coords.big[i] = big_w; + + small_p = (big_w - (big_p * (i - 1))) / (local_small_max + 1); + + for (z = 1; z <= local_small_max; z++) { + if (big_w === 0) { + break; + } + + small_w = this.toFixed(big_w - (small_p * z)); + + html += ''; + } + + html += ''; + + result = this.convertToValue(big_w); + if (o.values.length) { + result = o.p_values[result]; + } else { + result = this._prettify(result); + } + + html += '' + result + ''; + } + this.coords.big_num = Math.ceil(big_num + 1); + + + + this.$cache.cont.addClass("irs-with-grid"); + this.$cache.grid.html(html); + this.cacheGridLabels(); + }, + + cacheGridLabels: function () { + var $label, i, + num = this.coords.big_num; + + for (i = 0; i < num; i++) { + $label = this.$cache.grid.find(".js-grid-text-" + i); + this.$cache.grid_labels.push($label); + } + + this.calcGridLabels(); + }, + + calcGridLabels: function () { + var i, label, start = [], finish = [], + num = this.coords.big_num; + + for (i = 0; i < num; i++) { + this.coords.big_w[i] = this.$cache.grid_labels[i].outerWidth(false); + this.coords.big_p[i] = this.toFixed(this.coords.big_w[i] / this.coords.w_rs * 100); + this.coords.big_x[i] = this.toFixed(this.coords.big_p[i] / 2); + + start[i] = this.toFixed(this.coords.big[i] - this.coords.big_x[i]); + finish[i] = this.toFixed(start[i] + this.coords.big_p[i]); + } + + if (this.options.force_edges) { + if (start[0] < -this.coords.grid_gap) { + start[0] = -this.coords.grid_gap; + finish[0] = this.toFixed(start[0] + this.coords.big_p[0]); + + this.coords.big_x[0] = this.coords.grid_gap; + } + + if (finish[num - 1] > 100 + this.coords.grid_gap) { + finish[num - 1] = 100 + this.coords.grid_gap; + start[num - 1] = this.toFixed(finish[num - 1] - this.coords.big_p[num - 1]); + + this.coords.big_x[num - 1] = this.toFixed(this.coords.big_p[num - 1] - this.coords.grid_gap); + } + } + + this.calcGridCollision(2, start, finish); + this.calcGridCollision(4, start, finish); + + for (i = 0; i < num; i++) { + label = this.$cache.grid_labels[i][0]; + label.style.marginLeft = -this.coords.big_x[i] + "%"; + } + }, + + // Collisions Calc Beta + // TODO: Refactor then have plenty of time + calcGridCollision: function (step, start, finish) { + var i, next_i, label, + num = this.coords.big_num; + + for (i = 0; i < num; i += step) { + next_i = i + (step / 2); + if (next_i >= num) { + break; + } + + label = this.$cache.grid_labels[next_i][0]; + + if (finish[i] <= start[next_i]) { + label.style.visibility = "visible"; + } else { + label.style.visibility = "hidden"; + } + } + }, + + calcGridMargin: function () { + if (!this.options.grid_margin) { + return; + } + + this.coords.w_rs = this.$cache.rs.outerWidth(false); + if (!this.coords.w_rs) { + return; + } + + if (this.options.type === "single") { + this.coords.w_handle = this.$cache.s_single.outerWidth(false); + } else { + this.coords.w_handle = this.$cache.s_from.outerWidth(false); + } + this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100); + this.coords.grid_gap = this.toFixed((this.coords.p_handle / 2) - 0.1); + + this.$cache.grid[0].style.width = this.toFixed(100 - this.coords.p_handle) + "%"; + this.$cache.grid[0].style.left = this.coords.grid_gap + "%"; + }, + + + + // ============================================================================================================= + // Public methods + + update: function (options) { + if (!this.input) { + return; + } + + this.is_update = true; + + this.options.from = this.result.from; + this.options.to = this.result.to; + + this.options = $.extend(this.options, options); + this.validate(); + this.updateResult(options); + + this.toggleInput(); + this.remove(); + this.init(true); + }, + + reset: function () { + if (!this.input) { + return; + } + + this.updateResult(); + this.update(); + }, + + destroy: function () { + if (!this.input) { + return; + } + + this.toggleInput(); + this.$cache.input.prop("readonly", false); + $.data(this.input, "ionRangeSlider", null); + + this.remove(); + this.input = null; + this.options = null; + } + }; + + $.fn.ionRangeSlider = function (options) { + return this.each(function() { + if (!$.data(this, "ionRangeSlider")) { + $.data(this, "ionRangeSlider", new IonRangeSlider(this, options, plugin_count++)); + } + }); + }; + + + + // ================================================================================================================= + // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ + // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating + + // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel + + // MIT license + + (function() { + var lastTime = 0; + var vendors = ['ms', 'moz', 'webkit', 'o']; + for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { + window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; + window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] + || window[vendors[x]+'CancelRequestAnimationFrame']; + } + + if (!window.requestAnimationFrame) + window.requestAnimationFrame = function(callback, element) { + var currTime = new Date().getTime(); + var timeToCall = Math.max(0, 16 - (currTime - lastTime)); + var id = window.setTimeout(function() { callback(currTime + timeToCall); }, + timeToCall); + lastTime = currTime + timeToCall; + return id; + }; + + if (!window.cancelAnimationFrame) + window.cancelAnimationFrame = function(id) { + clearTimeout(id); + }; + }()); + +})); diff --git a/frontend/web/js/jCarousel/jCarousel.js b/frontend/web/js/jCarousel/jCarousel.js new file mode 100755 index 0000000..89e9c3e --- /dev/null +++ b/frontend/web/js/jCarousel/jCarousel.js @@ -0,0 +1,4 @@ +/*! jCarousel - v0.3.4 - 2015-09-23 + * http://sorgalla.com/jcarousel/ + * Copyright (c) 2006-2015 Jan Sorgalla; Licensed MIT */ +!function(a){"use strict";var b=a.jCarousel={};b.version="0.3.4";var c=/^([+\-]=)?(.+)$/;b.parseTarget=function(a){var b=!1,d="object"!=typeof a?c.exec(a):null;return d?(a=parseInt(d[2],10)||0,d[1]&&(b=!0,"-="===d[1]&&(a*=-1))):"object"!=typeof a&&(a=parseInt(a,10)||0),{target:a,relative:b}},b.detectCarousel=function(a){for(var b;a.length>0;){if(b=a.filter("[data-jcarousel]"),b.length>0)return b;if(b=a.find("[data-jcarousel]"),b.length>0)return b;a=a.parent()}return null},b.base=function(c){return{version:b.version,_options:{},_element:null,_carousel:null,_init:a.noop,_create:a.noop,_destroy:a.noop,_reload:a.noop,create:function(){return this._element.attr("data-"+c.toLowerCase(),!0).data(c,this),!1===this._trigger("create")?this:(this._create(),this._trigger("createend"),this)},destroy:function(){return!1===this._trigger("destroy")?this:(this._destroy(),this._trigger("destroyend"),this._element.removeData(c).removeAttr("data-"+c.toLowerCase()),this)},reload:function(a){return!1===this._trigger("reload")?this:(a&&this.options(a),this._reload(),this._trigger("reloadend"),this)},element:function(){return this._element},options:function(b,c){if(0===arguments.length)return a.extend({},this._options);if("string"==typeof b){if("undefined"==typeof c)return"undefined"==typeof this._options[b]?null:this._options[b];this._options[b]=c}else this._options=a.extend({},this._options,b);return this},carousel:function(){return this._carousel||(this._carousel=b.detectCarousel(this.options("carousel")||this._element),this._carousel||a.error('Could not detect carousel for plugin "'+c+'"')),this._carousel},_trigger:function(b,d,e){var f,g=!1;return e=[this].concat(e||[]),(d||this._element).each(function(){f=a.Event((c+":"+b).toLowerCase()),a(this).trigger(f,e),f.isDefaultPrevented()&&(g=!0)}),!g}}},b.plugin=function(c,d){var e=a[c]=function(b,c){this._element=a(b),this.options(c),this._init(),this.create()};return e.fn=e.prototype=a.extend({},b.base(c),d),a.fn[c]=function(b){var d=Array.prototype.slice.call(arguments,1),f=this;return this.each("string"==typeof b?function(){var e=a(this).data(c);if(!e)return a.error("Cannot call methods on "+c+' prior to initialization; attempted to call method "'+b+'"');if(!a.isFunction(e[b])||"_"===b.charAt(0))return a.error('No such method "'+b+'" for '+c+" instance");var g=e[b].apply(e,d);return g!==e&&"undefined"!=typeof g?(f=g,!1):void 0}:function(){var d=a(this).data(c);d instanceof e?d.reload(b):new e(this,b)}),f},e}}(jQuery),function(a,b){"use strict";var c=function(a){return parseFloat(a)||0};a.jCarousel.plugin("jcarousel",{animating:!1,tail:0,inTail:!1,resizeTimer:null,lt:null,vertical:!1,rtl:!1,circular:!1,underflow:!1,relative:!1,_options:{list:function(){return this.element().children().eq(0)},items:function(){return this.list().children()},animation:400,transitions:!1,wrap:null,vertical:null,rtl:null,center:!1},_list:null,_items:null,_target:a(),_first:a(),_last:a(),_visible:a(),_fullyvisible:a(),_init:function(){var a=this;return this.onWindowResize=function(){a.resizeTimer&&clearTimeout(a.resizeTimer),a.resizeTimer=setTimeout(function(){a.reload()},100)},this},_create:function(){this._reload(),a(b).on("resize.jcarousel",this.onWindowResize)},_destroy:function(){a(b).off("resize.jcarousel",this.onWindowResize)},_reload:function(){this.vertical=this.options("vertical"),null==this.vertical&&(this.vertical=this.list().height()>this.list().width()),this.rtl=this.options("rtl"),null==this.rtl&&(this.rtl=function(b){if("rtl"===(""+b.attr("dir")).toLowerCase())return!0;var c=!1;return b.parents("[dir]").each(function(){return/rtl/i.test(a(this).attr("dir"))?(c=!0,!1):void 0}),c}(this._element)),this.lt=this.vertical?"top":"left",this.relative="relative"===this.list().css("position"),this._list=null,this._items=null;var b=this.index(this._target)>=0?this._target:this.closest();this.circular="circular"===this.options("wrap"),this.underflow=!1;var c={left:0,top:0};return b.length>0&&(this._prepare(b),this.list().find("[data-jcarousel-clone]").remove(),this._items=null,this.underflow=this._fullyvisible.length>=this.items().length,this.circular=this.circular&&!this.underflow,c[this.lt]=this._position(b)+"px"),this.move(c),this},list:function(){if(null===this._list){var b=this.options("list");this._list=a.isFunction(b)?b.call(this):this._element.find(b)}return this._list},items:function(){if(null===this._items){var b=this.options("items");this._items=(a.isFunction(b)?b.call(this):this.list().find(b)).not("[data-jcarousel-clone]")}return this._items},index:function(a){return this.items().index(a)},closest:function(){var b,d=this,e=this.list().position()[this.lt],f=a(),g=!1,h=this.vertical?"bottom":this.rtl&&!this.relative?"left":"right";return this.rtl&&this.relative&&!this.vertical&&(e+=this.list().width()-this.clipping()),this.items().each(function(){if(f=a(this),g)return!1;var i=d.dimension(f);if(e+=i,e>=0){if(b=i-c(f.css("margin-"+h)),!(Math.abs(e)-i+b/2<=0))return!1;g=!0}}),f},target:function(){return this._target},first:function(){return this._first},last:function(){return this._last},visible:function(){return this._visible},fullyvisible:function(){return this._fullyvisible},hasNext:function(){if(!1===this._trigger("hasnext"))return!0;var a=this.options("wrap"),b=this.items().length-1,c=this.options("center")?this._target:this._last;return b>=0&&!this.underflow&&(a&&"first"!==a||this.index(c)0&&!this.underflow&&(a&&"last"!==a||this.index(this._first)>0||this.tail&&this.inTail)?!0:!1},clipping:function(){return this._element["inner"+(this.vertical?"Height":"Width")]()},dimension:function(a){return a["outer"+(this.vertical?"Height":"Width")](!0)},scroll:function(b,c,d){if(this.animating)return this;if(!1===this._trigger("scroll",null,[b,c]))return this;a.isFunction(c)&&(d=c,c=!0);var e=a.jCarousel.parseTarget(b);if(e.relative){var f,g,h,i,j,k,l,m,n=this.items().length-1,o=Math.abs(e.target),p=this.options("wrap");if(e.target>0){var q=this.index(this._last);if(q>=n&&this.tail)this.inTail?"both"===p||"last"===p?this._scroll(0,c,d):a.isFunction(d)&&d.call(this,!1):this._scrollTail(c,d);else if(f=this.index(this._target),this.underflow&&f===n&&("circular"===p||"both"===p||"last"===p)||!this.underflow&&q===n&&("both"===p||"last"===p))this._scroll(0,c,d);else if(h=f+o,this.circular&&h>n){for(m=n,j=this.items().get(-1);m++=0,k&&j.after(j.clone(!0).attr("data-jcarousel-clone",!0)),this.list().append(j),k||(l={},l[this.lt]=this.dimension(j),this.moveBy(l)),this._items=null;this._scroll(j,c,d)}else this._scroll(Math.min(h,n),c,d)}else if(this.inTail)this._scroll(Math.max(this.index(this._first)-o+1,0),c,d);else if(g=this.index(this._first),f=this.index(this._target),i=this.underflow?f:g,h=i-o,0>=i&&(this.underflow&&"circular"===p||"both"===p||"first"===p))this._scroll(n,c,d);else if(this.circular&&0>h){for(m=h,j=this.items().get(0);m++<0;){j=this.items().eq(-1),k=this._visible.index(j)>=0,k&&j.after(j.clone(!0).attr("data-jcarousel-clone",!0)),this.list().prepend(j),this._items=null;var r=this.dimension(j);l={},l[this.lt]=-r,this.moveBy(l)}this._scroll(j,c,d)}else this._scroll(Math.max(h,0),c,d)}else this._scroll(e.target,c,d);return this._trigger("scrollend"),this},moveBy:function(a,b){var d=this.list().position(),e=1,f=0;return this.rtl&&!this.vertical&&(e=-1,this.relative&&(f=this.list().width()-this.clipping())),a.left&&(a.left=d.left+f+c(a.left)*e+"px"),a.top&&(a.top=d.top+f+c(a.top)*e+"px"),this.move(a,b)},move:function(b,c){c=c||{};var d=this.options("transitions"),e=!!d,f=!!d.transforms,g=!!d.transforms3d,h=c.duration||0,i=this.list();if(!e&&h>0)return void i.animate(b,c);var j=c.complete||a.noop,k={};if(e){var l={transitionDuration:i.css("transitionDuration"),transitionTimingFunction:i.css("transitionTimingFunction"),transitionProperty:i.css("transitionProperty")},m=j;j=function(){a(this).css(l),m.call(this)},k={transitionDuration:(h>0?h/1e3:0)+"s",transitionTimingFunction:d.easing||c.easing,transitionProperty:h>0?function(){return f||g?"all":b.left?"left":"top"}():"none",transform:"none"}}g?k.transform="translate3d("+(b.left||0)+","+(b.top||0)+",0)":f?k.transform="translate("+(b.left||0)+","+(b.top||0)+")":a.extend(k,b),e&&h>0&&i.one("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",j),i.css(k),0>=h&&i.each(function(){j.call(this)})},_scroll:function(b,c,d){if(this.animating)return a.isFunction(d)&&d.call(this,!1),this;if("object"!=typeof b?b=this.items().eq(b):"undefined"==typeof b.jquery&&(b=a(b)),0===b.length)return a.isFunction(d)&&d.call(this,!1),this;this.inTail=!1,this._prepare(b);var e=this._position(b),f=this.list().position()[this.lt];if(e===f)return a.isFunction(d)&&d.call(this,!1),this;var g={};return g[this.lt]=e+"px",this._animate(g,c,d),this},_scrollTail:function(b,c){if(this.animating||!this.tail)return a.isFunction(c)&&c.call(this,!1),this;var d=this.list().position()[this.lt];this.rtl&&this.relative&&!this.vertical&&(d+=this.list().width()-this.clipping()),this.rtl&&!this.vertical?d+=this.tail:d-=this.tail,this.inTail=!0;var e={};return e[this.lt]=d+"px",this._update({target:this._target.next(),fullyvisible:this._fullyvisible.slice(1).add(this._visible.last())}),this._animate(e,b,c),this},_animate:function(b,c,d){if(d=d||a.noop,!1===this._trigger("animate"))return d.call(this,!1),this;this.animating=!0;var e=this.options("animation"),f=a.proxy(function(){this.animating=!1;var a=this.list().find("[data-jcarousel-clone]");a.length>0&&(a.remove(),this._reload()),this._trigger("animateend"),d.call(this,!0)},this),g="object"==typeof e?a.extend({},e):{duration:e},h=g.complete||a.noop;return c===!1?g.duration=0:"undefined"!=typeof a.fx.speeds[g.duration]&&(g.duration=a.fx.speeds[g.duration]),g.complete=function(){f(),h.call(this)},this.move(b,g),this},_prepare:function(b){var d,e,f,g,h=this.index(b),i=h,j=this.dimension(b),k=this.clipping(),l=this.vertical?"bottom":this.rtl?"left":"right",m=this.options("center"),n={target:b,first:b,last:b,visible:b,fullyvisible:k>=j?b:a()};if(m&&(j/=2,k/=2),k>j)for(;;){if(d=this.items().eq(++i),0===d.length){if(!this.circular)break;if(d=this.items().eq(0),b.get(0)===d.get(0))break;if(e=this._visible.index(d)>=0,e&&d.after(d.clone(!0).attr("data-jcarousel-clone",!0)),this.list().append(d),!e){var o={};o[this.lt]=this.dimension(d),this.moveBy(o)}this._items=null}if(g=this.dimension(d),0===g)break;if(j+=g,n.last=d,n.visible=n.visible.add(d),f=c(d.css("margin-"+l)),k>=j-f&&(n.fullyvisible=n.fullyvisible.add(d)),j>=k)break}if(!this.circular&&!m&&k>j)for(i=h;;){if(--i<0)break;if(d=this.items().eq(i),0===d.length)break;if(g=this.dimension(d),0===g)break;if(j+=g,n.first=d,n.visible=n.visible.add(d),f=c(d.css("margin-"+l)),k>=j-f&&(n.fullyvisible=n.fullyvisible.add(d)),j>=k)break}return this._update(n),this.tail=0,m||"circular"===this.options("wrap")||"custom"===this.options("wrap")||this.index(n.last)!==this.items().length-1||(j-=c(n.last.css("margin-"+l)),j>k&&(this.tail=j-k)),this},_position:function(a){var b=this._first,c=b.position()[this.lt],d=this.options("center"),e=d?this.clipping()/2-this.dimension(b)/2:0;return this.rtl&&!this.vertical?(c-=this.relative?this.list().width()-this.dimension(b):this.clipping()-this.dimension(b),c+=e):c-=e,!d&&(this.index(a)>this.index(b)||this.inTail)&&this.tail?(c=this.rtl&&!this.vertical?c-this.tail:c+this.tail,this.inTail=!0):this.inTail=!1,-c},_update:function(b){var c,d=this,e={target:this._target,first:this._first,last:this._last,visible:this._visible,fullyvisible:this._fullyvisible},f=this.index(b.first||e.first)e)return this.scroll(e,c,d);if(e>=g&&h>=e)return a.isFunction(d)&&d.call(this,!1),this;for(var i,j=this.items(),k=this.clipping(),l=this.vertical?"bottom":this.rtl?"left":"right",m=0;;){if(i=j.eq(e),0===i.length)break;if(m+=this.dimension(i),m>=k){var n=parseFloat(i.css("margin-"+l))||0;m-n!==k&&e++;break}if(0>=e)break;e--}return this.scroll(e,c,d)}}(jQuery),function(a){"use strict";a.jCarousel.plugin("jcarouselControl",{_options:{target:"+=1",event:"click",method:"scroll"},_active:null,_init:function(){this.onDestroy=a.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",a.proxy(this._create,this))},this),this.onReload=a.proxy(this._reload,this),this.onEvent=a.proxy(function(b){b.preventDefault();var c=this.options("method");a.isFunction(c)?c.call(this):this.carousel().jcarousel(this.options("method"),this.options("target"))},this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy).on("jcarousel:reloadend jcarousel:scrollend",this.onReload),this._element.on(this.options("event")+".jcarouselcontrol",this.onEvent),this._reload()},_destroy:function(){this._element.off(".jcarouselcontrol",this.onEvent),this.carousel().off("jcarousel:destroy",this.onDestroy).off("jcarousel:reloadend jcarousel:scrollend",this.onReload)},_reload:function(){var b,c=a.jCarousel.parseTarget(this.options("target")),d=this.carousel();if(c.relative)b=d.jcarousel(c.target>0?"hasNext":"hasPrev");else{var e="object"!=typeof c.target?d.jcarousel("items").eq(c.target):c.target;b=d.jcarousel("target").index(e)>=0}return this._active!==b&&(this._trigger(b?"active":"inactive"),this._active=b),this}})}(jQuery),function(a){"use strict";a.jCarousel.plugin("jcarouselPagination",{_options:{perPage:null,item:function(a){return''+a+""},event:"click",method:"scroll"},_carouselItems:null,_pages:{},_items:{},_currentPage:null,_init:function(){this.onDestroy=a.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",a.proxy(this._create,this))},this),this.onReload=a.proxy(this._reload,this),this.onScroll=a.proxy(this._update,this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy).on("jcarousel:reloadend",this.onReload).on("jcarousel:scrollend",this.onScroll),this._reload()},_destroy:function(){this._clear(),this.carousel().off("jcarousel:destroy",this.onDestroy).off("jcarousel:reloadend",this.onReload).off("jcarousel:scrollend",this.onScroll),this._carouselItems=null},_reload:function(){var b=this.options("perPage");if(this._pages={},this._items={},a.isFunction(b)&&(b=b.call(this)),null==b)this._pages=this._calculatePages();else for(var c,d=parseInt(b,10)||0,e=this._getCarouselItems(),f=1,g=0;;){if(c=e.eq(g++),0===c.length)break;this._pages[f]=this._pages[f]?this._pages[f].add(c):c,g%d===0&&f++}this._clear();var h=this,i=this.carousel().data("jcarousel"),j=this._element,k=this.options("item"),l=this._getCarouselItems().length;a.each(this._pages,function(b,c){var d=h._items[b]=a(k.call(h,b,c));d.on(h.options("event")+".jcarouselpagination",a.proxy(function(){var a=c.eq(0);if(i.circular){var d=i.index(i.target()),e=i.index(a);parseFloat(b)>parseFloat(h._currentPage)?d>e&&(a="+="+(l-d+e)):e>d&&(a="-="+(d+(l-e)))}i[this.options("method")](a)},h)),j.append(d)}),this._update()},_update:function(){var b,c=this.carousel().jcarousel("target");a.each(this._pages,function(a,d){return d.each(function(){return c.is(this)?(b=a,!1):void 0}),b?!1:void 0}),this._currentPage!==b&&(this._trigger("inactive",this._items[this._currentPage]),this._trigger("active",this._items[b])),this._currentPage=b},items:function(){return this._items},reloadCarouselItems:function(){return this._carouselItems=null,this},_clear:function(){this._element.empty(),this._currentPage=null},_calculatePages:function(){for(var a,b,c=this.carousel().data("jcarousel"),d=this._getCarouselItems(),e=c.clipping(),f=0,g=0,h=1,i={};;){if(a=d.eq(g++),0===a.length)break;b=c.dimension(a),f+b>e&&(h++,f=0),f+=b,i[h]=i[h]?i[h].add(a):a}return i},_getCarouselItems:function(){return this._carouselItems||(this._carouselItems=this.carousel().jcarousel("items")),this._carouselItems}})}(jQuery),function(a,b){"use strict";var c,d,e={hidden:"visibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange",webkitHidden:"webkitvisibilitychange"};a.each(e,function(a,e){return"undefined"!=typeof b[a]?(c=a,d=e,!1):void 0}),a.jCarousel.plugin("jcarouselAutoscroll",{_options:{target:"+=1",interval:3e3,autostart:!0},_timer:null,_started:!1,_init:function(){this.onDestroy=a.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",a.proxy(this._create,this))},this),this.onAnimateEnd=a.proxy(this._start,this),this.onVisibilityChange=a.proxy(function(){b[c]?this._stop():this._start()},this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy),a(b).on(d,this.onVisibilityChange),this.options("autostart")&&this.start()},_destroy:function(){this._stop(),this.carousel().off("jcarousel:destroy",this.onDestroy),a(b).off(d,this.onVisibilityChange)},_start:function(){return this._stop(),this._started?(this.carousel().one("jcarousel:animateend",this.onAnimateEnd),this._timer=setTimeout(a.proxy(function(){this.carousel().jcarousel("scroll",this.options("target"))},this),this.options("interval")),this):void 0},_stop:function(){return this._timer&&(this._timer=clearTimeout(this._timer)),this.carousel().off("jcarousel:animateend",this.onAnimateEnd),this},start:function(){return this._started=!0,this._start(),this},stop:function(){return this._started=!1,this._stop(),this}})}(jQuery,document); \ No newline at end of file diff --git a/frontend/web/js/jcarousel/jcarousel.min.js b/frontend/web/js/jcarousel/jcarousel.min.js new file mode 100755 index 0000000..077c607 --- /dev/null +++ b/frontend/web/js/jcarousel/jcarousel.min.js @@ -0,0 +1,4 @@ +/*! jCarousel - v0.3.4 - 2015-09-23 +* http://sorgalla.com/jcarousel/ +* Copyright (c) 2006-2015 Jan Sorgalla; Licensed MIT */ +!function(a){"use strict";var b=a.jCarousel={};b.version="0.3.4";var c=/^([+\-]=)?(.+)$/;b.parseTarget=function(a){var b=!1,d="object"!=typeof a?c.exec(a):null;return d?(a=parseInt(d[2],10)||0,d[1]&&(b=!0,"-="===d[1]&&(a*=-1))):"object"!=typeof a&&(a=parseInt(a,10)||0),{target:a,relative:b}},b.detectCarousel=function(a){for(var b;a.length>0;){if(b=a.filter("[data-jcarousel]"),b.length>0)return b;if(b=a.find("[data-jcarousel]"),b.length>0)return b;a=a.parent()}return null},b.base=function(c){return{version:b.version,_options:{},_element:null,_carousel:null,_init:a.noop,_create:a.noop,_destroy:a.noop,_reload:a.noop,create:function(){return this._element.attr("data-"+c.toLowerCase(),!0).data(c,this),!1===this._trigger("create")?this:(this._create(),this._trigger("createend"),this)},destroy:function(){return!1===this._trigger("destroy")?this:(this._destroy(),this._trigger("destroyend"),this._element.removeData(c).removeAttr("data-"+c.toLowerCase()),this)},reload:function(a){return!1===this._trigger("reload")?this:(a&&this.options(a),this._reload(),this._trigger("reloadend"),this)},element:function(){return this._element},options:function(b,c){if(0===arguments.length)return a.extend({},this._options);if("string"==typeof b){if("undefined"==typeof c)return"undefined"==typeof this._options[b]?null:this._options[b];this._options[b]=c}else this._options=a.extend({},this._options,b);return this},carousel:function(){return this._carousel||(this._carousel=b.detectCarousel(this.options("carousel")||this._element),this._carousel||a.error('Could not detect carousel for plugin "'+c+'"')),this._carousel},_trigger:function(b,d,e){var f,g=!1;return e=[this].concat(e||[]),(d||this._element).each(function(){f=a.Event((c+":"+b).toLowerCase()),a(this).trigger(f,e),f.isDefaultPrevented()&&(g=!0)}),!g}}},b.plugin=function(c,d){var e=a[c]=function(b,c){this._element=a(b),this.options(c),this._init(),this.create()};return e.fn=e.prototype=a.extend({},b.base(c),d),a.fn[c]=function(b){var d=Array.prototype.slice.call(arguments,1),f=this;return this.each("string"==typeof b?function(){var e=a(this).data(c);if(!e)return a.error("Cannot call methods on "+c+' prior to initialization; attempted to call method "'+b+'"');if(!a.isFunction(e[b])||"_"===b.charAt(0))return a.error('No such method "'+b+'" for '+c+" instance");var g=e[b].apply(e,d);return g!==e&&"undefined"!=typeof g?(f=g,!1):void 0}:function(){var d=a(this).data(c);d instanceof e?d.reload(b):new e(this,b)}),f},e}}(jQuery),function(a,b){"use strict";var c=function(a){return parseFloat(a)||0};a.jCarousel.plugin("jcarousel",{animating:!1,tail:0,inTail:!1,resizeTimer:null,lt:null,vertical:!1,rtl:!1,circular:!1,underflow:!1,relative:!1,_options:{list:function(){return this.element().children().eq(0)},items:function(){return this.list().children()},animation:400,transitions:!1,wrap:null,vertical:null,rtl:null,center:!1},_list:null,_items:null,_target:a(),_first:a(),_last:a(),_visible:a(),_fullyvisible:a(),_init:function(){var a=this;return this.onWindowResize=function(){a.resizeTimer&&clearTimeout(a.resizeTimer),a.resizeTimer=setTimeout(function(){a.reload()},100)},this},_create:function(){this._reload(),a(b).on("resize.jcarousel",this.onWindowResize)},_destroy:function(){a(b).off("resize.jcarousel",this.onWindowResize)},_reload:function(){this.vertical=this.options("vertical"),null==this.vertical&&(this.vertical=this.list().height()>this.list().width()),this.rtl=this.options("rtl"),null==this.rtl&&(this.rtl=function(b){if("rtl"===(""+b.attr("dir")).toLowerCase())return!0;var c=!1;return b.parents("[dir]").each(function(){return/rtl/i.test(a(this).attr("dir"))?(c=!0,!1):void 0}),c}(this._element)),this.lt=this.vertical?"top":"left",this.relative="relative"===this.list().css("position"),this._list=null,this._items=null;var b=this.index(this._target)>=0?this._target:this.closest();this.circular="circular"===this.options("wrap"),this.underflow=!1;var c={left:0,top:0};return b.length>0&&(this._prepare(b),this.list().find("[data-jcarousel-clone]").remove(),this._items=null,this.underflow=this._fullyvisible.length>=this.items().length,this.circular=this.circular&&!this.underflow,c[this.lt]=this._position(b)+"px"),this.move(c),this},list:function(){if(null===this._list){var b=this.options("list");this._list=a.isFunction(b)?b.call(this):this._element.find(b)}return this._list},items:function(){if(null===this._items){var b=this.options("items");this._items=(a.isFunction(b)?b.call(this):this.list().find(b)).not("[data-jcarousel-clone]")}return this._items},index:function(a){return this.items().index(a)},closest:function(){var b,d=this,e=this.list().position()[this.lt],f=a(),g=!1,h=this.vertical?"bottom":this.rtl&&!this.relative?"left":"right";return this.rtl&&this.relative&&!this.vertical&&(e+=this.list().width()-this.clipping()),this.items().each(function(){if(f=a(this),g)return!1;var i=d.dimension(f);if(e+=i,e>=0){if(b=i-c(f.css("margin-"+h)),!(Math.abs(e)-i+b/2<=0))return!1;g=!0}}),f},target:function(){return this._target},first:function(){return this._first},last:function(){return this._last},visible:function(){return this._visible},fullyvisible:function(){return this._fullyvisible},hasNext:function(){if(!1===this._trigger("hasnext"))return!0;var a=this.options("wrap"),b=this.items().length-1,c=this.options("center")?this._target:this._last;return b>=0&&!this.underflow&&(a&&"first"!==a||this.index(c)0&&!this.underflow&&(a&&"last"!==a||this.index(this._first)>0||this.tail&&this.inTail)?!0:!1},clipping:function(){return this._element["inner"+(this.vertical?"Height":"Width")]()},dimension:function(a){return a["outer"+(this.vertical?"Height":"Width")](!0)},scroll:function(b,c,d){if(this.animating)return this;if(!1===this._trigger("scroll",null,[b,c]))return this;a.isFunction(c)&&(d=c,c=!0);var e=a.jCarousel.parseTarget(b);if(e.relative){var f,g,h,i,j,k,l,m,n=this.items().length-1,o=Math.abs(e.target),p=this.options("wrap");if(e.target>0){var q=this.index(this._last);if(q>=n&&this.tail)this.inTail?"both"===p||"last"===p?this._scroll(0,c,d):a.isFunction(d)&&d.call(this,!1):this._scrollTail(c,d);else if(f=this.index(this._target),this.underflow&&f===n&&("circular"===p||"both"===p||"last"===p)||!this.underflow&&q===n&&("both"===p||"last"===p))this._scroll(0,c,d);else if(h=f+o,this.circular&&h>n){for(m=n,j=this.items().get(-1);m++=0,k&&j.after(j.clone(!0).attr("data-jcarousel-clone",!0)),this.list().append(j),k||(l={},l[this.lt]=this.dimension(j),this.moveBy(l)),this._items=null;this._scroll(j,c,d)}else this._scroll(Math.min(h,n),c,d)}else if(this.inTail)this._scroll(Math.max(this.index(this._first)-o+1,0),c,d);else if(g=this.index(this._first),f=this.index(this._target),i=this.underflow?f:g,h=i-o,0>=i&&(this.underflow&&"circular"===p||"both"===p||"first"===p))this._scroll(n,c,d);else if(this.circular&&0>h){for(m=h,j=this.items().get(0);m++<0;){j=this.items().eq(-1),k=this._visible.index(j)>=0,k&&j.after(j.clone(!0).attr("data-jcarousel-clone",!0)),this.list().prepend(j),this._items=null;var r=this.dimension(j);l={},l[this.lt]=-r,this.moveBy(l)}this._scroll(j,c,d)}else this._scroll(Math.max(h,0),c,d)}else this._scroll(e.target,c,d);return this._trigger("scrollend"),this},moveBy:function(a,b){var d=this.list().position(),e=1,f=0;return this.rtl&&!this.vertical&&(e=-1,this.relative&&(f=this.list().width()-this.clipping())),a.left&&(a.left=d.left+f+c(a.left)*e+"px"),a.top&&(a.top=d.top+f+c(a.top)*e+"px"),this.move(a,b)},move:function(b,c){c=c||{};var d=this.options("transitions"),e=!!d,f=!!d.transforms,g=!!d.transforms3d,h=c.duration||0,i=this.list();if(!e&&h>0)return void i.animate(b,c);var j=c.complete||a.noop,k={};if(e){var l={transitionDuration:i.css("transitionDuration"),transitionTimingFunction:i.css("transitionTimingFunction"),transitionProperty:i.css("transitionProperty")},m=j;j=function(){a(this).css(l),m.call(this)},k={transitionDuration:(h>0?h/1e3:0)+"s",transitionTimingFunction:d.easing||c.easing,transitionProperty:h>0?function(){return f||g?"all":b.left?"left":"top"}():"none",transform:"none"}}g?k.transform="translate3d("+(b.left||0)+","+(b.top||0)+",0)":f?k.transform="translate("+(b.left||0)+","+(b.top||0)+")":a.extend(k,b),e&&h>0&&i.one("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",j),i.css(k),0>=h&&i.each(function(){j.call(this)})},_scroll:function(b,c,d){if(this.animating)return a.isFunction(d)&&d.call(this,!1),this;if("object"!=typeof b?b=this.items().eq(b):"undefined"==typeof b.jquery&&(b=a(b)),0===b.length)return a.isFunction(d)&&d.call(this,!1),this;this.inTail=!1,this._prepare(b);var e=this._position(b),f=this.list().position()[this.lt];if(e===f)return a.isFunction(d)&&d.call(this,!1),this;var g={};return g[this.lt]=e+"px",this._animate(g,c,d),this},_scrollTail:function(b,c){if(this.animating||!this.tail)return a.isFunction(c)&&c.call(this,!1),this;var d=this.list().position()[this.lt];this.rtl&&this.relative&&!this.vertical&&(d+=this.list().width()-this.clipping()),this.rtl&&!this.vertical?d+=this.tail:d-=this.tail,this.inTail=!0;var e={};return e[this.lt]=d+"px",this._update({target:this._target.next(),fullyvisible:this._fullyvisible.slice(1).add(this._visible.last())}),this._animate(e,b,c),this},_animate:function(b,c,d){if(d=d||a.noop,!1===this._trigger("animate"))return d.call(this,!1),this;this.animating=!0;var e=this.options("animation"),f=a.proxy(function(){this.animating=!1;var a=this.list().find("[data-jcarousel-clone]");a.length>0&&(a.remove(),this._reload()),this._trigger("animateend"),d.call(this,!0)},this),g="object"==typeof e?a.extend({},e):{duration:e},h=g.complete||a.noop;return c===!1?g.duration=0:"undefined"!=typeof a.fx.speeds[g.duration]&&(g.duration=a.fx.speeds[g.duration]),g.complete=function(){f(),h.call(this)},this.move(b,g),this},_prepare:function(b){var d,e,f,g,h=this.index(b),i=h,j=this.dimension(b),k=this.clipping(),l=this.vertical?"bottom":this.rtl?"left":"right",m=this.options("center"),n={target:b,first:b,last:b,visible:b,fullyvisible:k>=j?b:a()};if(m&&(j/=2,k/=2),k>j)for(;;){if(d=this.items().eq(++i),0===d.length){if(!this.circular)break;if(d=this.items().eq(0),b.get(0)===d.get(0))break;if(e=this._visible.index(d)>=0,e&&d.after(d.clone(!0).attr("data-jcarousel-clone",!0)),this.list().append(d),!e){var o={};o[this.lt]=this.dimension(d),this.moveBy(o)}this._items=null}if(g=this.dimension(d),0===g)break;if(j+=g,n.last=d,n.visible=n.visible.add(d),f=c(d.css("margin-"+l)),k>=j-f&&(n.fullyvisible=n.fullyvisible.add(d)),j>=k)break}if(!this.circular&&!m&&k>j)for(i=h;;){if(--i<0)break;if(d=this.items().eq(i),0===d.length)break;if(g=this.dimension(d),0===g)break;if(j+=g,n.first=d,n.visible=n.visible.add(d),f=c(d.css("margin-"+l)),k>=j-f&&(n.fullyvisible=n.fullyvisible.add(d)),j>=k)break}return this._update(n),this.tail=0,m||"circular"===this.options("wrap")||"custom"===this.options("wrap")||this.index(n.last)!==this.items().length-1||(j-=c(n.last.css("margin-"+l)),j>k&&(this.tail=j-k)),this},_position:function(a){var b=this._first,c=b.position()[this.lt],d=this.options("center"),e=d?this.clipping()/2-this.dimension(b)/2:0;return this.rtl&&!this.vertical?(c-=this.relative?this.list().width()-this.dimension(b):this.clipping()-this.dimension(b),c+=e):c-=e,!d&&(this.index(a)>this.index(b)||this.inTail)&&this.tail?(c=this.rtl&&!this.vertical?c-this.tail:c+this.tail,this.inTail=!0):this.inTail=!1,-c},_update:function(b){var c,d=this,e={target:this._target,first:this._first,last:this._last,visible:this._visible,fullyvisible:this._fullyvisible},f=this.index(b.first||e.first)e)return this.scroll(e,c,d);if(e>=g&&h>=e)return a.isFunction(d)&&d.call(this,!1),this;for(var i,j=this.items(),k=this.clipping(),l=this.vertical?"bottom":this.rtl?"left":"right",m=0;;){if(i=j.eq(e),0===i.length)break;if(m+=this.dimension(i),m>=k){var n=parseFloat(i.css("margin-"+l))||0;m-n!==k&&e++;break}if(0>=e)break;e--}return this.scroll(e,c,d)}}(jQuery),function(a){"use strict";a.jCarousel.plugin("jcarouselControl",{_options:{target:"+=1",event:"click",method:"scroll"},_active:null,_init:function(){this.onDestroy=a.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",a.proxy(this._create,this))},this),this.onReload=a.proxy(this._reload,this),this.onEvent=a.proxy(function(b){b.preventDefault();var c=this.options("method");a.isFunction(c)?c.call(this):this.carousel().jcarousel(this.options("method"),this.options("target"))},this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy).on("jcarousel:reloadend jcarousel:scrollend",this.onReload),this._element.on(this.options("event")+".jcarouselcontrol",this.onEvent),this._reload()},_destroy:function(){this._element.off(".jcarouselcontrol",this.onEvent),this.carousel().off("jcarousel:destroy",this.onDestroy).off("jcarousel:reloadend jcarousel:scrollend",this.onReload)},_reload:function(){var b,c=a.jCarousel.parseTarget(this.options("target")),d=this.carousel();if(c.relative)b=d.jcarousel(c.target>0?"hasNext":"hasPrev");else{var e="object"!=typeof c.target?d.jcarousel("items").eq(c.target):c.target;b=d.jcarousel("target").index(e)>=0}return this._active!==b&&(this._trigger(b?"active":"inactive"),this._active=b),this}})}(jQuery),function(a){"use strict";a.jCarousel.plugin("jcarouselPagination",{_options:{perPage:null,item:function(a){return''+a+""},event:"click",method:"scroll"},_carouselItems:null,_pages:{},_items:{},_currentPage:null,_init:function(){this.onDestroy=a.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",a.proxy(this._create,this))},this),this.onReload=a.proxy(this._reload,this),this.onScroll=a.proxy(this._update,this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy).on("jcarousel:reloadend",this.onReload).on("jcarousel:scrollend",this.onScroll),this._reload()},_destroy:function(){this._clear(),this.carousel().off("jcarousel:destroy",this.onDestroy).off("jcarousel:reloadend",this.onReload).off("jcarousel:scrollend",this.onScroll),this._carouselItems=null},_reload:function(){var b=this.options("perPage");if(this._pages={},this._items={},a.isFunction(b)&&(b=b.call(this)),null==b)this._pages=this._calculatePages();else for(var c,d=parseInt(b,10)||0,e=this._getCarouselItems(),f=1,g=0;;){if(c=e.eq(g++),0===c.length)break;this._pages[f]=this._pages[f]?this._pages[f].add(c):c,g%d===0&&f++}this._clear();var h=this,i=this.carousel().data("jcarousel"),j=this._element,k=this.options("item"),l=this._getCarouselItems().length;a.each(this._pages,function(b,c){var d=h._items[b]=a(k.call(h,b,c));d.on(h.options("event")+".jcarouselpagination",a.proxy(function(){var a=c.eq(0);if(i.circular){var d=i.index(i.target()),e=i.index(a);parseFloat(b)>parseFloat(h._currentPage)?d>e&&(a="+="+(l-d+e)):e>d&&(a="-="+(d+(l-e)))}i[this.options("method")](a)},h)),j.append(d)}),this._update()},_update:function(){var b,c=this.carousel().jcarousel("target");a.each(this._pages,function(a,d){return d.each(function(){return c.is(this)?(b=a,!1):void 0}),b?!1:void 0}),this._currentPage!==b&&(this._trigger("inactive",this._items[this._currentPage]),this._trigger("active",this._items[b])),this._currentPage=b},items:function(){return this._items},reloadCarouselItems:function(){return this._carouselItems=null,this},_clear:function(){this._element.empty(),this._currentPage=null},_calculatePages:function(){for(var a,b,c=this.carousel().data("jcarousel"),d=this._getCarouselItems(),e=c.clipping(),f=0,g=0,h=1,i={};;){if(a=d.eq(g++),0===a.length)break;b=c.dimension(a),f+b>e&&(h++,f=0),f+=b,i[h]=i[h]?i[h].add(a):a}return i},_getCarouselItems:function(){return this._carouselItems||(this._carouselItems=this.carousel().jcarousel("items")),this._carouselItems}})}(jQuery),function(a,b){"use strict";var c,d,e={hidden:"visibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange",webkitHidden:"webkitvisibilitychange"};a.each(e,function(a,e){return"undefined"!=typeof b[a]?(c=a,d=e,!1):void 0}),a.jCarousel.plugin("jcarouselAutoscroll",{_options:{target:"+=1",interval:3e3,autostart:!0},_timer:null,_started:!1,_init:function(){this.onDestroy=a.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",a.proxy(this._create,this))},this),this.onAnimateEnd=a.proxy(this._start,this),this.onVisibilityChange=a.proxy(function(){b[c]?this._stop():this._start()},this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy),a(b).on(d,this.onVisibilityChange),this.options("autostart")&&this.start()},_destroy:function(){this._stop(),this.carousel().off("jcarousel:destroy",this.onDestroy),a(b).off(d,this.onVisibilityChange)},_start:function(){return this._stop(),this._started?(this.carousel().one("jcarousel:animateend",this.onAnimateEnd),this._timer=setTimeout(a.proxy(function(){this.carousel().jcarousel("scroll",this.options("target"))},this),this.options("interval")),this):void 0},_stop:function(){return this._timer&&(this._timer=clearTimeout(this._timer)),this.carousel().off("jcarousel:animateend",this.onAnimateEnd),this},start:function(){return this._started=!0,this._start(),this},stop:function(){return this._started=!1,this._stop(),this}})}(jQuery,document); \ No newline at end of file diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/arrows_left.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/arrows_left.png new file mode 100755 index 0000000..4252afe Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/arrows_left.png differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/arrows_right.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/arrows_right.png new file mode 100755 index 0000000..e9468f6 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/arrows_right.png differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/credits.txt b/frontend/web/js/jcarousel/skins/HOME_SLIDER/credits.txt new file mode 100755 index 0000000..e5ec8c2 --- /dev/null +++ b/frontend/web/js/jcarousel/skins/HOME_SLIDER/credits.txt @@ -0,0 +1 @@ +Button images copyright by Tango Icon Library Team (http://tango.freedesktop.org/Tango_Icon_Library) \ No newline at end of file diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/next-horizontal.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/next-horizontal.png new file mode 100755 index 0000000..6fcd3d9 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/next-horizontal.png differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/next-vertical.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/next-vertical.png new file mode 100755 index 0000000..066a3e0 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/next-vertical.png differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/next.jpg b/frontend/web/js/jcarousel/skins/HOME_SLIDER/next.jpg new file mode 100755 index 0000000..5ad08bf Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/next.jpg differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/next.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/next.png new file mode 100755 index 0000000..b2fb161 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/next.png differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev-horizontal.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev-horizontal.png new file mode 100755 index 0000000..36472c0 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev-horizontal.png differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev-vertical.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev-vertical.png new file mode 100755 index 0000000..bb30f85 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev-vertical.png differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev.jpg b/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev.jpg new file mode 100755 index 0000000..59a2cdb Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev.jpg differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev.png new file mode 100755 index 0000000..426628d Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/prev.png differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/skin.css b/frontend/web/js/jcarousel/skins/HOME_SLIDER/skin.css new file mode 100755 index 0000000..31cfa88 --- /dev/null +++ b/frontend/web/js/jcarousel/skins/HOME_SLIDER/skin.css @@ -0,0 +1,183 @@ +.jcarousel-skin-tango .jcarousel-container { + +} + +.jcarousel-skin-tango .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango .jcarousel-container-horizontal { + width: 240px;text-align:left;border1:1px solid red; + padding: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-container-vertical { + width: 42px; + height: 200px; + padding: 20px 0px; +} + +.jcarousel-skin-tango .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango .jcarousel-clip-horizontal { + width: 200px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-clip-vertical { + width: 42px; + height: 200px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango .jcarousel-item { + width: 42px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_next.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_prev.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/skin2.css b/frontend/web/js/jcarousel/skins/HOME_SLIDER/skin2.css new file mode 100755 index 0000000..dbcce80 --- /dev/null +++ b/frontend/web/js/jcarousel/skins/HOME_SLIDER/skin2.css @@ -0,0 +1,185 @@ +.jcarousel-skin-tango2 .jcarousel-container { + +} + +.jcarousel-skin-tango2 img{width:50px;float:left;margin-right:20px;} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango2 .jcarousel-container-horizontal { + width: 240px;text-align:left; + padding: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-container-vertical { + width: 242px; + height: 320px; + padding: 40px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango2 .jcarousel-clip-horizontal { + width: 200px; + height1: 320px; +} + +.jcarousel-skin-tango2 .jcarousel-clip-vertical { + width: 242px; + height: 320px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango2 .jcarousel-item { + width: 242px; + height1: 300px; +} + +.jcarousel-skin-tango2 .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango2 .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango2 .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 115px; + width: 20px; + height: 12px; + cursor: pointer; + background: transparent url(v_next2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 115px; + width: 29px; + height: 12px; + cursor: pointer; + background: transparent url(v_prev2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_next.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_next.png new file mode 100755 index 0000000..e5056d1 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_next.png differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_next2.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_next2.png new file mode 100755 index 0000000..600203b Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_next2.png differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_prev.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_prev.png new file mode 100755 index 0000000..36c087e Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_prev.png differ diff --git a/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_prev2.png b/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_prev2.png new file mode 100755 index 0000000..791e630 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/HOME_SLIDER/v_prev2.png differ diff --git a/frontend/web/js/jcarousel/skins/ie7/credits.txt b/frontend/web/js/jcarousel/skins/ie7/credits.txt new file mode 100755 index 0000000..87ccdbc --- /dev/null +++ b/frontend/web/js/jcarousel/skins/ie7/credits.txt @@ -0,0 +1 @@ +Button images copyright by Microsoft Corporation (http://microsoft.com) \ No newline at end of file diff --git a/frontend/web/js/jcarousel/skins/ie7/loading-small.gif b/frontend/web/js/jcarousel/skins/ie7/loading-small.gif new file mode 100755 index 0000000..b25ada9 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/ie7/loading-small.gif differ diff --git a/frontend/web/js/jcarousel/skins/ie7/loading.gif b/frontend/web/js/jcarousel/skins/ie7/loading.gif new file mode 100755 index 0000000..5c7f808 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/ie7/loading.gif differ diff --git a/frontend/web/js/jcarousel/skins/ie7/loading_small.gif b/frontend/web/js/jcarousel/skins/ie7/loading_small.gif new file mode 100755 index 0000000..5979f6d Binary files /dev/null and b/frontend/web/js/jcarousel/skins/ie7/loading_small.gif differ diff --git a/frontend/web/js/jcarousel/skins/ie7/next-horizontal.gif b/frontend/web/js/jcarousel/skins/ie7/next-horizontal.gif new file mode 100755 index 0000000..36c1f78 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/ie7/next-horizontal.gif differ diff --git a/frontend/web/js/jcarousel/skins/ie7/prev-horizontal.gif b/frontend/web/js/jcarousel/skins/ie7/prev-horizontal.gif new file mode 100755 index 0000000..3b93296 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/ie7/prev-horizontal.gif differ diff --git a/frontend/web/js/jcarousel/skins/ie7/skin.css b/frontend/web/js/jcarousel/skins/ie7/skin.css new file mode 100755 index 0000000..243873f --- /dev/null +++ b/frontend/web/js/jcarousel/skins/ie7/skin.css @@ -0,0 +1,190 @@ +.jcarousel-skin-ie7 .jcarousel-container { + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + background: #D4D0C8; + border: 1px solid #808080; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-ie7 .jcarousel-container-horizontal { + width: 245px; + padding: 20px 40px; +} + +.jcarousel-skin-ie7 .jcarousel-container-vertical { + width: 75px; + height: 245px; + padding: 40px 20px; +} + +.jcarousel-skin-ie7 .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-ie7 .jcarousel-clip-horizontal { + width: 245px; + height: 77px; +} + +.jcarousel-skin-ie7 .jcarousel-clip-vertical { + width: 77px; + height: 245px; +} + +.jcarousel-skin-ie7 .jcarousel-item { + width: 75px; + height: 75px; + border: 1px solid #fff; +} + +.jcarousel-skin-ie7 .jcarousel-item:hover, +.jcarousel-skin-ie7 .jcarousel-item:focus { + border-color: #808080; +} + +.jcarousel-skin-ie7 .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 7px; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 7px; + margin-right: 0; +} + +.jcarousel-skin-ie7 .jcarousel-item-vertical { + margin-bottom: 7px; +} + +.jcarousel-skin-ie7 .jcarousel-item-placeholder { +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-ie7 .jcarousel-next-horizontal { + position: absolute; + top: 43px; + right: 5px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(next-horizontal.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev-horizontal.gif); +} + +.jcarousel-skin-ie7 .jcarousel-next-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-next-horizontal:focus { + background-position: -32px 0; +} + +.jcarousel-skin-ie7 .jcarousel-next-horizontal:active { + background-position: -64px 0; +} + +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal, +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: -96px 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-horizontal { + position: absolute; + top: 43px; + left: 5px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(prev-horizontal.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next-horizontal.gif); +} + +.jcarousel-skin-ie7 .jcarousel-prev-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-prev-horizontal:focus { + background-position: -32px 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-horizontal:active { + background-position: -64px 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: -96px 0; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-ie7 .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 43px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(next-vertical.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-next-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-next-vertical:focus { + background-position: 0 -32px; +} + +.jcarousel-skin-ie7 .jcarousel-next-vertical:active { + background-position: 0 -64px; +} + +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical, +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 -96px; +} + +.jcarousel-skin-ie7 .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 43px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(prev-vertical.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-prev-vertical:focus { + background-position: 0 -32px; +} + +.jcarousel-skin-ie7 .jcarousel-prev-vertical:active { + background-position: 0 -64px; +} + +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 -96px; +} diff --git a/frontend/web/js/jcarousel/skins/tango/arrows_left.png b/frontend/web/js/jcarousel/skins/tango/arrows_left.png new file mode 100755 index 0000000..4252afe Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/arrows_left.png differ diff --git a/frontend/web/js/jcarousel/skins/tango/arrows_right.png b/frontend/web/js/jcarousel/skins/tango/arrows_right.png new file mode 100755 index 0000000..e9468f6 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/arrows_right.png differ diff --git a/frontend/web/js/jcarousel/skins/tango/credits.txt b/frontend/web/js/jcarousel/skins/tango/credits.txt new file mode 100755 index 0000000..e5ec8c2 --- /dev/null +++ b/frontend/web/js/jcarousel/skins/tango/credits.txt @@ -0,0 +1 @@ +Button images copyright by Tango Icon Library Team (http://tango.freedesktop.org/Tango_Icon_Library) \ No newline at end of file diff --git a/frontend/web/js/jcarousel/skins/tango/next-horizontal.png b/frontend/web/js/jcarousel/skins/tango/next-horizontal.png new file mode 100755 index 0000000..6fcd3d9 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/next-horizontal.png differ diff --git a/frontend/web/js/jcarousel/skins/tango/next-vertical.png b/frontend/web/js/jcarousel/skins/tango/next-vertical.png new file mode 100755 index 0000000..066a3e0 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/next-vertical.png differ diff --git a/frontend/web/js/jcarousel/skins/tango/next.jpg b/frontend/web/js/jcarousel/skins/tango/next.jpg new file mode 100755 index 0000000..5ad08bf Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/next.jpg differ diff --git a/frontend/web/js/jcarousel/skins/tango/next.png b/frontend/web/js/jcarousel/skins/tango/next.png new file mode 100755 index 0000000..b2fb161 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/next.png differ diff --git a/frontend/web/js/jcarousel/skins/tango/prev-horizontal.png b/frontend/web/js/jcarousel/skins/tango/prev-horizontal.png new file mode 100755 index 0000000..36472c0 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/prev-horizontal.png differ diff --git a/frontend/web/js/jcarousel/skins/tango/prev-vertical.png b/frontend/web/js/jcarousel/skins/tango/prev-vertical.png new file mode 100755 index 0000000..bb30f85 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/prev-vertical.png differ diff --git a/frontend/web/js/jcarousel/skins/tango/prev.jpg b/frontend/web/js/jcarousel/skins/tango/prev.jpg new file mode 100755 index 0000000..59a2cdb Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/prev.jpg differ diff --git a/frontend/web/js/jcarousel/skins/tango/prev.png b/frontend/web/js/jcarousel/skins/tango/prev.png new file mode 100755 index 0000000..426628d Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/prev.png differ diff --git a/frontend/web/js/jcarousel/skins/tango/skin.css b/frontend/web/js/jcarousel/skins/tango/skin.css new file mode 100755 index 0000000..31cfa88 --- /dev/null +++ b/frontend/web/js/jcarousel/skins/tango/skin.css @@ -0,0 +1,183 @@ +.jcarousel-skin-tango .jcarousel-container { + +} + +.jcarousel-skin-tango .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango .jcarousel-container-horizontal { + width: 240px;text-align:left;border1:1px solid red; + padding: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-container-vertical { + width: 42px; + height: 200px; + padding: 20px 0px; +} + +.jcarousel-skin-tango .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango .jcarousel-clip-horizontal { + width: 200px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-clip-vertical { + width: 42px; + height: 200px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango .jcarousel-item { + width: 42px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_next.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_prev.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/jcarousel/skins/tango/skin2.css b/frontend/web/js/jcarousel/skins/tango/skin2.css new file mode 100755 index 0000000..dbcce80 --- /dev/null +++ b/frontend/web/js/jcarousel/skins/tango/skin2.css @@ -0,0 +1,185 @@ +.jcarousel-skin-tango2 .jcarousel-container { + +} + +.jcarousel-skin-tango2 img{width:50px;float:left;margin-right:20px;} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango2 .jcarousel-container-horizontal { + width: 240px;text-align:left; + padding: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-container-vertical { + width: 242px; + height: 320px; + padding: 40px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango2 .jcarousel-clip-horizontal { + width: 200px; + height1: 320px; +} + +.jcarousel-skin-tango2 .jcarousel-clip-vertical { + width: 242px; + height: 320px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango2 .jcarousel-item { + width: 242px; + height1: 300px; +} + +.jcarousel-skin-tango2 .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango2 .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango2 .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 115px; + width: 20px; + height: 12px; + cursor: pointer; + background: transparent url(v_next2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 115px; + width: 29px; + height: 12px; + cursor: pointer; + background: transparent url(v_prev2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/jcarousel/skins/tango/v_next.png b/frontend/web/js/jcarousel/skins/tango/v_next.png new file mode 100755 index 0000000..e5056d1 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/v_next.png differ diff --git a/frontend/web/js/jcarousel/skins/tango/v_next2.png b/frontend/web/js/jcarousel/skins/tango/v_next2.png new file mode 100755 index 0000000..600203b Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/v_next2.png differ diff --git a/frontend/web/js/jcarousel/skins/tango/v_prev.png b/frontend/web/js/jcarousel/skins/tango/v_prev.png new file mode 100755 index 0000000..36c087e Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/v_prev.png differ diff --git a/frontend/web/js/jcarousel/skins/tango/v_prev2.png b/frontend/web/js/jcarousel/skins/tango/v_prev2.png new file mode 100755 index 0000000..791e630 Binary files /dev/null and b/frontend/web/js/jcarousel/skins/tango/v_prev2.png differ diff --git a/frontend/web/js/jquery-1.5.min.js b/frontend/web/js/jquery-1.5.min.js new file mode 100755 index 0000000..9144b8a --- /dev/null +++ b/frontend/web/js/jquery-1.5.min.js @@ -0,0 +1,16 @@ +/*! + * jQuery JavaScript Library v1.5 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Jan 31 08:31:29 2011 -0500 + */ +(function(a,b){function b$(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function bX(a){if(!bR[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bR[a]=c}return bR[a]}function bW(a,b){var c={};d.each(bV.concat.apply([],bV.slice(0,b)),function(){c[this]=a});return c}function bJ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f=a.converters,g,h=e.length,i,j=e[0],k,l,m,n,o;for(g=1;g=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(q,"`").replace(r,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,p,q=[],r=[],s=d._data(this,u);typeof s==="function"&&(s=s.events);if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,p=f.handleObj.origHandler.apply(f.elem,arguments);if(p===!1||a.isPropagationStopped()){c=f.level,p===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,b,c){c[0].type=a;return d.event.handle.apply(b,c)}function w(){return!0}function v(){return!1}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");e.type="text/javascript",d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1?(g=Array(c),d.each(b,function(a,b){d.when(b).then(function(b){g[a]=arguments.length>1?E.call(arguments,0):b,--c||e.resolveWith(f,g)},e.reject)})):e!==a&&e.resolve(a);return f},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return a.jQuery=a.$=d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="
    a";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option"));if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:b.getElementsByTagName("input")[0].value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,_scriptEval:null,noCloneEvent:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},g.disabled=!0,d.support.optDisabled=!h.disabled,d.support.scriptEval=function(){if(d.support._scriptEval===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();e.type="text/javascript";try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(d.support._scriptEval=!0,delete a[f]):d.support._scriptEval=!1,b.removeChild(e),b=e=f=null}return d.support._scriptEval};try{delete b.test}catch(i){d.support.deleteExpando=!1}b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function j(){d.support.noCloneEvent=!1,b.detachEvent("onclick",j)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="";var k=c.createDocumentFragment();k.appendChild(b.firstChild),d.support.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
    ",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
    t
    ";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var l=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=l("submit"),d.support.changeBubbles=l("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!d.isEmptyObject(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={}),typeof c==="object"&&(f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c)),i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,i=g?b[d.expando]:d.expando;if(!h[i])return;if(c){var j=e?h[i][f]:h[i];if(j){delete j[c];if(!d.isEmptyObject(j))return}}if(e){delete h[i][f];if(!d.isEmptyObject(h[i]))return}var k=h[i][f];d.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},h[i][f]=k):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,j=c.type==="select-one";if(f<0)return null;for(var k=j?f:0,l=j?f+1:h.length;k=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=j.test(c);if(c==="selected"&&!d.support.optSelected){var n=a.parentNode;n&&(n.selectedIndex,n.parentNode&&n.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&k.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:l.test(a.nodeName)||m.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var o=/\.(.*)$/,p=/^(?:textarea|input|select)$/i,q=/\./g,r=/ /g,s=/[^\w\s.|`]/g,t=function(a){return a.replace(s,"\\$&")},u="events";d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a);if(f===!1)f=v;else if(!f)return;var h,i;f.handler&&(h=f,f=h.handler),f.guid||(f.guid=d.guid++);var j=d._data(c);if(!j)return;var k=j[u],l=j.handle;typeof k==="function"?(l=k.handle,k=k.events):k||(c.nodeType||(j[u]=j=function(){}),j.events=k={}),l||(j.handle=l=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(l.elem,arguments):b}),l.elem=c,e=e.split(" ");var m,n=0,o;while(m=e[n++]){i=h?d.extend({},h):{handler:f,data:g},m.indexOf(".")>-1?(o=m.split("."),m=o.shift(),i.namespace=o.slice(0).sort().join(".")):(o=[],i.namespace=""),i.type=m,i.guid||(i.guid=f.guid);var p=k[m],q=d.event.special[m]||{};if(!p){p=k[m]=[];if(!q.setup||q.setup.call(c,g,o,l)===!1)c.addEventListener?c.addEventListener(m,l,!1):c.attachEvent&&c.attachEvent("on"+m,l)}q.add&&(q.add.call(c,i),i.handler.guid||(i.handler.guid=f.guid)),p.push(i),d.event.global[m]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),w=s&&s[u];if(!s||!w)return;typeof w==="function"&&(s=w,w=w.events),c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in w)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),t).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=w[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=e.nodeType?d._data(e,"handle"):(d._data(e,u)||{}).handle;h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(o,""),n=d.nodeName(l,"a")&&m==="click",p=d.event.special[m]||{};if((!p._default||p._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,u),typeof i==="function"&&(i=i.events),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(p.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f){a.type="change",a.liveFired=b;return d.event.trigger(a,arguments[1],c)}}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;if(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")return B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")return B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return p.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return p.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function s(a,b,c,d,e,f){for(var g=0,h=d.length;g0){k=j;break}}j=j[a]}d[g]=k}}}function r(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0;[0,0].sort(function(){h=!1;return 0});var i=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var l,m,o,p,q,r,s,u,v=!0,w=i.isXML(d),x=[],y=b;do{a.exec(""),l=a.exec(y);if(l){y=l[3],x.push(l[1]);if(l[2]){p=l[3];break}}}while(l);if(x.length>1&&k.exec(b))if(x.length===2&&j.relative[x[0]])m=t(x[0]+x[1],d);else{m=j.relative[x[0]]?[d]:i(x.shift(),d);while(x.length)b=x.shift(),j.relative[b]&&(b+=x.shift()),m=t(b,m)}else{!g&&x.length>1&&d.nodeType===9&&!w&&j.match.ID.test(x[0])&&!j.match.ID.test(x[x.length-1])&&(q=i.find(x.shift(),d,w),d=q.expr?i.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:n(g)}:i.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),m=q.expr?i.filter(q.expr,q.set):q.set,x.length>0?o=n(m):v=!1;while(x.length)r=x.pop(),s=r,j.relative[r]?s=x.pop():r="",s==null&&(s=d),j.relative[r](o,s,w)}else o=x=[]}o||(o=m),o||i.error(r||b);if(f.call(o)==="[object Array]")if(v)if(d&&d.nodeType===1)for(u=0;o[u]!=null;u++)o[u]&&(o[u]===!0||o[u].nodeType===1&&i.contains(d,o[u]))&&e.push(m[u]);else for(u=0;o[u]!=null;u++)o[u]&&o[u].nodeType===1&&e.push(m[u]);else e.push.apply(e,o);else n(o,e);p&&(i(p,h,e,g),i.uniqueSort(e));return e};i.uniqueSort=function(a){if(p){g=h,a.sort(p);if(g)for(var b=1;b0},i.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=j.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!/\W/.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a,b){return a[1].toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||i.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&i.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(/\\/g,"");!f&&j.attrMap[g]&&(a[1]=j.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(/\\/g,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=i(b[3],null,null,c);else{var g=i.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(j.match.POS.test(b[0])||j.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!i(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=j.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||i.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,k=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=j.attrHandle[c]?j.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=j.setFilters[e];if(f)return f(a,c,b,d)}}},k=j.match.POS,l=function(a,b){return"\\"+(b-0+1)};for(var m in j.match)j.match[m]=new RegExp(j.match[m].source+/(?![^\[]*\])(?![^\(]*\))/.source),j.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+j.match[m].source.replace(/\\(\d+)/g,l));var n=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(o){n=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(j.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},j.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(j.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(j.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=i,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){i=function(b,e,f,g){e=e||c;if(!g&&!i.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return n(e.getElementsByTagName(b),f);if(h[2]&&j.find.CLASS&&e.getElementsByClassName)return n(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return n([e.body],f);if(h&&h[3]){var k=e.getElementById(h[3]);if(!k||!k.parentNode)return n([],f);if(k.id===h[3])return n([k],f)}try{return n(e.querySelectorAll(b),f)}catch(l){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e.getAttribute("id"),o=m||d,p=e.parentNode,q=/^\s*[+~]/.test(b);m?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),q&&p&&(e=e.parentNode);try{if(!q||p)return n(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(r){}finally{m||e.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)i[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(i.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!i.isXML(a))try{if(d||!j.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return i(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;j.order.splice(1,0,"CLASS"),j.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?i.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?i.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains=function(){return!1},i.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var t=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=j.match.PSEUDO.exec(a))e+=c[0],a=a.replace(j.match.PSEUDO,"");a=j.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div
    ","
    "]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!0:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if(!d.support.noCloneEvent&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");for(h=0;f[h];++h)$(f[h],g[h]);$(a,e)}if(b){Z(a,e);if(c&&"getElementsByTagName"in a){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");if(f.length)for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var ba=/alpha\([^)]*\)/i,bb=/opacity=([^)]*)/,bc=/-([a-z])/ig,bd=/([A-Z])/g,be=/^-?\d+(?:px)?$/i,bf=/^-?\d/,bg={position:"absolute",visibility:"hidden",display:"block"},bh=["Left","Right"],bi=["Top","Bottom"],bj,bk,bl,bm=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bj(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bj)return bj(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bc,bm)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bn(a,b,e):d.swap(a,bg,function(){f=bn(a,b,e)});if(f<=0){f=bj(a,b,b),f==="0px"&&bl&&(f=bl(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!be.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=ba.test(f)?f.replace(ba,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bk=function(a,c,e){var f,g,h;e=e.replace(bd,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bl=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!be.test(d)&&bf.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bj=bk||bl,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bo=/%20/g,bp=/\[\]$/,bq=/\r?\n/g,br=/#.*$/,bs=/^(.*?):\s*(.*?)\r?$/mg,bt=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bu=/^(?:GET|HEAD)$/,bv=/^\/\//,bw=/\?/,bx=/)<[^<]*)*<\/script>/gi,by=/^(?:select|textarea)/i,bz=/\s+/,bA=/([?&])_=[^&]*/,bB=/^(\w+:)\/\/([^\/?#:]+)(?::(\d+))?/,bC=d.fn.load,bD={},bE={};d.fn.extend({load:function(a,b,c){if(typeof a!=="string"&&bC)return bC.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}var g="GET";b&&(d.isFunction(b)?(c=b,b=null):typeof b==="object"&&(b=d.param(b,d.ajaxSettings.traditional),g="POST"));var h=this;d.ajax({url:a,type:g,dataType:"html",data:b,complete:function(a,b,e){e=a.responseText,a.isResolved()&&(a.done(function(a){e=a}),h.html(f?d("
    ").append(e.replace(bx,"")).find(f):e)),c&&h.each(c,[e,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||by.test(this.nodeName)||bt.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bq,"\r\n")}}):{name:b.name,value:c.replace(bq,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,b){d[b]=function(a,c,e,f){d.isFunction(c)&&(f=f||e,e=c,c=null);return d.ajax({type:b,url:a,data:c,success:e,dataType:f})}}),d.extend({getScript:function(a,b){return d.get(a,null,b,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a){d.extend(!0,d.ajaxSettings,a),a.context&&(d.ajaxSettings.context=a.context)},ajaxSettings:{url:location.href,global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bF(bD),ajaxTransport:bF(bE),ajax:function(a,e){function w(a,c,e,l){if(t!==2){t=2,p&&clearTimeout(p),o=b,m=l||"",v.readyState=a?4:0;var n,q,r,s=e?bI(f,v,e):b,u,w;if(a>=200&&a<300||a===304){if(f.ifModified){if(u=v.getResponseHeader("Last-Modified"))d.lastModified[f.url]=u;if(w=v.getResponseHeader("Etag"))d.etag[f.url]=w}if(a===304)c="notmodified",n=!0;else try{q=bJ(f,s),c="success",n=!0}catch(x){c="parsererror",r=x}}else r=c,a&&(c="error",a<0&&(a=0));v.status=a,v.statusText=c,n?i.resolveWith(g,[q,c,v]):i.rejectWith(g,[v,c,r]),v.statusCode(k),k=b,f.global&&h.trigger("ajax"+(n?"Success":"Error"),[v,f,n?q:r]),j.resolveWith(g,[v,c]),f.global&&(h.trigger("ajaxComplete",[v,f]),--d.active||d.event.trigger("ajaxStop"))}}typeof e!=="object"&&(e=a,a=b),e=e||{};var f=d.extend(!0,{},d.ajaxSettings,e),g=(f.context=("context"in e?e:d.ajaxSettings).context)||f,h=g===f?d.event:d(g),i=d.Deferred(),j=d._Deferred(),k=f.statusCode||{},l={},m,n,o,p,q=c.location,r=q.protocol||"http:",s,t=0,u,v={readyState:0,setRequestHeader:function(a,b){t===0&&(l[a.toLowerCase()]=b);return this},getAllResponseHeaders:function(){return t===2?m:null},getResponseHeader:function(a){var b;if(t===2){if(!n){n={};while(b=bs.exec(m))n[b[1].toLowerCase()]=b[2]}b=n[a.toLowerCase()]}return b||null},abort:function(a){a=a||"abort",o&&o.abort(a),w(0,a);return this}};i.promise(v),v.success=v.done,v.error=v.fail,v.complete=j.done,v.statusCode=function(a){if(a){var b;if(t<2)for(b in a)k[b]=[k[b],a[b]];else b=a[v.status],v.then(b,b)}return this},f.url=(""+(a||f.url)).replace(br,"").replace(bv,r+"//"),f.dataTypes=d.trim(f.dataType||"*").toLowerCase().split(bz),f.crossDomain||(s=bB.exec(f.url.toLowerCase()),f.crossDomain=s&&(s[1]!=r||s[2]!=q.hostname||(s[3]||(s[1]==="http:"?80:443))!=(q.port||(r==="http:"?80:443)))),f.data&&f.processData&&typeof f.data!=="string"&&(f.data=d.param(f.data,f.traditional)),bG(bD,f,e,v),f.type=f.type.toUpperCase(),f.hasContent=!bu.test(f.type),f.global&&d.active++===0&&d.event.trigger("ajaxStart");if(!f.hasContent){f.data&&(f.url+=(bw.test(f.url)?"&":"?")+f.data);if(f.cache===!1){var x=d.now(),y=f.url.replace(bA,"$1_="+x);f.url=y+(y===f.url?(bw.test(f.url)?"&":"?")+"_="+x:"")}}if(f.data&&f.hasContent&&f.contentType!==!1||e.contentType)l["content-type"]=f.contentType;f.ifModified&&(d.lastModified[f.url]&&(l["if-modified-since"]=d.lastModified[f.url]),d.etag[f.url]&&(l["if-none-match"]=d.etag[f.url])),l.accept=f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", */*; q=0.01":""):f.accepts["*"];for(u in f.headers)l[u.toLowerCase()]=f.headers[u];if(!f.beforeSend||f.beforeSend.call(g,v,f)!==!1&&t!==2){for(u in {success:1,error:1,complete:1})v[u](f[u]);o=bG(bE,f,e,v);if(o){t=v.readyState=1,f.global&&h.trigger("ajaxSend",[v,f]),f.async&&f.timeout>0&&(p=setTimeout(function(){v.abort("timeout")},f.timeout));try{o.send(l,w)}catch(z){status<2?w(-1,z):d.error(z)}}else w(-1,"No Transport")}else w(0,"abort"),v=!1;return v},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery)d.each(a,function(){f(this.name,this.value)});else for(var g in a)bH(g,a[g],c,f);return e.join("&").replace(bo,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bK=d.now(),bL=/(\=)\?(&|$)|()\?\?()/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bK++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){e=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bL.test(b.url)||e&&bL.test(b.data))){var f,g=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h=a[g],i=b.url,j=b.data,k="$1"+g+"$2";b.jsonp!==!1&&(i=i.replace(bL,k),b.url===i&&(e&&(j=j.replace(bL,k)),b.data===j&&(i+=(/\?/.test(i)?"&":"?")+b.jsonp+"="+g))),b.url=i,b.data=j,a[g]=function(a){f=[a]},b.complete=[function(){a[g]=h;if(h)f&&d.isFunction(h)&&a[g](f[0]);else try{delete a[g]}catch(b){}},b.complete],b.converters["script json"]=function(){f||d.error(g+" was not called");return f[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript"},contents:{script:/javascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bM=d.now(),bN={},bO,bP;d.ajaxSettings.xhr=a.ActiveXObject?function(){if(a.location.protocol!=="file:")try{return new a.XMLHttpRequest}catch(b){}try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}:function(){return new a.XMLHttpRequest};try{bP=d.ajaxSettings.xhr()}catch(bQ){}d.support.ajax=!!bP,d.support.cors=bP&&"withCredentials"in bP,bP=b,d.support.ajax&&d.ajaxTransport(function(b){if(!b.crossDomain||d.support.cors){var c;return{send:function(e,f){bO||(bO=1,d(a).bind("unload",function(){d.each(bN,function(a,b){b.onreadystatechange&&b.onreadystatechange(1)})}));var g=b.xhr(),h;b.username?g.open(b.type,b.url,b.async,b.username,b.password):g.open(b.type,b.url,b.async),(!b.crossDomain||b.hasContent)&&!e["x-requested-with"]&&(e["x-requested-with"]="XMLHttpRequest");try{d.each(e,function(a,b){g.setRequestHeader(a,b)})}catch(i){}g.send(b.hasContent&&b.data||null),c=function(a,e){if(c&&(e||g.readyState===4)){c=0,h&&(g.onreadystatechange=d.noop,delete bN[h]);if(e)g.readyState!==4&&g.abort();else{var i=g.status,j,k=g.getAllResponseHeaders(),l={},m=g.responseXML;m&&m.documentElement&&(l.xml=m),l.text=g.responseText;try{j=g.statusText}catch(n){j=""}i=i===0?!b.crossDomain||j?k?304:0:302:i==1223?204:i,f(i,j,l,k)}}},b.async&&g.readyState!==4?(h=bM++,bN[h]=g,g.onreadystatechange=c):c()},abort:function(){c&&c(0,1)}}}});var bR={},bS=/^(?:toggle|show|hide)$/,bT=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,bU,bV=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(bW("show",3),a,b,c);for(var g=0,h=this.length;g=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:bW("show",1),slideUp:bW("hide",1),slideToggle:bW("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(d.css(this.elem,this.prop));return a||0},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||"px",this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!bU&&(bU=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b
    ";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=bZ.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!bZ.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=b$(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=b$(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}})})(window); diff --git a/frontend/web/js/jquery.mask.js b/frontend/web/js/jquery.mask.js new file mode 100755 index 0000000..2644d23 --- /dev/null +++ b/frontend/web/js/jquery.mask.js @@ -0,0 +1,463 @@ +/** + * jquery.mask.js + * @version: v1.10.12 + * @author: Igor Escobar + * + * Created by Igor Escobar on 2012-03-10. Please report any bug at http://blog.igorescobar.com + * + * Copyright (c) 2012 Igor Escobar http://blog.igorescobar.com + * + * The MIT License (http://www.opensource.org/licenses/mit-license.php) + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +/*jshint laxbreak: true */ +/* global define */ + +// UMD (Universal Module Definition) patterns for JavaScript modules that work everywhere. +// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js +(function (factory) { + if (typeof define === "function" && define.amd) { + // AMD. Register as an anonymous module. + define(["jquery"], factory); + } else { + // Browser globals + factory(window.jQuery || window.Zepto); + } +}(function ($) { + "use strict"; + var Mask = function (el, mask, options) { + el = $(el); + + var jMask = this, old_value = el.val(), regexMask; + + mask = typeof mask === "function" ? mask(el.val(), undefined, el, options) : mask; + + var p = { + invalid: [], + getCaret: function () { + try { + var sel, + pos = 0, + ctrl = el.get(0), + dSel = document.selection, + cSelStart = ctrl.selectionStart; + + // IE Support + if (dSel && navigator.appVersion.indexOf("MSIE 10") === -1) { + sel = dSel.createRange(); + sel.moveStart('character', el.is("input") ? -el.val().length : -el.text().length); + pos = sel.text.length; + } + // Firefox support + else if (cSelStart || cSelStart === '0') { + pos = cSelStart; + } + + return pos; + } catch (e) {} + }, + setCaret: function(pos) { + try { + if (el.is(":focus")) { + var range, ctrl = el.get(0); + + if (ctrl.setSelectionRange) { + ctrl.setSelectionRange(pos,pos); + } else if (ctrl.createTextRange) { + range = ctrl.createTextRange(); + range.collapse(true); + range.moveEnd('character', pos); + range.moveStart('character', pos); + range.select(); + } + } + } catch (e) {} + }, + events: function() { + el + .on('keyup.mask', p.behaviour) + .on("paste.mask drop.mask", function() { + setTimeout(function() { + el.keydown().keyup(); + }, 100); + }) + .on('change.mask', function(){ + el.data('changed', true); + }) + .on("blur.mask", function(){ + if (old_value !== el.val() && !el.data('changed')) { + el.trigger("change"); + } + el.data('changed', false); + }) + // it's very important that this callback remains in this position + // otherwhise old_value it's going to work buggy + .on('keydown.mask, blur.mask', function() { + old_value = el.val(); + }) + // clear the value if it not complete the mask + .on("focusout.mask", function() { + if (options.clearIfNotMatch && !regexMask.test(p.val())) { + p.val(''); + } + }); + }, + getRegexMask: function() { + var maskChunks = [], translation, pattern, optional, recursive, oRecursive, r; + + for (var i = 0; i < mask.length; i++) { + translation = jMask.translation[mask[i]]; + + if (translation) { + + pattern = translation.pattern.toString().replace(/.{1}$|^.{1}/g, ""); + optional = translation.optional; + recursive = translation.recursive; + + if (recursive) { + maskChunks.push(mask[i]); + oRecursive = {digit: mask[i], pattern: pattern}; + } else { + maskChunks.push(!optional && !recursive ? pattern : (pattern + "?")); + } + + } else { + maskChunks.push(mask[i].replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')); + } + } + + r = maskChunks.join(""); + + if (oRecursive) { + r = r.replace(new RegExp("(" + oRecursive.digit + "(.*" + oRecursive.digit + ")?)"), "($1)?") + .replace(new RegExp(oRecursive.digit, "g"), oRecursive.pattern); + } + + return new RegExp(r); + }, + destroyEvents: function() { + el.off(['keydown', 'keyup', 'paste', 'drop', 'blur', 'focusout', ''].join('.mask ')); + }, + val: function(v) { + var isInput = el.is('input'), + method = isInput ? 'val' : 'text', + r; + + if (arguments.length > 0) { + if (el[method]() !== v) { + el[method](v); + } + r = el; + } else { + r = el[method](); + } + + return r; + }, + getMCharsBeforeCount: function(index, onCleanVal) { + for (var count = 0, i = 0, maskL = mask.length; i < maskL && i < index; i++) { + if (!jMask.translation[mask.charAt(i)]) { + index = onCleanVal ? index + 1 : index; + count++; + } + } + return count; + }, + caretPos: function (originalCaretPos, oldLength, newLength, maskDif) { + var translation = jMask.translation[mask.charAt(Math.min(originalCaretPos - 1, mask.length - 1))]; + + return !translation ? p.caretPos(originalCaretPos + 1, oldLength, newLength, maskDif) + : Math.min(originalCaretPos + newLength - oldLength - maskDif, newLength); + }, + behaviour: function(e) { + e = e || window.event; + p.invalid = []; + var keyCode = e.keyCode || e.which; + if ($.inArray(keyCode, jMask.byPassKeys) === -1) { + + var caretPos = p.getCaret(), + currVal = p.val(), + currValL = currVal.length, + changeCaret = caretPos < currValL, + newVal = p.getMasked(), + newValL = newVal.length, + maskDif = p.getMCharsBeforeCount(newValL - 1) - p.getMCharsBeforeCount(currValL - 1); + + p.val(newVal); + + // change caret but avoid CTRL+A + if (changeCaret && !(keyCode === 65 && e.ctrlKey)) { + // Avoid adjusting caret on backspace or delete + if (!(keyCode === 8 || keyCode === 46)) { + caretPos = p.caretPos(caretPos, currValL, newValL, maskDif); + } + p.setCaret(caretPos); + } + + return p.callbacks(e); + } + }, + getMasked: function (skipMaskChars) { + var buf = [], + value = p.val(), + m = 0, maskLen = mask.length, + v = 0, valLen = value.length, + offset = 1, addMethod = "push", + resetPos = -1, + lastMaskChar, + check; + + if (options.reverse) { + addMethod = "unshift"; + offset = -1; + lastMaskChar = 0; + m = maskLen - 1; + v = valLen - 1; + check = function () { + return m > -1 && v > -1; + }; + } else { + lastMaskChar = maskLen - 1; + check = function () { + return m < maskLen && v < valLen; + }; + } + + while (check()) { + var maskDigit = mask.charAt(m), + valDigit = value.charAt(v), + translation = jMask.translation[maskDigit]; + + if (translation) { + if (valDigit.match(translation.pattern)) { + buf[addMethod](valDigit); + if (translation.recursive) { + if (resetPos === -1) { + resetPos = m; + } else if (m === lastMaskChar) { + m = resetPos - offset; + } + + if (lastMaskChar === resetPos) { + m -= offset; + } + } + m += offset; + } else if (translation.optional) { + m += offset; + v -= offset; + } else if (translation.fallback) { + buf[addMethod](translation.fallback); + m += offset; + v -= offset; + } else { + p.invalid.push({p: v, v: valDigit, e: translation.pattern}); + } + v += offset; + } else { + if (!skipMaskChars) { + buf[addMethod](maskDigit); + } + + if (valDigit === maskDigit) { + v += offset; + } + + m += offset; + } + } + + var lastMaskCharDigit = mask.charAt(lastMaskChar); + if (maskLen === valLen + 1 && !jMask.translation[lastMaskCharDigit]) { + buf.push(lastMaskCharDigit); + } + + return buf.join(""); + }, + callbacks: function (e) { + var val = p.val(), + changed = val !== old_value, + defaultArgs = [val, e, el, options], + callback = function(name, criteria, args) { + if (typeof options[name] === "function" && criteria) { + options[name].apply(this, args); + } + }; + + callback('onChange', changed === true, defaultArgs); + callback('onKeyPress', changed === true, defaultArgs); + callback('onComplete', val.length === mask.length, defaultArgs); + callback('onInvalid', p.invalid.length > 0, [val, e, el, p.invalid, options]); + } + }; + + + // public methods + jMask.mask = mask; + jMask.options = options; + jMask.remove = function() { + var caret = p.getCaret(); + p.destroyEvents(); + p.val(jMask.getCleanVal()); + p.setCaret(caret - p.getMCharsBeforeCount(caret)); + return el; + }; + + // get value without mask + jMask.getCleanVal = function() { + return p.getMasked(true); + }; + + jMask.init = function(only_mask) { + only_mask = only_mask || false; + options = options || {}; + + jMask.byPassKeys = $.jMaskGlobals.byPassKeys; + jMask.translation = $.jMaskGlobals.translation; + + jMask.translation = $.extend({}, jMask.translation, options.translation); + jMask = $.extend(true, {}, jMask, options); + + regexMask = p.getRegexMask(); + + if (only_mask === false) { + + if (options.placeholder) { + el.attr('placeholder' , options.placeholder); + } + + // autocomplete needs to be off. we can't intercept events + // the browser doesn't fire any kind of event when something is + // selected in a autocomplete list so we can't sanitize it. + el.attr('autocomplete', 'off'); + p.destroyEvents(); + p.events(); + + var caret = p.getCaret(); + p.val(p.getMasked()); + p.setCaret(caret + p.getMCharsBeforeCount(caret, true)); + + } else { + p.events(); + p.val(p.getMasked()); + } + }; + + jMask.init(!el.is("input")); + + }; + + $.maskWatchers = {}; + var HTMLAttributes = function () { + var input = $(this), + options = {}, + prefix = "data-mask-", + mask = input.attr('data-mask'); + + if (input.attr(prefix + 'reverse')) { + options.reverse = true; + } + + if (input.attr(prefix + 'clearifnotmatch')) { + options.clearIfNotMatch = true; + } + + if (notSameMaskObject(input, mask, options)) { + return input.data('mask', new Mask(this, mask, options)); + } + }, + notSameMaskObject = function(field, mask, options) { + options = options || {}; + var maskObject = $(field).data('mask'), stringify = JSON.stringify; + try { + return typeof maskObject !== "object" || stringify(maskObject.options) !== stringify(options) || maskObject.mask !== mask; + } catch (e) {} + }; + + + $.fn.mask = function(mask, options) { + options = options || {}; + var selector = this.selector, + globals = $.jMaskGlobals, + interval = $.jMaskGlobals.watchInterval, + maskFunction = function() { + if (notSameMaskObject(this, mask, options)) { + return $(this).data('mask', new Mask(this, mask, options)); + } + }; + + $(this).each(maskFunction); + + if (selector && selector !== "" && globals.watchInputs) { + clearInterval($.maskWatchers[selector]); + $.maskWatchers[selector] = setInterval(function(){ + $(document).find(selector).each(maskFunction); + }, interval); + } + }; + + $.fn.unmask = function() { + clearInterval($.maskWatchers[this.selector]); + delete $.maskWatchers[this.selector]; + return this.each(function() { + if ($(this).data('mask')) { + $(this).data('mask').remove().removeData('mask'); + } + }); + }; + + $.fn.cleanVal = function() { + return this.data('mask').getCleanVal(); + }; + + var globals = { + maskElements: 'input,td,span,div', + dataMaskAttr: '*[data-mask]', + dataMask: true, + watchInterval: 300, + watchInputs: true, + watchDataMask: false, + byPassKeys: [9, 16, 17, 18, 36, 37, 38, 39, 40, 91], + translation: { + '0': {pattern: /\d/}, + '9': {pattern: /\d/, optional: true}, + '#': {pattern: /\d/, recursive: true}, + 'A': {pattern: /[a-zA-Z0-9]/}, + 'S': {pattern: /[a-zA-Z]/} + } + }; + + $.jMaskGlobals = $.jMaskGlobals || {}; + globals = $.jMaskGlobals = $.extend(true, {}, globals, $.jMaskGlobals); + + // looking for inputs with data-mask attribute + if (globals.dataMask) { + $(globals.dataMaskAttr).each(HTMLAttributes); + } + + setInterval(function(){ + if ($.jMaskGlobals.watchDataMask) { + $(document).find($.jMaskGlobals.maskElements).filter(globals.dataMaskAttr).each(HTMLAttributes); + } + }, globals.watchInterval); +})); \ No newline at end of file diff --git a/frontend/web/js/jquery.min.js b/frontend/web/js/jquery.min.js new file mode 100755 index 0000000..f364443 --- /dev/null +++ b/frontend/web/js/jquery.min.js @@ -0,0 +1,6 @@ +/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; + +return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
    a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:k.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("
    "); + $("#TB_overlay").click(tb_remove); + } + }else{//all others + if(document.getElementById("TB_overlay") === null){ + $("body").append("
    "); + $("#TB_overlay").click(tb_remove); + } + } + + if(caption===null){caption="";} + $("body").append("
    ");//add loader to the page + $('#TB_load').show();//show loader + + var baseURL; + if(url.indexOf("?")!==-1){ //ff there is a query string involved + baseURL = url.substr(0, url.indexOf("?")); + }else{ + baseURL = url; + } + + var urlString = /\.jpg|\.jpeg|\.png|\.gif|\.bmp/g; + var urlType = baseURL.toLowerCase().match(urlString); + + if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images + + TB_PrevCaption = ""; + TB_PrevURL = ""; + TB_PrevHTML = ""; + TB_NextCaption = ""; + TB_NextURL = ""; + TB_NextHTML = ""; + TB_imageCount = ""; + TB_FoundURL = false; + if(imageGroup){ + TB_TempArray = $("a[@rel="+imageGroup+"]").get(); + for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { + var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); + if (!(TB_TempArray[TB_Counter].href == url)) { + if (TB_FoundURL) { + TB_NextCaption = TB_TempArray[TB_Counter].title; + TB_NextURL = TB_TempArray[TB_Counter].href; + TB_NextHTML = "  Next >"; + } else { + TB_PrevCaption = TB_TempArray[TB_Counter].title; + TB_PrevURL = TB_TempArray[TB_Counter].href; + TB_PrevHTML = "  < Prev"; + } + } else { + TB_FoundURL = true; + TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); + } + } + } + + imgPreloader = new Image(); + imgPreloader.onload = function(){ + imgPreloader.onload = null; + + // Resizing large images - orginal by Christian Montoya edited by me. + var pagesize = tb_getPageSize(); + var x = pagesize[0] - 150; + var y = pagesize[1] - 150; + var imageWidth = imgPreloader.width; + var imageHeight = imgPreloader.height; + if (imageWidth > x) { + imageHeight = imageHeight * (x / imageWidth); + imageWidth = x; + if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; + } + } else if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; + if (imageWidth > x) { + imageHeight = imageHeight * (x / imageWidth); + imageWidth = x; + } + } + // End Resizing + + TB_WIDTH = imageWidth + 30; + TB_HEIGHT = imageHeight + 60; + $("#TB_window").append(""+caption+"" + "
    "+caption+"
    " + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
    close or Esc Key
    "); + + $("#TB_closeWindowButton").click(tb_remove); + + if (!(TB_PrevHTML === "")) { + function goPrev(){ + if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);} + $("#TB_window").remove(); + $("body").append("
    "); + tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); + return false; + } + $("#TB_prev").click(goPrev); + } + + if (!(TB_NextHTML === "")) { + function goNext(){ + $("#TB_window").remove(); + $("body").append("
    "); + tb_show(TB_NextCaption, TB_NextURL, imageGroup); + return false; + } + $("#TB_next").click(goNext); + + } + + document.onkeydown = function(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + if(keycode == 27){ // close + tb_remove(); + } else if(keycode == 190){ // display previous image + if(!(TB_NextHTML == "")){ + document.onkeydown = ""; + goNext(); + } + } else if(keycode == 188){ // display next image + if(!(TB_PrevHTML == "")){ + document.onkeydown = ""; + goPrev(); + } + } + }; + + tb_position(); + $("#TB_load").remove(); + $("#TB_ImageOff").click(tb_remove); + $("#TB_window").css({display:"block"}); //for safari using css instead of show + }; + + imgPreloader.src = url; + }else{//code to show html pages + + var queryString = url.replace(/^[^\?]+\??/,''); + var params = tb_parseQuery( queryString ); + + TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL + TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL + ajaxContentW = TB_WIDTH - 30; + ajaxContentH = TB_HEIGHT - 45; + + if(url.indexOf('TB_iframe') != -1){ + urlNoQuery = url.split('TB_'); + $("#TB_window").append("
    "+caption+"
    close or Esc Key
    "); + }else{ + if($("#TB_window").css("display") != "block"){ + if(params['modal'] != "true"){ + $("#TB_window").append("
    "+caption+"
    close or Esc Key
    "); + }else{ + $("#TB_overlay").unbind(); + $("#TB_window").append("
    "); + } + }else{ + $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; + $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; + $("#TB_ajaxContent")[0].scrollTop = 0; + $("#TB_ajaxWindowTitle").html(caption); + } + } + + $("#TB_closeWindowButton").click(tb_remove); + + if(url.indexOf('TB_inline') != -1){ + $("#TB_ajaxContent").html($('#' + params['inlineId']).html()); + tb_position(); + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + }else if(url.indexOf('TB_iframe') != -1){ + tb_position(); + if(frames['TB_iframeContent'] === undefined){//be nice to safari + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + $(document).keyup( function(e){ var key = e.keyCode; if(key == 27){tb_remove();}}); + } + }else{ + $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method + tb_position(); + $("#TB_load").remove(); + tb_init("#TB_ajaxContent a.thickbox"); + $("#TB_window").css({display:"block"}); + }); + } + + } + + if(!params['modal']){ + document.onkeyup = function(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + if(keycode == 27){ // close + tb_remove(); + } + }; + } + + } catch(e) { + //nothing here + } +} + +//helper functions below +function tb_showIframe(){ + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); +} + +function tb_remove() { + $("#TB_imageOff").unbind("click"); + $("#TB_overlay").unbind("click"); + $("#TB_closeWindowButton").unbind("click"); + $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').remove();}); + $("#TB_load").remove(); + if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 + $("body","html").css({height: "auto", width: "auto"}); + $("html").css("overflow",""); + } + document.onkeydown = ""; + return false; +} + +function tb_position() { +$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); + if ( !(jQuery.browser.msie && typeof XMLHttpRequest == 'function')) { // take away IE6 + $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); + } +} + +function tb_parseQuery ( query ) { + var Params = {}; + if ( ! query ) {return Params;}// return empty object + var Pairs = query.split(/[;&]/); + for ( var i = 0; i < Pairs.length; i++ ) { + var KeyVal = Pairs[i].split('='); + if ( ! KeyVal || KeyVal.length != 2 ) {continue;} + var key = unescape( KeyVal[0] ); + var val = unescape( KeyVal[1] ); + val = val.replace(/\+/g, ' '); + Params[key] = val; + } + return Params; +} + +function tb_getPageSize(){ + var de = document.documentElement; + var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; + var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; + arrayPageSize = [w,h]; + return arrayPageSize; +} diff --git a/frontend/web/js/jsor-jcarousel-7bb2e0a/index.html b/frontend/web/js/jsor-jcarousel-7bb2e0a/index.html new file mode 100755 index 0000000..7a3fc68 --- /dev/null +++ b/frontend/web/js/jsor-jcarousel-7bb2e0a/index.html @@ -0,0 +1,516 @@ + + + +jCarousel - Riding carousels with jQuery + + + + +
    +

    jCarousel

    +

    Riding carousels with jQuery

    +

    Author: Jan Sorgalla
    + Version: 0.2.8 (Changelog)
    + Download: jcarousel.tar.gz or jcarousel.zip
    + Source Code: http://github.com/jsor/jcarousel
    + Bugtracker: http://github.com/jsor/jcarousel/issues
    + Licence: Dual licensed under the MIT + and GPL licenses.

    + + +

    Contents

    +
      +
    1. Introduction
    2. +
    3. Examples
    4. +
    5. Getting started
    6. +
    7. Dynamic content loading
    8. +
    9. Accessing the jCarousel instance
    10. +
    11. Defining the number of visible items
    12. +
    13. Configuration
    14. +
    15. Credits
    16. +
    + + +

    Introduction

    +

    jCarousel is a jQuery plugin for controlling + a list of items in horizontal or vertical order. The items, which can be static + HTML content or loaded with (or without) AJAX, can be scrolled back and forth + (with or without animation).

    + + +

    Examples

    +

    The following examples illustrate the possibilities of jCarousel:

    + + + + +

    Getting started

    +

    To use the jCarousel component, include the jQuery + library, the jCarousel source file and a jCarousel skin stylesheet file inside the <head> tag + of your HTML document:

    +
    +<script type="text/javascript" src="/path/to/jquery-1.4.2.min.js"></script>
    +<script type="text/javascript" src="/path/to/lib/jquery.jcarousel.min.js"></script>
    +<link rel="stylesheet" type="text/css" href="/path/to/skin/skin.css" />
    +
    +

    The download package contains some example skin packages. Feel free to build your own skins based on it.

    +

    jCarousel expects a very basic HTML markup structure inside your HTML document:

    +
    +<ul id="mycarousel" class="jcarousel-skin-name">
    +   <!-- The content goes in here -->
    +</ul>
    +
    +

    jCarousel automatically wraps the required HTML markup around the list. The + class attribute applies the jCarousel skin "name" to the + carousel.

    +

    To setup jCarousel, add the following code inside the <head> + tag of your HTML document:

    +
    +<script type="text/javascript">
    +jQuery(document).ready(function() {
    +    jQuery('#mycarousel').jcarousel({
    +        // Configuration goes here
    +    });
    +});
    +</script>
    +
    +

    jCarousel accepts a lot of configuration options, see chapter "Configuration" + for further informations.

    +

    After jCarousel has been initialised, the fully created markup in + the DOM is:

    +
    +<div class="jcarousel-skin-name">
    +  <div class="jcarousel-container">
    +    <div class="jcarousel-clip">
    +      <ul class="jcarousel-list">
    +        <li class="jcarousel-item-1">First item</li>
    +        <li class="jcarousel-item-2">Second item</li>
    +      </ul>
    +    </div>
    +    <div disabled="disabled" class="jcarousel-prev jcarousel-prev-disabled"></div>
    +    <div class="jcarousel-next"></div>
    +  </div>
    +</div>
    +
    + +

    As you can see, there are some elements added which have assigned classes + (in addition to the classes you may have already assigned manually). Feel + free to design your carousel with the classes you can see above.

    +

    Note:

    +
      +
    • The skin class "jcarousel-skin-name" has been moved + from the <ul> to the top <div> element.
    • +
    • The last 2 nested <div>'s under <div class="jcarousel-container"> + are the next/prev buttons of the carousel. The first one illustrates a disabled button, the second an enabled one. The disabled + button has the attribute + disabled (which actually makes no sense for <div> + elements, but you can also use <button> elements or + whatever you want) as well as the additional class jcarousel-prev-disabled + (or jcarousel-next-disabled).
    • +
    • All <li> elements of the list have the class jcarousel-item-n + assigned where n represents the position in the list.
    • +
    • Not shown here is, that all classes are followed by additional classes with a suffix + dependent on the orientation of the carousel, ie. <ul class="jcarousel-list + jcarousel-list-horizontal"> for a horizontal carousel.
    • +
    + + +

    Dynamic content loading

    +

    By passing the callback function itemLoadCallback as configuration + option, you are able to dynamically create <li> items for the content.

    +
    +<script type="text/javascript">
    +jQuery(document).ready(function() {
    +    jQuery('#mycarousel').jcarousel({
    +        itemLoadCallback: itemLoadCallbackFunction
    +    });
    +});
    +</script>
    +

    itemLoadCallbackFunction is a JavaScript function that is called + when the carousel requests a set of items to be loaded. Two parameters are + passed: The instance of the requesting carousel and a flag which indicates + the current state of the carousel ('init', 'prev' or 'next').

    +
    +<script type="text/javascript">
    +function itemLoadCallbackFunction(carousel, state)
    +{
    +    for (var i = carousel.first; i <= carousel.last; i++) {
    +        // Check if the item already exists
    +        if (!carousel.has(i)) {
    +            // Add the item
    +            carousel.add(i, "I'm item #" + i);
    +        }
    +    }
    +};
    +</script>
    +

    jCarousel contains a convenience method add() that can be + passed the index of the item to create and the innerHTML string of the + item to be + created. If the item already exists, it just updates the innerHTML. You can + access the index of the first and last visible element by the public variables carousel.first and carousel.last. +

    + + +

    Accessing the jCarousel instance

    +

    The instance of the carousel will be stored with the data() method of jQuery under the key jcarousel for a simple access.

    +

    If you have created a carousel like:

    +
    +jQuery(document).ready(function() {
    +    jQuery('#mycarousel').jcarousel();
    +});
    +

    You can access the instance with:

    +
    +var carousel = jQuery('#mycarousel').data('jcarousel');
    +

    You can also access methods of the instance directly, for example the add() method: +

    +var index = 1;
    +var html = 'My content of item no. 1';
    +jQuery('#mycarousel').jcarousel('add', index, html);
    + + +

    Defining the number of visible items

    + +

    Sometimes people are confused how to define the number of visible items because there is no option for this as they expect (Yes, there is an option visible, we discuss this later).

    +

    You simply define the number of visible items by defining the width (or height) with the class .jcarousel-clip (or the more distinct .jcarousel-clip-horizontal and .jcarousel-clip-vertical classes) in your skin stylesheet.

    +

    This offers a lot of flexibility, because you can define the width in pixel for a fixed carousel or in percent for a flexible carousel (This example shows a carousel with a clip width in percent, resize the browser to see it in effect).

    +

    So, why there is an option visible? If you set the option visible, jCarousel sets the width of the visible items to always make this number of items visible. Open this example and resize your browser window to see it in effect.

    + + +

    Configuration

    +

    jCarousel accepts a list of options to control the appearance and behaviour + of the carousel. Here is the list of options you may set:

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    PropertyTypeDefaultDescription
    verticalboolfalseSpecifies wether the carousel appears in horizontal or vertical orientation. + Changes the carousel from a left/right style to a up/down style carousel.
    rtlboolfalseSpecifies wether the carousel appears in RTL (Right-To-Left) mode.
    startinteger1The index of the item to start with.
    offsetinteger1The index of the first available item at initialisation.
    sizeintegerNumber of existing <li> elements if size is not passed explicitlyThe number of total items.
    scrollinteger3The number of items to scroll by.
    visibleintegernullIf passed, the width/height of the items will be calculated and set + depending on the width/height of the clipping, so that exactly that + number of items will be visible.
    animationmixed"fast"The speed of the scroll animation as string in jQuery terms ("slow" + or "fast") or milliseconds as integer + (See jQuery Documentation). + If set to 0, animation is turned off.
    easingstringnullThe name of the easing effect that you want to use (See jQuery + Documentation).
    autointeger0Specifies how many seconds to periodically autoscroll the content. + If set to 0 (default) then autoscrolling is turned off. +
    wrapstringnullSpecifies whether to wrap at the first/last item (or both) and jump + back to the start/end. Options are "first", "last", + "both" or "circular" as string. If set to null, + wrapping is turned off (default).
    initCallbackfunctionnullJavaScript function that is called right after initialisation of the + carousel. Two parameters are passed: The instance of the requesting + carousel and the state of the carousel initialisation (init, reset or + reload).
    setupCallbackfunctionnullJavaScript function that is called right after the carousel is completely setup. + One parameter is passed: The instance of the requesting carousel.
    itemLoadCallbackfunctionnullJavaScript function that is called when the carousel requests a set + of items to be loaded. Two parameters are passed: The instance of the + requesting carousel and the state of the carousel action (prev, next + or init). Alternatively, you can pass a hash of one or two functions + which are triggered before and/or after animation: +
    +itemLoadCallback: {
    +  onBeforeAnimation: callback1,
    +  onAfterAnimation: callback2
    +}
    itemFirstInCallback functionnullJavaScript function that is called (after the scroll animation) when + an item becomes the first one in the visible range of the carousel. + Four parameters are passed: The instance of the requesting carousel + and the <li> object itself, the index which indicates + the position of the item in the list and the state of the carousel action + (prev, next or init). Alternatively, you can pass a hash of one or two + functions which are triggered before and/or after animation: +
    +itemFirstInCallback: {
    +  onBeforeAnimation: callback1,
    +  onAfterAnimation: callback2
    +}
    itemFirstOutCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item isn't longer the first one in the visible range of the carousel. + Four parameters are passed: The instance of the requesting carousel + and the <li> object itself, the index which indicates + the position of the item in the list and the state of the carousel action + (prev, next or init). Alternatively, you can pass a hash of one or two + functions which are triggered before and/or after animation: +
    +itemFirstOutCallback: {
    +  onBeforeAnimation: callback1,
    +  onAfterAnimation: callback2
    +}
    itemLastInCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item becomes the last one in the visible range of the carousel. Four + parameters are passed: The instance of the requesting carousel and the + <li> object itself, the index which indicates the + position of the item in the list and the state of the carousel action + (prev, next or init). Alternatively, you can pass a hash of one or two + functions which are triggered before and/or after animation: +
    +itemLastInCallback: {
    +  onBeforeAnimation: callback1,
    +  onAfterAnimation: callback2
    +}
    itemLastOutCallbackfunctionnullJavaScript function that is called when an item isn't longer the last + one in the visible range of the carousel. Four parameters are passed: + The instance of the requesting carousel and the <li> + object itself, the index which indicates the position of the item in + the list and the state of the carousel action (prev, next or init). + Alternatively, you can pass a hash of one or two functions which are + triggered before and/or after animation: +
    +itemLastOutCallback: {
    +  onBeforeAnimation: callback1,
    +  onAfterAnimation: callback2
    +}
    itemVisibleInCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item is in the visible range of the carousel. Four parameters are + passed: The instance of the requesting carousel and the <li> + object itself, the index which indicates the position of the item in + the list and the state of the carousel action (prev, next or init). + Alternatively, you can pass a hash of one or two functions which are + triggered before and/or after animation: +
    +itemVisibleInCallback: {
    +  onBeforeAnimation: callback1,
    +  onAfterAnimation: callback2
    +}
    itemVisibleOutCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item isn't longer in the visible range of the carousel. Four parameters + are passed: The instance of the requesting carousel and the <li> + object itself, the index which indicates the position of the item in + the list and the state of the carousel action (prev, next or init). + Alternatively, you can pass a hash of one or two functions which are + triggered before and/or after animation: +
    +itemVisibleOutCallback: {
    +  onBeforeAnimation: callback1,
    +  onAfterAnimation: callback2
    +}
    animationStepCallbackfunctionnullJavaScript function that is called after each animation step. This + function is directly passed to jQuery's .animate() method + as the step parameter. See the jQuery documentation for the + parameters it will receive.
    buttonNextCallbackfunctionnullJavaScript function that is called when the state of the 'next' control + is changing. The responsibility of this method is to enable or disable + the 'next' control. Three parameters are passed: The instance of the + requesting carousel, the control element and a flag indicating whether + the button should be enabled or disabled.
    buttonPrevCallbackfunctionnullJavaScript function that is called when the state of the 'previous' + control is changing. The responsibility of this method is to enable + or disable the 'previous' control. Three parameters are passed: The + instance of the requesting carousel, the control element and a flag + indicating whether the button should be enabled or disabled.
    buttonNextHTMLstring<div></div>The HTML markup for the auto-generated next button. If set to null, + no next-button is created.
    buttonPrevHTMLstring<div></div>The HTML markup for the auto-generated prev button. If set to null, + no prev-button is created.
    buttonNextEventstring"click"Specifies the event which triggers the next scroll.
    buttonPrevEventstring"click"Specifies the event which triggers the prev scroll.
    itemFallbackDimensionintegernullIf, for some reason, jCarousel can not detect the width of an item, you can set a fallback dimension (width or height, depending on the orientation) here to ensure correct calculations.
    + + +

    Credits

    +

    Thanks to John Resig for his fantastic jQuery + library.
    + jCarousel is inspired by the Carousel + Component written by Bill Scott.

    + + + diff --git a/frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery-1.4.2.min.js b/frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery-1.4.2.min.js new file mode 100755 index 0000000..7c24308 --- /dev/null +++ b/frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery-1.4.2.min.js @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
    a"; +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

    ";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="
    ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
    ","
    "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); +return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
    ").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
    "; +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.js b/frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.js new file mode 100755 index 0000000..1bbb0bb --- /dev/null +++ b/frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.js @@ -0,0 +1,1057 @@ +/*! + * jCarousel - Riding carousels with jQuery + * http://sorgalla.com/jcarousel/ + * + * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * Built on top of the jQuery library + * http://jquery.com + * + * Inspired by the "Carousel Component" by Bill Scott + * http://billwscott.com/carousel/ + */ + +/*global window, jQuery */ +(function($) { + // Default configuration properties. + var defaults = { + vertical: false, + rtl: false, + start: 1, + offset: 1, + size: null, + scroll: 3, + visible: null, + animation: 'normal', + easing: 'swing', + auto: 0, + wrap: null, + initCallback: null, + setupCallback: null, + reloadCallback: null, + itemLoadCallback: null, + itemFirstInCallback: null, + itemFirstOutCallback: null, + itemLastInCallback: null, + itemLastOutCallback: null, + itemVisibleInCallback: null, + itemVisibleOutCallback: null, + animationStepCallback: null, + buttonNextHTML: '
    ', + buttonPrevHTML: '
    ', + buttonNextEvent: 'click', + buttonPrevEvent: 'click', + buttonNextCallback: null, + buttonPrevCallback: null, + itemFallbackDimension: null + }, windowLoaded = false; + + $(window).bind('load.jcarousel', function() { windowLoaded = true; }); + + /** + * The jCarousel object. + * + * @constructor + * @class jcarousel + * @param e {HTMLElement} The element to create the carousel for. + * @param o {Object} A set of key/value pairs to set as configuration properties. + * @cat Plugins/jCarousel + */ + $.jcarousel = function(e, o) { + this.options = $.extend({}, defaults, o || {}); + + this.locked = false; + this.autoStopped = false; + + this.container = null; + this.clip = null; + this.list = null; + this.buttonNext = null; + this.buttonPrev = null; + this.buttonNextState = null; + this.buttonPrevState = null; + + // Only set if not explicitly passed as option + if (!o || o.rtl === undefined) { + this.options.rtl = ($(e).attr('dir') || $('html').attr('dir') || '').toLowerCase() == 'rtl'; + } + + this.wh = !this.options.vertical ? 'width' : 'height'; + this.lt = !this.options.vertical ? (this.options.rtl ? 'right' : 'left') : 'top'; + + // Extract skin class + var skin = '', split = e.className.split(' '); + + for (var i = 0; i < split.length; i++) { + if (split[i].indexOf('jcarousel-skin') != -1) { + $(e).removeClass(split[i]); + skin = split[i]; + break; + } + } + + if (e.nodeName.toUpperCase() == 'UL' || e.nodeName.toUpperCase() == 'OL') { + this.list = $(e); + this.clip = this.list.parents('.jcarousel-clip'); + this.container = this.list.parents('.jcarousel-container'); + } else { + this.container = $(e); + this.list = this.container.find('ul,ol').eq(0); + this.clip = this.container.find('.jcarousel-clip'); + } + + if (this.clip.size() === 0) { + this.clip = this.list.wrap('
    ').parent(); + } + + if (this.container.size() === 0) { + this.container = this.clip.wrap('
    ').parent(); + } + + if (skin !== '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1) { + this.container.wrap('
    '); + } + + this.buttonPrev = $('.jcarousel-prev', this.container); + + if (this.buttonPrev.size() === 0 && this.options.buttonPrevHTML !== null) { + this.buttonPrev = $(this.options.buttonPrevHTML).appendTo(this.container); + } + + this.buttonPrev.addClass(this.className('jcarousel-prev')); + + this.buttonNext = $('.jcarousel-next', this.container); + + if (this.buttonNext.size() === 0 && this.options.buttonNextHTML !== null) { + this.buttonNext = $(this.options.buttonNextHTML).appendTo(this.container); + } + + this.buttonNext.addClass(this.className('jcarousel-next')); + + this.clip.addClass(this.className('jcarousel-clip')).css({ + position: 'relative' + }); + + this.list.addClass(this.className('jcarousel-list')).css({ + overflow: 'hidden', + position: 'relative', + top: 0, + margin: 0, + padding: 0 + }).css((this.options.rtl ? 'right' : 'left'), 0); + + this.container.addClass(this.className('jcarousel-container')).css({ + position: 'relative' + }); + + if (!this.options.vertical && this.options.rtl) { + this.container.addClass('jcarousel-direction-rtl').attr('dir', 'rtl'); + } + + var di = this.options.visible !== null ? Math.ceil(this.clipping() / this.options.visible) : null; + var li = this.list.children('li'); + + var self = this; + + if (li.size() > 0) { + var wh = 0, j = this.options.offset; + li.each(function() { + self.format(this, j++); + wh += self.dimension(this, di); + }); + + this.list.css(this.wh, (wh + 100) + 'px'); + + // Only set if not explicitly passed as option + if (!o || o.size === undefined) { + this.options.size = li.size(); + } + } + + // For whatever reason, .show() does not work in Safari... + this.container.css('display', 'block'); + this.buttonNext.css('display', 'block'); + this.buttonPrev.css('display', 'block'); + + this.funcNext = function() { self.next(); }; + this.funcPrev = function() { self.prev(); }; + this.funcResize = function() { + if (self.resizeTimer) { + clearTimeout(self.resizeTimer); + } + + self.resizeTimer = setTimeout(function() { + self.reload(); + }, 100); + }; + + if (this.options.initCallback !== null) { + this.options.initCallback(this, 'init'); + } + + if (!windowLoaded && $.browser.safari) { + this.buttons(false, false); + $(window).bind('load.jcarousel', function() { self.setup(); }); + } else { + this.setup(); + } + }; + + // Create shortcut for internal use + var $jc = $.jcarousel; + + $jc.fn = $jc.prototype = { + jcarousel: '0.2.8' + }; + + $jc.fn.extend = $jc.extend = $.extend; + + $jc.fn.extend({ + /** + * Setups the carousel. + * + * @method setup + * @return undefined + */ + setup: function() { + this.first = null; + this.last = null; + this.prevFirst = null; + this.prevLast = null; + this.animating = false; + this.timer = null; + this.resizeTimer = null; + this.tail = null; + this.inTail = false; + + if (this.locked) { + return; + } + + this.list.css(this.lt, this.pos(this.options.offset) + 'px'); + var p = this.pos(this.options.start, true); + this.prevFirst = this.prevLast = null; + this.animate(p, false); + + $(window).unbind('resize.jcarousel', this.funcResize).bind('resize.jcarousel', this.funcResize); + + if (this.options.setupCallback !== null) { + this.options.setupCallback(this); + } + }, + + /** + * Clears the list and resets the carousel. + * + * @method reset + * @return undefined + */ + reset: function() { + this.list.empty(); + + this.list.css(this.lt, '0px'); + this.list.css(this.wh, '10px'); + + if (this.options.initCallback !== null) { + this.options.initCallback(this, 'reset'); + } + + this.setup(); + }, + + /** + * Reloads the carousel and adjusts positions. + * + * @method reload + * @return undefined + */ + reload: function() { + if (this.tail !== null && this.inTail) { + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail); + } + + this.tail = null; + this.inTail = false; + + if (this.options.reloadCallback !== null) { + this.options.reloadCallback(this); + } + + if (this.options.visible !== null) { + var self = this; + var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0; + this.list.children('li').each(function(i) { + wh += self.dimension(this, di); + if (i + 1 < self.first) { + lt = wh; + } + }); + + this.list.css(this.wh, wh + 'px'); + this.list.css(this.lt, -lt + 'px'); + } + + this.scroll(this.first, false); + }, + + /** + * Locks the carousel. + * + * @method lock + * @return undefined + */ + lock: function() { + this.locked = true; + this.buttons(); + }, + + /** + * Unlocks the carousel. + * + * @method unlock + * @return undefined + */ + unlock: function() { + this.locked = false; + this.buttons(); + }, + + /** + * Sets the size of the carousel. + * + * @method size + * @return undefined + * @param s {Number} The size of the carousel. + */ + size: function(s) { + if (s !== undefined) { + this.options.size = s; + if (!this.locked) { + this.buttons(); + } + } + + return this.options.size; + }, + + /** + * Checks whether a list element exists for the given index (or index range). + * + * @method get + * @return bool + * @param i {Number} The index of the (first) element. + * @param i2 {Number} The index of the last element. + */ + has: function(i, i2) { + if (i2 === undefined || !i2) { + i2 = i; + } + + if (this.options.size !== null && i2 > this.options.size) { + i2 = this.options.size; + } + + for (var j = i; j <= i2; j++) { + var e = this.get(j); + if (!e.length || e.hasClass('jcarousel-item-placeholder')) { + return false; + } + } + + return true; + }, + + /** + * Returns a jQuery object with list element for the given index. + * + * @method get + * @return jQuery + * @param i {Number} The index of the element. + */ + get: function(i) { + return $('>.jcarousel-item-' + i, this.list); + }, + + /** + * Adds an element for the given index to the list. + * If the element already exists, it updates the inner html. + * Returns the created element as jQuery object. + * + * @method add + * @return jQuery + * @param i {Number} The index of the element. + * @param s {String} The innerHTML of the element. + */ + add: function(i, s) { + var e = this.get(i), old = 0, n = $(s); + + if (e.length === 0) { + var c, j = $jc.intval(i); + e = this.create(i); + while (true) { + c = this.get(--j); + if (j <= 0 || c.length) { + if (j <= 0) { + this.list.prepend(e); + } else { + c.after(e); + } + break; + } + } + } else { + old = this.dimension(e); + } + + if (n.get(0).nodeName.toUpperCase() == 'LI') { + e.replaceWith(n); + e = n; + } else { + e.empty().append(s); + } + + this.format(e.removeClass(this.className('jcarousel-item-placeholder')), i); + + var di = this.options.visible !== null ? Math.ceil(this.clipping() / this.options.visible) : null; + var wh = this.dimension(e, di) - old; + + if (i > 0 && i < this.first) { + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px'); + } + + this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px'); + + return e; + }, + + /** + * Removes an element for the given index from the list. + * + * @method remove + * @return undefined + * @param i {Number} The index of the element. + */ + remove: function(i) { + var e = this.get(i); + + // Check if item exists and is not currently visible + if (!e.length || (i >= this.first && i <= this.last)) { + return; + } + + var d = this.dimension(e); + + if (i < this.first) { + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px'); + } + + e.remove(); + + this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px'); + }, + + /** + * Moves the carousel forwards. + * + * @method next + * @return undefined + */ + next: function() { + if (this.tail !== null && !this.inTail) { + this.scrollTail(false); + } else { + this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size !== null && this.last == this.options.size) ? 1 : this.first + this.options.scroll); + } + }, + + /** + * Moves the carousel backwards. + * + * @method prev + * @return undefined + */ + prev: function() { + if (this.tail !== null && this.inTail) { + this.scrollTail(true); + } else { + this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size !== null && this.first == 1) ? this.options.size : this.first - this.options.scroll); + } + }, + + /** + * Scrolls the tail of the carousel. + * + * @method scrollTail + * @return undefined + * @param b {Boolean} Whether scroll the tail back or forward. + */ + scrollTail: function(b) { + if (this.locked || this.animating || !this.tail) { + return; + } + + this.pauseAuto(); + + var pos = $jc.intval(this.list.css(this.lt)); + + pos = !b ? pos - this.tail : pos + this.tail; + this.inTail = !b; + + // Save for callbacks + this.prevFirst = this.first; + this.prevLast = this.last; + + this.animate(pos); + }, + + /** + * Scrolls the carousel to a certain position. + * + * @method scroll + * @return undefined + * @param i {Number} The index of the element to scoll to. + * @param a {Boolean} Flag indicating whether to perform animation. + */ + scroll: function(i, a) { + if (this.locked || this.animating) { + return; + } + + this.pauseAuto(); + this.animate(this.pos(i), a); + }, + + /** + * Prepares the carousel and return the position for a certian index. + * + * @method pos + * @return {Number} + * @param i {Number} The index of the element to scoll to. + * @param fv {Boolean} Whether to force last item to be visible. + */ + pos: function(i, fv) { + var pos = $jc.intval(this.list.css(this.lt)); + + if (this.locked || this.animating) { + return pos; + } + + if (this.options.wrap != 'circular') { + i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i); + } + + var back = this.first > i; + + // Create placeholders, new list width/height + // and new list position + var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first; + var c = back ? this.get(f) : this.get(this.last); + var j = back ? f : f - 1; + var e = null, l = 0, p = false, d = 0, g; + + while (back ? --j >= i : ++j < i) { + e = this.get(j); + p = !e.length; + if (e.length === 0) { + e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); + c[back ? 'before' : 'after' ](e); + + if (this.first !== null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { + g = this.get(this.index(j)); + if (g.length) { + e = this.add(j, g.clone(true)); + } + } + } + + c = e; + d = this.dimension(e); + + if (p) { + l += d; + } + + if (this.first !== null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size === null || j <= this.options.size)))) { + pos = back ? pos + d : pos - d; + } + } + + // Calculate visible items + var clipping = this.clipping(), cache = [], visible = 0, v = 0; + c = this.get(i - 1); + j = i; + + while (++visible) { + e = this.get(j); + p = !e.length; + if (e.length === 0) { + e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); + // This should only happen on a next scroll + if (c.length === 0) { + this.list.prepend(e); + } else { + c[back ? 'before' : 'after' ](e); + } + + if (this.first !== null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { + g = this.get(this.index(j)); + if (g.length) { + e = this.add(j, g.clone(true)); + } + } + } + + c = e; + d = this.dimension(e); + if (d === 0) { + throw new Error('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...'); + } + + if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size) { + cache.push(e); + } else if (p) { + l += d; + } + + v += d; + + if (v >= clipping) { + break; + } + + j++; + } + + // Remove out-of-range placeholders + for (var x = 0; x < cache.length; x++) { + cache[x].remove(); + } + + // Resize list + if (l > 0) { + this.list.css(this.wh, this.dimension(this.list) + l + 'px'); + + if (back) { + pos -= l; + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px'); + } + } + + // Calculate first and last item + var last = i + visible - 1; + if (this.options.wrap != 'circular' && this.options.size && last > this.options.size) { + last = this.options.size; + } + + if (j > last) { + visible = 0; + j = last; + v = 0; + while (++visible) { + e = this.get(j--); + if (!e.length) { + break; + } + v += this.dimension(e); + if (v >= clipping) { + break; + } + } + } + + var first = last - visible + 1; + if (this.options.wrap != 'circular' && first < 1) { + first = 1; + } + + if (this.inTail && back) { + pos += this.tail; + this.inTail = false; + } + + this.tail = null; + if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) { + var m = $jc.intval(this.get(last).css(!this.options.vertical ? 'marginRight' : 'marginBottom')); + if ((v - m) > clipping) { + this.tail = v - clipping - m; + } + } + + if (fv && i === this.options.size && this.tail) { + pos -= this.tail; + this.inTail = true; + } + + // Adjust position + while (i-- > first) { + pos += this.dimension(this.get(i)); + } + + // Save visible item range + this.prevFirst = this.first; + this.prevLast = this.last; + this.first = first; + this.last = last; + + return pos; + }, + + /** + * Animates the carousel to a certain position. + * + * @method animate + * @return undefined + * @param p {Number} Position to scroll to. + * @param a {Boolean} Flag indicating whether to perform animation. + */ + animate: function(p, a) { + if (this.locked || this.animating) { + return; + } + + this.animating = true; + + var self = this; + var scrolled = function() { + self.animating = false; + + if (p === 0) { + self.list.css(self.lt, 0); + } + + if (!self.autoStopped && (self.options.wrap == 'circular' || self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size === null || self.last < self.options.size || (self.last == self.options.size && self.tail !== null && !self.inTail))) { + self.startAuto(); + } + + self.buttons(); + self.notify('onAfterAnimation'); + + // This function removes items which are appended automatically for circulation. + // This prevents the list from growing infinitely. + if (self.options.wrap == 'circular' && self.options.size !== null) { + for (var i = self.prevFirst; i <= self.prevLast; i++) { + if (i !== null && !(i >= self.first && i <= self.last) && (i < 1 || i > self.options.size)) { + self.remove(i); + } + } + } + }; + + this.notify('onBeforeAnimation'); + + // Animate + if (!this.options.animation || a === false) { + this.list.css(this.lt, p + 'px'); + scrolled(); + } else { + var o = !this.options.vertical ? (this.options.rtl ? {'right': p} : {'left': p}) : {'top': p}; + // Define animation settings. + var settings = { + duration: this.options.animation, + easing: this.options.easing, + complete: scrolled + }; + // If we have a step callback, specify it as well. + if ($.isFunction(this.options.animationStepCallback)) { + settings.step = this.options.animationStepCallback; + } + // Start the animation. + this.list.animate(o, settings); + } + }, + + /** + * Starts autoscrolling. + * + * @method auto + * @return undefined + * @param s {Number} Seconds to periodically autoscroll the content. + */ + startAuto: function(s) { + if (s !== undefined) { + this.options.auto = s; + } + + if (this.options.auto === 0) { + return this.stopAuto(); + } + + if (this.timer !== null) { + return; + } + + this.autoStopped = false; + + var self = this; + this.timer = window.setTimeout(function() { self.next(); }, this.options.auto * 1000); + }, + + /** + * Stops autoscrolling. + * + * @method stopAuto + * @return undefined + */ + stopAuto: function() { + this.pauseAuto(); + this.autoStopped = true; + }, + + /** + * Pauses autoscrolling. + * + * @method pauseAuto + * @return undefined + */ + pauseAuto: function() { + if (this.timer === null) { + return; + } + + window.clearTimeout(this.timer); + this.timer = null; + }, + + /** + * Sets the states of the prev/next buttons. + * + * @method buttons + * @return undefined + */ + buttons: function(n, p) { + if (n == null) { + n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size === null || this.last < this.options.size); + if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size !== null && this.last >= this.options.size) { + n = this.tail !== null && !this.inTail; + } + } + + if (p == null) { + p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1); + if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size !== null && this.first == 1) { + p = this.tail !== null && this.inTail; + } + } + + var self = this; + + if (this.buttonNext.size() > 0) { + this.buttonNext.unbind(this.options.buttonNextEvent + '.jcarousel', this.funcNext); + + if (n) { + this.buttonNext.bind(this.options.buttonNextEvent + '.jcarousel', this.funcNext); + } + + this.buttonNext[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true); + + if (this.options.buttonNextCallback !== null && this.buttonNext.data('jcarouselstate') != n) { + this.buttonNext.each(function() { self.options.buttonNextCallback(self, this, n); }).data('jcarouselstate', n); + } + } else { + if (this.options.buttonNextCallback !== null && this.buttonNextState != n) { + this.options.buttonNextCallback(self, null, n); + } + } + + if (this.buttonPrev.size() > 0) { + this.buttonPrev.unbind(this.options.buttonPrevEvent + '.jcarousel', this.funcPrev); + + if (p) { + this.buttonPrev.bind(this.options.buttonPrevEvent + '.jcarousel', this.funcPrev); + } + + this.buttonPrev[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true); + + if (this.options.buttonPrevCallback !== null && this.buttonPrev.data('jcarouselstate') != p) { + this.buttonPrev.each(function() { self.options.buttonPrevCallback(self, this, p); }).data('jcarouselstate', p); + } + } else { + if (this.options.buttonPrevCallback !== null && this.buttonPrevState != p) { + this.options.buttonPrevCallback(self, null, p); + } + } + + this.buttonNextState = n; + this.buttonPrevState = p; + }, + + /** + * Notify callback of a specified event. + * + * @method notify + * @return undefined + * @param evt {String} The event name + */ + notify: function(evt) { + var state = this.prevFirst === null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev'); + + // Load items + this.callback('itemLoadCallback', evt, state); + + if (this.prevFirst !== this.first) { + this.callback('itemFirstInCallback', evt, state, this.first); + this.callback('itemFirstOutCallback', evt, state, this.prevFirst); + } + + if (this.prevLast !== this.last) { + this.callback('itemLastInCallback', evt, state, this.last); + this.callback('itemLastOutCallback', evt, state, this.prevLast); + } + + this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast); + this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last); + }, + + callback: function(cb, evt, state, i1, i2, i3, i4) { + if (this.options[cb] == null || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation')) { + return; + } + + var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb]; + + if (!$.isFunction(callback)) { + return; + } + + var self = this; + + if (i1 === undefined) { + callback(self, state, evt); + } else if (i2 === undefined) { + this.get(i1).each(function() { callback(self, this, i1, state, evt); }); + } else { + var call = function(i) { + self.get(i).each(function() { callback(self, this, i, state, evt); }); + }; + for (var i = i1; i <= i2; i++) { + if (i !== null && !(i >= i3 && i <= i4)) { + call(i); + } + } + } + }, + + create: function(i) { + return this.format('
  • ', i); + }, + + format: function(e, i) { + e = $(e); + var split = e.get(0).className.split(' '); + for (var j = 0; j < split.length; j++) { + if (split[j].indexOf('jcarousel-') != -1) { + e.removeClass(split[j]); + } + } + e.addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i)).css({ + 'float': (this.options.rtl ? 'right' : 'left'), + 'list-style': 'none' + }).attr('jcarouselindex', i); + return e; + }, + + className: function(c) { + return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical'); + }, + + dimension: function(e, d) { + var el = $(e); + + if (d == null) { + return !this.options.vertical ? + (el.outerWidth(true) || $jc.intval(this.options.itemFallbackDimension)) : + (el.outerHeight(true) || $jc.intval(this.options.itemFallbackDimension)); + } else { + var w = !this.options.vertical ? + d - $jc.intval(el.css('marginLeft')) - $jc.intval(el.css('marginRight')) : + d - $jc.intval(el.css('marginTop')) - $jc.intval(el.css('marginBottom')); + + $(el).css(this.wh, w + 'px'); + + return this.dimension(el); + } + }, + + clipping: function() { + return !this.options.vertical ? + this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) : + this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth')); + }, + + index: function(i, s) { + if (s == null) { + s = this.options.size; + } + + return Math.round((((i-1) / s) - Math.floor((i-1) / s)) * s) + 1; + } + }); + + $jc.extend({ + /** + * Gets/Sets the global default configuration properties. + * + * @method defaults + * @return {Object} + * @param d {Object} A set of key/value pairs to set as configuration properties. + */ + defaults: function(d) { + return $.extend(defaults, d || {}); + }, + + intval: function(v) { + v = parseInt(v, 10); + return isNaN(v) ? 0 : v; + }, + + windowLoaded: function() { + windowLoaded = true; + } + }); + + /** + * Creates a carousel for all matched elements. + * + * @example $("#mycarousel").jcarousel(); + * @before
    • First item
    • Second item
    + * @result + * + *
    + *
    + *
    + *
      + *
    • First item
    • + *
    • Second item
    • + *
    + *
    + *
    + *
    + *
    + *
    + * + * @method jcarousel + * @return jQuery + * @param o {Hash|String} A set of key/value pairs to set as configuration properties or a method name to call on a formerly created instance. + */ + $.fn.jcarousel = function(o) { + if (typeof o == 'string') { + var instance = $(this).data('jcarousel'), args = Array.prototype.slice.call(arguments, 1); + return instance[o].apply(instance, args); + } else { + return this.each(function() { + var instance = $(this).data('jcarousel'); + if (instance) { + if (o) { + $.extend(instance.options, o); + } + instance.reload(); + } else { + $(this).data('jcarousel', new $jc(this, o)); + } + }); + } + }; + +})(jQuery); diff --git a/frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.min.js b/frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.min.js new file mode 100755 index 0000000..5d9a91e --- /dev/null +++ b/frontend/web/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.min.js @@ -0,0 +1,16 @@ +/*! + * jCarousel - Riding carousels with jQuery + * http://sorgalla.com/jcarousel/ + * + * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * Built on top of the jQuery library + * http://jquery.com + * + * Inspired by the "Carousel Component" by Bill Scott + * http://billwscott.com/carousel/ + */ + +(function(g){var q={vertical:!1,rtl:!1,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"
    ",buttonPrevHTML:"
    ",buttonNextEvent:"click",buttonPrevEvent:"click", buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},m=!1;g(window).bind("load.jcarousel",function(){m=!0});g.jcarousel=function(a,c){this.options=g.extend({},q,c||{});this.autoStopped=this.locked=!1;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===void 0)this.options.rtl=(g(a).attr("dir")||g("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical? this.options.rtl?"right":"left":"top";for(var b="",d=a.className.split(" "),f=0;f").parent();if(this.container.size()===0)this.container=this.clip.wrap("
    ").parent();b!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('
    ');this.buttonPrev=g(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null)this.buttonPrev=g(this.options.buttonPrevHTML).appendTo(this.container);this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext= g(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null)this.buttonNext=g(this.options.buttonNextHTML).appendTo(this.container);this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip")).css({position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"}); !this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var j=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null,b=this.list.children("li"),e=this;if(b.size()>0){var h=0,i=this.options.offset;b.each(function(){e.format(this,i++);h+=e.dimension(this,j)});this.list.css(this.wh,h+100+"px");if(!c||c.size===void 0)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display", "block");this.funcNext=function(){e.next()};this.funcPrev=function(){e.prev()};this.funcResize=function(){e.resizeTimer&&clearTimeout(e.resizeTimer);e.resizeTimer=setTimeout(function(){e.reload()},100)};this.options.initCallback!==null&&this.options.initCallback(this,"init");!m&&g.browser.safari?(this.buttons(!1,!1),g(window).bind("load.jcarousel",function(){e.setup()})):this.setup()};var f=g.jcarousel;f.fn=f.prototype={jcarousel:"0.2.8"};f.fn.extend=f.extend=g.extend;f.fn.extend({setup:function(){this.prevLast= this.prevFirst=this.last=this.first=null;this.animating=!1;this.tail=this.resizeTimer=this.timer=null;this.inTail=!1;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,!0);this.prevFirst=this.prevLast=null;this.animate(a,!1);g(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize);this.options.setupCallback!==null&&this.options.setupCallback(this)}},reset:function(){this.list.empty();this.list.css(this.lt, "0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=!1;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0;this.list.children("li").each(function(f){b+=a.dimension(this, c);f+1this.options.size)c=this.options.size;for(var b=a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return!1}return!0}, get:function(a){return g(">.jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,p=g(c);if(b.length===0)for(var j,e=f.intval(a),b=this.create(a);;){if(j=this.get(--e),e<=0||j.length){e<=0?this.list.prepend(b):j.after(b);break}}else d=this.dimension(b);p.get(0).nodeName.toUpperCase()=="LI"?(b.replaceWith(p),b=p):b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")),a);p=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible): null;d=this.dimension(b,p)-d;a>0&&a=this.first&&a<=this.last)){var b=this.dimension(c);athis.options.size?this.options.size:a);for(var d=this.first>a,g=this.options.wrap!="circular"&&this.first<=1?1:this.first,j=d?this.get(g): this.get(this.last),e=d?g:g-1,h=null,i=0,k=!1,l=0;d?--e>=a:++ethis.options.size)))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)));j=h;l=this.dimension(h);k&&(i+=l);if(this.first!==null&&(this.options.wrap=="circular"||e>=1&&(this.options.size===null||e<= this.options.size)))b=d?b+l:b-l}for(var g=this.clipping(),m=[],o=0,n=0,j=this.get(a-1),e=a;++o;){h=this.get(e);k=!h.length;if(h.length===0){h=this.create(e).addClass(this.className("jcarousel-item-placeholder"));if(j.length===0)this.list.prepend(h);else j[d?"before":"after"](h);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)))}j=h;l=this.dimension(h);if(l===0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."); this.options.wrap!="circular"&&this.options.size!==null&&e>this.options.size?m.push(h):k&&(i+=l);n+=l;if(n>=g)break;e++}for(h=0;h0&&(this.list.css(this.wh,this.dimension(this.list)+i+"px"),d&&(b-=i,this.list.css(this.lt,f.intval(this.list.css(this.lt))-i+"px")));i=a+o-1;if(this.options.wrap!="circular"&&this.options.size&&i>this.options.size)i=this.options.size;if(e>i){o=0;e=i;for(n=0;++o;){h=this.get(e--);if(!h.length)break;n+=this.dimension(h);if(n>=g)break}}e=i-o+ 1;this.options.wrap!="circular"&&e<1&&(e=1);if(this.inTail&&d)b+=this.tail,this.inTail=!1;this.tail=null;if(this.options.wrap!="circular"&&i==this.options.size&&i-o+1>=1&&(d=f.intval(this.get(i).css(!this.options.vertical?"marginRight":"marginBottom")),n-d>g))this.tail=n-g-d;if(c&&a===this.options.size&&this.tail)b-=this.tail,this.inTail=!0;for(;a-- >e;)b+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=e;this.last=i;return b},animate:function(a,c){if(!this.locked&& !this.animating){this.animating=!0;var b=this,d=function(){b.animating=!1;a===0&&b.list.css(b.lt,0);!b.autoStopped&&(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size===null||b.last=b.first&&c<=b.last)&&(c<1||c>b.options.size)&&b.remove(c)}; this.notify("onBeforeAnimation");if(!this.options.animation||c===!1)this.list.css(this.lt,a+"px"),d();else{var f=!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},d={duration:this.options.animation,easing:this.options.easing,complete:d};if(g.isFunction(this.options.animationStepCallback))d.step=this.options.animationStepCallback;this.list.animate(f,d)}}},startAuto:function(a){if(a!==void 0)this.options.auto=a;if(this.options.auto===0)return this.stopAuto();if(this.timer===null){this.autoStopped= !1;var c=this;this.timer=window.setTimeout(function(){c.next()},this.options.auto*1E3)}},stopAuto:function(){this.pauseAuto();this.autoStopped=!0},pauseAuto:function(){if(this.timer!==null)window.clearTimeout(this.timer),this.timer=null},buttons:function(a,c){if(a==null&&(a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last=this.options.size))a=this.tail!==null&&!this.inTail;if(c==null&&(c=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1),!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1))c=this.tail!==null&&this.inTail;var b=this;this.buttonNext.size()>0?(this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext),a&&this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext), this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?!1:!0),this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a)):this.options.buttonNextCallback!==null&&this.buttonNextState!=a&&this.options.buttonNextCallback(b,null,a);this.buttonPrev.size()>0?(this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev), c&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev),this.buttonPrev[c?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?!1:!0),this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)):this.options.buttonPrevCallback!==null&&this.buttonPrevState!=c&&this.options.buttonPrevCallback(b,null,c);this.buttonNextState= a;this.buttonPrevState=c},notify:function(a){var c=this.prevFirst===null?"init":this.prevFirst=j&&k<=e)&&a(k)}}},create:function(a){return this.format("
  • ",a)},format:function(a,c){for(var a=g(a),b=a.get(0).className.split(" "),d=0;d-1||J.indexOf("win32")>-1){Q.isWindows=true}else{if(J.indexOf("macintosh")>-1||J.indexOf("mac os x")>-1){Q.isMac=true}else{if(J.indexOf("linux")>-1){Q.isLinux=true}}}Q.isIE=J.indexOf("msie")>-1;Q.isIE6=J.indexOf("msie 6")>-1;Q.isIE7=J.indexOf("msie 7")>-1;Q.isGecko=J.indexOf("gecko")>-1&&J.indexOf("safari")==-1;Q.isWebKit=J.indexOf("applewebkit/")>-1;var ab=/#(.+)$/,af=/^(light|shadow)box\[(.*?)\]/i,az=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,f=/[0-9a-z]+$/i,aD=/(.+\/)shadowbox\.js/i;var A=false,a=false,l={},z=0,R,ap;Q.current=-1;Q.dimensions=null;Q.ease=function(K){return 1+Math.pow(K-1,3)};Q.errorInfo={fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}};Q.gallery=[];Q.onReady=aj;Q.path=null;Q.player=null;Q.playerId="sb-player";Q.options={animate:true,animateFade:true,autoplayMovies:true,continuous:false,enableKeys:true,flashParams:{bgcolor:"#000000",allowfullscreen:true},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsupported:"link",onChange:aj,onClose:aj,onFinish:aj,onOpen:aj,showMovieControls:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};Q.getCurrent=function(){return Q.current>-1?Q.gallery[Q.current]:null};Q.hasNext=function(){return Q.gallery.length>1&&(Q.current!=Q.gallery.length-1||Q.options.continuous)};Q.isOpen=function(){return A};Q.isPaused=function(){return ap=="pause"};Q.applyOptions=function(K){l=aC({},Q.options);aC(Q.options,K)};Q.revertOptions=function(){aC(Q.options,l)};Q.init=function(aG,aJ){if(a){return}a=true;if(Q.skin.options){aC(Q.options,Q.skin.options)}if(aG){aC(Q.options,aG)}if(!Q.path){var aI,S=document.getElementsByTagName("script");for(var aH=0,K=S.length;aHaQ){aS=aQ-aM}var aG=2*aO+K;if(aJ+aG>aR){aJ=aR-aG}var S=(aN-aS)/aN,aP=(aH-aJ)/aH,aK=(S>0||aP>0);if(aL&&aK){if(S>aP){aJ=Math.round((aH/aN)*aS)}else{if(aP>S){aS=Math.round((aN/aH)*aJ)}}}Q.dimensions={height:aS+aI,width:aJ+K,innerHeight:aS,innerWidth:aJ,top:Math.floor((aQ-(aS+aM))/2+aO),left:Math.floor((aR-(aJ+aG))/2+aO),oversized:aK};return Q.dimensions};Q.makeGallery=function(aI){var K=[],aH=-1;if(typeof aI=="string"){aI=[aI]}if(typeof aI.length=="number"){aF(aI,function(aK,aL){if(aL.content){K[aK]=aL}else{K[aK]={content:aL}}});aH=0}else{if(aI.tagName){var S=Q.getCache(aI);aI=S?S:Q.makeObject(aI)}if(aI.gallery){K=[];var aJ;for(var aG in Q.cache){aJ=Q.cache[aG];if(aJ.gallery&&aJ.gallery==aI.gallery){if(aH==-1&&aJ.content==aI.content){aH=K.length}K.push(aJ)}}if(aH==-1){K.unshift(aI);aH=0}}else{K=[aI];aH=0}}aF(K,function(aK,aL){K[aK]=aC({},aL)});return[K,aH]};Q.makeObject=function(aH,aG){var aI={content:aH.href,title:aH.getAttribute("title")||"",link:aH};if(aG){aG=aC({},aG);aF(["player","title","height","width","gallery"],function(aJ,aK){if(typeof aG[aK]!="undefined"){aI[aK]=aG[aK];delete aG[aK]}});aI.options=aG}else{aI.options={}}if(!aI.player){aI.player=Q.getPlayer(aI.content)}var K=aH.getAttribute("rel");if(K){var S=K.match(af);if(S){aI.gallery=escape(S[2])}aF(K.split(";"),function(aJ,aK){S=aK.match(az);if(S){aI[S[1]]=S[2]}})}return aI};Q.getPlayer=function(aG){if(aG.indexOf("#")>-1&&aG.indexOf(document.location.href)==0){return"inline"}var aH=aG.indexOf("?");if(aH>-1){aG=aG.substring(0,aH)}var S,K=aG.match(f);if(K){S=K[0].toLowerCase()}if(S){if(Q.img&&Q.img.ext.indexOf(S)>-1){return"img"}if(Q.swf&&Q.swf.ext.indexOf(S)>-1){return"swf"}if(Q.flv&&Q.flv.ext.indexOf(S)>-1){return"flv"}if(Q.qt&&Q.qt.ext.indexOf(S)>-1){if(Q.wmp&&Q.wmp.ext.indexOf(S)>-1){return"qtwmp"}else{return"qt"}}if(Q.wmp&&Q.wmp.ext.indexOf(S)>-1){return"wmp"}}return"iframe"};function G(){var aH=Q.errorInfo,aI=Q.plugins,aK,aL,aO,aG,aN,S,aM,K;for(var aJ=0;aJ'+s(Q.lang.errors[aN],S)+""}else{aL=true}}else{if(aK.player=="inline"){aG=ab.exec(aK.content);if(aG){aM=ad(aG[1]);if(aM){aK.content=aM.innerHTML}else{aL=true}}else{aL=true}}else{if(aK.player=="swf"||aK.player=="flv"){K=(aK.options&&aK.options.flashVersion)||Q.options.flashVersion;if(Q.flash&&!Q.flash.hasFlashPlayerVersion(K)){aK.width=310;aK.height=177}}}}if(aL){Q.gallery.splice(aJ,1);if(aJ0?aJ-1:aJ}}--aJ}}}function aq(K){if(!Q.options.enableKeys){return}(K?F:M)(document,"keydown",an)}function an(aG){if(aG.metaKey||aG.shiftKey||aG.altKey||aG.ctrlKey){return}var S=v(aG),K;switch(S){case 81:case 88:case 27:K=Q.close;break;case 37:K=Q.previous;break;case 39:K=Q.next;break;case 32:K=typeof ap=="number"?Q.pause:Q.play;break}if(K){n(aG);K()}}function c(aK){aq(false);var aJ=Q.getCurrent();var aG=(aJ.player=="inline"?"html":aJ.player);if(typeof Q[aG]!="function"){throw"unknown player "+aG}if(aK){Q.player.remove();Q.revertOptions();Q.applyOptions(aJ.options||{})}Q.player=new Q[aG](aJ,Q.playerId);if(Q.gallery.length>1){var aH=Q.gallery[Q.current+1]||Q.gallery[0];if(aH.player=="img"){var S=new Image();S.src=aH.content}var aI=Q.gallery[Q.current-1]||Q.gallery[Q.gallery.length-1];if(aI.player=="img"){var K=new Image();K.src=aI.content}}Q.skin.onLoad(aK,W)}function W(){if(!A){return}if(typeof Q.player.ready!="undefined"){var K=setInterval(function(){if(A){if(Q.player.ready){clearInterval(K);K=null;Q.skin.onReady(e)}}else{clearInterval(K);K=null}},10)}else{Q.skin.onReady(e)}}function e(){if(!A){return}Q.player.append(Q.skin.body,Q.dimensions);Q.skin.onShow(I)}function I(){if(!A){return}if(Q.player.onLoad){Q.player.onLoad()}Q.options.onFinish(Q.getCurrent());if(!Q.isPaused()){Q.play()}aq(true)}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(S,aG){var K=this.length>>>0;aG=aG||0;if(aG<0){aG+=K}for(;aG-1;Q.plugins={fla:w.indexOf("Shockwave Flash")>-1,qt:w.indexOf("QuickTime")>-1,wmp:!ai&&w.indexOf("Windows Media")>-1,f4m:ai}}else{var p=function(K){var S;try{S=new ActiveXObject(K)}catch(aG){}return !!S};Q.plugins={fla:p("ShockwaveFlash.ShockwaveFlash"),qt:p("QuickTime.QuickTime"),wmp:p("wmplayer.ocx"),f4m:false}}var X=/^(light|shadow)box/i,am="shadowboxCacheKey",b=1;Q.cache={};Q.select=function(S){var aG=[];if(!S){var K;aF(document.getElementsByTagName("a"),function(aJ,aK){K=aK.getAttribute("rel");if(K&&X.test(K)){aG.push(aK)}})}else{var aI=S.length;if(aI){if(typeof S=="string"){if(Q.find){aG=Q.find(S)}}else{if(aI==2&&typeof S[0]=="string"&&S[1].nodeType){if(Q.find){aG=Q.find(S[0],S[1])}}else{for(var aH=0;aH+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,aQ=0,aS=Object.prototype.toString,aK=false,aJ=true;[0,0].sort(function(){aJ=false;return 0});var aG=function(a1,aW,a4,a5){a4=a4||[];var a7=aW=aW||document;if(aW.nodeType!==1&&aW.nodeType!==9){return[]}if(!a1||typeof a1!=="string"){return a4}var a2=[],aY,a9,bc,aX,a0=true,aZ=aH(aW),a6=a1;while((aP.exec(""),aY=aP.exec(a6))!==null){a6=aY[3];a2.push(aY[1]);if(aY[2]){aX=aY[3];break}}if(a2.length>1&&aL.exec(a1)){if(a2.length===2&&aM.relative[a2[0]]){a9=aT(a2[0]+a2[1],aW)}else{a9=aM.relative[a2[0]]?[aW]:aG(a2.shift(),aW);while(a2.length){a1=a2.shift();if(aM.relative[a1]){a1+=a2.shift()}a9=aT(a1,a9)}}}else{if(!a5&&a2.length>1&&aW.nodeType===9&&!aZ&&aM.match.ID.test(a2[0])&&!aM.match.ID.test(a2[a2.length-1])){var a8=aG.find(a2.shift(),aW,aZ);aW=a8.expr?aG.filter(a8.expr,a8.set)[0]:a8.set[0]}if(aW){var a8=a5?{expr:a2.pop(),set:aO(a5)}:aG.find(a2.pop(),a2.length===1&&(a2[0]==="~"||a2[0]==="+")&&aW.parentNode?aW.parentNode:aW,aZ);a9=a8.expr?aG.filter(a8.expr,a8.set):a8.set;if(a2.length>0){bc=aO(a9)}else{a0=false}while(a2.length){var bb=a2.pop(),ba=bb;if(!aM.relative[bb]){bb=""}else{ba=a2.pop()}if(ba==null){ba=aW}aM.relative[bb](bc,ba,aZ)}}else{bc=a2=[]}}if(!bc){bc=a9}if(!bc){throw"Syntax error, unrecognized expression: "+(bb||a1)}if(aS.call(bc)==="[object Array]"){if(!a0){a4.push.apply(a4,bc)}else{if(aW&&aW.nodeType===1){for(var a3=0;bc[a3]!=null;a3++){if(bc[a3]&&(bc[a3]===true||bc[a3].nodeType===1&&aN(aW,bc[a3]))){a4.push(a9[a3])}}}else{for(var a3=0;bc[a3]!=null;a3++){if(bc[a3]&&bc[a3].nodeType===1){a4.push(a9[a3])}}}}}else{aO(bc,a4)}if(aX){aG(aX,a7,a4,a5);aG.uniqueSort(a4)}return a4};aG.uniqueSort=function(aX){if(aR){aK=aJ;aX.sort(aR);if(aK){for(var aW=1;aW":function(a2,aX){var a0=typeof aX==="string";if(a0&&!/\W/.test(aX)){aX=aX.toLowerCase();for(var aY=0,aW=a2.length;aY=0)){if(!aY){aW.push(a1)}}else{if(aY){aX[a0]=false}}}}return false},ID:function(aW){return aW[1].replace(/\\/g,"")},TAG:function(aX,aW){return aX[1].toLowerCase()},CHILD:function(aW){if(aW[1]==="nth"){var aX=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(aW[2]==="even"&&"2n"||aW[2]==="odd"&&"2n+1"||!/\D/.test(aW[2])&&"0n+"+aW[2]||aW[2]);aW[2]=(aX[1]+(aX[2]||1))-0;aW[3]=aX[3]-0}aW[0]=aQ++;return aW},ATTR:function(a0,aX,aY,aW,a1,a2){var aZ=a0[1].replace(/\\/g,"");if(!a2&&aM.attrMap[aZ]){a0[1]=aM.attrMap[aZ]}if(a0[2]==="~="){a0[4]=" "+a0[4]+" "}return a0},PSEUDO:function(a0,aX,aY,aW,a1){if(a0[1]==="not"){if((aP.exec(a0[3])||"").length>1||/^\w/.test(a0[3])){a0[3]=aG(a0[3],null,null,aX)}else{var aZ=aG.filter(a0[3],aX,aY,true^a1);if(!aY){aW.push.apply(aW,aZ)}return false}}else{if(aM.match.POS.test(a0[0])||aM.match.CHILD.test(a0[0])){return true}}return a0},POS:function(aW){aW.unshift(true);return aW}},filters:{enabled:function(aW){return aW.disabled===false&&aW.type!=="hidden"},disabled:function(aW){return aW.disabled===true},checked:function(aW){return aW.checked===true},selected:function(aW){aW.parentNode.selectedIndex;return aW.selected===true},parent:function(aW){return !!aW.firstChild},empty:function(aW){return !aW.firstChild},has:function(aY,aX,aW){return !!aG(aW[3],aY).length},header:function(aW){return/h\d/i.test(aW.nodeName)},text:function(aW){return"text"===aW.type},radio:function(aW){return"radio"===aW.type},checkbox:function(aW){return"checkbox"===aW.type},file:function(aW){return"file"===aW.type},password:function(aW){return"password"===aW.type},submit:function(aW){return"submit"===aW.type},image:function(aW){return"image"===aW.type},reset:function(aW){return"reset"===aW.type},button:function(aW){return"button"===aW.type||aW.nodeName.toLowerCase()==="button"},input:function(aW){return/input|select|textarea|button/i.test(aW.nodeName)}},setFilters:{first:function(aX,aW){return aW===0},last:function(aY,aX,aW,aZ){return aX===aZ.length-1},even:function(aX,aW){return aW%2===0},odd:function(aX,aW){return aW%2===1},lt:function(aY,aX,aW){return aXaW[3]-0},nth:function(aY,aX,aW){return aW[3]-0===aX},eq:function(aY,aX,aW){return aW[3]-0===aX}},filter:{PSEUDO:function(a2,aY,aZ,a3){var aX=aY[1],a0=aM.filters[aX];if(a0){return a0(a2,aZ,aY,a3)}else{if(aX==="contains"){return(a2.textContent||a2.innerText||S([a2])||"").indexOf(aY[3])>=0}else{if(aX==="not"){var a1=aY[3];for(var aZ=0,aW=a1.length;aZ=0)}}},ID:function(aX,aW){return aX.nodeType===1&&aX.getAttribute("id")===aW},TAG:function(aX,aW){return(aW==="*"&&aX.nodeType===1)||aX.nodeName.toLowerCase()===aW},CLASS:function(aX,aW){return(" "+(aX.className||aX.getAttribute("class"))+" ").indexOf(aW)>-1},ATTR:function(a1,aZ){var aY=aZ[1],aW=aM.attrHandle[aY]?aM.attrHandle[aY](a1):a1[aY]!=null?a1[aY]:a1.getAttribute(aY),a2=aW+"",a0=aZ[2],aX=aZ[4];return aW==null?a0==="!=":a0==="="?a2===aX:a0==="*="?a2.indexOf(aX)>=0:a0==="~="?(" "+a2+" ").indexOf(aX)>=0:!aX?a2&&aW!==false:a0==="!="?a2!==aX:a0==="^="?a2.indexOf(aX)===0:a0==="$="?a2.substr(a2.length-aX.length)===aX:a0==="|="?a2===aX||a2.substr(0,aX.length+1)===aX+"-":false},POS:function(a0,aX,aY,a1){var aW=aX[2],aZ=aM.setFilters[aW];if(aZ){return aZ(a0,aY,aX,a1)}}}};var aL=aM.match.POS;for(var aI in aM.match){aM.match[aI]=new RegExp(aM.match[aI].source+/(?![^\[]*\])(?![^\(]*\))/.source);aM.leftMatch[aI]=new RegExp(/(^(?:.|\r|\n)*?)/.source+aM.match[aI].source)}var aO=function(aX,aW){aX=Array.prototype.slice.call(aX,0);if(aW){aW.push.apply(aW,aX);return aW}return aX};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(aV){aO=function(a0,aZ){var aX=aZ||[];if(aS.call(a0)==="[object Array]"){Array.prototype.push.apply(aX,a0)}else{if(typeof a0.length==="number"){for(var aY=0,aW=a0.length;aY";var aW=document.documentElement;aW.insertBefore(aX,aW.firstChild);if(document.getElementById(aY)){aM.find.ID=function(a0,a1,a2){if(typeof a1.getElementById!=="undefined"&&!a2){var aZ=a1.getElementById(a0[1]);return aZ?aZ.id===a0[1]||typeof aZ.getAttributeNode!=="undefined"&&aZ.getAttributeNode("id").nodeValue===a0[1]?[aZ]:k:[]}};aM.filter.ID=function(a1,aZ){var a0=typeof a1.getAttributeNode!=="undefined"&&a1.getAttributeNode("id");return a1.nodeType===1&&a0&&a0.nodeValue===aZ}}aW.removeChild(aX);aW=aX=null})();(function(){var aW=document.createElement("div");aW.appendChild(document.createComment(""));if(aW.getElementsByTagName("*").length>0){aM.find.TAG=function(aX,a1){var a0=a1.getElementsByTagName(aX[1]);if(aX[1]==="*"){var aZ=[];for(var aY=0;a0[aY];aY++){if(a0[aY].nodeType===1){aZ.push(a0[aY])}}a0=aZ}return a0}}aW.innerHTML="";if(aW.firstChild&&typeof aW.firstChild.getAttribute!=="undefined"&&aW.firstChild.getAttribute("href")!=="#"){aM.attrHandle.href=function(aX){return aX.getAttribute("href",2)}}aW=null})();if(document.querySelectorAll){(function(){var aW=aG,aY=document.createElement("div");aY.innerHTML="

    ";if(aY.querySelectorAll&&aY.querySelectorAll(".TEST").length===0){return}aG=function(a2,a1,aZ,a0){a1=a1||document;if(!a0&&a1.nodeType===9&&!aH(a1)){try{return aO(a1.querySelectorAll(a2),aZ)}catch(a3){}}return aW(a2,a1,aZ,a0)};for(var aX in aW){aG[aX]=aW[aX]}aY=null})()}(function(){var aW=document.createElement("div");aW.innerHTML="
    ";if(!aW.getElementsByClassName||aW.getElementsByClassName("e").length===0){return}aW.lastChild.className="e";if(aW.getElementsByClassName("e").length===1){return}aM.order.splice(1,0,"CLASS");aM.find.CLASS=function(aX,aY,aZ){if(typeof aY.getElementsByClassName!=="undefined"&&!aZ){return aY.getElementsByClassName(aX[1])}};aW=null})();function K(aX,a2,a1,a5,a3,a4){for(var aZ=0,aY=a5.length;aZ0){a0=aW;break}}}aW=aW[aX]}a5[aZ]=a0}}}var aN=document.compareDocumentPosition?function(aX,aW){return aX.compareDocumentPosition(aW)&16}:function(aX,aW){return aX!==aW&&(aX.contains?aX.contains(aW):true)};var aH=function(aW){var aX=(aW?aW.ownerDocument||aW:0).documentElement;return aX?aX.nodeName!=="HTML":false};var aT=function(aW,a3){var aZ=[],a0="",a1,aY=a3.nodeType?[a3]:a3;while((a1=aM.match.PSEUDO.exec(aW))){a0+=a1[0];aW=aW.replace(aM.match.PSEUDO,"")}aW=aM.relative[aW]?aW+"*":aW;for(var a2=0,aX=aY.length;a2{1}, чтобы просмотривать этот контент.',shared:'Чтобы просмотреть этот контент, вы должны установить и {1}, и {3}.',either:'Вы должны установить или {1} плагин, или {3}, чтобы просмотреть этот контент.'}};var D,at="sb-drag-proxy",E,j,ag;function ax(){E={x:0,y:0,startX:null,startY:null}}function aA(){var K=Q.dimensions;aC(j.style,{height:K.innerHeight+"px",width:K.innerWidth+"px"})}function O(){ax();var K=["position:absolute","cursor:"+(Q.isGecko?"-moz-grab":"move"),"background-color:"+(Q.isIE?"#fff;filter:alpha(opacity=0)":"transparent")].join(";");Q.appendHTML(Q.skin.body,'
    ');j=ad(at);aA();F(j,"mousedown",L)}function B(){if(j){M(j,"mousedown",L);C(j);j=null}ag=null}function L(S){n(S);var K=V(S);E.startX=K[0];E.startY=K[1];ag=ad(Q.player.id);F(document,"mousemove",H);F(document,"mouseup",i);if(Q.isGecko){j.style.cursor="-moz-grabbing"}}function H(aI){var K=Q.player,aJ=Q.dimensions,aH=V(aI);var aG=aH[0]-E.startX;E.startX+=aG;E.x=Math.max(Math.min(0,E.x+aG),aJ.innerWidth-K.width);var S=aH[1]-E.startY;E.startY+=S;E.y=Math.max(Math.min(0,E.y+S),aJ.innerHeight-K.height);aC(ag.style,{left:E.x+"px",top:E.y+"px"})}function i(){M(document,"mousemove",H);M(document,"mouseup",i);if(Q.isGecko){j.style.cursor="-moz-grab"}}Q.img=function(S,aG){this.obj=S;this.id=aG;this.ready=false;var K=this;D=new Image();D.onload=function(){K.height=S.height?parseInt(S.height,10):D.height;K.width=S.width?parseInt(S.width,10):D.width;K.ready=true;D.onload=null;D=null};D.src=S.content};Q.img.ext=["bmp","gif","jpg","jpeg","png"];Q.img.prototype={append:function(S,aI){var aG=document.createElement("img");aG.id=this.id;aG.src=this.obj.content;aG.style.position="absolute";var K,aH;if(aI.oversized&&Q.options.handleOversize=="resize"){K=aI.innerHeight;aH=aI.innerWidth}else{K=this.height;aH=this.width}aG.setAttribute("height",K);aG.setAttribute("width",aH);S.appendChild(aG)},remove:function(){var K=ad(this.id);if(K){C(K)}B();if(D){D.onload=null;D=null}},onLoad:function(){var K=Q.dimensions;if(K.oversized&&Q.options.handleOversize=="drag"){O()}},onWindowResize:function(){var aH=Q.dimensions;switch(Q.options.handleOversize){case"resize":var K=ad(this.id);K.height=aH.innerHeight;K.width=aH.innerWidth;break;case"drag":if(ag){var aG=parseInt(Q.getStyle(ag,"top")),S=parseInt(Q.getStyle(ag,"left"));if(aG+this.height=aJ){clearInterval(S);S=null;aM(aG,aN);if(aR){aR()}}else{aM(aG,aO+aK((aI-aH)/aL)*aP)}},10)}function aB(){aa.style.height=Q.getWindowSize("Height")+"px";aa.style.width=Q.getWindowSize("Width")+"px"}function aE(){aa.style.top=document.documentElement.scrollTop+"px";aa.style.left=document.documentElement.scrollLeft+"px"}function ay(K){if(K){aF(Y,function(S,aG){aG[0].style.visibility=aG[1]||""})}else{Y=[];aF(Q.options.troubleElements,function(aG,S){aF(document.getElementsByTagName(S),function(aH,aI){Y.push([aI,aI.style.visibility]);aI.style.visibility="hidden"})})}}function r(aG,K){var S=ad("sb-nav-"+aG);if(S){S.style.display=K?"":"none"}}function ah(K,aJ){var aI=ad("sb-loading"),aG=Q.getCurrent().player,aH=(aG=="img"||aG=="html");if(K){Q.setOpacity(aI,0);aI.style.display="block";var S=function(){Q.clearOpacity(aI);if(aJ){aJ()}};if(aH){N(aI,"opacity",1,Q.options.fadeDuration,S)}else{S()}}else{var S=function(){aI.style.display="none";Q.clearOpacity(aI);if(aJ){aJ()}};if(aH){N(aI,"opacity",0,Q.options.fadeDuration,S)}else{S()}}}function t(aO){var aJ=Q.getCurrent();ad("sb-title-inner").innerHTML=aJ.title||"";var aP,aL,S,aQ,aM;if(Q.options.displayNav){aP=true;var aN=Q.gallery.length;if(aN>1){if(Q.options.continuous){aL=aM=true}else{aL=(aN-1)>Q.current;aM=Q.current>0}}if(Q.options.slideshowDelay>0&&Q.hasNext()){aQ=!Q.isPaused();S=!aQ}}else{aP=aL=S=aQ=aM=false}r("close",aP);r("next",aL);r("play",S);r("pause",aQ);r("previous",aM);var K="";if(Q.options.displayCounter&&Q.gallery.length>1){var aN=Q.gallery.length;if(Q.options.counterType=="skip"){var aI=0,aH=aN,aG=parseInt(Q.options.counterLimit)||0;if(aG2){var aK=Math.floor(aG/2);aI=Q.current-aK;if(aI<0){aI+=aN}aH=Q.current+(aG-aK);if(aH>aN){aH-=aN}}while(aI!=aH){if(aI==aN){aI=0}K+='"}}else{K=[Q.current+1,Q.lang.of,aN].join(" ")}}ad("sb-counter").innerHTML=K;aO()}function U(aH){var K=ad("sb-title-inner"),aG=ad("sb-info-inner"),S=0.35;K.style.visibility=aG.style.visibility="";if(K.innerHTML!=""){N(K,"marginTop",0,S)}N(aG,"marginTop",0,S,aH)}function av(aG,aM){var aK=ad("sb-title"),K=ad("sb-info"),aH=aK.offsetHeight,aI=K.offsetHeight,aJ=ad("sb-title-inner"),aL=ad("sb-info-inner"),S=(aG?0.35:0);N(aJ,"marginTop",aH,S);N(aL,"marginTop",aI*-1,S,function(){aJ.style.visibility=aL.style.visibility="hidden";aM()})}function ac(K,aH,S,aJ){var aI=ad("sb-wrapper-inner"),aG=(S?Q.options.resizeDuration:0);N(Z,"top",aH,aG);N(aI,"height",K,aG,aJ)}function ar(K,aH,S,aI){var aG=(S?Q.options.resizeDuration:0);N(Z,"left",aH,aG);N(Z,"width",K,aG,aI)}function ak(aM,aG){var aI=ad("sb-body-inner"),aM=parseInt(aM),aG=parseInt(aG),S=Z.offsetHeight-aI.offsetHeight,K=Z.offsetWidth-aI.offsetWidth,aK=ae.offsetHeight,aL=ae.offsetWidth,aJ=parseInt(Q.options.viewportPadding)||20,aH=(Q.player&&Q.options.handleOversize!="drag");return Q.setDimensions(aM,aG,aK,aL,S,K,aJ,aH)}var T={};T.markup='';T.options={animSequence:"sync",counterLimit:10,counterType:"default",displayCounter:true,displayNav:true,fadeDuration:0.35,initialHeight:160,initialWidth:320,modal:false,overlayColor:"#000",overlayOpacity:0.5,resizeDuration:0.35,showOverlay:true,troubleElements:["select","object","embed","canvas"]};T.init=function(){Q.appendHTML(document.body,s(T.markup,Q.lang));T.body=ad("sb-body-inner");aa=ad("sb-container");ae=ad("sb-overlay");Z=ad("sb-wrapper");if(!x){aa.style.position="absolute"}if(!h){var aG,K,S=/url\("(.*\.png)"\)/;aF(q,function(aI,aJ){aG=ad(aJ);if(aG){K=Q.getStyle(aG,"backgroundImage").match(S);if(K){aG.style.backgroundImage="none";aG.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+K[1]+",sizingMethod=scale);"}}})}var aH;F(au,"resize",function(){if(aH){clearTimeout(aH);aH=null}if(A){aH=setTimeout(T.onWindowResize,10)}})};T.onOpen=function(K,aG){m=false;aa.style.display="block";aB();var S=ak(Q.options.initialHeight,Q.options.initialWidth);ac(S.innerHeight,S.top);ar(S.width,S.left);if(Q.options.showOverlay){ae.style.backgroundColor=Q.options.overlayColor;Q.setOpacity(ae,0);if(!Q.options.modal){F(ae,"click",Q.close)}ao=true}if(!x){aE();F(au,"scroll",aE)}ay();aa.style.visibility="visible";if(ao){N(ae,"opacity",Q.options.overlayOpacity,Q.options.fadeDuration,aG)}else{aG()}};T.onLoad=function(S,K){ah(true);while(T.body.firstChild){C(T.body.firstChild)}av(S,function(){if(!A){return}if(!S){Z.style.visibility="visible"}t(K)})};T.onReady=function(aH){if(!A){return}var S=Q.player,aG=ak(S.height,S.width);var K=function(){U(aH)};switch(Q.options.animSequence){case"hw":ac(aG.innerHeight,aG.top,true,function(){ar(aG.width,aG.left,true,K)});break;case"wh":ar(aG.width,aG.left,true,function(){ac(aG.innerHeight,aG.top,true,K)});break;default:ar(aG.width,aG.left,true);ac(aG.innerHeight,aG.top,true,K)}};T.onShow=function(K){ah(false,K);m=true};T.onClose=function(){if(!x){M(au,"scroll",aE)}M(ae,"click",Q.close);Z.style.visibility="hidden";var K=function(){aa.style.visibility="hidden";aa.style.display="none";ay(true)};if(ao){N(ae,"opacity",0,Q.options.fadeDuration,K)}else{K()}};T.onPlay=function(){r("play",false);r("pause",true)};T.onPause=function(){r("pause",false);r("play",true)};T.onWindowResize=function(){if(!m){return}aB();var K=Q.player,S=ak(K.height,K.width);ar(S.width,S.left);ac(S.innerHeight,S.top);if(K.onWindowResize){K.onWindowResize()}};Q.skin=T;au.Shadowbox=Q})(window); \ No newline at end of file diff --git a/frontend/web/js/slides.min.jquery.js b/frontend/web/js/slides.min.jquery.js new file mode 100755 index 0000000..1a1fcdd --- /dev/null +++ b/frontend/web/js/slides.min.jquery.js @@ -0,0 +1,20 @@ +/* +* Slides, A Slideshow Plugin for jQuery +* Intructions: http://slidesjs.com +* By: Nathan Searles, http://nathansearles.com +* Version: 1.1.9 +* Updated: September 5th, 2011 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +(function(a){a.fn.slides=function(b){return b=a.extend({},a.fn.slides.option,b),this.each(function(){function w(g,h,i){if(!p&&o){p=!0,b.animationStart(n+1);switch(g){case"next":l=n,k=n+1,k=e===k?0:k,r=f*2,g=-f*2,n=k;break;case"prev":l=n,k=n-1,k=k===-1?e-1:k,r=0,g=0,n=k;break;case"pagination":k=parseInt(i,10),l=a("."+b.paginationClass+" li."+b.currentClass+" a",c).attr("href").match("[^#/]+$"),k>l?(r=f*2,g=-f*2):(r=0,g=0),n=k}h==="fade"?b.crossfade?d.children(":eq("+k+")",c).css({zIndex:10}).fadeIn(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1)}):d.children(":eq("+l+")",c).fadeOut(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing)}):d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing,function(){a.browser.msie&&a(this).get(0).style.removeAttribute("filter")}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+k+")").css({left:r,display:"block"}),b.autoHeight?d.animate({left:g,height:d.children(":eq("+k+")").outerHeight()},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1}):d.animate({left:g},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1})),b.pagination&&(a("."+b.paginationClass+" li."+b.currentClass,c).removeClass(b.currentClass),a("."+b.paginationClass+" li:eq("+k+")",c).addClass(b.currentClass))}}function x(){clearInterval(c.data("interval"))}function y(){b.pause?(clearTimeout(c.data("pause")),clearInterval(c.data("interval")),u=setTimeout(function(){clearTimeout(c.data("pause")),v=setInterval(function(){w("next",i)},b.play),c.data("interval",v)},b.pause),c.data("pause",u)):x()}a("."+b.container,a(this)).children().wrapAll('
    ');var c=a(this),d=a(".slides_control",c),e=d.children().size(),f=d.children().outerWidth(),g=d.children().outerHeight(),h=b.start-1,i=b.effect.indexOf(",")<0?b.effect:b.effect.replace(" ","").split(",")[0],j=b.effect.indexOf(",")<0?i:b.effect.replace(" ","").split(",")[1],k=0,l=0,m=0,n=0,o,p,q,r,s,t,u,v;if(e<2)return a("."+b.container,a(this)).fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()}),a("."+b.next+", ."+b.prev).fadeOut(0),!1;if(e<2)return;h<0&&(h=0),h>e&&(h=e-1),b.start&&(n=h),b.randomize&&d.randomize(),a("."+b.container,c).css({overflow:"hidden",position:"relative"}),d.children().css({position:"absolute",top:0,left:d.children().outerWidth(),zIndex:0,display:"none"}),d.css({position:"relative",width:f*3,height:g,left:-f}),a("."+b.container,c).css({display:"block"}),b.autoHeight&&(d.children().css({height:"auto"}),d.animate({height:d.children(":eq("+h+")").outerHeight()},b.autoHeightSpeed));if(b.preload&&d.find("img:eq("+h+")").length){a("."+b.container,c).css({background:"url("+b.preloadImage+") no-repeat 50% 50%"});var z=d.find("img:eq("+h+")").attr("src")+"?"+(new Date).getTime();a("img",c).parent().attr("class")!="slides_control"?t=d.children(":eq(0)")[0].tagName.toLowerCase():t=d.find("img:eq("+h+")"),d.find("img:eq("+h+")").attr("src",z).load(function(){d.find(t+":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){a(this).css({zIndex:5}),a("."+b.container,c).css({background:""}),o=!0,b.slidesLoaded()})})}else d.children(":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()});b.bigTarget&&(d.children().css({cursor:"pointer"}),d.children().click(function(){return w("next",i),!1})),b.hoverPause&&b.play&&(d.bind("mouseover",function(){x()}),d.bind("mouseleave",function(){y()})),b.generateNextPrev&&(a("."+b.container,c).after('Prev'),a("."+b.prev,c).after('Next')),a("."+b.next,c).click(function(a){a.preventDefault(),b.play&&y(),w("next",i)}),a("."+b.prev,c).click(function(a){a.preventDefault(),b.play&&y(),w("prev",i)}),b.generatePagination?(b.prependPagination?c.prepend("
      "):c.append("
        "),d.children().each(function(){a("."+b.paginationClass,c).append('
      • '+(m+1)+"
      • "),m++})):a("."+b.paginationClass+" li a",c).each(function(){a(this).attr("href","#"+m),m++}),a("."+b.paginationClass+" li:eq("+h+")",c).addClass(b.currentClass),a("."+b.paginationClass+" li a",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$"),n!=q&&w("pagination",j,q),!1}),a("a.link",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$")-1,n!=q&&w("pagination",j,q),!1}),b.play&&(v=setInterval(function(){w("next",i)},b.play),c.data("interval",v))})},a.fn.slides.option={preload:!1,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:!1,next:"next",prev:"prev",pagination:!0,generatePagination:!0,prependPagination:!1,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:!1,randomize:!1,play:0,pause:0,hoverPause:!1,autoHeight:!1,autoHeightSpeed:350,bigTarget:!1,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}},a.fn.randomize=function(b){function c(){return Math.round(Math.random())-.5}return a(this).each(function(){var d=a(this),e=d.children(),f=e.length;if(f>1){e.hide();var g=[];for(i=0;i + + +jCarousel: Changelog + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        +

        Changelog

        +

        Version 0.2.8 - 2011-04-14

        +
          +
        • Fixed selecting only direct childs of the current list (#61).
        • +
        • Added static method to set windowLoaded to true manually (#60).
        • +
        • Added setupCallback.
        • +
        • Optimized resize callback.
        • +
        • Added animationStepCallback option (Thanks scy).
        • +
        • Wider support of border-radius, and support of :focus in addition to :hover (Thanks lespacedunmatin).
        • +
        +

        Version 0.2.7 - 2010-10-06

        +
          +
        • Fixed bug with autoscrolling introduced while fixing #49.
        • +
        +

        Version 0.2.6 - 2010-10-05

        +
          +
        • Fixed item only partially visible when defined as start item (#22).
        • +
        • Fixed multiple binds on prev/next buttons (#26).
        • +
        • Added firing of button callbacks also if no buttons are specified (#39).
        • +
        • Fixed stopAuto() not stopping while in animation (#49).
        • +
        +

        Version 0.2.5 - 2010-08-13

        +
          +
        • Added RTL (Right-To-Left) support.
        • +
        • Added automatic deletion of cloned elements for circular carousels.
        • +
        • Added new option itemFallbackDimension (#7).
        • +
        • Added new section "Defining the number of visible items" to documentation.
        • +
        +

        Version 0.2.4 - 2010-04-19

        +
          +
        • Updated jQuery to version 1.4.2.
        • +
        • jCarousel instance can now be retrieved by $(selector).data('jcarousel').
        • +
        • Support for static circular carousels out of the box.
        • +
        • Removed not longer needed core stylsheet jquery.jcarousel.css. Styles are now set by javascript or skin stylesheets.
        • +
        +

        Version 0.2.3 - 2008-04-07

        +
          +
        • Updated jQuery to version 1.2.3.
        • +
        • Fixed (hopefully) issues with Safari.
        • +
        • Added new example "Multiple carousels on one page".
        • +
        +

        Version 0.2.2 - 2007-11-07

        +
          +
        • Fixed bug with nested li elements reported by John + Fiala.
        • +
        • Fixed bug on initialization with too few elements reported by Glenn + Nilsson.
        • +
        +

        Version 0.2.1 - 2007-10-12

        +
          +
        • Readded the option start for a custom start position. The + old option start is renamed to offset.
        • +
        • New example for dynamic content loading via Ajax from a PHP script.
        • +
        • Fixed a bug with variable item widths/heights.
        • +
        + +

        Version 0.2.0-beta - 2007-05-07

        +
          +
        • Complete rewrite of the plugin. See this post for further informations.
        • +
        +

        Version 0.1.6 - 2007-01-22

        +
          +
        • New public methods size() and init().
        • +
        • Added new example "Carousel with external controls".
        • +
        +

        Version 0.1.5 - 2007-01-08

        +
          +
        • Code modifications to work with the jQuery 1.1.
        • +
        • Renamed the js file to jquery.jcarousel.pack.js as noted in the jquery docs.
        • +
        +

        Version 0.1.4 - 2006-12-12

        +
          +
        • New configuration option autoScrollResumeOnMouseout.
        • +
        +

        Version 0.1.3 - 2006-12-02

        +
          +
        • New configuration option itemStart. Sets the index of the + item to start with.
        • +
        +

        Version 0.1.2 - 2006-11-28

        +
          +
        • New configuration option wrapPrev. Behaves like wrap + but scrolls to the end when clicking the prev-button at the start of the + carousel. (Note: This may produce unexpected results with dynamic loaded + content. You must ensure to load the complete carousel on initialisation).
        • +
        • Moved call of the button handlers at the end of the buttons() method. + This lets the callbacks change the behaviours assigned by jCarousel.
        • +
        +

        Version 0.1.1 - 2006-10-25

        +
          +
        • The item handler callback options accept now a hash of two functions which + are triggered before and after animation.
        • +
        • The item handler callback functions accept now a fourth parameter state which + holds one of three states: next, prev or init.
        • +
        • New configuration option autoScrollStopOnMouseover
        • +
        +

        Version 0.1.0 - 2006-09-21

        +
          +
        • Stable release.
        • +
        • Internal source code rewriting to fit more into the jQuery + plugin guidelines.
        • +
        • Added inline documentation.
        • +
        • Changed licence to a dual licence model (MIT and GPL).
        • +
        +

        Version 0.1.0-RC1 - 2006-09-13

        +
          +
        • Virtual item attribute jCarouselItemIdx is replaced by a class jcarousel-item-n.
        • +
        • The item callback functions accept a third parameter idx which + holds the position of the item in the list (formerly the attribute jCarouselItemIdx).
        • +
        • Fixed bug with margin-right in Safari.
        • +
        +

        Version 0.1.0-gamma - 2006-09-07

        +
          +
        • Added auto-wrapping of the required html markup around lists (ul + and ol) if jQuery().jcarousel() is assigned directly to them.
        • +
        • Added support for new callback functions itemFirstInHandler, itemFirstOutHandler, itemLastInHandler, itemLastOutHandler, itemVisibleInHandler, itemVisibleOutHandler.
        • +
        • General sourcecode rewriting.
        • +
        • Fixed bug not setting <li> index attributes correctly.
        • +
        • Changed default itemWidth and itemHeight to 75.
        • +
        +

        Version 0.1.0-beta - 2006-09-02

        +
          +
        • Initial release.
        • +
        +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax.html new file mode 100755 index 0000000..7082721 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax.html @@ -0,0 +1,83 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with dynamic content loading via Ajax

        +

        + The data is loaded dynamically from a simple text file which contains the image urls. +

        + +
        +
          + +
        +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax.txt b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax.txt new file mode 100755 index 0000000..4ff426e --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax.txt @@ -0,0 +1,10 @@ +http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg| +http://static.flickr.com/75/199481072_b4a0d09597_s.jpg| +http://static.flickr.com/57/199481087_33ae73a8de_s.jpg| +http://static.flickr.com/77/199481108_4359e6b971_s.jpg| +http://static.flickr.com/58/199481143_3c148d9dd3_s.jpg| +http://static.flickr.com/72/199481203_ad4cdcf109_s.jpg| +http://static.flickr.com/58/199481218_264ce20da0_s.jpg| +http://static.flickr.com/69/199481255_fdfe885f87_s.jpg| +http://static.flickr.com/60/199480111_87d4cb3e38_s.jpg| +http://static.flickr.com/70/229228324_08223b70fa_s.jpg \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax_php.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax_php.html new file mode 100755 index 0000000..26cf676 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax_php.html @@ -0,0 +1,95 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with dynamic content loading via Ajax

        +

        + The data is loaded dynamically from a simple text file which contains the image urls. +

        + +
        +
          + +
        +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax_php.php b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax_php.php new file mode 100755 index 0000000..00b4313 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_ajax_php.php @@ -0,0 +1,43 @@ +'; + +// Return total number of images so the callback +// can set the size of the carousel. +echo ' ' . $total . ''; + +foreach ($selected as $img) { + echo ' ' . $img . ''; +} + +echo ''; + +?> \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_api.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_api.html new file mode 100755 index 0000000..658d255 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_api.html @@ -0,0 +1,149 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with dynamic content loading via Ajax from the Flickr API

        +

        + The data is loaded dynamically from the Flickr API + method flickr.photos.getRecent. + All items not in the visible range are removed from the list to keep the list small. +

        +

        + Note: There are constantly added new photos at flickr, so you possibly get different photos at certain positions. +

        + +
        +
          + +
        +
        + +

        + If you're using this example on your own server, don't forget to set your API key in dynamic_flickr_api.php! +

        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_api.php b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_api.php new file mode 100755 index 0000000..2c1e02c --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_api.php @@ -0,0 +1,29 @@ + \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_feed.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_feed.html new file mode 100755 index 0000000..db10596 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_feed.html @@ -0,0 +1,190 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with dynamic content loading via Ajax from the Flickr photo stream

        +

        + The data is loaded dynamically from the Flickr + public photos feed (format: JSON) + and can be filtered by tags. +

        + +
        +
          + +
        +
        + + + + +
        +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_feed.php b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_feed.php new file mode 100755 index 0000000..7e68919 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_flickr_feed.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_javascript.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_javascript.html new file mode 100755 index 0000000..7043dd2 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/dynamic_javascript.html @@ -0,0 +1,86 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with dynamic content loading via JavaScript

        +

        + The data is loaded dynamically from an javascript array. +

        + +
          + +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/arrow-down.gif b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/arrow-down.gif new file mode 100755 index 0000000..c8012ba Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/arrow-down.gif differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/arrow-up.gif b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/arrow-up.gif new file mode 100755 index 0000000..08bc203 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/arrow-up.gif differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading-small.gif b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading-small.gif new file mode 100755 index 0000000..b25ada9 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading-small.gif differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading-thickbox.gif b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading-thickbox.gif new file mode 100755 index 0000000..82290f4 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading-thickbox.gif differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading.gif b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading.gif new file mode 100755 index 0000000..5c7f808 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/images/loading.gif differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_easing.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_easing.html new file mode 100755 index 0000000..d48f4a8 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_easing.html @@ -0,0 +1,73 @@ + + + +jCarousel Examples + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with custom animation effect

        +

        + This example shows how to use custom animation effects (uses Robert + Penners easing equations). +

        + + +
        +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        +
        +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_flexible.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_flexible.html new file mode 100755 index 0000000..d92a040 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_flexible.html @@ -0,0 +1,72 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Flexible carousel

        +

        + This example shows a carousel with flexible item width. In this case, always + 4 items are visible (resize the browser window to see what happens). +

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_textscroller.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_textscroller.html new file mode 100755 index 0000000..c2bcaa0 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_textscroller.html @@ -0,0 +1,192 @@ + + + +jCarousel Examples + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        +

        Using jCarousel as Textscroller

        +

        + This example shows how to use jCarousel as a Textscroller. The data is loaded from the jQuery Blog RSS-Feed. +

        + +
        +
          + +
        +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_textscroller.php b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_textscroller.php new file mode 100755 index 0000000..a8ead24 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_textscroller.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_thickbox.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_thickbox.html new file mode 100755 index 0000000..7a15a86 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/special_thickbox.html @@ -0,0 +1,102 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        jCarousel and Thickbox 3

        +

        + Example of jCarousel working together with Thickbox 3. +

        + +
          + +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_auto.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_auto.html new file mode 100755 index 0000000..8200685 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_auto.html @@ -0,0 +1,79 @@ + + + +jCarousel Examples + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with autoscrolling

        +

        + Autoscrolling is enabled and the interval is set to 2 seconds. + Autoscrolling pauses when the user moves the cursor over the images and stops + when the user clicks the next or prev button. wrap is set to + "last". +

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_callbacks.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_callbacks.html new file mode 100755 index 0000000..9e57d45 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_callbacks.html @@ -0,0 +1,235 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel illustrating the callback functions

        +

        + This carousel has registered all available callback functions and displays + information about the state of the items and buttons. Additionally the width + of the carousel is set to auto. Resize the browser window and see what happens. +

        + + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +

        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_circular.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_circular.html new file mode 100755 index 0000000..bfdb2aa --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_circular.html @@ -0,0 +1,56 @@ + + + +jCarousel Examples + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Circular carousel

        +

        + This example shows a simple circular carousel. +

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_controls.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_controls.html new file mode 100755 index 0000000..d8fdeab --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_controls.html @@ -0,0 +1,166 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with external controls

        +

        + This carousel shows how to control it from outside. +

        + +
        +
        + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 +
        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        +
        + « Prev + + Next » +
        +
        + +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_multiple.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_multiple.html new file mode 100755 index 0000000..1af9089 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_multiple.html @@ -0,0 +1,95 @@ + + + +jCarousel Examples + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Multiple carousels on one page

        +

        + This example shows how to use multiple carousels on one page with different + skins and configurations. +

        + + + +
        + + + +
        + + + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_simple.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_simple.html new file mode 100755 index 0000000..018d649 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_simple.html @@ -0,0 +1,54 @@ + + + +jCarousel Examples + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Simple carousel

        +

        + This is the most simple usage of the carousel with no configuration options. +

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_start.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_start.html new file mode 100755 index 0000000..9b3dc40 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_start.html @@ -0,0 +1,53 @@ + + + +jCarousel Examples + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with custom start position

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_vertical.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_vertical.html new file mode 100755 index 0000000..4453e5b --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/static_vertical.html @@ -0,0 +1,57 @@ + + + +jCarousel Examples + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Vertical carousel

        +

        + A carousel in vertical orientation with custom prev/next controls, animation + set to "slow" and scroll set to 2. +

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/thickbox/thickbox.css b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/thickbox/thickbox.css new file mode 100755 index 0000000..399c68a --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/thickbox/thickbox.css @@ -0,0 +1,159 @@ +/* ----------------------------------------------------------------------------------------------------------------*/ +/* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/ +/* ----------------------------------------------------------------------------------------------------------------*/ +*{padding: 0; margin: 0;} + +/* ----------------------------------------------------------------------------------------------------------------*/ +/* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/ +/* ----------------------------------------------------------------------------------------------------------------*/ +#TB_window { + font: 12px Arial, Helvetica, sans-serif; + color: #333333; +} + +#TB_secondLine { + font: 10px Arial, Helvetica, sans-serif; + color:#666666; +} + +#TB_window a:link {color: #666666;} +#TB_window a:visited {color: #666666;} +#TB_window a:hover {color: #000;} +#TB_window a:active {color: #666666;} +#TB_window a:focus{color: #666666;} + +/* ----------------------------------------------------------------------------------------------------------------*/ +/* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/ +/* ----------------------------------------------------------------------------------------------------------------*/ +#TB_overlay { + position: fixed; + z-index:100; + top: 0px; + left: 0px; + background-color:#000; + filter:alpha(opacity=75); + -moz-opacity: 0.75; + opacity: 0.75; + height:100%; + width:100%; +} + +* html #TB_overlay { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_window { + position: fixed; + background: #ffffff; + z-index: 102; + color:#000000; + display:none; + border: 4px solid #525252; + text-align:left; + top:50%; + left:50%; +} + +* html #TB_window { /* ie6 hack */ +position: absolute; +margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_window img#TB_Image { + display:block; + margin: 15px 0 0 15px; + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; + border-top: 1px solid #666; + border-left: 1px solid #666; +} + +#TB_caption{ + height:25px; + padding:7px 30px 10px 25px; + float:left; +} + +#TB_closeWindow{ + height:25px; + padding:11px 25px 10px 0; + float:right; +} + +#TB_closeAjaxWindow{ + padding:7px 10px 5px 0; + margin-bottom:1px; + text-align:right; + float:right; +} + +#TB_ajaxWindowTitle{ + float:left; + padding:7px 0 5px 10px; + margin-bottom:1px; +} + +#TB_title{ + background-color:#e8e8e8; + height:27px; +} + +#TB_ajaxContent{ + clear:both; + padding:2px 15px 15px 15px; + overflow:auto; + text-align:left; + line-height:1.4em; +} + +#TB_ajaxContent.TB_modal{ + padding:15px; +} + +#TB_ajaxContent p{ + padding:5px 0px 5px 0px; +} + +#TB_load{ + position: fixed; + display:none; + height:13px; + width:208px; + z-index:103; + top: 50%; + left: 50%; + margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ +} + +* html #TB_load { /* ie6 hack */ +position: absolute; +margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_HideSelect{ + z-index:99; + position:fixed; + top: 0; + left: 0; + background-color:#fff; + border:none; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; + height:100%; + width:100%; +} + +* html #TB_HideSelect { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_iframeContent{ + clear:both; + border:none; + margin-bottom:-1px; + margin-top:1px; + _margin-bottom:1px; +} diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/thickbox/thickbox.js b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/thickbox/thickbox.js new file mode 100755 index 0000000..e415594 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/examples/thickbox/thickbox.js @@ -0,0 +1,296 @@ +/* + * Thickbox 3 - One Box To Rule Them All. + * By Cody Lindley (http://www.codylindley.com) + * Copyright (c) 2007 cody lindley + * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php +*/ + +var tb_pathToImage = "images/loadingAnimation.gif"; + +/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/ + +//on page load call tb_init +$(document).ready(function(){ + tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox + imgLoader = new Image();// preload image + imgLoader.src = tb_pathToImage; +}); + +//add thickbox to href & area elements that have a class of .thickbox +function tb_init(domChunk){ + $(domChunk).click(function(){ + var t = this.title || this.name || null; + var a = this.href || this.alt; + var g = this.rel || false; + tb_show(t,a,g); + this.blur(); + return false; + }); +} + +function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link + + try { + if (typeof document.body.style.maxHeight === "undefined") {//if IE 6 + $("body","html").css({height: "100%", width: "100%"}); + $("html").css("overflow","hidden"); + if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6 + $("body").append("
        "); + $("#TB_overlay").click(tb_remove); + } + }else{//all others + if(document.getElementById("TB_overlay") === null){ + $("body").append("
        "); + $("#TB_overlay").click(tb_remove); + } + } + + if(caption===null){caption="";} + $("body").append("
        ");//add loader to the page + $('#TB_load').show();//show loader + + var baseURL; + if(url.indexOf("?")!==-1){ //ff there is a query string involved + baseURL = url.substr(0, url.indexOf("?")); + }else{ + baseURL = url; + } + + var urlString = /\.jpg|\.jpeg|\.png|\.gif|\.bmp/g; + var urlType = baseURL.toLowerCase().match(urlString); + + if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images + + TB_PrevCaption = ""; + TB_PrevURL = ""; + TB_PrevHTML = ""; + TB_NextCaption = ""; + TB_NextURL = ""; + TB_NextHTML = ""; + TB_imageCount = ""; + TB_FoundURL = false; + if(imageGroup){ + TB_TempArray = $("a[@rel="+imageGroup+"]").get(); + for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { + var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); + if (!(TB_TempArray[TB_Counter].href == url)) { + if (TB_FoundURL) { + TB_NextCaption = TB_TempArray[TB_Counter].title; + TB_NextURL = TB_TempArray[TB_Counter].href; + TB_NextHTML = "  Next >"; + } else { + TB_PrevCaption = TB_TempArray[TB_Counter].title; + TB_PrevURL = TB_TempArray[TB_Counter].href; + TB_PrevHTML = "  < Prev"; + } + } else { + TB_FoundURL = true; + TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); + } + } + } + + imgPreloader = new Image(); + imgPreloader.onload = function(){ + imgPreloader.onload = null; + + // Resizing large images - orginal by Christian Montoya edited by me. + var pagesize = tb_getPageSize(); + var x = pagesize[0] - 150; + var y = pagesize[1] - 150; + var imageWidth = imgPreloader.width; + var imageHeight = imgPreloader.height; + if (imageWidth > x) { + imageHeight = imageHeight * (x / imageWidth); + imageWidth = x; + if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; + } + } else if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; + if (imageWidth > x) { + imageHeight = imageHeight * (x / imageWidth); + imageWidth = x; + } + } + // End Resizing + + TB_WIDTH = imageWidth + 30; + TB_HEIGHT = imageHeight + 60; + $("#TB_window").append(""+caption+"" + "
        "+caption+"
        " + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
        close or Esc Key
        "); + + $("#TB_closeWindowButton").click(tb_remove); + + if (!(TB_PrevHTML === "")) { + function goPrev(){ + if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);} + $("#TB_window").remove(); + $("body").append("
        "); + tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); + return false; + } + $("#TB_prev").click(goPrev); + } + + if (!(TB_NextHTML === "")) { + function goNext(){ + $("#TB_window").remove(); + $("body").append("
        "); + tb_show(TB_NextCaption, TB_NextURL, imageGroup); + return false; + } + $("#TB_next").click(goNext); + + } + + document.onkeydown = function(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + if(keycode == 27){ // close + tb_remove(); + } else if(keycode == 190){ // display previous image + if(!(TB_NextHTML == "")){ + document.onkeydown = ""; + goNext(); + } + } else if(keycode == 188){ // display next image + if(!(TB_PrevHTML == "")){ + document.onkeydown = ""; + goPrev(); + } + } + }; + + tb_position(); + $("#TB_load").remove(); + $("#TB_ImageOff").click(tb_remove); + $("#TB_window").css({display:"block"}); //for safari using css instead of show + }; + + imgPreloader.src = url; + }else{//code to show html pages + + var queryString = url.replace(/^[^\?]+\??/,''); + var params = tb_parseQuery( queryString ); + + TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL + TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL + ajaxContentW = TB_WIDTH - 30; + ajaxContentH = TB_HEIGHT - 45; + + if(url.indexOf('TB_iframe') != -1){ + urlNoQuery = url.split('TB_'); + $("#TB_window").append("
        "+caption+"
        close or Esc Key
        "); + }else{ + if($("#TB_window").css("display") != "block"){ + if(params['modal'] != "true"){ + $("#TB_window").append("
        "+caption+"
        close or Esc Key
        "); + }else{ + $("#TB_overlay").unbind(); + $("#TB_window").append("
        "); + } + }else{ + $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; + $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; + $("#TB_ajaxContent")[0].scrollTop = 0; + $("#TB_ajaxWindowTitle").html(caption); + } + } + + $("#TB_closeWindowButton").click(tb_remove); + + if(url.indexOf('TB_inline') != -1){ + $("#TB_ajaxContent").html($('#' + params['inlineId']).html()); + tb_position(); + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + }else if(url.indexOf('TB_iframe') != -1){ + tb_position(); + if(frames['TB_iframeContent'] === undefined){//be nice to safari + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + $(document).keyup( function(e){ var key = e.keyCode; if(key == 27){tb_remove();}}); + } + }else{ + $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method + tb_position(); + $("#TB_load").remove(); + tb_init("#TB_ajaxContent a.thickbox"); + $("#TB_window").css({display:"block"}); + }); + } + + } + + if(!params['modal']){ + document.onkeyup = function(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + if(keycode == 27){ // close + tb_remove(); + } + }; + } + + } catch(e) { + //nothing here + } +} + +//helper functions below +function tb_showIframe(){ + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); +} + +function tb_remove() { + $("#TB_imageOff").unbind("click"); + $("#TB_overlay").unbind("click"); + $("#TB_closeWindowButton").unbind("click"); + $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').remove();}); + $("#TB_load").remove(); + if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 + $("body","html").css({height: "auto", width: "auto"}); + $("html").css("overflow",""); + } + document.onkeydown = ""; + return false; +} + +function tb_position() { +$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); + if ( !(jQuery.browser.msie && typeof XMLHttpRequest == 'function')) { // take away IE6 + $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); + } +} + +function tb_parseQuery ( query ) { + var Params = {}; + if ( ! query ) {return Params;}// return empty object + var Pairs = query.split(/[;&]/); + for ( var i = 0; i < Pairs.length; i++ ) { + var KeyVal = Pairs[i].split('='); + if ( ! KeyVal || KeyVal.length != 2 ) {continue;} + var key = unescape( KeyVal[0] ); + var val = unescape( KeyVal[1] ); + val = val.replace(/\+/g, ' '); + Params[key] = val; + } + return Params; +} + +function tb_getPageSize(){ + var de = document.documentElement; + var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; + var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; + arrayPageSize = [w,h]; + return arrayPageSize; +} diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/img/a12.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/a12.png new file mode 100755 index 0000000..9a78622 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/a12.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/img/a14.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/a14.png new file mode 100755 index 0000000..ca1a769 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/a14.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/img/a19.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/a19.png new file mode 100755 index 0000000..6405de7 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/a19.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/img/b05.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/b05.png new file mode 100755 index 0000000..b8481de Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/b05.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/img/b12.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/b12.png new file mode 100755 index 0000000..db761c7 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/b12.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/img/b21.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/b21.png new file mode 100755 index 0000000..5aa92bf Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/b21.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/img/pagination.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/pagination.png new file mode 100755 index 0000000..9593831 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/img/pagination.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/index.html b/frontend/web/js/widget-carousel/FILTER_SLIDER/index.html new file mode 100755 index 0000000..7a3fc68 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/index.html @@ -0,0 +1,516 @@ + + + +jCarousel - Riding carousels with jQuery + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        +

        Author: Jan Sorgalla
        + Version: 0.2.8 (Changelog)
        + Download: jcarousel.tar.gz or jcarousel.zip
        + Source Code: http://github.com/jsor/jcarousel
        + Bugtracker: http://github.com/jsor/jcarousel/issues
        + Licence: Dual licensed under the MIT + and GPL licenses.

        + + +

        Contents

        +
          +
        1. Introduction
        2. +
        3. Examples
        4. +
        5. Getting started
        6. +
        7. Dynamic content loading
        8. +
        9. Accessing the jCarousel instance
        10. +
        11. Defining the number of visible items
        12. +
        13. Configuration
        14. +
        15. Credits
        16. +
        + + +

        Introduction

        +

        jCarousel is a jQuery plugin for controlling + a list of items in horizontal or vertical order. The items, which can be static + HTML content or loaded with (or without) AJAX, can be scrolled back and forth + (with or without animation).

        + + +

        Examples

        +

        The following examples illustrate the possibilities of jCarousel:

        + + + + +

        Getting started

        +

        To use the jCarousel component, include the jQuery + library, the jCarousel source file and a jCarousel skin stylesheet file inside the <head> tag + of your HTML document:

        +
        +<script type="text/javascript" src="/path/to/jquery-1.4.2.min.js"></script>
        +<script type="text/javascript" src="/path/to/lib/jquery.jcarousel.min.js"></script>
        +<link rel="stylesheet" type="text/css" href="/path/to/skin/skin.css" />
        +
        +

        The download package contains some example skin packages. Feel free to build your own skins based on it.

        +

        jCarousel expects a very basic HTML markup structure inside your HTML document:

        +
        +<ul id="mycarousel" class="jcarousel-skin-name">
        +   <!-- The content goes in here -->
        +</ul>
        +
        +

        jCarousel automatically wraps the required HTML markup around the list. The + class attribute applies the jCarousel skin "name" to the + carousel.

        +

        To setup jCarousel, add the following code inside the <head> + tag of your HTML document:

        +
        +<script type="text/javascript">
        +jQuery(document).ready(function() {
        +    jQuery('#mycarousel').jcarousel({
        +        // Configuration goes here
        +    });
        +});
        +</script>
        +
        +

        jCarousel accepts a lot of configuration options, see chapter "Configuration" + for further informations.

        +

        After jCarousel has been initialised, the fully created markup in + the DOM is:

        +
        +<div class="jcarousel-skin-name">
        +  <div class="jcarousel-container">
        +    <div class="jcarousel-clip">
        +      <ul class="jcarousel-list">
        +        <li class="jcarousel-item-1">First item</li>
        +        <li class="jcarousel-item-2">Second item</li>
        +      </ul>
        +    </div>
        +    <div disabled="disabled" class="jcarousel-prev jcarousel-prev-disabled"></div>
        +    <div class="jcarousel-next"></div>
        +  </div>
        +</div>
        +
        + +

        As you can see, there are some elements added which have assigned classes + (in addition to the classes you may have already assigned manually). Feel + free to design your carousel with the classes you can see above.

        +

        Note:

        +
          +
        • The skin class "jcarousel-skin-name" has been moved + from the <ul> to the top <div> element.
        • +
        • The last 2 nested <div>'s under <div class="jcarousel-container"> + are the next/prev buttons of the carousel. The first one illustrates a disabled button, the second an enabled one. The disabled + button has the attribute + disabled (which actually makes no sense for <div> + elements, but you can also use <button> elements or + whatever you want) as well as the additional class jcarousel-prev-disabled + (or jcarousel-next-disabled).
        • +
        • All <li> elements of the list have the class jcarousel-item-n + assigned where n represents the position in the list.
        • +
        • Not shown here is, that all classes are followed by additional classes with a suffix + dependent on the orientation of the carousel, ie. <ul class="jcarousel-list + jcarousel-list-horizontal"> for a horizontal carousel.
        • +
        + + +

        Dynamic content loading

        +

        By passing the callback function itemLoadCallback as configuration + option, you are able to dynamically create <li> items for the content.

        +
        +<script type="text/javascript">
        +jQuery(document).ready(function() {
        +    jQuery('#mycarousel').jcarousel({
        +        itemLoadCallback: itemLoadCallbackFunction
        +    });
        +});
        +</script>
        +

        itemLoadCallbackFunction is a JavaScript function that is called + when the carousel requests a set of items to be loaded. Two parameters are + passed: The instance of the requesting carousel and a flag which indicates + the current state of the carousel ('init', 'prev' or 'next').

        +
        +<script type="text/javascript">
        +function itemLoadCallbackFunction(carousel, state)
        +{
        +    for (var i = carousel.first; i <= carousel.last; i++) {
        +        // Check if the item already exists
        +        if (!carousel.has(i)) {
        +            // Add the item
        +            carousel.add(i, "I'm item #" + i);
        +        }
        +    }
        +};
        +</script>
        +

        jCarousel contains a convenience method add() that can be + passed the index of the item to create and the innerHTML string of the + item to be + created. If the item already exists, it just updates the innerHTML. You can + access the index of the first and last visible element by the public variables carousel.first and carousel.last. +

        + + +

        Accessing the jCarousel instance

        +

        The instance of the carousel will be stored with the data() method of jQuery under the key jcarousel for a simple access.

        +

        If you have created a carousel like:

        +
        +jQuery(document).ready(function() {
        +    jQuery('#mycarousel').jcarousel();
        +});
        +

        You can access the instance with:

        +
        +var carousel = jQuery('#mycarousel').data('jcarousel');
        +

        You can also access methods of the instance directly, for example the add() method: +

        +var index = 1;
        +var html = 'My content of item no. 1';
        +jQuery('#mycarousel').jcarousel('add', index, html);
        + + +

        Defining the number of visible items

        + +

        Sometimes people are confused how to define the number of visible items because there is no option for this as they expect (Yes, there is an option visible, we discuss this later).

        +

        You simply define the number of visible items by defining the width (or height) with the class .jcarousel-clip (or the more distinct .jcarousel-clip-horizontal and .jcarousel-clip-vertical classes) in your skin stylesheet.

        +

        This offers a lot of flexibility, because you can define the width in pixel for a fixed carousel or in percent for a flexible carousel (This example shows a carousel with a clip width in percent, resize the browser to see it in effect).

        +

        So, why there is an option visible? If you set the option visible, jCarousel sets the width of the visible items to always make this number of items visible. Open this example and resize your browser window to see it in effect.

        + + +

        Configuration

        +

        jCarousel accepts a list of options to control the appearance and behaviour + of the carousel. Here is the list of options you may set:

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyTypeDefaultDescription
        verticalboolfalseSpecifies wether the carousel appears in horizontal or vertical orientation. + Changes the carousel from a left/right style to a up/down style carousel.
        rtlboolfalseSpecifies wether the carousel appears in RTL (Right-To-Left) mode.
        startinteger1The index of the item to start with.
        offsetinteger1The index of the first available item at initialisation.
        sizeintegerNumber of existing <li> elements if size is not passed explicitlyThe number of total items.
        scrollinteger3The number of items to scroll by.
        visibleintegernullIf passed, the width/height of the items will be calculated and set + depending on the width/height of the clipping, so that exactly that + number of items will be visible.
        animationmixed"fast"The speed of the scroll animation as string in jQuery terms ("slow" + or "fast") or milliseconds as integer + (See jQuery Documentation). + If set to 0, animation is turned off.
        easingstringnullThe name of the easing effect that you want to use (See jQuery + Documentation).
        autointeger0Specifies how many seconds to periodically autoscroll the content. + If set to 0 (default) then autoscrolling is turned off. +
        wrapstringnullSpecifies whether to wrap at the first/last item (or both) and jump + back to the start/end. Options are "first", "last", + "both" or "circular" as string. If set to null, + wrapping is turned off (default).
        initCallbackfunctionnullJavaScript function that is called right after initialisation of the + carousel. Two parameters are passed: The instance of the requesting + carousel and the state of the carousel initialisation (init, reset or + reload).
        setupCallbackfunctionnullJavaScript function that is called right after the carousel is completely setup. + One parameter is passed: The instance of the requesting carousel.
        itemLoadCallbackfunctionnullJavaScript function that is called when the carousel requests a set + of items to be loaded. Two parameters are passed: The instance of the + requesting carousel and the state of the carousel action (prev, next + or init). Alternatively, you can pass a hash of one or two functions + which are triggered before and/or after animation: +
        +itemLoadCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemFirstInCallback functionnullJavaScript function that is called (after the scroll animation) when + an item becomes the first one in the visible range of the carousel. + Four parameters are passed: The instance of the requesting carousel + and the <li> object itself, the index which indicates + the position of the item in the list and the state of the carousel action + (prev, next or init). Alternatively, you can pass a hash of one or two + functions which are triggered before and/or after animation: +
        +itemFirstInCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemFirstOutCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item isn't longer the first one in the visible range of the carousel. + Four parameters are passed: The instance of the requesting carousel + and the <li> object itself, the index which indicates + the position of the item in the list and the state of the carousel action + (prev, next or init). Alternatively, you can pass a hash of one or two + functions which are triggered before and/or after animation: +
        +itemFirstOutCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemLastInCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item becomes the last one in the visible range of the carousel. Four + parameters are passed: The instance of the requesting carousel and the + <li> object itself, the index which indicates the + position of the item in the list and the state of the carousel action + (prev, next or init). Alternatively, you can pass a hash of one or two + functions which are triggered before and/or after animation: +
        +itemLastInCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemLastOutCallbackfunctionnullJavaScript function that is called when an item isn't longer the last + one in the visible range of the carousel. Four parameters are passed: + The instance of the requesting carousel and the <li> + object itself, the index which indicates the position of the item in + the list and the state of the carousel action (prev, next or init). + Alternatively, you can pass a hash of one or two functions which are + triggered before and/or after animation: +
        +itemLastOutCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemVisibleInCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item is in the visible range of the carousel. Four parameters are + passed: The instance of the requesting carousel and the <li> + object itself, the index which indicates the position of the item in + the list and the state of the carousel action (prev, next or init). + Alternatively, you can pass a hash of one or two functions which are + triggered before and/or after animation: +
        +itemVisibleInCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemVisibleOutCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item isn't longer in the visible range of the carousel. Four parameters + are passed: The instance of the requesting carousel and the <li> + object itself, the index which indicates the position of the item in + the list and the state of the carousel action (prev, next or init). + Alternatively, you can pass a hash of one or two functions which are + triggered before and/or after animation: +
        +itemVisibleOutCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        animationStepCallbackfunctionnullJavaScript function that is called after each animation step. This + function is directly passed to jQuery's .animate() method + as the step parameter. See the jQuery documentation for the + parameters it will receive.
        buttonNextCallbackfunctionnullJavaScript function that is called when the state of the 'next' control + is changing. The responsibility of this method is to enable or disable + the 'next' control. Three parameters are passed: The instance of the + requesting carousel, the control element and a flag indicating whether + the button should be enabled or disabled.
        buttonPrevCallbackfunctionnullJavaScript function that is called when the state of the 'previous' + control is changing. The responsibility of this method is to enable + or disable the 'previous' control. Three parameters are passed: The + instance of the requesting carousel, the control element and a flag + indicating whether the button should be enabled or disabled.
        buttonNextHTMLstring<div></div>The HTML markup for the auto-generated next button. If set to null, + no next-button is created.
        buttonPrevHTMLstring<div></div>The HTML markup for the auto-generated prev button. If set to null, + no prev-button is created.
        buttonNextEventstring"click"Specifies the event which triggers the next scroll.
        buttonPrevEventstring"click"Specifies the event which triggers the prev scroll.
        itemFallbackDimensionintegernullIf, for some reason, jCarousel can not detect the width of an item, you can set a fallback dimension (width or height, depending on the orientation) here to ensure correct calculations.
        + + +

        Credits

        +

        Thanks to John Resig for his fantastic jQuery + library.
        + jCarousel is inspired by the Carousel + Component written by Bill Scott.

        +
        + + diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/arrows_left.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/arrows_left.png new file mode 100755 index 0000000..4252afe Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/arrows_left.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/arrows_right.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/arrows_right.png new file mode 100755 index 0000000..e9468f6 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/arrows_right.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/credits.txt b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/credits.txt new file mode 100755 index 0000000..e5ec8c2 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/credits.txt @@ -0,0 +1 @@ +Button images copyright by Tango Icon Library Team (http://tango.freedesktop.org/Tango_Icon_Library) \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next-horizontal.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next-horizontal.png new file mode 100755 index 0000000..6fcd3d9 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next-horizontal.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next-vertical.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next-vertical.png new file mode 100755 index 0000000..066a3e0 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next-vertical.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next.jpg b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next.jpg new file mode 100755 index 0000000..5ad08bf Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next.jpg differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next.png new file mode 100755 index 0000000..b2fb161 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/next.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev-horizontal.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev-horizontal.png new file mode 100755 index 0000000..36472c0 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev-horizontal.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev-vertical.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev-vertical.png new file mode 100755 index 0000000..bb30f85 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev-vertical.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev.jpg b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev.jpg new file mode 100755 index 0000000..59a2cdb Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev.jpg differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev.png new file mode 100755 index 0000000..426628d Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/prev.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/skin.css b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/skin.css new file mode 100755 index 0000000..90fbd32 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/skin.css @@ -0,0 +1,183 @@ +.jcarousel-skin-tango .jcarousel-container { + +} + +.jcarousel-skin-tango .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango .jcarousel-container-horizontal { + width: 240px;text-align:left;border1:1px solid red; + padding: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-container-vertical { + width: 42px; + height: 200px; + padding: 20px 0px; +} + +.jcarousel-skin-tango .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango .jcarousel-clip-horizontal { + width: 200px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-clip-vertical { + width: 42px; + height: 200px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango .jcarousel-item { + width: 42px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_next.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_prev.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/skin2.css b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/skin2.css new file mode 100755 index 0000000..176a868 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/skin2.css @@ -0,0 +1,185 @@ +.jcarousel-skin-tango2 .jcarousel-container { + +} + +.jcarousel-skin-tango2 img{width:50px;float:left;margin-right:20px;} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango2 .jcarousel-container-horizontal { + width: 240px;text-align:left; + padding: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-container-vertical { + width: 242px; + height: 320px; + padding: 40px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango2 .jcarousel-clip-horizontal { + width: 200px; + height1: 320px; +} + +.jcarousel-skin-tango2 .jcarousel-clip-vertical { + width: 242px; + height: 320px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango2 .jcarousel-item { + width: 242px; + height1: 300px; +} + +.jcarousel-skin-tango2 .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango2 .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango2 .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 115px; + width: 20px; + height: 12px; + cursor: pointer; + background: transparent url(v_next2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 115px; + width: 29px; + height: 12px; + cursor: pointer; + background: transparent url(v_prev2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_next.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_next.png new file mode 100755 index 0000000..e5056d1 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_next.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_next2.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_next2.png new file mode 100755 index 0000000..600203b Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_next2.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_prev.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_prev.png new file mode 100755 index 0000000..36c087e Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_prev.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_prev2.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_prev2.png new file mode 100755 index 0000000..791e630 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/HOME_SLIDER/v_prev2.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/credits.txt b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/credits.txt new file mode 100755 index 0000000..87ccdbc --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/credits.txt @@ -0,0 +1 @@ +Button images copyright by Microsoft Corporation (http://microsoft.com) \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading-small.gif b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading-small.gif new file mode 100755 index 0000000..b25ada9 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading-small.gif differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading.gif b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading.gif new file mode 100755 index 0000000..5c7f808 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading.gif differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading_small.gif b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading_small.gif new file mode 100755 index 0000000..5979f6d Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/loading_small.gif differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/next-horizontal.gif b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/next-horizontal.gif new file mode 100755 index 0000000..36c1f78 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/next-horizontal.gif differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/prev-horizontal.gif b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/prev-horizontal.gif new file mode 100755 index 0000000..3b93296 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/prev-horizontal.gif differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/skin.css b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/skin.css new file mode 100755 index 0000000..0a35832 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/ie7/skin.css @@ -0,0 +1,190 @@ +.jcarousel-skin-ie7 .jcarousel-container { + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + background: #D4D0C8; + border: 1px solid #808080; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-ie7 .jcarousel-container-horizontal { + width: 245px; + padding: 20px 40px; +} + +.jcarousel-skin-ie7 .jcarousel-container-vertical { + width: 75px; + height: 245px; + padding: 40px 20px; +} + +.jcarousel-skin-ie7 .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-ie7 .jcarousel-clip-horizontal { + width: 245px; + height: 77px; +} + +.jcarousel-skin-ie7 .jcarousel-clip-vertical { + width: 77px; + height: 245px; +} + +.jcarousel-skin-ie7 .jcarousel-item { + width: 75px; + height: 75px; + border: 1px solid #fff; +} + +.jcarousel-skin-ie7 .jcarousel-item:hover, +.jcarousel-skin-ie7 .jcarousel-item:focus { + border-color: #808080; +} + +.jcarousel-skin-ie7 .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 7px; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 7px; + margin-right: 0; +} + +.jcarousel-skin-ie7 .jcarousel-item-vertical { + margin-bottom: 7px; +} + +.jcarousel-skin-ie7 .jcarousel-item-placeholder { +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-ie7 .jcarousel-next-horizontal { + position: absolute; + top: 43px; + right: 5px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(next-horizontal.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev-horizontal.gif); +} + +.jcarousel-skin-ie7 .jcarousel-next-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-next-horizontal:focus { + background-position: -32px 0; +} + +.jcarousel-skin-ie7 .jcarousel-next-horizontal:active { + background-position: -64px 0; +} + +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal, +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: -96px 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-horizontal { + position: absolute; + top: 43px; + left: 5px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(prev-horizontal.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next-horizontal.gif); +} + +.jcarousel-skin-ie7 .jcarousel-prev-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-prev-horizontal:focus { + background-position: -32px 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-horizontal:active { + background-position: -64px 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: -96px 0; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-ie7 .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 43px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(next-vertical.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-next-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-next-vertical:focus { + background-position: 0 -32px; +} + +.jcarousel-skin-ie7 .jcarousel-next-vertical:active { + background-position: 0 -64px; +} + +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical, +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 -96px; +} + +.jcarousel-skin-ie7 .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 43px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(prev-vertical.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-prev-vertical:focus { + background-position: 0 -32px; +} + +.jcarousel-skin-ie7 .jcarousel-prev-vertical:active { + background-position: 0 -64px; +} + +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 -96px; +} diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/arrows_left.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/arrows_left.png new file mode 100755 index 0000000..4252afe Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/arrows_left.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/arrows_right.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/arrows_right.png new file mode 100755 index 0000000..e9468f6 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/arrows_right.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/credits.txt b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/credits.txt new file mode 100755 index 0000000..e5ec8c2 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/credits.txt @@ -0,0 +1 @@ +Button images copyright by Tango Icon Library Team (http://tango.freedesktop.org/Tango_Icon_Library) \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next-horizontal.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next-horizontal.png new file mode 100755 index 0000000..6fcd3d9 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next-horizontal.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next-vertical.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next-vertical.png new file mode 100755 index 0000000..066a3e0 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next-vertical.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next.jpg b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next.jpg new file mode 100755 index 0000000..5ad08bf Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next.jpg differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next.png new file mode 100755 index 0000000..b2fb161 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/next.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev-horizontal.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev-horizontal.png new file mode 100755 index 0000000..36472c0 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev-horizontal.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev-vertical.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev-vertical.png new file mode 100755 index 0000000..bb30f85 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev-vertical.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev.jpg b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev.jpg new file mode 100755 index 0000000..59a2cdb Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev.jpg differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev.png new file mode 100755 index 0000000..426628d Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/prev.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/skin.css b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/skin.css new file mode 100755 index 0000000..90fbd32 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/skin.css @@ -0,0 +1,183 @@ +.jcarousel-skin-tango .jcarousel-container { + +} + +.jcarousel-skin-tango .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango .jcarousel-container-horizontal { + width: 240px;text-align:left;border1:1px solid red; + padding: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-container-vertical { + width: 42px; + height: 200px; + padding: 20px 0px; +} + +.jcarousel-skin-tango .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango .jcarousel-clip-horizontal { + width: 200px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-clip-vertical { + width: 42px; + height: 200px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango .jcarousel-item { + width: 42px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_next.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_prev.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/skin2.css b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/skin2.css new file mode 100755 index 0000000..176a868 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/skin2.css @@ -0,0 +1,185 @@ +.jcarousel-skin-tango2 .jcarousel-container { + +} + +.jcarousel-skin-tango2 img{width:50px;float:left;margin-right:20px;} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango2 .jcarousel-container-horizontal { + width: 240px;text-align:left; + padding: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-container-vertical { + width: 242px; + height: 320px; + padding: 40px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango2 .jcarousel-clip-horizontal { + width: 200px; + height1: 320px; +} + +.jcarousel-skin-tango2 .jcarousel-clip-vertical { + width: 242px; + height: 320px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango2 .jcarousel-item { + width: 242px; + height1: 300px; +} + +.jcarousel-skin-tango2 .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango2 .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango2 .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 115px; + width: 20px; + height: 12px; + cursor: pointer; + background: transparent url(v_next2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 115px; + width: 29px; + height: 12px; + cursor: pointer; + background: transparent url(v_prev2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_next.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_next.png new file mode 100755 index 0000000..e5056d1 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_next.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_next2.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_next2.png new file mode 100755 index 0000000..600203b Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_next2.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_prev.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_prev.png new file mode 100755 index 0000000..36c087e Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_prev.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_prev2.png b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_prev2.png new file mode 100755 index 0000000..791e630 Binary files /dev/null and b/frontend/web/js/widget-carousel/FILTER_SLIDER/skins/tango/v_prev2.png differ diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/style.css b/frontend/web/js/widget-carousel/FILTER_SLIDER/style.css new file mode 100755 index 0000000..e1ed9f1 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/style.css @@ -0,0 +1,170 @@ + +/* + ==== loading ==== +*/ + +.loading { + position: absolute; + top: 0px; + left: 0px; +} + +.loading .load-1 { + filter: alpha(opacity=70); + opacity: 0.7; + position: absolute; + display: block; + background-color: #000; + top: 0px; + left: 0px; + width: 100%; + height: 100%; +} + +.loading .load-2 { + position: absolute; + display: block; + background: url(./img/10.png) no-repeat center center; + top: 0px; + left: 0px; + width: 100%; + height: 100%; +} + +/* + ==== Module ==== +*/ + +#FILTER_SLIDER { + position: relative; + top: 0px; + left: 0px; + width: 720px; + height: 340px; + overflow: hidden; + + display: inline-block; + vertical-align: top; +} + +#FILTER_SLIDER .item-list { + cursor: move; + position: absolute; + left: 0px; + top: 0px; + width: 720px; + height: 340px; + overflow: hidden; +} + +#FILTER_SLIDER .item a { + text-decoration: none; +} + +#FILTER_SLIDER .item .title { + + color: #fff; + display: block; + font-size: 24px; + margin-top: 223px; + padding: 20px; + position: relative; + text-align: center; + text-transform: uppercase; + transition: all 0.2s ease 0s; + white-space: nowrap; + + -webkit-transition: all .2s ease; + -moz-transition: all .2s ease; + -ms-transition: all .2s ease; + -o-transition: all .2s ease; + transition: all .2s ease; +} + +#FILTER_SLIDER .item:hover .title { +} + +#FILTER_SLIDER .item img { + border-radius: 0; +} + +#FILTER_SLIDER .jssorb03 { + display: table; + margin: 0 auto; + position: relative; + top: 304px; +} + +#FILTER_SLIDER .jssorb03 div, +#FILTER_SLIDER .jssorb03 div:hover, +#FILTER_SLIDER .jssorb03 .av { + position: absolute; + /* size of bullet elment */ + width: 21px; + height: 21px; + text-align: center; + line-height: 21px; + color: white; + font-size: 12px; + background: url(./img/b05.png) no-repeat; + overflow: hidden; + cursor: pointer; +} + +#FILTER_SLIDER .jssorb03 div { + background-position: -5px -4px; +} + +#FILTER_SLIDER .jssorb03 div:hover, +#FILTER_SLIDER .jssorb03 .av:hover { + background-position: -35px -4px; +} + +#FILTER_SLIDER .jssorb03 .av { + background-position: -65px -4px; +} + +#FILTER_SLIDER .jssorb03 .dn, +#FILTER_SLIDER .jssorb03 .dn:hover { + background-position: -95px -4px; +} + +#FILTER_SLIDER .jssora03l, +#FILTER_SLIDER .jssora03r { + display: block; + position: absolute; + /* size of arrow element */ + width: 55px; + height: 55px; + cursor: pointer; + background: url(./img/a14.png) no-repeat; + overflow: hidden; +} + +#FILTER_SLIDER .jssora03l { + background-position: -3px -33px; + top: 142px; + left: -13px; +} + +#FILTER_SLIDER .jssora03r { + background-position: -63px -33px; + top: 142px; + right: -13px; +} + +#FILTER_SLIDER .jssora03l:hover { + background-position: -123px -33px; +} + +#FILTER_SLIDER .jssora03r:hover { + background-position: -183px -33px; +} + +#FILTER_SLIDER .jssora03l.jssora03ldn { + background-position: -243px -33px; +} + +#FILTER_SLIDER .jssora03r.jssora03rdn { + background-position: -303px -33px; +} \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/FILTER_SLIDER/style.js b/frontend/web/js/widget-carousel/FILTER_SLIDER/style.js new file mode 100755 index 0000000..d0a7778 --- /dev/null +++ b/frontend/web/js/widget-carousel/FILTER_SLIDER/style.js @@ -0,0 +1,61 @@ + +$(document).on('ready', function () +{ + var FILTER_SLIDER_option_2 = + { + $AutoPlay: true, + $AutoPlaySteps: 1, +// $AutoPlayInterval: 4000, есть в FILTER_SLIDER_option_1 + $PauseOnHover: 1, + + $ArrowKeyNavigation: true, +// $SlideDuration: 500, есть в FILTER_SLIDER_option_1 + $MinDragOffsetToSlide: 20, + + $SlideSpacing: 0, + $DisplayPieces: 1, + $ParkingPosition: 0, + $UISearchMode: 1, + $PlayOrientation: 1, + $DragOrientation: 1, + + $BulletNavigatorOptions: { + $Class: $JssorBulletNavigator$, + $ChanceToShow: 2, + $AutoCenter: 0, + $Steps: 1, + $Lanes: 1, + $SpacingX: 10, + $SpacingY: 10, + $Orientation: 1 + }, + + $ArrowNavigatorOptions: { + $Class: $JssorArrowNavigator$, + $ChanceToShow: 2, + $AutoCenter: 0 + } + }; + + var FILTER_SLIDER = new $JssorSlider$("FILTER_SLIDER", $.extend({}, FILTER_SLIDER_option_1, FILTER_SLIDER_option_2)); + + function ScaleFILTER_SLIDER () + { + $item = $("#FILTER_SLIDER .item").width(); + + if ($(window).width()) + { + $body = $(window).width() - 70; + FILTER_SLIDER.$ScaleWidth(Math.min($body, $item)); + } + else + { + window.setTimeout(ScaleFILTER_SLIDER, 30); + } + } + + ScaleFILTER_SLIDER(); + + $(window).bind("resize", ScaleFILTER_SLIDER); + $(window).bind("orientationchange", ScaleFILTER_SLIDER); +}); \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/README b/frontend/web/js/widget-carousel/HOME_SLIDER/README new file mode 100755 index 0000000..018dac2 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/README @@ -0,0 +1,7 @@ +jCarousel - Riding carousels with jQuery + +jCarousel is a jQuery plugin for controlling a list of items in horizontal or vertical order. +The items, which can be static HTML content or loaded with (or without) AJAX, can be scrolled +back and forth (with or without animation). + +See index.html for documentation and examples. diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/changelog.html b/frontend/web/js/widget-carousel/HOME_SLIDER/changelog.html new file mode 100755 index 0000000..d7fa678 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/changelog.html @@ -0,0 +1,138 @@ + + + +jCarousel: Changelog + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        +

        Changelog

        +

        Version 0.2.8 - 2011-04-14

        +
          +
        • Fixed selecting only direct childs of the current list (#61).
        • +
        • Added static method to set windowLoaded to true manually (#60).
        • +
        • Added setupCallback.
        • +
        • Optimized resize callback.
        • +
        • Added animationStepCallback option (Thanks scy).
        • +
        • Wider support of border-radius, and support of :focus in addition to :hover (Thanks lespacedunmatin).
        • +
        +

        Version 0.2.7 - 2010-10-06

        +
          +
        • Fixed bug with autoscrolling introduced while fixing #49.
        • +
        +

        Version 0.2.6 - 2010-10-05

        +
          +
        • Fixed item only partially visible when defined as start item (#22).
        • +
        • Fixed multiple binds on prev/next buttons (#26).
        • +
        • Added firing of button callbacks also if no buttons are specified (#39).
        • +
        • Fixed stopAuto() not stopping while in animation (#49).
        • +
        +

        Version 0.2.5 - 2010-08-13

        +
          +
        • Added RTL (Right-To-Left) support.
        • +
        • Added automatic deletion of cloned elements for circular carousels.
        • +
        • Added new option itemFallbackDimension (#7).
        • +
        • Added new section "Defining the number of visible items" to documentation.
        • +
        +

        Version 0.2.4 - 2010-04-19

        +
          +
        • Updated jQuery to version 1.4.2.
        • +
        • jCarousel instance can now be retrieved by $(selector).data('jcarousel').
        • +
        • Support for static circular carousels out of the box.
        • +
        • Removed not longer needed core stylsheet jquery.jcarousel.css. Styles are now set by javascript or skin stylesheets.
        • +
        +

        Version 0.2.3 - 2008-04-07

        +
          +
        • Updated jQuery to version 1.2.3.
        • +
        • Fixed (hopefully) issues with Safari.
        • +
        • Added new example "Multiple carousels on one page".
        • +
        +

        Version 0.2.2 - 2007-11-07

        +
          +
        • Fixed bug with nested li elements reported by John + Fiala.
        • +
        • Fixed bug on initialization with too few elements reported by Glenn + Nilsson.
        • +
        +

        Version 0.2.1 - 2007-10-12

        +
          +
        • Readded the option start for a custom start position. The + old option start is renamed to offset.
        • +
        • New example for dynamic content loading via Ajax from a PHP script.
        • +
        • Fixed a bug with variable item widths/heights.
        • +
        + +

        Version 0.2.0-beta - 2007-05-07

        +
          +
        • Complete rewrite of the plugin. See this post for further informations.
        • +
        +

        Version 0.1.6 - 2007-01-22

        +
          +
        • New public methods size() and init().
        • +
        • Added new example "Carousel with external controls".
        • +
        +

        Version 0.1.5 - 2007-01-08

        +
          +
        • Code modifications to work with the jQuery 1.1.
        • +
        • Renamed the js file to jquery.jcarousel.pack.js as noted in the jquery docs.
        • +
        +

        Version 0.1.4 - 2006-12-12

        +
          +
        • New configuration option autoScrollResumeOnMouseout.
        • +
        +

        Version 0.1.3 - 2006-12-02

        +
          +
        • New configuration option itemStart. Sets the index of the + item to start with.
        • +
        +

        Version 0.1.2 - 2006-11-28

        +
          +
        • New configuration option wrapPrev. Behaves like wrap + but scrolls to the end when clicking the prev-button at the start of the + carousel. (Note: This may produce unexpected results with dynamic loaded + content. You must ensure to load the complete carousel on initialisation).
        • +
        • Moved call of the button handlers at the end of the buttons() method. + This lets the callbacks change the behaviours assigned by jCarousel.
        • +
        +

        Version 0.1.1 - 2006-10-25

        +
          +
        • The item handler callback options accept now a hash of two functions which + are triggered before and after animation.
        • +
        • The item handler callback functions accept now a fourth parameter state which + holds one of three states: next, prev or init.
        • +
        • New configuration option autoScrollStopOnMouseover
        • +
        +

        Version 0.1.0 - 2006-09-21

        +
          +
        • Stable release.
        • +
        • Internal source code rewriting to fit more into the jQuery + plugin guidelines.
        • +
        • Added inline documentation.
        • +
        • Changed licence to a dual licence model (MIT and GPL).
        • +
        +

        Version 0.1.0-RC1 - 2006-09-13

        +
          +
        • Virtual item attribute jCarouselItemIdx is replaced by a class jcarousel-item-n.
        • +
        • The item callback functions accept a third parameter idx which + holds the position of the item in the list (formerly the attribute jCarouselItemIdx).
        • +
        • Fixed bug with margin-right in Safari.
        • +
        +

        Version 0.1.0-gamma - 2006-09-07

        +
          +
        • Added auto-wrapping of the required html markup around lists (ul + and ol) if jQuery().jcarousel() is assigned directly to them.
        • +
        • Added support for new callback functions itemFirstInHandler, itemFirstOutHandler, itemLastInHandler, itemLastOutHandler, itemVisibleInHandler, itemVisibleOutHandler.
        • +
        • General sourcecode rewriting.
        • +
        • Fixed bug not setting <li> index attributes correctly.
        • +
        • Changed default itemWidth and itemHeight to 75.
        • +
        +

        Version 0.1.0-beta - 2006-09-02

        +
          +
        • Initial release.
        • +
        +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax.html new file mode 100755 index 0000000..7082721 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax.html @@ -0,0 +1,83 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with dynamic content loading via Ajax

        +

        + The data is loaded dynamically from a simple text file which contains the image urls. +

        + +
        +
          + +
        +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax.txt b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax.txt new file mode 100755 index 0000000..4ff426e --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax.txt @@ -0,0 +1,10 @@ +http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg| +http://static.flickr.com/75/199481072_b4a0d09597_s.jpg| +http://static.flickr.com/57/199481087_33ae73a8de_s.jpg| +http://static.flickr.com/77/199481108_4359e6b971_s.jpg| +http://static.flickr.com/58/199481143_3c148d9dd3_s.jpg| +http://static.flickr.com/72/199481203_ad4cdcf109_s.jpg| +http://static.flickr.com/58/199481218_264ce20da0_s.jpg| +http://static.flickr.com/69/199481255_fdfe885f87_s.jpg| +http://static.flickr.com/60/199480111_87d4cb3e38_s.jpg| +http://static.flickr.com/70/229228324_08223b70fa_s.jpg \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax_php.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax_php.html new file mode 100755 index 0000000..26cf676 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax_php.html @@ -0,0 +1,95 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with dynamic content loading via Ajax

        +

        + The data is loaded dynamically from a simple text file which contains the image urls. +

        + +
        +
          + +
        +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax_php.php b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax_php.php new file mode 100755 index 0000000..00b4313 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_ajax_php.php @@ -0,0 +1,43 @@ +'; + +// Return total number of images so the callback +// can set the size of the carousel. +echo ' ' . $total . ''; + +foreach ($selected as $img) { + echo ' ' . $img . ''; +} + +echo ''; + +?> \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_api.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_api.html new file mode 100755 index 0000000..658d255 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_api.html @@ -0,0 +1,149 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with dynamic content loading via Ajax from the Flickr API

        +

        + The data is loaded dynamically from the Flickr API + method flickr.photos.getRecent. + All items not in the visible range are removed from the list to keep the list small. +

        +

        + Note: There are constantly added new photos at flickr, so you possibly get different photos at certain positions. +

        + +
        +
          + +
        +
        + +

        + If you're using this example on your own server, don't forget to set your API key in dynamic_flickr_api.php! +

        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_api.php b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_api.php new file mode 100755 index 0000000..2c1e02c --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_api.php @@ -0,0 +1,29 @@ + \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_feed.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_feed.html new file mode 100755 index 0000000..db10596 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_feed.html @@ -0,0 +1,190 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with dynamic content loading via Ajax from the Flickr photo stream

        +

        + The data is loaded dynamically from the Flickr + public photos feed (format: JSON) + and can be filtered by tags. +

        + +
        +
          + +
        +
        + + + + +
        +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_feed.php b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_feed.php new file mode 100755 index 0000000..7e68919 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_flickr_feed.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_javascript.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_javascript.html new file mode 100755 index 0000000..7043dd2 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/dynamic_javascript.html @@ -0,0 +1,86 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with dynamic content loading via JavaScript

        +

        + The data is loaded dynamically from an javascript array. +

        + +
          + +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/arrow-down.gif b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/arrow-down.gif new file mode 100755 index 0000000..c8012ba Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/arrow-down.gif differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/arrow-up.gif b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/arrow-up.gif new file mode 100755 index 0000000..08bc203 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/arrow-up.gif differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading-small.gif b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading-small.gif new file mode 100755 index 0000000..b25ada9 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading-small.gif differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading-thickbox.gif b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading-thickbox.gif new file mode 100755 index 0000000..82290f4 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading-thickbox.gif differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading.gif b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading.gif new file mode 100755 index 0000000..5c7f808 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/images/loading.gif differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_easing.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_easing.html new file mode 100755 index 0000000..d48f4a8 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_easing.html @@ -0,0 +1,73 @@ + + + +jCarousel Examples + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with custom animation effect

        +

        + This example shows how to use custom animation effects (uses Robert + Penners easing equations). +

        + + +
        +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        +
        +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_flexible.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_flexible.html new file mode 100755 index 0000000..d92a040 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_flexible.html @@ -0,0 +1,72 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Flexible carousel

        +

        + This example shows a carousel with flexible item width. In this case, always + 4 items are visible (resize the browser window to see what happens). +

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_textscroller.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_textscroller.html new file mode 100755 index 0000000..c2bcaa0 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_textscroller.html @@ -0,0 +1,192 @@ + + + +jCarousel Examples + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        +

        Using jCarousel as Textscroller

        +

        + This example shows how to use jCarousel as a Textscroller. The data is loaded from the jQuery Blog RSS-Feed. +

        + +
        +
          + +
        +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_textscroller.php b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_textscroller.php new file mode 100755 index 0000000..a8ead24 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_textscroller.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_thickbox.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_thickbox.html new file mode 100755 index 0000000..7a15a86 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/special_thickbox.html @@ -0,0 +1,102 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        jCarousel and Thickbox 3

        +

        + Example of jCarousel working together with Thickbox 3. +

        + +
          + +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_auto.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_auto.html new file mode 100755 index 0000000..8200685 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_auto.html @@ -0,0 +1,79 @@ + + + +jCarousel Examples + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with autoscrolling

        +

        + Autoscrolling is enabled and the interval is set to 2 seconds. + Autoscrolling pauses when the user moves the cursor over the images and stops + when the user clicks the next or prev button. wrap is set to + "last". +

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_callbacks.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_callbacks.html new file mode 100755 index 0000000..9e57d45 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_callbacks.html @@ -0,0 +1,235 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel illustrating the callback functions

        +

        + This carousel has registered all available callback functions and displays + information about the state of the items and buttons. Additionally the width + of the carousel is set to auto. Resize the browser window and see what happens. +

        + + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +

        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_circular.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_circular.html new file mode 100755 index 0000000..bfdb2aa --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_circular.html @@ -0,0 +1,56 @@ + + + +jCarousel Examples + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Circular carousel

        +

        + This example shows a simple circular carousel. +

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_controls.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_controls.html new file mode 100755 index 0000000..d8fdeab --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_controls.html @@ -0,0 +1,166 @@ + + + +jCarousel Examples + + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with external controls

        +

        + This carousel shows how to control it from outside. +

        + +
        +
        + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 +
        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        +
        + « Prev + + Next » +
        +
        + +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_multiple.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_multiple.html new file mode 100755 index 0000000..1af9089 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_multiple.html @@ -0,0 +1,95 @@ + + + +jCarousel Examples + + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Multiple carousels on one page

        +

        + This example shows how to use multiple carousels on one page with different + skins and configurations. +

        + + + +
        + + + +
        + + + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_simple.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_simple.html new file mode 100755 index 0000000..018d649 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_simple.html @@ -0,0 +1,54 @@ + + + +jCarousel Examples + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Simple carousel

        +

        + This is the most simple usage of the carousel with no configuration options. +

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_start.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_start.html new file mode 100755 index 0000000..9b3dc40 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_start.html @@ -0,0 +1,53 @@ + + + +jCarousel Examples + + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Carousel with custom start position

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_vertical.html b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_vertical.html new file mode 100755 index 0000000..4453e5b --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/static_vertical.html @@ -0,0 +1,57 @@ + + + +jCarousel Examples + + + + + + + + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        + +

        Vertical carousel

        +

        + A carousel in vertical orientation with custom prev/next controls, animation + set to "slow" and scroll set to 2. +

        + +
          +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        • +
        + +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/thickbox/thickbox.css b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/thickbox/thickbox.css new file mode 100755 index 0000000..399c68a --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/thickbox/thickbox.css @@ -0,0 +1,159 @@ +/* ----------------------------------------------------------------------------------------------------------------*/ +/* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/ +/* ----------------------------------------------------------------------------------------------------------------*/ +*{padding: 0; margin: 0;} + +/* ----------------------------------------------------------------------------------------------------------------*/ +/* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/ +/* ----------------------------------------------------------------------------------------------------------------*/ +#TB_window { + font: 12px Arial, Helvetica, sans-serif; + color: #333333; +} + +#TB_secondLine { + font: 10px Arial, Helvetica, sans-serif; + color:#666666; +} + +#TB_window a:link {color: #666666;} +#TB_window a:visited {color: #666666;} +#TB_window a:hover {color: #000;} +#TB_window a:active {color: #666666;} +#TB_window a:focus{color: #666666;} + +/* ----------------------------------------------------------------------------------------------------------------*/ +/* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/ +/* ----------------------------------------------------------------------------------------------------------------*/ +#TB_overlay { + position: fixed; + z-index:100; + top: 0px; + left: 0px; + background-color:#000; + filter:alpha(opacity=75); + -moz-opacity: 0.75; + opacity: 0.75; + height:100%; + width:100%; +} + +* html #TB_overlay { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_window { + position: fixed; + background: #ffffff; + z-index: 102; + color:#000000; + display:none; + border: 4px solid #525252; + text-align:left; + top:50%; + left:50%; +} + +* html #TB_window { /* ie6 hack */ +position: absolute; +margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_window img#TB_Image { + display:block; + margin: 15px 0 0 15px; + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; + border-top: 1px solid #666; + border-left: 1px solid #666; +} + +#TB_caption{ + height:25px; + padding:7px 30px 10px 25px; + float:left; +} + +#TB_closeWindow{ + height:25px; + padding:11px 25px 10px 0; + float:right; +} + +#TB_closeAjaxWindow{ + padding:7px 10px 5px 0; + margin-bottom:1px; + text-align:right; + float:right; +} + +#TB_ajaxWindowTitle{ + float:left; + padding:7px 0 5px 10px; + margin-bottom:1px; +} + +#TB_title{ + background-color:#e8e8e8; + height:27px; +} + +#TB_ajaxContent{ + clear:both; + padding:2px 15px 15px 15px; + overflow:auto; + text-align:left; + line-height:1.4em; +} + +#TB_ajaxContent.TB_modal{ + padding:15px; +} + +#TB_ajaxContent p{ + padding:5px 0px 5px 0px; +} + +#TB_load{ + position: fixed; + display:none; + height:13px; + width:208px; + z-index:103; + top: 50%; + left: 50%; + margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ +} + +* html #TB_load { /* ie6 hack */ +position: absolute; +margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_HideSelect{ + z-index:99; + position:fixed; + top: 0; + left: 0; + background-color:#fff; + border:none; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; + height:100%; + width:100%; +} + +* html #TB_HideSelect { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_iframeContent{ + clear:both; + border:none; + margin-bottom:-1px; + margin-top:1px; + _margin-bottom:1px; +} diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/examples/thickbox/thickbox.js b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/thickbox/thickbox.js new file mode 100755 index 0000000..e415594 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/examples/thickbox/thickbox.js @@ -0,0 +1,296 @@ +/* + * Thickbox 3 - One Box To Rule Them All. + * By Cody Lindley (http://www.codylindley.com) + * Copyright (c) 2007 cody lindley + * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php +*/ + +var tb_pathToImage = "images/loadingAnimation.gif"; + +/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/ + +//on page load call tb_init +$(document).ready(function(){ + tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox + imgLoader = new Image();// preload image + imgLoader.src = tb_pathToImage; +}); + +//add thickbox to href & area elements that have a class of .thickbox +function tb_init(domChunk){ + $(domChunk).click(function(){ + var t = this.title || this.name || null; + var a = this.href || this.alt; + var g = this.rel || false; + tb_show(t,a,g); + this.blur(); + return false; + }); +} + +function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link + + try { + if (typeof document.body.style.maxHeight === "undefined") {//if IE 6 + $("body","html").css({height: "100%", width: "100%"}); + $("html").css("overflow","hidden"); + if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6 + $("body").append("
        "); + $("#TB_overlay").click(tb_remove); + } + }else{//all others + if(document.getElementById("TB_overlay") === null){ + $("body").append("
        "); + $("#TB_overlay").click(tb_remove); + } + } + + if(caption===null){caption="";} + $("body").append("
        ");//add loader to the page + $('#TB_load').show();//show loader + + var baseURL; + if(url.indexOf("?")!==-1){ //ff there is a query string involved + baseURL = url.substr(0, url.indexOf("?")); + }else{ + baseURL = url; + } + + var urlString = /\.jpg|\.jpeg|\.png|\.gif|\.bmp/g; + var urlType = baseURL.toLowerCase().match(urlString); + + if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images + + TB_PrevCaption = ""; + TB_PrevURL = ""; + TB_PrevHTML = ""; + TB_NextCaption = ""; + TB_NextURL = ""; + TB_NextHTML = ""; + TB_imageCount = ""; + TB_FoundURL = false; + if(imageGroup){ + TB_TempArray = $("a[@rel="+imageGroup+"]").get(); + for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { + var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); + if (!(TB_TempArray[TB_Counter].href == url)) { + if (TB_FoundURL) { + TB_NextCaption = TB_TempArray[TB_Counter].title; + TB_NextURL = TB_TempArray[TB_Counter].href; + TB_NextHTML = "  Next >"; + } else { + TB_PrevCaption = TB_TempArray[TB_Counter].title; + TB_PrevURL = TB_TempArray[TB_Counter].href; + TB_PrevHTML = "  < Prev"; + } + } else { + TB_FoundURL = true; + TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); + } + } + } + + imgPreloader = new Image(); + imgPreloader.onload = function(){ + imgPreloader.onload = null; + + // Resizing large images - orginal by Christian Montoya edited by me. + var pagesize = tb_getPageSize(); + var x = pagesize[0] - 150; + var y = pagesize[1] - 150; + var imageWidth = imgPreloader.width; + var imageHeight = imgPreloader.height; + if (imageWidth > x) { + imageHeight = imageHeight * (x / imageWidth); + imageWidth = x; + if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; + } + } else if (imageHeight > y) { + imageWidth = imageWidth * (y / imageHeight); + imageHeight = y; + if (imageWidth > x) { + imageHeight = imageHeight * (x / imageWidth); + imageWidth = x; + } + } + // End Resizing + + TB_WIDTH = imageWidth + 30; + TB_HEIGHT = imageHeight + 60; + $("#TB_window").append(""+caption+"" + "
        "+caption+"
        " + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
        close or Esc Key
        "); + + $("#TB_closeWindowButton").click(tb_remove); + + if (!(TB_PrevHTML === "")) { + function goPrev(){ + if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);} + $("#TB_window").remove(); + $("body").append("
        "); + tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); + return false; + } + $("#TB_prev").click(goPrev); + } + + if (!(TB_NextHTML === "")) { + function goNext(){ + $("#TB_window").remove(); + $("body").append("
        "); + tb_show(TB_NextCaption, TB_NextURL, imageGroup); + return false; + } + $("#TB_next").click(goNext); + + } + + document.onkeydown = function(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + if(keycode == 27){ // close + tb_remove(); + } else if(keycode == 190){ // display previous image + if(!(TB_NextHTML == "")){ + document.onkeydown = ""; + goNext(); + } + } else if(keycode == 188){ // display next image + if(!(TB_PrevHTML == "")){ + document.onkeydown = ""; + goPrev(); + } + } + }; + + tb_position(); + $("#TB_load").remove(); + $("#TB_ImageOff").click(tb_remove); + $("#TB_window").css({display:"block"}); //for safari using css instead of show + }; + + imgPreloader.src = url; + }else{//code to show html pages + + var queryString = url.replace(/^[^\?]+\??/,''); + var params = tb_parseQuery( queryString ); + + TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL + TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL + ajaxContentW = TB_WIDTH - 30; + ajaxContentH = TB_HEIGHT - 45; + + if(url.indexOf('TB_iframe') != -1){ + urlNoQuery = url.split('TB_'); + $("#TB_window").append("
        "+caption+"
        close or Esc Key
        "); + }else{ + if($("#TB_window").css("display") != "block"){ + if(params['modal'] != "true"){ + $("#TB_window").append("
        "+caption+"
        close or Esc Key
        "); + }else{ + $("#TB_overlay").unbind(); + $("#TB_window").append("
        "); + } + }else{ + $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; + $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; + $("#TB_ajaxContent")[0].scrollTop = 0; + $("#TB_ajaxWindowTitle").html(caption); + } + } + + $("#TB_closeWindowButton").click(tb_remove); + + if(url.indexOf('TB_inline') != -1){ + $("#TB_ajaxContent").html($('#' + params['inlineId']).html()); + tb_position(); + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + }else if(url.indexOf('TB_iframe') != -1){ + tb_position(); + if(frames['TB_iframeContent'] === undefined){//be nice to safari + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + $(document).keyup( function(e){ var key = e.keyCode; if(key == 27){tb_remove();}}); + } + }else{ + $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method + tb_position(); + $("#TB_load").remove(); + tb_init("#TB_ajaxContent a.thickbox"); + $("#TB_window").css({display:"block"}); + }); + } + + } + + if(!params['modal']){ + document.onkeyup = function(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + if(keycode == 27){ // close + tb_remove(); + } + }; + } + + } catch(e) { + //nothing here + } +} + +//helper functions below +function tb_showIframe(){ + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); +} + +function tb_remove() { + $("#TB_imageOff").unbind("click"); + $("#TB_overlay").unbind("click"); + $("#TB_closeWindowButton").unbind("click"); + $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').remove();}); + $("#TB_load").remove(); + if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 + $("body","html").css({height: "auto", width: "auto"}); + $("html").css("overflow",""); + } + document.onkeydown = ""; + return false; +} + +function tb_position() { +$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); + if ( !(jQuery.browser.msie && typeof XMLHttpRequest == 'function')) { // take away IE6 + $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); + } +} + +function tb_parseQuery ( query ) { + var Params = {}; + if ( ! query ) {return Params;}// return empty object + var Pairs = query.split(/[;&]/); + for ( var i = 0; i < Pairs.length; i++ ) { + var KeyVal = Pairs[i].split('='); + if ( ! KeyVal || KeyVal.length != 2 ) {continue;} + var key = unescape( KeyVal[0] ); + var val = unescape( KeyVal[1] ); + val = val.replace(/\+/g, ' '); + Params[key] = val; + } + return Params; +} + +function tb_getPageSize(){ + var de = document.documentElement; + var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; + var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; + arrayPageSize = [w,h]; + return arrayPageSize; +} diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/img/a12.png b/frontend/web/js/widget-carousel/HOME_SLIDER/img/a12.png new file mode 100755 index 0000000..9a78622 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/img/a12.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/img/a14.png b/frontend/web/js/widget-carousel/HOME_SLIDER/img/a14.png new file mode 100755 index 0000000..ca1a769 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/img/a14.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/img/a19.png b/frontend/web/js/widget-carousel/HOME_SLIDER/img/a19.png new file mode 100755 index 0000000..6405de7 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/img/a19.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/img/b05.png b/frontend/web/js/widget-carousel/HOME_SLIDER/img/b05.png new file mode 100755 index 0000000..b8481de Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/img/b05.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/img/b12.png b/frontend/web/js/widget-carousel/HOME_SLIDER/img/b12.png new file mode 100755 index 0000000..db761c7 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/img/b12.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/img/b21.png b/frontend/web/js/widget-carousel/HOME_SLIDER/img/b21.png new file mode 100755 index 0000000..5aa92bf Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/img/b21.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/img/pagination.png b/frontend/web/js/widget-carousel/HOME_SLIDER/img/pagination.png new file mode 100755 index 0000000..9593831 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/img/pagination.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/index.html b/frontend/web/js/widget-carousel/HOME_SLIDER/index.html new file mode 100755 index 0000000..7a3fc68 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/index.html @@ -0,0 +1,516 @@ + + + +jCarousel - Riding carousels with jQuery + + + + +
        +

        jCarousel

        +

        Riding carousels with jQuery

        +

        Author: Jan Sorgalla
        + Version: 0.2.8 (Changelog)
        + Download: jcarousel.tar.gz or jcarousel.zip
        + Source Code: http://github.com/jsor/jcarousel
        + Bugtracker: http://github.com/jsor/jcarousel/issues
        + Licence: Dual licensed under the MIT + and GPL licenses.

        + + +

        Contents

        +
          +
        1. Introduction
        2. +
        3. Examples
        4. +
        5. Getting started
        6. +
        7. Dynamic content loading
        8. +
        9. Accessing the jCarousel instance
        10. +
        11. Defining the number of visible items
        12. +
        13. Configuration
        14. +
        15. Credits
        16. +
        + + +

        Introduction

        +

        jCarousel is a jQuery plugin for controlling + a list of items in horizontal or vertical order. The items, which can be static + HTML content or loaded with (or without) AJAX, can be scrolled back and forth + (with or without animation).

        + + +

        Examples

        +

        The following examples illustrate the possibilities of jCarousel:

        + + + + +

        Getting started

        +

        To use the jCarousel component, include the jQuery + library, the jCarousel source file and a jCarousel skin stylesheet file inside the <head> tag + of your HTML document:

        +
        +<script type="text/javascript" src="/path/to/jquery-1.4.2.min.js"></script>
        +<script type="text/javascript" src="/path/to/lib/jquery.jcarousel.min.js"></script>
        +<link rel="stylesheet" type="text/css" href="/path/to/skin/skin.css" />
        +
        +

        The download package contains some example skin packages. Feel free to build your own skins based on it.

        +

        jCarousel expects a very basic HTML markup structure inside your HTML document:

        +
        +<ul id="mycarousel" class="jcarousel-skin-name">
        +   <!-- The content goes in here -->
        +</ul>
        +
        +

        jCarousel automatically wraps the required HTML markup around the list. The + class attribute applies the jCarousel skin "name" to the + carousel.

        +

        To setup jCarousel, add the following code inside the <head> + tag of your HTML document:

        +
        +<script type="text/javascript">
        +jQuery(document).ready(function() {
        +    jQuery('#mycarousel').jcarousel({
        +        // Configuration goes here
        +    });
        +});
        +</script>
        +
        +

        jCarousel accepts a lot of configuration options, see chapter "Configuration" + for further informations.

        +

        After jCarousel has been initialised, the fully created markup in + the DOM is:

        +
        +<div class="jcarousel-skin-name">
        +  <div class="jcarousel-container">
        +    <div class="jcarousel-clip">
        +      <ul class="jcarousel-list">
        +        <li class="jcarousel-item-1">First item</li>
        +        <li class="jcarousel-item-2">Second item</li>
        +      </ul>
        +    </div>
        +    <div disabled="disabled" class="jcarousel-prev jcarousel-prev-disabled"></div>
        +    <div class="jcarousel-next"></div>
        +  </div>
        +</div>
        +
        + +

        As you can see, there are some elements added which have assigned classes + (in addition to the classes you may have already assigned manually). Feel + free to design your carousel with the classes you can see above.

        +

        Note:

        +
          +
        • The skin class "jcarousel-skin-name" has been moved + from the <ul> to the top <div> element.
        • +
        • The last 2 nested <div>'s under <div class="jcarousel-container"> + are the next/prev buttons of the carousel. The first one illustrates a disabled button, the second an enabled one. The disabled + button has the attribute + disabled (which actually makes no sense for <div> + elements, but you can also use <button> elements or + whatever you want) as well as the additional class jcarousel-prev-disabled + (or jcarousel-next-disabled).
        • +
        • All <li> elements of the list have the class jcarousel-item-n + assigned where n represents the position in the list.
        • +
        • Not shown here is, that all classes are followed by additional classes with a suffix + dependent on the orientation of the carousel, ie. <ul class="jcarousel-list + jcarousel-list-horizontal"> for a horizontal carousel.
        • +
        + + +

        Dynamic content loading

        +

        By passing the callback function itemLoadCallback as configuration + option, you are able to dynamically create <li> items for the content.

        +
        +<script type="text/javascript">
        +jQuery(document).ready(function() {
        +    jQuery('#mycarousel').jcarousel({
        +        itemLoadCallback: itemLoadCallbackFunction
        +    });
        +});
        +</script>
        +

        itemLoadCallbackFunction is a JavaScript function that is called + when the carousel requests a set of items to be loaded. Two parameters are + passed: The instance of the requesting carousel and a flag which indicates + the current state of the carousel ('init', 'prev' or 'next').

        +
        +<script type="text/javascript">
        +function itemLoadCallbackFunction(carousel, state)
        +{
        +    for (var i = carousel.first; i <= carousel.last; i++) {
        +        // Check if the item already exists
        +        if (!carousel.has(i)) {
        +            // Add the item
        +            carousel.add(i, "I'm item #" + i);
        +        }
        +    }
        +};
        +</script>
        +

        jCarousel contains a convenience method add() that can be + passed the index of the item to create and the innerHTML string of the + item to be + created. If the item already exists, it just updates the innerHTML. You can + access the index of the first and last visible element by the public variables carousel.first and carousel.last. +

        + + +

        Accessing the jCarousel instance

        +

        The instance of the carousel will be stored with the data() method of jQuery under the key jcarousel for a simple access.

        +

        If you have created a carousel like:

        +
        +jQuery(document).ready(function() {
        +    jQuery('#mycarousel').jcarousel();
        +});
        +

        You can access the instance with:

        +
        +var carousel = jQuery('#mycarousel').data('jcarousel');
        +

        You can also access methods of the instance directly, for example the add() method: +

        +var index = 1;
        +var html = 'My content of item no. 1';
        +jQuery('#mycarousel').jcarousel('add', index, html);
        + + +

        Defining the number of visible items

        + +

        Sometimes people are confused how to define the number of visible items because there is no option for this as they expect (Yes, there is an option visible, we discuss this later).

        +

        You simply define the number of visible items by defining the width (or height) with the class .jcarousel-clip (or the more distinct .jcarousel-clip-horizontal and .jcarousel-clip-vertical classes) in your skin stylesheet.

        +

        This offers a lot of flexibility, because you can define the width in pixel for a fixed carousel or in percent for a flexible carousel (This example shows a carousel with a clip width in percent, resize the browser to see it in effect).

        +

        So, why there is an option visible? If you set the option visible, jCarousel sets the width of the visible items to always make this number of items visible. Open this example and resize your browser window to see it in effect.

        + + +

        Configuration

        +

        jCarousel accepts a list of options to control the appearance and behaviour + of the carousel. Here is the list of options you may set:

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyTypeDefaultDescription
        verticalboolfalseSpecifies wether the carousel appears in horizontal or vertical orientation. + Changes the carousel from a left/right style to a up/down style carousel.
        rtlboolfalseSpecifies wether the carousel appears in RTL (Right-To-Left) mode.
        startinteger1The index of the item to start with.
        offsetinteger1The index of the first available item at initialisation.
        sizeintegerNumber of existing <li> elements if size is not passed explicitlyThe number of total items.
        scrollinteger3The number of items to scroll by.
        visibleintegernullIf passed, the width/height of the items will be calculated and set + depending on the width/height of the clipping, so that exactly that + number of items will be visible.
        animationmixed"fast"The speed of the scroll animation as string in jQuery terms ("slow" + or "fast") or milliseconds as integer + (See jQuery Documentation). + If set to 0, animation is turned off.
        easingstringnullThe name of the easing effect that you want to use (See jQuery + Documentation).
        autointeger0Specifies how many seconds to periodically autoscroll the content. + If set to 0 (default) then autoscrolling is turned off. +
        wrapstringnullSpecifies whether to wrap at the first/last item (or both) and jump + back to the start/end. Options are "first", "last", + "both" or "circular" as string. If set to null, + wrapping is turned off (default).
        initCallbackfunctionnullJavaScript function that is called right after initialisation of the + carousel. Two parameters are passed: The instance of the requesting + carousel and the state of the carousel initialisation (init, reset or + reload).
        setupCallbackfunctionnullJavaScript function that is called right after the carousel is completely setup. + One parameter is passed: The instance of the requesting carousel.
        itemLoadCallbackfunctionnullJavaScript function that is called when the carousel requests a set + of items to be loaded. Two parameters are passed: The instance of the + requesting carousel and the state of the carousel action (prev, next + or init). Alternatively, you can pass a hash of one or two functions + which are triggered before and/or after animation: +
        +itemLoadCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemFirstInCallback functionnullJavaScript function that is called (after the scroll animation) when + an item becomes the first one in the visible range of the carousel. + Four parameters are passed: The instance of the requesting carousel + and the <li> object itself, the index which indicates + the position of the item in the list and the state of the carousel action + (prev, next or init). Alternatively, you can pass a hash of one or two + functions which are triggered before and/or after animation: +
        +itemFirstInCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemFirstOutCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item isn't longer the first one in the visible range of the carousel. + Four parameters are passed: The instance of the requesting carousel + and the <li> object itself, the index which indicates + the position of the item in the list and the state of the carousel action + (prev, next or init). Alternatively, you can pass a hash of one or two + functions which are triggered before and/or after animation: +
        +itemFirstOutCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemLastInCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item becomes the last one in the visible range of the carousel. Four + parameters are passed: The instance of the requesting carousel and the + <li> object itself, the index which indicates the + position of the item in the list and the state of the carousel action + (prev, next or init). Alternatively, you can pass a hash of one or two + functions which are triggered before and/or after animation: +
        +itemLastInCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemLastOutCallbackfunctionnullJavaScript function that is called when an item isn't longer the last + one in the visible range of the carousel. Four parameters are passed: + The instance of the requesting carousel and the <li> + object itself, the index which indicates the position of the item in + the list and the state of the carousel action (prev, next or init). + Alternatively, you can pass a hash of one or two functions which are + triggered before and/or after animation: +
        +itemLastOutCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemVisibleInCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item is in the visible range of the carousel. Four parameters are + passed: The instance of the requesting carousel and the <li> + object itself, the index which indicates the position of the item in + the list and the state of the carousel action (prev, next or init). + Alternatively, you can pass a hash of one or two functions which are + triggered before and/or after animation: +
        +itemVisibleInCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        itemVisibleOutCallbackfunctionnullJavaScript function that is called (after the scroll animation) when + an item isn't longer in the visible range of the carousel. Four parameters + are passed: The instance of the requesting carousel and the <li> + object itself, the index which indicates the position of the item in + the list and the state of the carousel action (prev, next or init). + Alternatively, you can pass a hash of one or two functions which are + triggered before and/or after animation: +
        +itemVisibleOutCallback: {
        +  onBeforeAnimation: callback1,
        +  onAfterAnimation: callback2
        +}
        animationStepCallbackfunctionnullJavaScript function that is called after each animation step. This + function is directly passed to jQuery's .animate() method + as the step parameter. See the jQuery documentation for the + parameters it will receive.
        buttonNextCallbackfunctionnullJavaScript function that is called when the state of the 'next' control + is changing. The responsibility of this method is to enable or disable + the 'next' control. Three parameters are passed: The instance of the + requesting carousel, the control element and a flag indicating whether + the button should be enabled or disabled.
        buttonPrevCallbackfunctionnullJavaScript function that is called when the state of the 'previous' + control is changing. The responsibility of this method is to enable + or disable the 'previous' control. Three parameters are passed: The + instance of the requesting carousel, the control element and a flag + indicating whether the button should be enabled or disabled.
        buttonNextHTMLstring<div></div>The HTML markup for the auto-generated next button. If set to null, + no next-button is created.
        buttonPrevHTMLstring<div></div>The HTML markup for the auto-generated prev button. If set to null, + no prev-button is created.
        buttonNextEventstring"click"Specifies the event which triggers the next scroll.
        buttonPrevEventstring"click"Specifies the event which triggers the prev scroll.
        itemFallbackDimensionintegernullIf, for some reason, jCarousel can not detect the width of an item, you can set a fallback dimension (width or height, depending on the orientation) here to ensure correct calculations.
        + + +

        Credits

        +

        Thanks to John Resig for his fantastic jQuery + library.
        + jCarousel is inspired by the Carousel + Component written by Bill Scott.

        +
        + + diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/arrows_left.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/arrows_left.png new file mode 100755 index 0000000..4252afe Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/arrows_left.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/arrows_right.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/arrows_right.png new file mode 100755 index 0000000..e9468f6 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/arrows_right.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/credits.txt b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/credits.txt new file mode 100755 index 0000000..e5ec8c2 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/credits.txt @@ -0,0 +1 @@ +Button images copyright by Tango Icon Library Team (http://tango.freedesktop.org/Tango_Icon_Library) \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next-horizontal.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next-horizontal.png new file mode 100755 index 0000000..6fcd3d9 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next-horizontal.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next-vertical.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next-vertical.png new file mode 100755 index 0000000..066a3e0 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next-vertical.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next.jpg b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next.jpg new file mode 100755 index 0000000..5ad08bf Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next.jpg differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next.png new file mode 100755 index 0000000..b2fb161 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/next.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev-horizontal.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev-horizontal.png new file mode 100755 index 0000000..36472c0 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev-horizontal.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev-vertical.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev-vertical.png new file mode 100755 index 0000000..bb30f85 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev-vertical.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev.jpg b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev.jpg new file mode 100755 index 0000000..59a2cdb Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev.jpg differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev.png new file mode 100755 index 0000000..426628d Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/prev.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/skin.css b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/skin.css new file mode 100755 index 0000000..90fbd32 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/skin.css @@ -0,0 +1,183 @@ +.jcarousel-skin-tango .jcarousel-container { + +} + +.jcarousel-skin-tango .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango .jcarousel-container-horizontal { + width: 240px;text-align:left;border1:1px solid red; + padding: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-container-vertical { + width: 42px; + height: 200px; + padding: 20px 0px; +} + +.jcarousel-skin-tango .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango .jcarousel-clip-horizontal { + width: 200px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-clip-vertical { + width: 42px; + height: 200px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango .jcarousel-item { + width: 42px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_next.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_prev.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/skin2.css b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/skin2.css new file mode 100755 index 0000000..176a868 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/skin2.css @@ -0,0 +1,185 @@ +.jcarousel-skin-tango2 .jcarousel-container { + +} + +.jcarousel-skin-tango2 img{width:50px;float:left;margin-right:20px;} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango2 .jcarousel-container-horizontal { + width: 240px;text-align:left; + padding: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-container-vertical { + width: 242px; + height: 320px; + padding: 40px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango2 .jcarousel-clip-horizontal { + width: 200px; + height1: 320px; +} + +.jcarousel-skin-tango2 .jcarousel-clip-vertical { + width: 242px; + height: 320px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango2 .jcarousel-item { + width: 242px; + height1: 300px; +} + +.jcarousel-skin-tango2 .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango2 .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango2 .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 115px; + width: 20px; + height: 12px; + cursor: pointer; + background: transparent url(v_next2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 115px; + width: 29px; + height: 12px; + cursor: pointer; + background: transparent url(v_prev2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_next.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_next.png new file mode 100755 index 0000000..e5056d1 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_next.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_next2.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_next2.png new file mode 100755 index 0000000..600203b Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_next2.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_prev.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_prev.png new file mode 100755 index 0000000..36c087e Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_prev.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_prev2.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_prev2.png new file mode 100755 index 0000000..791e630 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/HOME_SLIDER/v_prev2.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/credits.txt b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/credits.txt new file mode 100755 index 0000000..87ccdbc --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/credits.txt @@ -0,0 +1 @@ +Button images copyright by Microsoft Corporation (http://microsoft.com) \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading-small.gif b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading-small.gif new file mode 100755 index 0000000..b25ada9 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading-small.gif differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading.gif b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading.gif new file mode 100755 index 0000000..5c7f808 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading.gif differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading_small.gif b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading_small.gif new file mode 100755 index 0000000..5979f6d Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/loading_small.gif differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/next-horizontal.gif b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/next-horizontal.gif new file mode 100755 index 0000000..36c1f78 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/next-horizontal.gif differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/prev-horizontal.gif b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/prev-horizontal.gif new file mode 100755 index 0000000..3b93296 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/prev-horizontal.gif differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/skin.css b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/skin.css new file mode 100755 index 0000000..0a35832 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/ie7/skin.css @@ -0,0 +1,190 @@ +.jcarousel-skin-ie7 .jcarousel-container { + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + background: #D4D0C8; + border: 1px solid #808080; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-ie7 .jcarousel-container-horizontal { + width: 245px; + padding: 20px 40px; +} + +.jcarousel-skin-ie7 .jcarousel-container-vertical { + width: 75px; + height: 245px; + padding: 40px 20px; +} + +.jcarousel-skin-ie7 .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-ie7 .jcarousel-clip-horizontal { + width: 245px; + height: 77px; +} + +.jcarousel-skin-ie7 .jcarousel-clip-vertical { + width: 77px; + height: 245px; +} + +.jcarousel-skin-ie7 .jcarousel-item { + width: 75px; + height: 75px; + border: 1px solid #fff; +} + +.jcarousel-skin-ie7 .jcarousel-item:hover, +.jcarousel-skin-ie7 .jcarousel-item:focus { + border-color: #808080; +} + +.jcarousel-skin-ie7 .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 7px; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 7px; + margin-right: 0; +} + +.jcarousel-skin-ie7 .jcarousel-item-vertical { + margin-bottom: 7px; +} + +.jcarousel-skin-ie7 .jcarousel-item-placeholder { +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-ie7 .jcarousel-next-horizontal { + position: absolute; + top: 43px; + right: 5px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(next-horizontal.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev-horizontal.gif); +} + +.jcarousel-skin-ie7 .jcarousel-next-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-next-horizontal:focus { + background-position: -32px 0; +} + +.jcarousel-skin-ie7 .jcarousel-next-horizontal:active { + background-position: -64px 0; +} + +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal, +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-ie7 .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: -96px 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-horizontal { + position: absolute; + top: 43px; + left: 5px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(prev-horizontal.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next-horizontal.gif); +} + +.jcarousel-skin-ie7 .jcarousel-prev-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-prev-horizontal:focus { + background-position: -32px 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-horizontal:active { + background-position: -64px 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: -96px 0; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-ie7 .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 43px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(next-vertical.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-next-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-next-vertical:focus { + background-position: 0 -32px; +} + +.jcarousel-skin-ie7 .jcarousel-next-vertical:active { + background-position: 0 -64px; +} + +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical, +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-ie7 .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 -96px; +} + +.jcarousel-skin-ie7 .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 43px; + width: 32px; + height: 32px; + cursor: pointer; + background: transparent url(prev-vertical.gif) no-repeat 0 0; +} + +.jcarousel-skin-ie7 .jcarousel-prev-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-prev-vertical:focus { + background-position: 0 -32px; +} + +.jcarousel-skin-ie7 .jcarousel-prev-vertical:active { + background-position: 0 -64px; +} + +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-ie7 .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 -96px; +} diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/arrows_left.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/arrows_left.png new file mode 100755 index 0000000..4252afe Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/arrows_left.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/arrows_right.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/arrows_right.png new file mode 100755 index 0000000..e9468f6 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/arrows_right.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/credits.txt b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/credits.txt new file mode 100755 index 0000000..e5ec8c2 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/credits.txt @@ -0,0 +1 @@ +Button images copyright by Tango Icon Library Team (http://tango.freedesktop.org/Tango_Icon_Library) \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next-horizontal.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next-horizontal.png new file mode 100755 index 0000000..6fcd3d9 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next-horizontal.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next-vertical.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next-vertical.png new file mode 100755 index 0000000..066a3e0 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next-vertical.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next.jpg b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next.jpg new file mode 100755 index 0000000..5ad08bf Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next.jpg differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next.png new file mode 100755 index 0000000..b2fb161 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/next.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev-horizontal.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev-horizontal.png new file mode 100755 index 0000000..36472c0 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev-horizontal.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev-vertical.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev-vertical.png new file mode 100755 index 0000000..bb30f85 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev-vertical.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev.jpg b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev.jpg new file mode 100755 index 0000000..59a2cdb Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev.jpg differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev.png new file mode 100755 index 0000000..426628d Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/prev.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/skin.css b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/skin.css new file mode 100755 index 0000000..90fbd32 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/skin.css @@ -0,0 +1,183 @@ +.jcarousel-skin-tango .jcarousel-container { + +} + +.jcarousel-skin-tango .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango .jcarousel-container-horizontal { + width: 240px;text-align:left;border1:1px solid red; + padding: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-container-vertical { + width: 42px; + height: 200px; + padding: 20px 0px; +} + +.jcarousel-skin-tango .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango .jcarousel-clip-horizontal { + width: 200px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-clip-vertical { + width: 42px; + height: 200px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango .jcarousel-item { + width: 42px; + height1: 300px; +} + +.jcarousel-skin-tango .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_next.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 15px; + width: 11px; + height: 7px; + cursor: pointer; + background: transparent url(v_prev.png) no-repeat 0 0; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/skin2.css b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/skin2.css new file mode 100755 index 0000000..176a868 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/skin2.css @@ -0,0 +1,185 @@ +.jcarousel-skin-tango2 .jcarousel-container { + +} + +.jcarousel-skin-tango2 img{width:50px;float:left;margin-right:20px;} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl { + direction: rtl; +} + +.jcarousel-skin-tango2 .jcarousel-container-horizontal { + width: 240px;text-align:left; + padding: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-container-vertical { + width: 242px; + height: 320px; + padding: 40px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-clip { + overflow: hidden; +} + +.jcarousel-skin-tango2 .jcarousel-clip-horizontal { + width: 200px; + height1: 320px; +} + +.jcarousel-skin-tango2 .jcarousel-clip-vertical { + width: 242px; + height: 320px; + margin:0px;padding:0px; +} + +.jcarousel-skin-tango2 .jcarousel-item { + width: 242px; + height1: 300px; +} + +.jcarousel-skin-tango2 .jcarousel-item-horizontal { + margin-left: 0; + margin-right: 10px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-item-horizontal { + margin-left: 10px; + margin-right: 0; +} + +.jcarousel-skin-tango2 .jcarousel-item-vertical { + margin-bottom: 5px; +} + +.jcarousel-skin-tango2 .jcarousel-item-placeholder { + background: #fff; + color: #000; +} + +/** + * Horizontal Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-horizontal { + position: absolute; + top: -40px; + right: 0px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_right.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-next-horizontal { + left: 5px; + right: auto; + background-image: url(prev.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal { + position: absolute; + top: -40px; + right: 20px; + width: 10px; + height: 16px; + cursor: pointer; + background: transparent url(arrows_left.png) no-repeat 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-direction-rtl .jcarousel-prev-horizontal { + left: auto; + right: 5px; + background-image: url(next.jpg); +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:focus { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-horizontal:active { + background-position: 0px 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-horizontal:active { + cursor: default; + background-position: 0px -16px; +} + +/** + * Vertical Buttons + */ +.jcarousel-skin-tango2 .jcarousel-next-vertical { + position: absolute; + bottom: 5px; + left: 115px; + width: 20px; + height: 12px; + cursor: pointer; + background: transparent url(v_next2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-next-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical { + position: absolute; + top: 5px; + left: 115px; + width: 29px; + height: 12px; + cursor: pointer; + background: transparent url(v_prev2.png) no-repeat 0 0; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-vertical:focus { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-vertical:active { + background-position: 0 0px; +} + +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:hover, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:focus, +.jcarousel-skin-tango2 .jcarousel-prev-disabled-vertical:active { + cursor: default; + background-position: 0 0px; +} diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_next.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_next.png new file mode 100755 index 0000000..e5056d1 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_next.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_next2.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_next2.png new file mode 100755 index 0000000..600203b Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_next2.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_prev.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_prev.png new file mode 100755 index 0000000..36c087e Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_prev.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_prev2.png b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_prev2.png new file mode 100755 index 0000000..791e630 Binary files /dev/null and b/frontend/web/js/widget-carousel/HOME_SLIDER/skins/tango/v_prev2.png differ diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/style.css b/frontend/web/js/widget-carousel/HOME_SLIDER/style.css new file mode 100755 index 0000000..556b039 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/style.css @@ -0,0 +1,170 @@ + +/* + ==== loading ==== +*/ + +.loading { + position: absolute; + top: 0px; + left: 0px; +} + +.loading .load-1 { + filter: alpha(opacity=70); + opacity: 0.7; + position: absolute; + display: block; + background-color: #000; + top: 0px; + left: 0px; + width: 100%; + height: 100%; +} + +.loading .load-2 { + position: absolute; + display: block; + background: url(./img/10.png) no-repeat center center; + top: 0px; + left: 0px; + width: 100%; + height: 100%; +} + +/* + ==== Module ==== +*/ + +#HOME_SLIDER { + position: relative; + top: 0px; + left: 0px; + width: 720px; + height: 340px; + overflow: hidden; + + display: inline-block; + vertical-align: top; +} + +#HOME_SLIDER .item-list { + cursor: move; + position: absolute; + left: 0px; + top: 0px; + width: 720px; + height: 340px; + overflow: hidden; +} + +#HOME_SLIDER .item a { + text-decoration: none; +} + +#HOME_SLIDER .item .title { + + color: #fff; + display: block; + font-size: 24px; + margin-top: 223px; + padding: 20px; + position: relative; + text-align: center; + text-transform: uppercase; + transition: all 0.2s ease 0s; + white-space: nowrap; + + -webkit-transition: all .2s ease; + -moz-transition: all .2s ease; + -ms-transition: all .2s ease; + -o-transition: all .2s ease; + transition: all .2s ease; +} + +#HOME_SLIDER .item:hover .title { +} + +#HOME_SLIDER .item img { + border-radius: 0; +} + +#HOME_SLIDER .jssorb03 { + display: table; + margin: 0 auto; + position: relative; + top: 304px; +} + +#HOME_SLIDER .jssorb03 div, +#HOME_SLIDER .jssorb03 div:hover, +#HOME_SLIDER .jssorb03 .av { + position: absolute; + /* size of bullet elment */ + width: 21px; + height: 21px; + text-align: center; + line-height: 21px; + color: white; + font-size: 12px; + background: url(./img/b05.png) no-repeat; + overflow: hidden; + cursor: pointer; +} + +#HOME_SLIDER .jssorb03 div { + background-position: -5px -4px; +} + +#HOME_SLIDER .jssorb03 div:hover, +#HOME_SLIDER .jssorb03 .av:hover { + background-position: -35px -4px; +} + +#HOME_SLIDER .jssorb03 .av { + background-position: -65px -4px; +} + +#HOME_SLIDER .jssorb03 .dn, +#HOME_SLIDER .jssorb03 .dn:hover { + background-position: -95px -4px; +} + +#HOME_SLIDER .jssora03l, +#HOME_SLIDER .jssora03r { + display: block; + position: absolute; + /* size of arrow element */ + width: 55px; + height: 55px; + cursor: pointer; + background: url(./img/a14.png) no-repeat; + overflow: hidden; +} + +#HOME_SLIDER .jssora03l { + background-position: -3px -33px; + top: 142px; + left: -13px; +} + +#HOME_SLIDER .jssora03r { + background-position: -63px -33px; + top: 142px; + right: -13px; +} + +#HOME_SLIDER .jssora03l:hover { + background-position: -123px -33px; +} + +#HOME_SLIDER .jssora03r:hover { + background-position: -183px -33px; +} + +#HOME_SLIDER .jssora03l.jssora03ldn { + background-position: -243px -33px; +} + +#HOME_SLIDER .jssora03r.jssora03rdn { + background-position: -303px -33px; +} \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/HOME_SLIDER/style.js b/frontend/web/js/widget-carousel/HOME_SLIDER/style.js new file mode 100755 index 0000000..678e275 --- /dev/null +++ b/frontend/web/js/widget-carousel/HOME_SLIDER/style.js @@ -0,0 +1,61 @@ + +$(document).on('ready', function () +{ + var HOME_SLIDER_option_2 = + { + $AutoPlay: true, + $AutoPlaySteps: 1, +// $AutoPlayInterval: 4000, есть в HOME_SLIDER_option_1 + $PauseOnHover: 1, + + $ArrowKeyNavigation: true, +// $SlideDuration: 500, есть в HOME_SLIDER_option_1 + $MinDragOffsetToSlide: 20, + + $SlideSpacing: 0, + $DisplayPieces: 1, + $ParkingPosition: 0, + $UISearchMode: 1, + $PlayOrientation: 1, + $DragOrientation: 1, + + $BulletNavigatorOptions: { + $Class: $JssorBulletNavigator$, + $ChanceToShow: 2, + $AutoCenter: 0, + $Steps: 1, + $Lanes: 1, + $SpacingX: 10, + $SpacingY: 10, + $Orientation: 1 + }, + + $ArrowNavigatorOptions: { + $Class: $JssorArrowNavigator$, + $ChanceToShow: 2, + $AutoCenter: 0 + } + }; + + var HOME_SLIDER = new $JssorSlider$("HOME_SLIDER", $.extend({}, HOME_SLIDER_option_1, HOME_SLIDER_option_2)); + + function ScaleHOME_SLIDER () + { + $item = $("#HOME_SLIDER .item").width(); + + if ($(window).width()) + { + $body = $(window).width() - 70; + HOME_SLIDER.$ScaleWidth(Math.min($body, $item)); + } + else + { + window.setTimeout(ScaleHOME_SLIDER, 30); + } + } + + ScaleHOME_SLIDER(); + + $(window).bind("resize", ScaleHOME_SLIDER); + $(window).bind("orientationchange", ScaleHOME_SLIDER); +}); \ No newline at end of file diff --git a/frontend/web/js/widget-carousel/lib/jquery-1.4.2.min.js b/frontend/web/js/widget-carousel/lib/jquery-1.4.2.min.js new file mode 100755 index 0000000..7c24308 --- /dev/null +++ b/frontend/web/js/widget-carousel/lib/jquery-1.4.2.min.js @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
        a"; +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

        ";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="
        ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
        ","
        "],thead:[1,"","
        "],tr:[2,"","
        "],td:[3,"","
        "],col:[2,"","
        "],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
        ","
        "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); +return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
        ").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
        "; +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/frontend/web/js/widget-carousel/lib/jquery.jcarousel.js b/frontend/web/js/widget-carousel/lib/jquery.jcarousel.js new file mode 100755 index 0000000..1bbb0bb --- /dev/null +++ b/frontend/web/js/widget-carousel/lib/jquery.jcarousel.js @@ -0,0 +1,1057 @@ +/*! + * jCarousel - Riding carousels with jQuery + * http://sorgalla.com/jcarousel/ + * + * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * Built on top of the jQuery library + * http://jquery.com + * + * Inspired by the "Carousel Component" by Bill Scott + * http://billwscott.com/carousel/ + */ + +/*global window, jQuery */ +(function($) { + // Default configuration properties. + var defaults = { + vertical: false, + rtl: false, + start: 1, + offset: 1, + size: null, + scroll: 3, + visible: null, + animation: 'normal', + easing: 'swing', + auto: 0, + wrap: null, + initCallback: null, + setupCallback: null, + reloadCallback: null, + itemLoadCallback: null, + itemFirstInCallback: null, + itemFirstOutCallback: null, + itemLastInCallback: null, + itemLastOutCallback: null, + itemVisibleInCallback: null, + itemVisibleOutCallback: null, + animationStepCallback: null, + buttonNextHTML: '
        ', + buttonPrevHTML: '
        ', + buttonNextEvent: 'click', + buttonPrevEvent: 'click', + buttonNextCallback: null, + buttonPrevCallback: null, + itemFallbackDimension: null + }, windowLoaded = false; + + $(window).bind('load.jcarousel', function() { windowLoaded = true; }); + + /** + * The jCarousel object. + * + * @constructor + * @class jcarousel + * @param e {HTMLElement} The element to create the carousel for. + * @param o {Object} A set of key/value pairs to set as configuration properties. + * @cat Plugins/jCarousel + */ + $.jcarousel = function(e, o) { + this.options = $.extend({}, defaults, o || {}); + + this.locked = false; + this.autoStopped = false; + + this.container = null; + this.clip = null; + this.list = null; + this.buttonNext = null; + this.buttonPrev = null; + this.buttonNextState = null; + this.buttonPrevState = null; + + // Only set if not explicitly passed as option + if (!o || o.rtl === undefined) { + this.options.rtl = ($(e).attr('dir') || $('html').attr('dir') || '').toLowerCase() == 'rtl'; + } + + this.wh = !this.options.vertical ? 'width' : 'height'; + this.lt = !this.options.vertical ? (this.options.rtl ? 'right' : 'left') : 'top'; + + // Extract skin class + var skin = '', split = e.className.split(' '); + + for (var i = 0; i < split.length; i++) { + if (split[i].indexOf('jcarousel-skin') != -1) { + $(e).removeClass(split[i]); + skin = split[i]; + break; + } + } + + if (e.nodeName.toUpperCase() == 'UL' || e.nodeName.toUpperCase() == 'OL') { + this.list = $(e); + this.clip = this.list.parents('.jcarousel-clip'); + this.container = this.list.parents('.jcarousel-container'); + } else { + this.container = $(e); + this.list = this.container.find('ul,ol').eq(0); + this.clip = this.container.find('.jcarousel-clip'); + } + + if (this.clip.size() === 0) { + this.clip = this.list.wrap('
        ').parent(); + } + + if (this.container.size() === 0) { + this.container = this.clip.wrap('
        ').parent(); + } + + if (skin !== '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1) { + this.container.wrap('
        '); + } + + this.buttonPrev = $('.jcarousel-prev', this.container); + + if (this.buttonPrev.size() === 0 && this.options.buttonPrevHTML !== null) { + this.buttonPrev = $(this.options.buttonPrevHTML).appendTo(this.container); + } + + this.buttonPrev.addClass(this.className('jcarousel-prev')); + + this.buttonNext = $('.jcarousel-next', this.container); + + if (this.buttonNext.size() === 0 && this.options.buttonNextHTML !== null) { + this.buttonNext = $(this.options.buttonNextHTML).appendTo(this.container); + } + + this.buttonNext.addClass(this.className('jcarousel-next')); + + this.clip.addClass(this.className('jcarousel-clip')).css({ + position: 'relative' + }); + + this.list.addClass(this.className('jcarousel-list')).css({ + overflow: 'hidden', + position: 'relative', + top: 0, + margin: 0, + padding: 0 + }).css((this.options.rtl ? 'right' : 'left'), 0); + + this.container.addClass(this.className('jcarousel-container')).css({ + position: 'relative' + }); + + if (!this.options.vertical && this.options.rtl) { + this.container.addClass('jcarousel-direction-rtl').attr('dir', 'rtl'); + } + + var di = this.options.visible !== null ? Math.ceil(this.clipping() / this.options.visible) : null; + var li = this.list.children('li'); + + var self = this; + + if (li.size() > 0) { + var wh = 0, j = this.options.offset; + li.each(function() { + self.format(this, j++); + wh += self.dimension(this, di); + }); + + this.list.css(this.wh, (wh + 100) + 'px'); + + // Only set if not explicitly passed as option + if (!o || o.size === undefined) { + this.options.size = li.size(); + } + } + + // For whatever reason, .show() does not work in Safari... + this.container.css('display', 'block'); + this.buttonNext.css('display', 'block'); + this.buttonPrev.css('display', 'block'); + + this.funcNext = function() { self.next(); }; + this.funcPrev = function() { self.prev(); }; + this.funcResize = function() { + if (self.resizeTimer) { + clearTimeout(self.resizeTimer); + } + + self.resizeTimer = setTimeout(function() { + self.reload(); + }, 100); + }; + + if (this.options.initCallback !== null) { + this.options.initCallback(this, 'init'); + } + + if (!windowLoaded && $.browser.safari) { + this.buttons(false, false); + $(window).bind('load.jcarousel', function() { self.setup(); }); + } else { + this.setup(); + } + }; + + // Create shortcut for internal use + var $jc = $.jcarousel; + + $jc.fn = $jc.prototype = { + jcarousel: '0.2.8' + }; + + $jc.fn.extend = $jc.extend = $.extend; + + $jc.fn.extend({ + /** + * Setups the carousel. + * + * @method setup + * @return undefined + */ + setup: function() { + this.first = null; + this.last = null; + this.prevFirst = null; + this.prevLast = null; + this.animating = false; + this.timer = null; + this.resizeTimer = null; + this.tail = null; + this.inTail = false; + + if (this.locked) { + return; + } + + this.list.css(this.lt, this.pos(this.options.offset) + 'px'); + var p = this.pos(this.options.start, true); + this.prevFirst = this.prevLast = null; + this.animate(p, false); + + $(window).unbind('resize.jcarousel', this.funcResize).bind('resize.jcarousel', this.funcResize); + + if (this.options.setupCallback !== null) { + this.options.setupCallback(this); + } + }, + + /** + * Clears the list and resets the carousel. + * + * @method reset + * @return undefined + */ + reset: function() { + this.list.empty(); + + this.list.css(this.lt, '0px'); + this.list.css(this.wh, '10px'); + + if (this.options.initCallback !== null) { + this.options.initCallback(this, 'reset'); + } + + this.setup(); + }, + + /** + * Reloads the carousel and adjusts positions. + * + * @method reload + * @return undefined + */ + reload: function() { + if (this.tail !== null && this.inTail) { + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail); + } + + this.tail = null; + this.inTail = false; + + if (this.options.reloadCallback !== null) { + this.options.reloadCallback(this); + } + + if (this.options.visible !== null) { + var self = this; + var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0; + this.list.children('li').each(function(i) { + wh += self.dimension(this, di); + if (i + 1 < self.first) { + lt = wh; + } + }); + + this.list.css(this.wh, wh + 'px'); + this.list.css(this.lt, -lt + 'px'); + } + + this.scroll(this.first, false); + }, + + /** + * Locks the carousel. + * + * @method lock + * @return undefined + */ + lock: function() { + this.locked = true; + this.buttons(); + }, + + /** + * Unlocks the carousel. + * + * @method unlock + * @return undefined + */ + unlock: function() { + this.locked = false; + this.buttons(); + }, + + /** + * Sets the size of the carousel. + * + * @method size + * @return undefined + * @param s {Number} The size of the carousel. + */ + size: function(s) { + if (s !== undefined) { + this.options.size = s; + if (!this.locked) { + this.buttons(); + } + } + + return this.options.size; + }, + + /** + * Checks whether a list element exists for the given index (or index range). + * + * @method get + * @return bool + * @param i {Number} The index of the (first) element. + * @param i2 {Number} The index of the last element. + */ + has: function(i, i2) { + if (i2 === undefined || !i2) { + i2 = i; + } + + if (this.options.size !== null && i2 > this.options.size) { + i2 = this.options.size; + } + + for (var j = i; j <= i2; j++) { + var e = this.get(j); + if (!e.length || e.hasClass('jcarousel-item-placeholder')) { + return false; + } + } + + return true; + }, + + /** + * Returns a jQuery object with list element for the given index. + * + * @method get + * @return jQuery + * @param i {Number} The index of the element. + */ + get: function(i) { + return $('>.jcarousel-item-' + i, this.list); + }, + + /** + * Adds an element for the given index to the list. + * If the element already exists, it updates the inner html. + * Returns the created element as jQuery object. + * + * @method add + * @return jQuery + * @param i {Number} The index of the element. + * @param s {String} The innerHTML of the element. + */ + add: function(i, s) { + var e = this.get(i), old = 0, n = $(s); + + if (e.length === 0) { + var c, j = $jc.intval(i); + e = this.create(i); + while (true) { + c = this.get(--j); + if (j <= 0 || c.length) { + if (j <= 0) { + this.list.prepend(e); + } else { + c.after(e); + } + break; + } + } + } else { + old = this.dimension(e); + } + + if (n.get(0).nodeName.toUpperCase() == 'LI') { + e.replaceWith(n); + e = n; + } else { + e.empty().append(s); + } + + this.format(e.removeClass(this.className('jcarousel-item-placeholder')), i); + + var di = this.options.visible !== null ? Math.ceil(this.clipping() / this.options.visible) : null; + var wh = this.dimension(e, di) - old; + + if (i > 0 && i < this.first) { + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px'); + } + + this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px'); + + return e; + }, + + /** + * Removes an element for the given index from the list. + * + * @method remove + * @return undefined + * @param i {Number} The index of the element. + */ + remove: function(i) { + var e = this.get(i); + + // Check if item exists and is not currently visible + if (!e.length || (i >= this.first && i <= this.last)) { + return; + } + + var d = this.dimension(e); + + if (i < this.first) { + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px'); + } + + e.remove(); + + this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px'); + }, + + /** + * Moves the carousel forwards. + * + * @method next + * @return undefined + */ + next: function() { + if (this.tail !== null && !this.inTail) { + this.scrollTail(false); + } else { + this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size !== null && this.last == this.options.size) ? 1 : this.first + this.options.scroll); + } + }, + + /** + * Moves the carousel backwards. + * + * @method prev + * @return undefined + */ + prev: function() { + if (this.tail !== null && this.inTail) { + this.scrollTail(true); + } else { + this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size !== null && this.first == 1) ? this.options.size : this.first - this.options.scroll); + } + }, + + /** + * Scrolls the tail of the carousel. + * + * @method scrollTail + * @return undefined + * @param b {Boolean} Whether scroll the tail back or forward. + */ + scrollTail: function(b) { + if (this.locked || this.animating || !this.tail) { + return; + } + + this.pauseAuto(); + + var pos = $jc.intval(this.list.css(this.lt)); + + pos = !b ? pos - this.tail : pos + this.tail; + this.inTail = !b; + + // Save for callbacks + this.prevFirst = this.first; + this.prevLast = this.last; + + this.animate(pos); + }, + + /** + * Scrolls the carousel to a certain position. + * + * @method scroll + * @return undefined + * @param i {Number} The index of the element to scoll to. + * @param a {Boolean} Flag indicating whether to perform animation. + */ + scroll: function(i, a) { + if (this.locked || this.animating) { + return; + } + + this.pauseAuto(); + this.animate(this.pos(i), a); + }, + + /** + * Prepares the carousel and return the position for a certian index. + * + * @method pos + * @return {Number} + * @param i {Number} The index of the element to scoll to. + * @param fv {Boolean} Whether to force last item to be visible. + */ + pos: function(i, fv) { + var pos = $jc.intval(this.list.css(this.lt)); + + if (this.locked || this.animating) { + return pos; + } + + if (this.options.wrap != 'circular') { + i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i); + } + + var back = this.first > i; + + // Create placeholders, new list width/height + // and new list position + var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first; + var c = back ? this.get(f) : this.get(this.last); + var j = back ? f : f - 1; + var e = null, l = 0, p = false, d = 0, g; + + while (back ? --j >= i : ++j < i) { + e = this.get(j); + p = !e.length; + if (e.length === 0) { + e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); + c[back ? 'before' : 'after' ](e); + + if (this.first !== null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { + g = this.get(this.index(j)); + if (g.length) { + e = this.add(j, g.clone(true)); + } + } + } + + c = e; + d = this.dimension(e); + + if (p) { + l += d; + } + + if (this.first !== null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size === null || j <= this.options.size)))) { + pos = back ? pos + d : pos - d; + } + } + + // Calculate visible items + var clipping = this.clipping(), cache = [], visible = 0, v = 0; + c = this.get(i - 1); + j = i; + + while (++visible) { + e = this.get(j); + p = !e.length; + if (e.length === 0) { + e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); + // This should only happen on a next scroll + if (c.length === 0) { + this.list.prepend(e); + } else { + c[back ? 'before' : 'after' ](e); + } + + if (this.first !== null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { + g = this.get(this.index(j)); + if (g.length) { + e = this.add(j, g.clone(true)); + } + } + } + + c = e; + d = this.dimension(e); + if (d === 0) { + throw new Error('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...'); + } + + if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size) { + cache.push(e); + } else if (p) { + l += d; + } + + v += d; + + if (v >= clipping) { + break; + } + + j++; + } + + // Remove out-of-range placeholders + for (var x = 0; x < cache.length; x++) { + cache[x].remove(); + } + + // Resize list + if (l > 0) { + this.list.css(this.wh, this.dimension(this.list) + l + 'px'); + + if (back) { + pos -= l; + this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px'); + } + } + + // Calculate first and last item + var last = i + visible - 1; + if (this.options.wrap != 'circular' && this.options.size && last > this.options.size) { + last = this.options.size; + } + + if (j > last) { + visible = 0; + j = last; + v = 0; + while (++visible) { + e = this.get(j--); + if (!e.length) { + break; + } + v += this.dimension(e); + if (v >= clipping) { + break; + } + } + } + + var first = last - visible + 1; + if (this.options.wrap != 'circular' && first < 1) { + first = 1; + } + + if (this.inTail && back) { + pos += this.tail; + this.inTail = false; + } + + this.tail = null; + if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) { + var m = $jc.intval(this.get(last).css(!this.options.vertical ? 'marginRight' : 'marginBottom')); + if ((v - m) > clipping) { + this.tail = v - clipping - m; + } + } + + if (fv && i === this.options.size && this.tail) { + pos -= this.tail; + this.inTail = true; + } + + // Adjust position + while (i-- > first) { + pos += this.dimension(this.get(i)); + } + + // Save visible item range + this.prevFirst = this.first; + this.prevLast = this.last; + this.first = first; + this.last = last; + + return pos; + }, + + /** + * Animates the carousel to a certain position. + * + * @method animate + * @return undefined + * @param p {Number} Position to scroll to. + * @param a {Boolean} Flag indicating whether to perform animation. + */ + animate: function(p, a) { + if (this.locked || this.animating) { + return; + } + + this.animating = true; + + var self = this; + var scrolled = function() { + self.animating = false; + + if (p === 0) { + self.list.css(self.lt, 0); + } + + if (!self.autoStopped && (self.options.wrap == 'circular' || self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size === null || self.last < self.options.size || (self.last == self.options.size && self.tail !== null && !self.inTail))) { + self.startAuto(); + } + + self.buttons(); + self.notify('onAfterAnimation'); + + // This function removes items which are appended automatically for circulation. + // This prevents the list from growing infinitely. + if (self.options.wrap == 'circular' && self.options.size !== null) { + for (var i = self.prevFirst; i <= self.prevLast; i++) { + if (i !== null && !(i >= self.first && i <= self.last) && (i < 1 || i > self.options.size)) { + self.remove(i); + } + } + } + }; + + this.notify('onBeforeAnimation'); + + // Animate + if (!this.options.animation || a === false) { + this.list.css(this.lt, p + 'px'); + scrolled(); + } else { + var o = !this.options.vertical ? (this.options.rtl ? {'right': p} : {'left': p}) : {'top': p}; + // Define animation settings. + var settings = { + duration: this.options.animation, + easing: this.options.easing, + complete: scrolled + }; + // If we have a step callback, specify it as well. + if ($.isFunction(this.options.animationStepCallback)) { + settings.step = this.options.animationStepCallback; + } + // Start the animation. + this.list.animate(o, settings); + } + }, + + /** + * Starts autoscrolling. + * + * @method auto + * @return undefined + * @param s {Number} Seconds to periodically autoscroll the content. + */ + startAuto: function(s) { + if (s !== undefined) { + this.options.auto = s; + } + + if (this.options.auto === 0) { + return this.stopAuto(); + } + + if (this.timer !== null) { + return; + } + + this.autoStopped = false; + + var self = this; + this.timer = window.setTimeout(function() { self.next(); }, this.options.auto * 1000); + }, + + /** + * Stops autoscrolling. + * + * @method stopAuto + * @return undefined + */ + stopAuto: function() { + this.pauseAuto(); + this.autoStopped = true; + }, + + /** + * Pauses autoscrolling. + * + * @method pauseAuto + * @return undefined + */ + pauseAuto: function() { + if (this.timer === null) { + return; + } + + window.clearTimeout(this.timer); + this.timer = null; + }, + + /** + * Sets the states of the prev/next buttons. + * + * @method buttons + * @return undefined + */ + buttons: function(n, p) { + if (n == null) { + n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size === null || this.last < this.options.size); + if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size !== null && this.last >= this.options.size) { + n = this.tail !== null && !this.inTail; + } + } + + if (p == null) { + p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1); + if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size !== null && this.first == 1) { + p = this.tail !== null && this.inTail; + } + } + + var self = this; + + if (this.buttonNext.size() > 0) { + this.buttonNext.unbind(this.options.buttonNextEvent + '.jcarousel', this.funcNext); + + if (n) { + this.buttonNext.bind(this.options.buttonNextEvent + '.jcarousel', this.funcNext); + } + + this.buttonNext[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true); + + if (this.options.buttonNextCallback !== null && this.buttonNext.data('jcarouselstate') != n) { + this.buttonNext.each(function() { self.options.buttonNextCallback(self, this, n); }).data('jcarouselstate', n); + } + } else { + if (this.options.buttonNextCallback !== null && this.buttonNextState != n) { + this.options.buttonNextCallback(self, null, n); + } + } + + if (this.buttonPrev.size() > 0) { + this.buttonPrev.unbind(this.options.buttonPrevEvent + '.jcarousel', this.funcPrev); + + if (p) { + this.buttonPrev.bind(this.options.buttonPrevEvent + '.jcarousel', this.funcPrev); + } + + this.buttonPrev[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true); + + if (this.options.buttonPrevCallback !== null && this.buttonPrev.data('jcarouselstate') != p) { + this.buttonPrev.each(function() { self.options.buttonPrevCallback(self, this, p); }).data('jcarouselstate', p); + } + } else { + if (this.options.buttonPrevCallback !== null && this.buttonPrevState != p) { + this.options.buttonPrevCallback(self, null, p); + } + } + + this.buttonNextState = n; + this.buttonPrevState = p; + }, + + /** + * Notify callback of a specified event. + * + * @method notify + * @return undefined + * @param evt {String} The event name + */ + notify: function(evt) { + var state = this.prevFirst === null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev'); + + // Load items + this.callback('itemLoadCallback', evt, state); + + if (this.prevFirst !== this.first) { + this.callback('itemFirstInCallback', evt, state, this.first); + this.callback('itemFirstOutCallback', evt, state, this.prevFirst); + } + + if (this.prevLast !== this.last) { + this.callback('itemLastInCallback', evt, state, this.last); + this.callback('itemLastOutCallback', evt, state, this.prevLast); + } + + this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast); + this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last); + }, + + callback: function(cb, evt, state, i1, i2, i3, i4) { + if (this.options[cb] == null || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation')) { + return; + } + + var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb]; + + if (!$.isFunction(callback)) { + return; + } + + var self = this; + + if (i1 === undefined) { + callback(self, state, evt); + } else if (i2 === undefined) { + this.get(i1).each(function() { callback(self, this, i1, state, evt); }); + } else { + var call = function(i) { + self.get(i).each(function() { callback(self, this, i, state, evt); }); + }; + for (var i = i1; i <= i2; i++) { + if (i !== null && !(i >= i3 && i <= i4)) { + call(i); + } + } + } + }, + + create: function(i) { + return this.format('
      • ', i); + }, + + format: function(e, i) { + e = $(e); + var split = e.get(0).className.split(' '); + for (var j = 0; j < split.length; j++) { + if (split[j].indexOf('jcarousel-') != -1) { + e.removeClass(split[j]); + } + } + e.addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i)).css({ + 'float': (this.options.rtl ? 'right' : 'left'), + 'list-style': 'none' + }).attr('jcarouselindex', i); + return e; + }, + + className: function(c) { + return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical'); + }, + + dimension: function(e, d) { + var el = $(e); + + if (d == null) { + return !this.options.vertical ? + (el.outerWidth(true) || $jc.intval(this.options.itemFallbackDimension)) : + (el.outerHeight(true) || $jc.intval(this.options.itemFallbackDimension)); + } else { + var w = !this.options.vertical ? + d - $jc.intval(el.css('marginLeft')) - $jc.intval(el.css('marginRight')) : + d - $jc.intval(el.css('marginTop')) - $jc.intval(el.css('marginBottom')); + + $(el).css(this.wh, w + 'px'); + + return this.dimension(el); + } + }, + + clipping: function() { + return !this.options.vertical ? + this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) : + this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth')); + }, + + index: function(i, s) { + if (s == null) { + s = this.options.size; + } + + return Math.round((((i-1) / s) - Math.floor((i-1) / s)) * s) + 1; + } + }); + + $jc.extend({ + /** + * Gets/Sets the global default configuration properties. + * + * @method defaults + * @return {Object} + * @param d {Object} A set of key/value pairs to set as configuration properties. + */ + defaults: function(d) { + return $.extend(defaults, d || {}); + }, + + intval: function(v) { + v = parseInt(v, 10); + return isNaN(v) ? 0 : v; + }, + + windowLoaded: function() { + windowLoaded = true; + } + }); + + /** + * Creates a carousel for all matched elements. + * + * @example $("#mycarousel").jcarousel(); + * @before
        • First item
        • Second item
        + * @result + * + *
        + *
        + *
        + *
          + *
        • First item
        • + *
        • Second item
        • + *
        + *
        + *
        + *
        + *
        + *
        + * + * @method jcarousel + * @return jQuery + * @param o {Hash|String} A set of key/value pairs to set as configuration properties or a method name to call on a formerly created instance. + */ + $.fn.jcarousel = function(o) { + if (typeof o == 'string') { + var instance = $(this).data('jcarousel'), args = Array.prototype.slice.call(arguments, 1); + return instance[o].apply(instance, args); + } else { + return this.each(function() { + var instance = $(this).data('jcarousel'); + if (instance) { + if (o) { + $.extend(instance.options, o); + } + instance.reload(); + } else { + $(this).data('jcarousel', new $jc(this, o)); + } + }); + } + }; + +})(jQuery); diff --git a/frontend/web/js/widget-carousel/lib/jquery.jcarousel.min.js b/frontend/web/js/widget-carousel/lib/jquery.jcarousel.min.js new file mode 100755 index 0000000..2f04d97 --- /dev/null +++ b/frontend/web/js/widget-carousel/lib/jquery.jcarousel.min.js @@ -0,0 +1,2 @@ +(function(h,e,b,i,c,g,j){/*! Jssor */ + new(function(){});var d=h.$JssorEasing$={$EaseSwing:function(a){return-b.cos(a*b.PI)/2+.5},$EaseLinear:function(a){return a},$EaseInQuad:function(a){return a*a},$EaseOutQuad:function(a){return-a*(a-2)},$EaseInOutQuad:function(a){return(a*=2)<1?1/2*a*a:-1/2*(--a*(a-2)-1)},$EaseInCubic:function(a){return a*a*a},$EaseOutCubic:function(a){return(a-=1)*a*a+1},$EaseInOutCubic:function(a){return(a*=2)<1?1/2*a*a*a:1/2*((a-=2)*a*a+2)},$EaseInQuart:function(a){return a*a*a*a},$EaseOutQuart:function(a){return-((a-=1)*a*a*a-1)},$EaseInOutQuart:function(a){return(a*=2)<1?1/2*a*a*a*a:-1/2*((a-=2)*a*a*a-2)},$EaseInQuint:function(a){return a*a*a*a*a},$EaseOutQuint:function(a){return(a-=1)*a*a*a*a+1},$EaseInOutQuint:function(a){return(a*=2)<1?1/2*a*a*a*a*a:1/2*((a-=2)*a*a*a*a+2)},$EaseInSine:function(a){return 1-b.cos(a*b.PI/2)},$EaseOutSine:function(a){return b.sin(a*b.PI/2)},$EaseInOutSine:function(a){return-1/2*(b.cos(b.PI*a)-1)},$EaseInExpo:function(a){return a==0?0:b.pow(2,10*(a-1))},$EaseOutExpo:function(a){return a==1?1:-b.pow(2,-10*a)+1},$EaseInOutExpo:function(a){return a==0||a==1?a:(a*=2)<1?1/2*b.pow(2,10*(a-1)):1/2*(-b.pow(2,-10*--a)+2)},$EaseInCirc:function(a){return-(b.sqrt(1-a*a)-1)},$EaseOutCirc:function(a){return b.sqrt(1-(a-=1)*a)},$EaseInOutCirc:function(a){return(a*=2)<1?-1/2*(b.sqrt(1-a*a)-1):1/2*(b.sqrt(1-(a-=2)*a)+1)},$EaseInElastic:function(a){if(!a||a==1)return a;var c=.3,d=.075;return-(b.pow(2,10*(a-=1))*b.sin((a-d)*2*b.PI/c))},$EaseOutElastic:function(a){if(!a||a==1)return a;var c=.3,d=.075;return b.pow(2,-10*a)*b.sin((a-d)*2*b.PI/c)+1},$EaseInOutElastic:function(a){if(!a||a==1)return a;var c=.45,d=.1125;return(a*=2)<1?-.5*b.pow(2,10*(a-=1))*b.sin((a-d)*2*b.PI/c):b.pow(2,-10*(a-=1))*b.sin((a-d)*2*b.PI/c)*.5+1},$EaseInBack:function(a){var b=1.70158;return a*a*((b+1)*a-b)},$EaseOutBack:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},$EaseInOutBack:function(a){var b=1.70158;return(a*=2)<1?1/2*a*a*(((b*=1.525)+1)*a-b):1/2*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},$EaseInBounce:function(a){return 1-d.$EaseOutBounce(1-a)},$EaseOutBounce:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},$EaseInOutBounce:function(a){return a<1/2?d.$EaseInBounce(a*2)*.5:d.$EaseOutBounce(a*2-1)*.5+.5},$EaseGoBack:function(a){return 1-b.abs(2-1)},$EaseInWave:function(a){return 1-b.cos(a*b.PI*2)},$EaseOutWave:function(a){return b.sin(a*b.PI*2)},$EaseOutJump:function(a){return 1-((a*=2)<1?(a=1-a)*a*a:(a-=1)*a*a)},$EaseInJump:function(a){return(a*=2)<1?a*a*a:(a=2-a)*a*a}};var a=new function(){var f=this,xb=/\S+/g,T=1,fb=2,kb=3,jb=4,ob=5,L,s=0,l=0,p=0,bb=0,A=0,B=navigator,tb=B.appName,k=B.userAgent,z;function Eb(){if(!L){L={ie:"ontouchstart"in h||"createTouch"in e};var a;if(B.pointerEnabled||(a=B.msPointerEnabled))L.dd=a?"msTouchAction":"touchAction"}return L}function v(i){if(!s){s=-1;if(tb=="Microsoft Internet Explorer"&&!!h.attachEvent&&!!h.ActiveXObject){var f=k.indexOf("MSIE");s=T;p=n(k.substring(f+5,k.indexOf(";",f)));/*@cc_on bb=@_jscript_version@*/;l=e.documentMode||p}else if(tb=="Netscape"&&!!h.addEventListener){var d=k.indexOf("Firefox"),b=k.indexOf("Safari"),g=k.indexOf("Chrome"),c=k.indexOf("AppleWebKit");if(d>=0){s=fb;l=n(k.substring(d+8))}else if(b>=0){var j=k.substring(0,b).lastIndexOf("/");s=g>=0?jb:kb;l=n(k.substring(j+1,b))}else{var a=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/i.exec(k);if(a){s=T;l=p=n(a[1])}}if(c>=0)A=n(k.substring(c+12))}else{var a=/(opera)(?:.*version|)[ \/]([\w.]+)/i.exec(k);if(a){s=ob;l=n(a[2])}}}return i==s}function q(){return v(T)}function O(){return q()&&(l<6||e.compatMode=="BackCompat")}function ib(){return v(kb)}function hb(){return v(jb)}function nb(){return v(ob)}function cb(){return ib()&&A>534&&A<535}function M(){return q()&&l<9}function t(a){if(!z){m(["transform","WebkitTransform","msTransform","MozTransform","OTransform"],function(b){if(a.style[b]!=j){z=b;return c}});z=z||"transform"}return z}function sb(a){return{}.toString.call(a)}var K;function Cb(){if(!K){K={};m(["Boolean","Number","String","Function","Array","Date","RegExp","Object"],function(a){K["[object "+a+"]"]=a.toLowerCase()})}return K}function m(a,d){if(sb(a)=="[object Array]"){for(var b=0;b535&&"ontouchstart"in h)k+=" perspective(2000px)";e.style[g]=k}}}f.me=function(b,a){if(cb())vb(f.F(i,ab,b,a));else ab(b,a)};f.le=function(b,c){var a=t(b);if(a)b.style[a+"Origin"]=c};f.oe=function(a,c){if(q()&&p<9||p<10&&O())a.style.zoom=c==1?"":c;else{var b=t(a);if(b){var f="scale("+c+")",e=a.style[b],g=new RegExp(/[\s]*scale\(.*?\)/g),d=I(e,[g],f);a.style[b]=d}}};f.ne=function(a){if(!a.style[t(a)]||a.style[t(a)]=="none")a.style[t(a)]="perspective(2000px)"};f.Rb=function(b,a){return function(c){c=r(c);var e=c.type,d=c.relatedTarget||(e=="mouseout"?c.toElement:c.fromElement);(!d||d!==a&&!f.nf(a,d))&&b(c)}};f.c=function(a,c,d,b){a=f.hb(a);if(a.addEventListener){c=="mousewheel"&&a.addEventListener("DOMMouseScroll",d,b);a.addEventListener(c,d,b)}else if(a.attachEvent){a.attachEvent("on"+c,d);b&&a.setCapture&&a.setCapture()}};f.I=function(a,c,d,b){a=f.hb(a);if(a.removeEventListener){c=="mousewheel"&&a.removeEventListener("DOMMouseScroll",d,b);a.removeEventListener(c,d,b)}else if(a.detachEvent){a.detachEvent("on"+c,d);b&&a.releaseCapture&&a.releaseCapture()}};f.Fb=function(a){a=r(a);a.preventDefault&&a.preventDefault();a.cancel=c;a.returnValue=g};f.af=function(a){a=r(a);a.stopPropagation&&a.stopPropagation();a.cancelBubble=c};f.F=function(d,c){var a=[].slice.call(arguments,2),b=function(){var b=a.concat([].slice.call(arguments,0));return c.apply(d,b)};return b};f.gf=function(a,b){if(b==j)return a.textContent||a.innerText;var c=e.createTextNode(b);f.jc(a);a.appendChild(c)};f.V=function(d,c){for(var b=[],a=d.firstChild;a;a=a.nextSibling)(c||a.nodeType==1)&&b.push(a);return b};function rb(a,c,e,b){b=b||"u";for(a=a?a.firstChild:i;a;a=a.nextSibling)if(a.nodeType==1){if(S(a,b)==c)return a;if(!e){var d=rb(a,c,e,b);if(d)return d}}}f.C=rb;function Q(a,d,f,b){b=b||"u";var c=[];for(a=a?a.firstChild:i;a;a=a.nextSibling)if(a.nodeType==1){S(a,b)==d&&c.push(a);if(!f){var e=Q(a,d,f,b);if(e.length)c=c.concat(e)}}return c}function lb(a,c,d){for(a=a?a.firstChild:i;a;a=a.nextSibling)if(a.nodeType==1){if(a.tagName==c)return a;if(!d){var b=lb(a,c,d);if(b)return b}}}f.cf=lb;function db(a,c,e){var b=[];for(a=a?a.firstChild:i;a;a=a.nextSibling)if(a.nodeType==1){(!c||a.tagName==c)&&b.push(a);if(!e){var d=db(a,c,e);if(d.length)b=b.concat(d)}}return b}f.of=db;f.mf=function(b,a){return b.getElementsByTagName(a)};function C(){var e=arguments,d,c,b,a,g=1&e[0],f=1+g;d=e[f-1]||{};for(;f-1;f--){var d=c[f],e=V(i);w(e,w(d));a.Vb(e,d.style.cssText);a.Wb(e,d);a.wb(d)}return b};function Db(b){var q=this,o="",r=["av","pv","ds","dn"],g=[],p,k=0,h=0,d=0;function i(){H(b,p,g[d||k||h&2||h]);a.cb(b,"pointer-events",d?"none":"")}function c(){k=0;i();f.I(e,"mouseup",c);f.I(e,"touchend",c);f.I(e,"touchcancel",c)}function n(a){if(d)f.Fb(a);else{k=4;i();f.c(e,"mouseup",c);f.c(e,"touchend",c);f.c(e,"touchcancel",c)}}q.Ic=function(a){if(a!=j){h=a&2||a&1;i()}else return h};q.$Enable=function(a){if(a==j)return!d;d=a?0:3;i()};b=f.hb(b);var l=a.Oe(w(b));if(l)o=l.shift();m(r,function(a){g.push(o+a)});p=Z(" ",g);g.unshift("");f.c(b,"mousedown",n);f.c(b,"touchstart",n)}f.Ub=function(a){return new Db(a)};f.cb=E;f.ab=o("overflow");f.B=o("top",2);f.z=o("left",2);f.o=o("width",2);f.n=o("height",2);f.Vc=o("marginLeft",2);f.Uc=o("marginTop",2);f.E=o("position");f.N=o("display");f.H=o("zIndex",1);f.rb=function(b,a,c){if(a!=j)Bb(b,a,c);else return Ab(b)};f.Vb=function(a,b){if(b!=j)a.style.cssText=b;else return a.style.cssText};var R={$Opacity:f.rb,$Top:f.B,$Left:f.z,db:f.o,eb:f.n,xb:f.E,yg:f.N,$ZIndex:f.H},u;function J(){if(!u)u=C({zg:f.Uc,Ag:f.Vc,$Clip:f.Ve,kc:f.me},R);return u}function pb(){J();u.kc=u.kc;return u}f.ce=J;f.Wd=pb;f.Vd=function(c,b){J();var a={};m(b,function(d,b){if(R[b])a[b]=R[b](c)});return a};f.L=function(c,b){var a=J();m(b,function(d,b){a[b]&&a[b](c,d)})};f.Ad=function(b,a){pb();f.L(b,a)};var F=new function(){var a=this;function b(d,g){for(var j=d[0].length,i=d.length,h=g[0].length,f=[],c=0;c=j||d<=f))d=((d-f)%r+r)%r+f;if(!E||x||i||l!=d){var g=b.min(d,j);g=b.max(g,f);if(!E||x||i||g!=n){if(K){var h=(g-m)/(z||1);if(k.$Reverse)h=1-h;var p=a.td(P,K,h,I,H,J,k);a.e(p,function(b,a){C[a]&&C[a](R,b)})}e.rc(n-m,g-m);n=g;a.e(y,function(b,c){var a=o=p*q)c=p;w(c);if(!x&&c*q>=p*q)N(D);else t(L)}}function v(d,g,h){if(!s){s=c;x=h;D=g;d=b.max(d,f);d=b.min(d,j);p=d;q=p=0&&b=0&&h=0&&b=0&&cf||d>h){switch(e){case j:case m:a++;break;case k:case l:case o:case i:b++;break;case p:case n:default:a--}if(a<0||b<0||a>f||b>h){switch(e){case j:case m:a=f;b++;break;case o:case i:b=h;a++;break;case k:case l:b=h;a--;break;case p:case n:default:a=0;b++}if(b>h)b=h;else if(b<0)b=0;else if(a>f)a=f;else if(a<0)a=0}d=b;c=a}}return r};h.$FormationSquare=function(i){var a=i.$Cols||1,c=i.$Rows||1,j=[],d,e,f,h,k;f=ac?(a-c)/2:0;k=b.round(b.max(a/2,c/2))+1;for(d=0;d1||d.$Clip;if(d.$Zoom||d.$Rotate){var H=c;if(a.Q())if(d.$Cols*d.$Rows>1)H=g;else I=g;if(H){e.$Zoom=d.$Zoom?d.$Zoom-1:1;f.$Zoom=1;if(a.Q()||a.vc())e.$Zoom=b.min(e.$Zoom,2);var N=d.$Rotate;e.$Rotate=N*360*(x?-1:1);f.$Rotate=0}}if(I){if(d.$Clip){var w=d.$ScaleClip||1,i=t.Bb={};if(C&&z){i.$Top=h.eb/2*w;i.$Bottom=-i.$Top}else if(C)i.$Bottom=-h.eb*w;else if(z)i.$Top=h.eb*w;if(B&&A){i.$Left=h.db/2*w;i.$Right=-i.$Left}else if(B)i.$Right=-h.db*w;else if(A)i.$Left=h.db*w}r.$Clip=t;f.$Clip=h[v]}var L=o?1:-1,M=s?1:-1;if(d.x)e.$Left+=n*d.x*L;if(d.y)e.$Top+=l*d.y*M;a.e(e,function(b,c){if(a.Pc(b))if(b!=f[c])r[c]=b-f[c]});u[v]=k?f:e;var D=d.Od,y=b.round(m*d.$Delay/d.$Interval);j[v]=new Array(y);j[v].Cd=y;j[v].zd=y+D-1;for(var F=0;F<=D;F++){var E=a.td(f,r,F/D,d.$Easing,d.$During,d.$Round,{$Move:d.$Move,$OriginalWidth:n,$OriginalHeight:l});E.$ZIndex=E.$ZIndex||1;j[v].push(E)}})});o.reverse();a.e(o,function(b){a.e(b,function(c){var f=c[0],e=c[1],d=f+","+e,b=i;if(e||f)b=a.O(i);a.L(b,u[d]);a.ab(b,"hidden");a.E(b,"absolute");A.Zd(b);m[d]=b;a.A(b,!k)})})}function v(){var a=this,b=0;k.call(a,0,u);a.Gb=function(c,a){if(a-b>j){b=a;e&&e.Ob(a);h&&h.Ob(a)}};a.nb=r}f.Hd=function(){var a=0,c=t.$Transitions,d=c.length;if(w)a=x++%d;else a=b.floor(b.random()*d);c[a]&&(c[a].Z=a);return c[a]};f.Dd=function(w,x,i,k,a){r=a;a=m(a,j);var g=k.id,d=i.id;g["no-image"]=!k.Tb;d["no-image"]=!i.Tb;var l=g,n=d,v=a,c=a.$Brother||m({},j);if(!a.$SlideOut){l=d;n=g}var t=c.$Shift||0;h=new p(o,n,c,b.max(t-c.$Interval,0),s,q);e=new p(o,l,v,b.max(c.$Interval-t,0),s,q);h.Ob(0);e.Ob(0);u=b.max(h.Mc,e.Mc);f.Z=w};f.Db=function(){o.Db();h=i;e=i};f.Jd=function(){var a=i;if(e)a=new v;return a};if(a.Q()||a.vc()||y&&a.oc()<537)j=16;l.call(f);k.call(f,-1e7,1e7)};var f=h.$JssorSlider$=function(q,ec){var n=this;function Dc(){var a=this;k.call(a,-1e8,2e8);a.Td=function(){var c=a.Eb(),d=b.floor(c),f=s(d),e=c-b.floor(c);return{Z:f,Md:d,xb:e}};a.Gb=function(d,a){var e=b.floor(a);if(e!=a&&a>d)e++;Tb(e,c);n.i(f.$EVT_POSITION_CHANGE,s(a),s(d),a,d)}}function Cc(){var b=this;k.call(b,0,0,{ed:r});a.e(D,function(a){A&1&&a.Fd(r);b.nc(a);a.$Shift(hb/ac)})}function Bc(){var a=this,b=Sb.$Elmt;k.call(a,-1,2,{$Easing:d.$EaseLinear,wc:{xb:Yb},ed:r},b,{xb:1},{xb:-2});a.Nb=b}function pc(m,l){var a=this,d,e,h,j,b;k.call(a,-1e8,2e8,{md:100});a.ld=function(){Q=c;U=i;n.i(f.$EVT_SWIPE_START,s(w.T()),w.T())};a.kd=function(){Q=g;j=g;var a=w.Td();n.i(f.$EVT_SWIPE_END,s(w.T()),w.T());!a.xb&&Fc(a.Md,t)};a.Gb=function(g,f){var a;if(j)a=b;else{a=e;if(h){var c=f/h;a=p.$SlideEasing(c)*(e-d)+d}}w.v(a)};a.Qb=function(b,f,c,g){d=b;e=f;h=c;w.v(b);a.v(0);a.fd(c,g)};a.Nd=function(d){j=c;b=d;a.$Play(d,i,c)};a.Sd=function(a){b=a};w=new Dc;w.X(m);w.X(l)}function qc(){var c=this,b=Wb();a.H(b,0);a.cb(b,"pointerEvents","none");c.$Elmt=b;c.Zd=function(c){a.D(b,c);a.A(b)};c.Db=function(){a.K(b);a.jc(b)}}function zc(o,e){var d=this,q,x,N,y,j,C=[],H,v,W,K,Q,G,h,w,m;k.call(d,-u,u+1,{});function F(a){x&&x.Sb();q&&q.Sb();V(o,a);G=c;q=new L.$Class(o,L,1);x=new L.$Class(o,L);x.v(0);q.v(0)}function Y(){q.ZbJ||b>I)){var i=g,q=J/I*b/h;if(p.$FillMode&1)i=q>1;else if(p.$FillMode&2)i=q<1;l=i?h*I/b:J;k=i?I:b*J/h}a.o(j,l);a.n(j,k);a.B(j,(I-k)/2);a.z(j,(J-l)/2)}a.E(j,"absolute");n.i(f.$EVT_LOAD_END,e)}}a.K(r);o&&o(d)}function X(b,c,f,g){if(g==U&&t==e&&R)if(!Ec){var a=s(b);B.Dd(a,e,c,d,f);c.Xe();ab.Jb(a,1);ab.v(a);z.Qb(b,b,0)}}function bb(b){if(b==U&&t==e){if(!h){var a=i;if(B)if(B.Z==e)a=B.Jd();else B.Db();Y();h=new xc(o,e,a,d.Te(),d.Le());h.Jc(m)}!h.$IsPlaying()&&h.zc()}}function T(f,c,g){if(f==e){if(f!=c)D[c]&&D[c].Ue();else!g&&h&&h.Ye();m&&m.$Enable();var j=U=a.J();d.Ab(a.F(i,bb,j))}else{var l=b.abs(e-f),k=u+p.$LazyLoading-1;(!Q||l<=k)&&d.Ab()}}function cb(){if(t==e&&h){h.W();m&&m.$Quit();m&&m.$Disable();h.Oc()}}function fb(){t==e&&h&&h.W()}function Z(a){!M&&n.i(f.$EVT_CLICK,e,a)}function P(){m=w.pInstance;h&&h.Jc(m)}d.Ab=function(d,b){b=b||y;if(C.length&&!K){a.A(b);if(!W){W=c;n.i(f.$EVT_LOAD_START,e);a.e(C,function(b){if(!a.M(b,"src")){b.src=a.t(b,"src2");a.N(b,b["display-origin"])}})}a.bf(C,j,a.F(i,O,d,b))}else O(d,b)};d.df=function(){var g=e;if(p.$AutoPlaySteps<0)g-=r;var c=g+p.$AutoPlaySteps*vc;if(A&2)c=s(c);if(!(A&1))c=b.max(0,b.min(c,r-u));if(c!=e){if(B){var d=B.Hd(r);if(d){var h=U=a.J(),f=D[s(c)];return f.Ab(a.F(i,X,c,f,d,h),y)}}pb(c)}};d.bc=function(){T(e,e,c)};d.Ue=function(){m&&m.$Quit();m&&m.$Disable();d.rd();h&&h.ff();h=i;F()};d.Xe=function(){a.K(o)};d.rd=function(){a.A(o)};d.ef=function(){m&&m.$Enable()};function V(b,e,d){if(a.M(b,"jssor-slider"))return;d=d||0;if(!G){if(b.tagName=="IMG"){C.push(b);if(!a.M(b,"src")){Q=c;b["display-origin"]=a.N(b);a.K(b)}}a.Q()&&a.H(b,(a.H(b)||0)+1);if(p.$HWA&&a.oc())(a.oc()<534||!eb&&!a.ee())&&a.ne(b)}var f=a.V(b);a.e(f,function(f){var i=f.tagName,k=a.t(f,"u");if(k=="player"&&!w){w=f;if(w.pInstance)P();else a.c(w,"dataavailable",P)}if(k=="caption"){if(!a.Wc()&&!e){var h=a.O(f,g,c);a.Wb(h,f,b);a.wb(f,b);f=h;e=c}}else if(!G&&!d&&!j){if(i=="A"){if(a.t(f,"u")=="image")j=a.cf(f,"IMG");else j=a.C(f,"image",c);if(j){H=f;a.L(H,S);v=a.O(H,c);a.N(v,"block");a.L(v,S);a.rb(v,0);a.cb(v,"backgroundColor","#000")}}else if(i=="IMG"&&a.t(f,"u")=="image")j=f;if(j){j.border=0;a.L(j,S)}}V(f,e,d+1)})}d.rc=function(c,b){var a=u-b;Yb(N,a)};d.Te=function(){return q};d.Le=function(){return x};d.Z=e;l.call(d);var E=a.C(o,"thumb",c);if(E){d.hf=a.O(E);a.Kc(E,"id");a.K(E)}a.A(o);y=a.O(db);a.H(y,1e3);a.c(o,"click",Z);F(c);d.Tb=j;d.qd=v;d.id=o;d.Nb=N=o;a.D(N,y);n.$On(203,T);n.$On(28,fb);n.$On(24,cb)}function xc(G,i,p,u,s){var b=this,l=0,w=0,m,h,d,e,j,q,v,r,o=D[i];k.call(b,0,0);function x(){a.jc(O);cc&&j&&o.qd&&a.D(O,o.qd);a.A(O,!j&&o.Tb)}function y(){if(q){q=g;n.i(f.$EVT_ROLLBACK_END,i,d,l,h,d,e);b.v(h)}b.zc()}function z(a){r=a;b.W();b.zc()}b.zc=function(){var a=b.Eb();if(!C&&!Q&&!r&&t==i){if(!a){if(m&&!j){j=c;b.Oc(c);n.i(f.$EVT_SLIDESHOW_START,i,l,w,m,e)}x()}var g,p=f.$EVT_STATE_CHANGE;if(a!=e)if(a==d)g=e;else if(a==h)g=d;else if(!a)g=h;else if(a>d){q=c;g=d;p=f.$EVT_ROLLBACK_START}else g=b.jd();n.i(p,i,a,l,h,d,e);var k=R&&(!E||F);if(a==e)(d!=e&&!(E&12)||k)&&o.df();else(k||a!=d)&&b.fd(g,y)}};b.Ye=function(){d==e&&d==b.Eb()&&b.v(h)};b.ff=function(){B&&B.Z==i&&B.Db();var a=b.Eb();a=m){j=g;x();o.rd();B.Db();n.i(f.$EVT_SLIDESHOW_END,i,l,w,m,e)}n.i(f.$EVT_PROGRESS_CHANGE,i,a,l,h,d,e)};b.Jc=function(a){if(a&&!v){v=a;a.$On($JssorPlayer$.be,z)}};p&&b.nc(p);m=b.Y();b.Y();b.nc(u);h=u.Y();d=h+(a.ec(a.t(G,"idle"))||oc);s.$Shift(d);b.X(s);e=b.Y()}function Yb(g,f){var e=x>0?x:ib,c=Bb*f*(e&1),d=Cb*f*(e>>1&1);c=b.round(c);d=b.round(d);a.z(g,c);a.B(g,d)}function Ob(){rb=Q;Kb=z.jd();G=w.T()}function fc(){Ob();if(C||!F&&E&12){z.W();n.i(f.de)}}function dc(e){if(!C&&(F||!(E&12))&&!z.$IsPlaying()){var c=w.T(),a=b.ceil(G);if(e&&b.abs(H)>=p.$MinDragOffsetToSlide){a=b.ceil(c);a+=gb}if(!(A&1))a=b.min(r-u,b.max(a,0));var d=b.abs(a-c);d=1-b.pow(1-d,5);if(!M&&rb)z.Kd(Kb);else if(c==a){vb.ef();vb.bc()}else z.Qb(c,a,d*Ub)}}function Ib(b){!a.t(a.Ac(b),"nodrag")&&a.Fb(b)}function tc(a){Xb(a,1)}function Xb(b,d){b=a.Xc(b);var k=a.Ac(b);if(!K&&!a.t(k,"nodrag")&&uc()&&(!d||b.touches.length==1)){C=c;Ab=g;U=i;a.c(e,d?"touchmove":"mousemove",Db);a.J();M=0;fc();if(!rb)x=0;if(d){var j=b.touches[0];wb=j.clientX;xb=j.clientY}else{var h=a.Yc(b);wb=h.x;xb=h.y}H=0;cb=0;gb=0;n.i(f.$EVT_DRAG_START,s(G),G,b)}}function Db(e){if(C){e=a.Xc(e);var f;if(e.type!="mousemove"){var l=e.touches[0];f={x:l.clientX,y:l.clientY}}else f=a.Yc(e);if(f){var j=f.x-wb,k=f.y-xb;if(b.floor(G)!=G)x=x||ib&K;if((j||k)&&!x){if(K==3)if(b.abs(k)>b.abs(j))x=2;else x=1;else x=K;if(lb&&x==1&&b.abs(k)-b.abs(j)>3)Ab=c}if(x){var d=k,i=Cb;if(x==1){d=j;i=Bb}if(!(A&1)){if(d>0){var g=i*t,h=d-g;if(h>0)d=g+b.sqrt(h)*5}if(d<0){var g=i*(r-u-t),h=-d-g;if(h>0)d=-g-b.sqrt(h)*5}}if(H-cb<-2)gb=0;else if(H-cb>2)gb=-1;cb=H;H=d;ub=G-H/i/(Z||1);if(H&&x&&!Ab){a.Fb(e);if(!Q)z.Nd(ub);else z.Sd(ub)}}}}}function ob(){rc();if(C){C=g;a.J();a.I(e,"mousemove",Db);a.I(e,"touchmove",Db);M=H;z.W();var b=w.T();n.i(f.$EVT_DRAG_END,s(b),b,s(G),G);E&12&&Ob();dc(c)}}function jc(c){if(M){a.af(c);var b=a.Ac(c);while(b&&v!==b){b.tagName=="A"&&a.Fb(c);try{b=b.parentNode}catch(d){break}}}}function nc(a){D[t];t=s(a);vb=D[t];Tb(a);return t}function Fc(a,b){x=0;nc(a);n.i(f.$EVT_PARK,s(a),b)}function Tb(b,c){N=b;a.e(P,function(a){a.qc(s(b),b,c)})}function uc(){var b=f.pd||0,a=Y;if(lb)a&1&&(a&=1);f.pd|=a;return K=a&~b}function rc(){if(K){f.pd&=~Y;K=0}}function Wb(){var b=a.bb();a.L(b,S);a.E(b,"absolute");return b}function s(a){return(a%r+r)%r}function kc(d,c){var a=d;if(c){if(!A){a=b.min(b.max(a+N,0),r-u);c=g}else if(A&2){a=s(a+N);c=g}}else if(A)a=n.od(a);pb(a,p.$SlideDuration,c)}function zb(){a.e(P,function(a){a.Bc(a.Xb.$ChanceToShow<=F)})}function hc(){if(!F){F=1;zb();if(!C){E&12&&dc();E&3&&D[t].bc()}}}function gc(){if(F){F=0;zb();C||!(E&12)||fc()}}function ic(){S={db:J,eb:I,$Top:0,$Left:0};a.e(V,function(b){a.L(b,S);a.E(b,"absolute");/*a.ab(b,"hidden");*/a.K(b)});a.L(db,S)}function nb(b,a){pb(b,a,c)}function pb(f,e,k){if(Qb&&(!C&&(F||!(E&12))||p.$NaviQuitDrag)){Q=c;C=g;z.W();if(e==j)e=Ub;var d=Eb.Eb(),a=f;if(k){a=d+f;if(f>0)a=b.ceil(a);else a=b.floor(a)}if(A&2)a=s(a);if(!(A&1))a=b.max(0,b.min(a,r-u));var i=(a-d)%r;a=d+i;var h=d==a?0:e*b.abs(i);h=b.min(h,e*u*1.5);z.Qb(d,a,h||1)}}n.$PlayTo=pb;n.$GoTo=function(a){w.v(a)};n.$Next=function(){nb(1)};n.$Prev=function(){nb(-1)};n.$Pause=function(){R=g};n.$Play=function(){if(!R){R=c;D[t]&&D[t].bc()}};n.$SetSlideshowTransitions=function(a){p.$SlideshowOptions.$Transitions=a};n.$SetCaptionTransitions=function(b){L.$CaptionTransitions=b;L.Zb=a.J()};n.$SlidesCount=function(){return V.length};n.$CurrentIndex=function(){return t};n.$IsAutoPlaying=function(){return R};n.$IsDragging=function(){return C};n.$IsSliding=function(){return Q};n.$IsMouseOver=function(){return!F};n.$LastDragSucceded=function(){return M};function X(){return a.o(y||q)}function kb(){return a.n(y||q)}n.$OriginalWidth=n.$GetOriginalWidth=X;n.$OriginalHeight=n.$GetOriginalHeight=kb;function Gb(c,d){if(c==j)return a.o(q);if(!y){var b=a.bb(e);a.Ec(b,a.Ec(q));a.Vb(b,a.Vb(q));a.N(b,"block");a.E(b,"relative");a.B(b,0);a.z(b,0);a.ab(b,"visible");y=a.bb(e);a.E(y,"absolute");a.B(y,0);a.z(y,0);a.o(y,a.o(q));a.n(y,a.n(q));a.le(y,"0 0");a.D(y,b);var h=a.V(q);a.D(q,y);a.cb(q,"backgroundImage","");a.e(h,function(c){a.D(a.t(c,"noscale")?q:b,c)})}Z=c/(d?a.n:a.o)(y);a.oe(y,Z);var g=d?Z*X():c,f=d?c:Z*kb();a.o(q,g);a.n(q,f);a.e(P,function(a){a.hc(g,f)})}n.$ScaleHeight=n.$GetScaleHeight=function(b){if(b==j)return a.n(q);Gb(b,c)};n.$ScaleWidth=n.$SetScaleWidth=n.$GetScaleWidth=Gb;n.od=function(a){var d=b.ceil(s(hb/ac)),c=s(a-N+d);if(c>u){if(a-N>r/2)a-=r;else if(a-N<=-r/2)a+=r}else a=N+c-d;return a};l.call(n);n.$Elmt=q=a.hb(q);var p=a.l({$FillMode:0,$LazyLoading:1,$StartIndex:0,$AutoPlay:g,$Loop:1,$HWA:c,$NaviQuitDrag:c,$AutoPlaySteps:1,$AutoPlayInterval:3e3,$PauseOnHover:1,$SlideDuration:500,$SlideEasing:d.$EaseOutQuad,$MinDragOffsetToSlide:20,$SlideSpacing:0,$DisplayPieces:1,$ParkingPosition:0,$UISearchMode:1,$PlayOrientation:1,$DragOrientation:1},ec);if(p.$Idle!=j)p.$AutoPlayInterval=p.$Idle;if(p.$Cols!=j)p.$DisplayPieces=p.$Cols;var ib=p.$PlayOrientation&3,vc=(p.$PlayOrientation&4)/-4||1,fb=p.$SlideshowOptions,L=a.l({$Class:o,$PlayInMode:1,$PlayOutMode:1},p.$CaptionSliderOptions),sb=p.$BulletNavigatorOptions,W=p.$ArrowNavigatorOptions,bb=p.$ThumbnailNavigatorOptions,T=!p.$UISearchMode,y,v=a.C(q,"slides",T),db=a.C(q,"loading",T)||a.bb(e),Jb=a.C(q,"navigator",T),bc=a.C(q,"arrowleft",T),Zb=a.C(q,"arrowright",T),Hb=a.C(q,"thumbnavigator",T),mc=a.o(v),lc=a.n(v),S,V=[],wc=a.V(v);a.e(wc,function(b){if(b.tagName=="DIV"&&!a.t(b,"u"))V.push(b);else a.Q()&&a.H(b,(a.H(b)||0)+1)});var t=-1,N,vb,r=V.length,J=p.$SlideWidth||mc,I=p.$SlideHeight||lc,Vb=p.$SlideSpacing,Bb=J+Vb,Cb=I+Vb,ac=ib&1?Bb:Cb,u=b.min(p.$DisplayPieces,r),jb,x,K,Ab,P=[],Pb,Rb,Nb,cc,Ec,R,E=p.$PauseOnHover,oc=p.$AutoPlayInterval,Ub=p.$SlideDuration,tb,eb,hb,Qb=u1&&tb&&(!a.Wc()||a.Sc()>=8)}hb=eb||u>=r||!(A&1)?0:p.$ParkingPosition;Y=(u>1||hb?ib:-1)&p.$DragOrientation;var yb=v,D=[],B,O,Fb=a.he(),lb=Fb.ie,G,rb,Kb,ub;Fb.dd&&a.cb(yb,Fb.dd,([i,"pan-y","pan-x","none"])[Y]||"");ab=new Bc;if(eb)B=new tb(Sb,J,I,fb,lb);a.D(jb,ab.Nb);a.ab(v,"hidden");O=Wb();a.cb(O,"backgroundColor","#000");a.rb(O,0);a.Wb(O,yb.firstChild,yb);for(var qb=0;qb=t-j.$DisplayPieces);u=c}d.qc=function(b,a,c){if(c)e=a;else{e=b;r(u)}};d.Bc=r;var s;d.hc=function(i,d){if(!s||h.$Scale==g){var e=a.tb(b).clientWidth,d=a.tb(b).clientHeight;if(h.$AutoCenter&1){a.z(b,(e-q)/2);a.z(f,(e-q)/2)}if(h.$AutoCenter&2){a.B(b,(d-o)/2);a.B(f,(d-o)/2)}s=c}};var p;d.gc=function(d){t=d;e=0;if(!p){a.c(b,"click",a.F(i,n,-k));a.c(f,"click",a.F(i,n,k));a.Ub(b);a.Ub(f);p=c}};d.Xb=h=a.l({$Steps:1},j);k=h.$Steps;if(h.$Scale==g){a.M(b,"noscale",c);a.M(f,"noscale",c)}};h.$JssorThumbnailNavigator$=function(k,C){var h=this,z,q,d,w=[],A,y,n,r,s,u,t,p,v,e,o;l.call(h);k=a.hb(k);function B(l,e){var f=this,b,k,j;function n(){k.Ic(q==e)}function g(a){(a||!v.$LastDragSucceded())&&h.i(m.Mb,e)}f.Z=e;f.Hc=n;j=l.hf||l.Tb||a.bb();f.Nb=b=a.Dc(o,"thumbnailtemplate",j,c);k=a.Ub(b);d.$ActionMode&1&&a.c(b,"click",a.F(i,g,0));d.$ActionMode&2&&a.c(b,"mouseover",a.Rb(a.F(i,g,1),b))}h.qc=function(c,d,e){var a=q;q=c;a!=-1&&w[a].Hc();w[c].Hc();!e&&v.$PlayTo(v.od(b.floor(d/n)))};h.Bc=function(b){a.A(k,b)};h.hc=a.ac;var x;h.gc=function(F,C){if(!x){z=F;b.ceil(z/n);q=-1;p=b.min(p,C.length);var h=d.$Orientation&1,l=u+(u+r)*(n-1)*(1-h),j=t+(t+s)*(n-1)*h,o=l+(l+r)*(p-1)*h,m=j+(j+s)*(p-1)*(1-h);a.E(e,"absolute");a.ab(e,"hidden");d.$AutoCenter&1&&a.z(e,(A-o)/2);d.$AutoCenter&2&&a.B(e,(y-m)/2);a.o(e,o);a.n(e,m);var i=[];a.e(C,function(k,f){var g=new B(k,f),d=g.Nb,c=b.floor(f/n),j=f%n;a.z(d,(u+r)*j*(1-h));a.B(d,(t+s)*j*h);if(!i[c]){i[c]=a.bb();a.D(e,i[c])}a.D(i[c],d);w.push(g)});var E=a.l({$HWA:g,$AutoPlay:g,$NaviQuitDrag:g,$SlideWidth:l,$SlideHeight:j,$SlideSpacing:r*h+s*(1-h),$MinDragOffsetToSlide:12,$SlideDuration:200,$PauseOnHover:1,$PlayOrientation:d.$Orientation,$DragOrientation:d.$DisableDrag?0:d.$Orientation},d);v=new f(k,E);x=c}};h.Xb=d=a.l({$SpacingX:3,$SpacingY:3,$DisplayPieces:1,$Orientation:1,$AutoCenter:3,$ActionMode:1},C);if(d.$Rows!=j)d.$Lanes=d.$Rows;A=a.o(k);y=a.n(k);e=a.C(k,"slides",c);o=a.C(e,"prototype");u=a.o(o);t=a.n(o);a.wb(o,e);n=d.$Lanes||1;r=d.$SpacingX;s=d.$SpacingY;p=d.$DisplayPieces;d.$Scale==g&&a.M(k,"noscale",c)};function o(){k.call(this,0,0);this.Sb=a.ac}h.$JssorCaptionSlider$=function(p,h,f){var c=this,g,n=f?h.$PlayInMode:h.$PlayOutMode,e=h.$CaptionTransitions,o={nb:"t",$Delay:"d",$Duration:"du",x:"x",y:"y",$Rotate:"r",$Zoom:"z",$Opacity:"f",lb:"b"},d={Cb:function(b,a){if(!isNaN(a.ob))b=a.ob;else b*=a.ze;return b},$Opacity:function(b,a){return this.Cb(b-1,a)}};d.$Zoom=d.$Opacity;k.call(c,0,0);function l(r,m){var k=[],i,j=[],c=[];function h(c,d){var b={};a.e(o,function(g,h){var e=a.t(c,g+(d||""));if(e){var f={};if(g=="t")f.ob=e;else if(e.indexOf("%")+1)f.ze=a.ec(e)/100;else f.ob=a.ec(e);b[h]=f}});return b}function p(){return e[b.floor(b.random()*e.length)]}function g(f){var h;if(f=="*")h=p();else if(f){var d=e[a.Me(f)]||e[f];if(a.mc(d)){if(f!=i){i=f;c[f]=0;j[f]=d[b.floor(b.random()*d.length)]}else c[f]++;d=j[f];if(a.mc(d)){d=d.length&&d[c[f]%d.length];if(a.mc(d))d=d[b.floor(b.random()*d.length)]}}h=d;if(a.cd(h))h=g(h)}return h}var q=a.V(r);a.e(q,function(b){var c=[];c.$Elmt=b;var e=a.t(b,"u")=="caption";a.e(f?[0,3]:[2],function(k,o){if(e){var j,f;if(k!=2||!a.t(b,"t3")){f=h(b,k);if(k==2&&!f.nb){f.$Delay=f.$Delay||{ob:0};f=a.l(h(b,0),f)}}if(f&&f.nb){j=g(f.nb.ob);if(j){var i=a.l({$Delay:0},j);a.e(f,function(c,a){var b=(d[a]||d.Cb).apply(d,[i[a],f[a]]);if(!isNaN(b))i[a]=b});if(!o)if(f.lb)i.lb=f.lb.ob||0;else if(n&2)i.lb=0}}c.push(i)}if(m%2&&!o)c.V=l(b,m+1)});k.push(c)});return k}function m(w,c,z){var g={$Easing:c.$Easing,$Round:c.$Round,$During:c.$During,$Reverse:f&&!z},m=w,r=a.tb(w),l=a.o(m),j=a.n(m),y=a.o(r),x=a.n(r),h={},e={},i=c.$ScaleClip||1;if(c.$Opacity)e.$Opacity=1-c.$Opacity;g.$OriginalWidth=l;g.$OriginalHeight=j;if(c.$Zoom||c.$Rotate){e.$Zoom=(c.$Zoom||2)-2;if(a.Q()||a.vc())e.$Zoom=b.min(e.$Zoom,1);h.$Zoom=1;var B=c.$Rotate||0;e.$Rotate=B*360;h.$Rotate=0}else if(c.$Clip){var s={$Top:0,$Right:l,$Bottom:j,$Left:0},v=a.l({},s),d=v.Bb={},u=c.$Clip&4,p=c.$Clip&8,t=c.$Clip&1,q=c.$Clip&2;if(u&&p){d.$Top=j/2*i;d.$Bottom=-d.$Top}else if(u)d.$Bottom=-j*i;else if(p)d.$Top=j*i;if(t&&q){d.$Left=l/2*i;d.$Right=-d.$Left}else if(t)d.$Right=-l*i;else if(q)d.$Left=l*i;g.$Move=c.$Move;e.$Clip=v;h.$Clip=s}var n=0,o=0;if(c.x)n-=y*c.x;if(c.y)o-=x*c.y;if(n||o||g.$Move){e.$Left=n;e.$Top=o}var A=c.$Duration;h=a.l(h,a.Vd(m,e));g.wc=a.Wd();return new k(c.$Delay,A,g,m,h,e)}function i(b,d){a.e(d,function(a){var e,h=a.$Elmt,d=a[0],k=a[1];if(d){e=m(h,d);b=e.Jb(d.lb==j?b:d.lb,1)}b=i(b,a.V);if(k){var f=m(h,k,1);f.Jb(b,1);c.X(f);g.X(f)}e&&c.X(e)});return b}c.Sb=function(){c.v(c.Y()*(f||0));g.v(0)};g=new k(0,0);i(0,n?l(p,1):[])};})(window,document,Math,null,true,false) \ No newline at end of file diff --git a/frontend/web/libraries/aaa.php b/frontend/web/libraries/aaa.php new file mode 100755 index 0000000..a32ce43 --- /dev/null +++ b/frontend/web/libraries/aaa.php @@ -0,0 +1,7 @@ +a)?(g("html").addClass("lt-ie9"),!0):!1}();Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,d=[].slice;if("function"!=typeof b)throw new TypeError;var c=d.call(arguments,1),e=function(){if(this instanceof +e){var f=function(){};f.prototype=b.prototype;var f=new f,l=b.apply(f,c.concat(d.call(arguments)));return Object(l)===l?l:f}return b.apply(a,c.concat(d.call(arguments)))};return e});Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var d;if(null==this)throw new TypeError('"this" is null or not defined');var c=Object(this),e=c.length>>>0;if(0===e)return-1;d=+b||0;Infinity===Math.abs(d)&&(d=0);if(d>=e)return-1;for(d=Math.max(0<=d?d:e-Math.abs(d),0);d');this.$cache.input.prop("readonly",!0);this.$cache.cont=this.$cache.input.prev();this.result.slider=this.$cache.cont;this.$cache.cont.html('01000'); +this.$cache.rs=this.$cache.cont.find(".irs");this.$cache.min=this.$cache.cont.find(".irs-min");this.$cache.max=this.$cache.cont.find(".irs-max");this.$cache.from=this.$cache.cont.find(".irs-from");this.$cache.to=this.$cache.cont.find(".irs-to");this.$cache.single=this.$cache.cont.find(".irs-single");this.$cache.bar=this.$cache.cont.find(".irs-bar");this.$cache.line=this.$cache.cont.find(".irs-line");this.$cache.grid=this.$cache.cont.find(".irs-grid");"single"===this.options.type?(this.$cache.cont.append(''), +this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.s_from=this.$cache.cont.find(".from"), +this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler());this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none");this.appendGrid();this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.cont.removeClass("irs-disabled"),this.$cache.input[0].disabled= +!1,this.bindEvents());this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var a=this.options.max,b=this.options.to;this.options.from>this.options.min&&b===a?this.$cache.s_from.addClass("type_last"):b');this.$cache.cont.addClass("irs-disabled")},remove:function(){this.$cache.cont.remove();this.$cache.cont=null;this.$cache.line.off("keydown.irs_"+this.plugin_count);this.$cache.body.off("touchmove.irs_"+this.plugin_count);this.$cache.body.off("mousemove.irs_"+this.plugin_count);this.$cache.win.off("touchend.irs_"+ +this.plugin_count);this.$cache.win.off("mouseup.irs_"+this.plugin_count);p&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count));this.$cache.grid_labels=[];this.coords.big=[];this.coords.big_w=[];this.coords.big_p=[];this.coords.big_x=[];cancelAnimationFrame(this.raf_id)},bindEvents:function(){if(!this.no_diapason){this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this));this.$cache.body.on("mousemove.irs_"+this.plugin_count, +this.pointerMove.bind(this));this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this, +"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")));"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")), +this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+ +this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")), +this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+ +this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")));if(this.options.keyboard)this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard"));p&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this)))}}, +pointerMove:function(a){this.dragging&&(this.coords.x_pointer=(a.pageX||a.originalEvent.touches&&a.originalEvent.touches[0].pageX)-this.coords.x_gap,this.calc())},pointerUp:function(a){if(this.current_plugin===this.plugin_count&&this.is_active){this.is_active=!1;this.$cache.cont.find(".state_hover").removeClass("state_hover");this.force_redraw=!0;p&&g("*").prop("unselectable",!1);this.updateScene();this.restoreOriginalMinInterval();if(g.contains(this.$cache.cont[0],a.target)||this.dragging)this.is_finish= +!0,this.callOnFinish();this.dragging=!1}},pointerDown:function(a,b){b.preventDefault();var d=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&("both"===a&&this.setTempMinInterval(),a||(a=this.target),this.current_plugin=this.plugin_count,this.target=a,this.dragging=this.is_active=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=d-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(a),p&&g("*").prop("unselectable",!0),this.$cache.line.trigger("focus"), +this.updateScene())},pointerClick:function(a,b){b.preventDefault();var d=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(this.current_plugin=this.plugin_count,this.target=a,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(d-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(a,b){if(!(this.current_plugin!==this.plugin_count||b.altKey||b.ctrlKey||b.shiftKey||b.metaKey)){switch(b.which){case 83:case 65:case 40:case 37:b.preventDefault(); +this.moveByKey(!1);break;case 87:case 68:case 38:case 39:b.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(a){var b=this.coords.p_pointer,b=a?b+this.options.keyboard_step:b-this.options.keyboard_step;this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*b);this.is_key=!0;this.calc()},setMinMax:function(){this.options&&(this.options.hide_min_max?(this.$cache.min[0].style.display="none",this.$cache.max[0].style.display="none"):(this.options.values.length?(this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])), +this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]))):(this.$cache.min.html(this.decorate(this._prettify(this.options.min),this.options.min)),this.$cache.max.html(this.decorate(this._prettify(this.options.max),this.options.max))),this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)))},setTempMinInterval:function(){var a=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval); +this.options.min_interval=a},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(a){if(this.options){this.calc_count++;if(10===this.calc_count||a)this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent();if(this.coords.w_rs){this.calcPointerPercent();a=this.getHandleX();"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,a=this.getHandleX(),this.target= +this.options.drag_interval?"both_one":this.chooseHandle(a));switch(this.target){case "base":var b=(this.options.max-this.options.min)/100;a=(this.result.from-this.options.min)/b;b=(this.result.to-this.options.min)/b;this.coords.p_single_real=this.toFixed(a);this.coords.p_from_real=this.toFixed(a);this.coords.p_to_real=this.toFixed(b);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real, +this.options.from_min,this.options.from_max);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);this.target=null;break;case "single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(a);this.coords.p_single_real= +this.calcWithStep(this.coords.p_single_real);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case "from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(a);this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real);this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real); +this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case "to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(a);this.coords.p_to_real= +this.calcWithStep(this.coords.p_to_real);this.coords.p_to_realb&&(b=0,d=b+a);100this.coords.x_pointer||isNaN(this.coords.x_pointer)? +this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(a){return a/(100-this.coords.p_handle)*100},convertToFakePercent:function(a){return a/100*(100-this.coords.p_handle)},getHandleX:function(){var a=100-this.coords.p_handle,b=this.toFixed(this.coords.p_pointer-this.coords.p_gap);0>b?b=0:b>a&&(b=a);return b},calcHandlePercent:function(){this.coords.w_handle= +"single"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1);this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(a){return"single"===this.options.type?"single":a>=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max= +this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left= +this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left= +this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&& +(cancelAnimationFrame(this.raf_id),this.raf_id=null);clearTimeout(this.update_tm);this.update_tm=null;this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1);if(this.coords.w_rs){this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0);if(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)this.setMinMax(), +this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow();if(this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)){if(this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key){this.drawLabels();this.$cache.bar[0].style.left=this.coords.p_bar_x+"%";this.$cache.bar[0].style.width=this.coords.p_bar_w+"%";if("single"===this.options.type)this.$cache.s_single[0].style.left= +this.coords.p_single_fake+"%",this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from);else{this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%";this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%";if(this.old_from!==this.result.from||this.force_redraw)this.$cache.from[0].style.left=this.labels.p_from_left+ +"%";if(this.old_to!==this.result.to||this.force_redraw)this.$cache.to[0].style.left=this.labels.p_to_left+"%";this.$cache.single[0].style.left=this.labels.p_single_left+"%";this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to);this.$cache.input.data("from",this.result.from);this.$cache.input.data("to",this.result.to)}this.old_from=== +this.result.from&&this.old_to===this.result.to||this.is_start||this.$cache.input.trigger("change");this.old_from=this.result.from;this.old_to=this.result.to;this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange();if(this.is_key||this.is_click)this.is_click=this.is_key=!1,this.callOnFinish();this.is_finish=this.is_resize=this.is_update=!1}this.force_redraw=this.is_click=this.is_key=this.is_start=!1}}},drawLabels:function(){if(this.options){var a=this.options.values.length, +b=this.options.p_values,d;if(!this.options.hide_from_to)if("single"===this.options.type)a=a?this.decorate(b[this.result.from]):this.decorate(this._prettify(this.result.from),this.result.from),this.$cache.single.html(a),this.calcLabels(),this.$cache.min[0].style.visibility=this.labels.p_single_left100-this.labels.p_max-1?"hidden":"visible";else{a?(this.options.decorate_both? +(a=this.decorate(b[this.result.from]),a+=this.options.values_separator,a+=this.decorate(b[this.result.to])):a=this.decorate(b[this.result.from]+this.options.values_separator+b[this.result.to]),d=this.decorate(b[this.result.from]),b=this.decorate(b[this.result.to])):(this.options.decorate_both?(a=this.decorate(this._prettify(this.result.from),this.result.from),a+=this.options.values_separator,a+=this.decorate(this._prettify(this.result.to),this.result.to)):a=this.decorate(this._prettify(this.result.from)+ +this.options.values_separator+this._prettify(this.result.to),this.result.to),d=this.decorate(this._prettify(this.result.from),this.result.from),b=this.decorate(this._prettify(this.result.to),this.result.to));this.$cache.single.html(a);this.$cache.from.html(d);this.$cache.to.html(b);this.calcLabels();b=Math.min(this.labels.p_single_left,this.labels.p_from_left);a=this.labels.p_single_left+this.labels.p_single_fake;d=this.labels.p_to_left+this.labels.p_to_fake;var c=Math.max(a,d);this.labels.p_from_left+ +this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",c=d):(this.$cache.from[0].style.visibility= +"hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",c=Math.max(a,d))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden");this.$cache.min[0].style.visibility=b100-this.labels.p_max-1?"hidden":"visible"}}},drawShadow:function(){var a=this.options,b=this.$cache,d="number"===typeof a.from_min&& +!isNaN(a.from_min),c="number"===typeof a.from_max&&!isNaN(a.from_max),e="number"===typeof a.to_min&&!isNaN(a.to_min),f="number"===typeof a.to_max&&!isNaN(a.to_max);"single"===a.type?a.from_shadow&&(d||c)?(d=this.convertToPercent(d?a.from_min:a.min),c=this.convertToPercent(c?a.from_max:a.max)-d,d=this.toFixed(d-this.coords.p_handle/100*d),c=this.toFixed(c-this.coords.p_handle/100*c),d+=this.coords.p_handle/2,b.shad_single[0].style.display="block",b.shad_single[0].style.left=d+"%",b.shad_single[0].style.width= +c+"%"):b.shad_single[0].style.display="none":(a.from_shadow&&(d||c)?(d=this.convertToPercent(d?a.from_min:a.min),c=this.convertToPercent(c?a.from_max:a.max)-d,d=this.toFixed(d-this.coords.p_handle/100*d),c=this.toFixed(c-this.coords.p_handle/100*c),d+=this.coords.p_handle/2,b.shad_from[0].style.display="block",b.shad_from[0].style.left=d+"%",b.shad_from[0].style.width=c+"%"):b.shad_from[0].style.display="none",a.to_shadow&&(e||f)?(e=this.convertToPercent(e?a.to_min:a.min),a=this.convertToPercent(f? +a.to_max:a.max)-e,e=this.toFixed(e-this.coords.p_handle/100*e),a=this.toFixed(a-this.coords.p_handle/100*a),e+=this.coords.p_handle/2,b.shad_to[0].style.display="block",b.shad_to[0].style.left=e+"%",b.shad_to[0].style.width=a+"%"):b.shad_to[0].style.display="none")},callOnStart:function(){if(this.options.onStart&&"function"===typeof this.options.onStart)this.options.onStart(this.result)},callOnChange:function(){if(this.options.onChange&&"function"===typeof this.options.onChange)this.options.onChange(this.result)}, +callOnFinish:function(){if(this.options.onFinish&&"function"===typeof this.options.onFinish)this.options.onFinish(this.result)},callOnUpdate:function(){if(this.options.onUpdate&&"function"===typeof this.options.onUpdate)this.options.onUpdate(this.result)},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input")},convertToPercent:function(a,b){var d=this.options.max-this.options.min;return d?this.toFixed((b?a:a-this.options.min)/(d/100)):(this.no_diapason=!0,0)},convertToValue:function(a){var b= +this.options.min,d=this.options.max,c=b.toString().split(".")[1],e=d.toString().split(".")[1],f,l,g=0,k=0;if(0===a)return this.options.min;if(100===a)return this.options.max;c&&(g=f=c.length);e&&(g=l=e.length);f&&l&&(g=f>=l?f:l);0>b&&(k=Math.abs(b),b=+(b+k).toFixed(g),d=+(d+k).toFixed(g));a=(d-b)/100*a+b;(b=this.options.step.toString().split(".")[1])?a=+a.toFixed(b.length):(a/=this.options.step,a*=this.options.step,a=+a.toFixed(0));k&&(a-=k);k=b?+a.toFixed(b.length):this.toFixed(a);kthis.options.max&&(k=this.options.max);return k},calcWithStep:function(a){var b=Math.round(a/this.coords.p_step)*this.coords.p_step;100c.max_interval&&(a=b-c.max_interval):a-b>c.max_interval&&(a=b+c.max_interval);return this.convertToPercent(a)},checkDiapason:function(a,b,d){a=this.convertToValue(a);var c=this.options;"number"!==typeof b&&(b=c.min);"number"!==typeof d&&(d=c.max);ad&&(a=d);return this.convertToPercent(a)},toFixed:function(a){a=a.toFixed(9);return+a},_prettify:function(a){return this.options.prettify_enabled? +this.options.prettify&&"function"===typeof this.options.prettify?this.options.prettify(a):this.prettify(a):a},prettify:function(a){return a.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(a,b){if(!this.options.force_edges)return this.toFixed(a);0>a?a=0:a>100-b&&(a=100-b);return this.toFixed(a)},validate:function(){var a=this.options,b=this.result,d=a.values,c=d.length,e,f;"string"===typeof a.min&&(a.min=+a.min);"string"===typeof a.max&& +(a.max=+a.max);"string"===typeof a.from&&(a.from=+a.from);"string"===typeof a.to&&(a.to=+a.to);"string"===typeof a.step&&(a.step=+a.step);"string"===typeof a.from_min&&(a.from_min=+a.from_min);"string"===typeof a.from_max&&(a.from_max=+a.from_max);"string"===typeof a.to_min&&(a.to_min=+a.to_min);"string"===typeof a.to_max&&(a.to_max=+a.to_max);"string"===typeof a.keyboard_step&&(a.keyboard_step=+a.keyboard_step);"string"===typeof a.grid_num&&(a.grid_num=+a.grid_num);a.maxa.max&&(a.from=a.max);else{if(a.froma.max)a.from=a.min;if(a.to>a.max||a.toa.to&&(a.from=a.to)}if("number"!==typeof a.step||isNaN(a.step)||!a.step||0>a.step)a.step= +1;if("number"!==typeof a.keyboard_step||isNaN(a.keyboard_step)||!a.keyboard_step||0>a.keyboard_step)a.keyboard_step=5;"number"===typeof a.from_min&&a.froma.from_max&&(a.from=a.from_max);"number"===typeof a.to_min&&a.toa.to_max&&(a.to=a.to_max);if(b){b.min!==a.min&&(b.min=a.min);b.max!==a.max&&(b.max=a.max);if(b.fromb.max)b.from=a.from;if(b.to +b.max)b.to=a.to}if("number"!==typeof a.min_interval||isNaN(a.min_interval)||!a.min_interval||0>a.min_interval)a.min_interval=0;if("number"!==typeof a.max_interval||isNaN(a.max_interval)||!a.max_interval||0>a.max_interval)a.max_interval=0;a.min_interval&&a.min_interval>a.max-a.min&&(a.min_interval=a.max-a.min);a.max_interval&&a.max_interval>a.max-a.min&&(a.max_interval=a.max-a.min)},decorate:function(a,b){var d="",c=this.options;c.prefix&&(d+=c.prefix);d+=a;c.max_postfix&&(c.values.length&&a===c.p_values[c.max]? +(d+=c.max_postfix,c.postfix&&(d+=" ")):b===c.max&&(d+=c.max_postfix,c.postfix&&(d+=" ")));c.postfix&&(d+=c.postfix);return d},updateFrom:function(){this.result.from=this.options.from;this.result.from_percent=this.convertToPercent(this.result.from);this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to;this.result.to_percent=this.convertToPercent(this.result.to);this.options.values&&(this.result.to_value=this.options.values[this.result.to])}, +updateResult:function(){this.result.min=this.options.min;this.result.max=this.options.max;this.updateFrom();this.updateTo()},appendGrid:function(){if(this.options.grid){var a=this.options,b,d;b=a.max-a.min;var c=a.grid_num,e=0,f=0,g=4,h,k,m=0,n="";this.calcGridMargin();a.grid_snap?(c=b/a.step,e=this.toFixed(a.step/(b/100))):e=this.toFixed(100/c);4h&&(h=0));this.coords.big[b]=f;k=(f-e*(b-1))/ +(h+1);for(d=1;d<=h&&0!==f;d++)m=this.toFixed(f-k*d),n+='';n+='';m=this.convertToValue(f);m=a.values.length?a.p_values[m]:this._prettify(m);n+=''+m+""}this.coords.big_num=Math.ceil(c+1);this.$cache.cont.addClass("irs-with-grid");this.$cache.grid.html(n);this.cacheGridLabels()}},cacheGridLabels:function(){var a, +b,d=this.coords.big_num;for(b=0;b100+this.coords.grid_gap&&(d[c-1]=100+this.coords.grid_gap,b[c-1]=this.toFixed(d[c-1]-this.coords.big_p[c-1]),this.coords.big_x[c-1]=this.toFixed(this.coords.big_p[c-1]-this.coords.grid_gap)));this.calcGridCollision(2,b,d);this.calcGridCollision(4,b,d);for(a=0;a=g)break;f=this.$cache.grid_labels[e][0];f.style.visibility=d[c]<=b[e]?"visible":"hidden"}},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_handle="single"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/ +this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(a){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.options=g.extend(this.options,a),this.validate(),this.updateResult(a),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(), +this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),g.data(this.input,"ionRangeSlider",null),this.remove(),this.options=this.input=null)}};g.fn.ionRangeSlider=function(a){return this.each(function(){g.data(this,"ionRangeSlider")||g.data(this,"ionRangeSlider",new r(this,a,u++))})};(function(){for(var a=0,b=["ms","moz","webkit","o"],d=0;dquery("UPDATE `mod` SET `active`=1"); +/* +if(is_file(dirname( __FILE__ )."/../upload/oldfile_1.csv")){ + + $db->query('update catalogs_config set value=value+1 where id=5'); + $status = @$db->super_query('select value from catalogs_config where id=6',$db); + + if($status[0]['value'] ==1){ + exit; + } else { + $db->query('update catalogs_config set value=1 where id=6'); + sleep(300); + } + $d1 = @$db->super_query('select value from catalogs_config where id=5',$db); + $num = $d1[0]['value']; + +} else{ + exit; +} +*/ +$num = 1; +$_SERVER['DOCUMENT_ROOT'] = realpath(dirname(__FILE__)); +$tmpfname = $_SERVER['DOCUMENT_ROOT'] . "/../upload/file_1_duble.csv"; +$handle24 = fopen($tmpfname, "w"); + + +//unlink($_SERVER['DOCUMENT_ROOT'] . "/tmp/noDB_mod.csv"); + +//$link = mysql_connect(DBHOST,DBNAME,DBPASS); +//if(@$link) echo "ok"; +//else echo "not"; + + +//$fg = @fopen(dirname( __FILE__ )."/cron/oldfile_1.csv","r"); +//if(!@$fg) exit; +//@fclose($fg); +//exit; + +$rrrrrrrrrrrr = array(); + +$last_pid = ""; + +$ma = array(); + + +$su = 0; +$su2 = 0; + +$yy = @fopen(dirname ( __FILE__ )."/counter.txt","r+"); +$su = trim(fread($yy,128)); +fclose($yy); + + + + + + + +$fg = fopen(dirname( __FILE__ )."/../upload/file_1.csv","r"); +if(@$fg){ + $cot = ""; + while(!feof($fg)) + $cot = $cot.fread($fg,512); + @fclose($fg); +} +$cot = explode("\n",$cot); + +//print_r($cot); +if(trim($su)<=0 && count($cot)>2){ + $fg = @fopen(dirname ( __FILE__ )."/../upload/noDB_mod.csv","w+"); + fclose($fg); +} + +for($i=$su;$i"; + $line = explode(";",$cot[$i]); + +print_r($line); + if(trim($line[3])>0){ +//$db->query("UPDATE `catalogs_modifications` SET `active` = '1' WHERE `code` = '".trim($line[0])."';"); + } + + +///////////////////////////////////////////// ����� ������. ���� ���, �� ������� ���. + $row_city = @$db->super_query("SELECT * FROM `catalogs_cities` WHERE `name`='".trim($line[4])."' LIMIT 1;"); + if(!@$row_city['id']){ + @$db->query("INSERT INTO `catalogs_cities` (`name`) VALUES ('".trim($line[4])."');"); + $row_city['id'] = $db->insert_id(); + } + echo "�����:".$row_city['id']."
        "; + + +///////////////////////////////////////////// �������� �������� � ������� + $protect = @$db->super_query("SELECT * FROM catalogs_keys_products_cities WHERE mod_code='".trim($line[0])."' LIMIT 1;"); + $pr = @$db->super_query("SELECT * FROM `mod` WHERE `art` = '".trim($line[0])."' LIMIT 1;"); + + +///////////////////////////////////////////// �������� ���-�� � ������� + /* + if($last_pid!=trim($pr['product_id'])){ + $last_pid = trim($pr['product_id']); + if(trim($pr['product_id'])!='') + $db->query("DELETE FROM `catalogs_keys_products_cities` WHERE `product_id` = '".trim($pr['product_id'])."';"); + } + */ + + if($last_pid!=trim($line[0])){ + $last_pid = trim($line[0]); + if(trim($line[0])!='')$db->query("DELETE FROM `catalogs_keys_products_cities` WHERE `mod_code` = '".trim($line[0])."';"); + } + + + +///////////////////////////////////////////// + + + if(!@$protect['product_id'] && @$pr['product_id']){ + @$db->query("INSERT INTO `catalogs_keys_products_cities` (`product_id`,`mod_code`,`count`,`mktime`,`city_id`) VALUES ('".@$pr['product_id']."','".trim($line[0])."','".trim($line[3])."','".time()."','".$row_city['id']."');"); + } + echo "������� ID:".$pr['product_id']."
        "; +///////////////////////////////////////////// + +///////////////////////////////////////////// �������� ������ �� ������������� � ���������� � ������. + $no_DB = 0; + /* + $product = $db->super_query("SELECT f1.product_id as in_city, f2.product_id as in_modification, f2.product_id as in_modification FROM catalogs_keys_products_cities f1 LEFT JOIN catalogs_modifications f2 ON f2.code='".trim($line[0])."' WHERE f1.mod_code='".trim($line[0])."' AND f1.city_id='".$row_city['id']."' LIMIT 1;"); + */ + + $product = $db->super_query("SELECT product_id AS in_modification +FROM `mod` +WHERE `art` = '".trim($line[0])."' LIMIT 1"); +print "SELECT product_id AS in_modification +FROM `mod` +WHERE `art` = '".trim($line[0])."' LIMIT 1"; +print_r($product);print"
        "; +print "SELECT f1.product_id FROM catalogs_keys_products_cities f1 WHERE f1.product_id='".@$product['in_modification']."' and f1.mod_code='".trim($line[0])."' AND f1.city_id='".$row_city['id']."' LIMIT 1;"; + $catalogs_keys_products_cities = $db->super_query("SELECT f1.product_id FROM catalogs_keys_products_cities f1 WHERE f1.product_id='".@$product['in_modification']."' and f1.mod_code='".trim($line[0])."' AND f1.city_id='".$row_city['id']."' LIMIT 1;"); + if(!@$catalogs_keys_products_cities['product_id']){print'not city v keys
        '; + $db->query("INSERT INTO `catalogs_keys_products_cities` (`product_id`,`mod_code`,`count`,`mktime`,`city_id`) VALUES ('".@$pr['product_id']."','".trim($line[0])."','".trim($line[3])."','".time()."','".$row_city['id']."');"); + print "INSERT INTO `catalogs_keys_products_cities` (`product_id`,`mod_code`,`count`,`mktime`,`city_id`) VALUES ('".@$pr['product_id']."','".trim($line[0])."','".trim($line[3])."','".time()."','".$row_city['id']."');
        "; + } + + + + + + + + + +//$product = $db->super_query("SELECT f2.product_id as in_modification, f2.product_id as in_modification FROM catalogs_modifications f2 //WHERE f2.code='".trim($line[0])."' LIMIT 1;"); + + + echo "��� 3:".$product['in_modification']."
        "; + +//if(@$product['in_modification'] && !@$product['in_city'] && trim($line[3])>0){ +////////$db->query("INSERT INTO `catalogs_keys_products_cities` (`product_id`,`mod_code`,`count`,`mktime`,`city_id`) VALUES ///////('".@$product['in_modification']."','".trim($line[0])."','".trim($line[3])."','".time()."','".$row_city['id']."');"); +//}else + if(@$product['in_modification']){ + $db->query("UPDATE `catalogs_keys_products_cities` SET `count`='".trim($line[3])."' WHERE `product_id`='".@$product['in_modification']."' AND `mod_code`='".trim($line[0])."' AND `city_id`=".trim($row_city['id']).";"); + print "UPDATE `catalogs_keys_products_cities` SET `count`='".trim($line[3])."' WHERE `product_id`='".@$product['in_modification']."' AND `mod_code`='".trim($line[0])."' AND `city_id`=".trim($row_city['id']).";
        "; + }elseif(!@$product['in_modification']) $no_DB = 1; +///////////////////////////////////////////// +///////////////////////////////////////////// ������ � ������������� + if(@$product['in_modification'] && trim($line[0])!='') + $row2 = $db->super_query("SELECT COUNT(*) as count FROM `catalogs_keys_products_cities` WHERE `count`>0 AND `product_id`='".@$product['in_modification']."' AND `mod_code` = '".trim($line[0])."';"); + + echo "��� 4:".$row2['count']."
        "; + + if(trim($line[2])>0){$cine = trim($line[2]);$cine_last = trim($line[1]);$sale[] = 1;} + else{$cine = trim($line[1]);$cine_last = 0;$sale[] = 0;} + + + // if(trim($line[3])<=0 && trim($line[0])!='' && $row2['count']<=0){ + // $db->query("UPDATE `mod` SET `active` = '1', `cost`=".$cine.", `old_cost`=".$cine_last." WHERE `art` = '".trim($line[0])."';"); + // }else if(trim($line[3])>0) {$db->query("UPDATE `mod` SET `active` = '0',`cost`=".$cine.", `old_cost`=".$cine_last." WHERE `art` = '".trim($line[0])."';");} + + + if($row2['count']>0)$db->query("UPDATE `mod` SET `active` = '0',`cost`=".$cine.", `old_cost`=".$cine_last." WHERE `art` = '".trim($line[0])."';"); + else $db->query("UPDATE `mod` SET `active` = '1',`cost`=".$cine.", `old_cost`=".$cine_last." WHERE `art` = '".trim($line[0])."';"); + + + +print "select COUNT(*) as count from mod where product_id='".$product['in_modification']."' and old_cost>0 GROUP BY cost"; + $p = $db->super_query("select COUNT(*) as count from `mod` where `active`=0 and product_id='".$product['in_modification']."' and old_cost>0 GROUP BY cost"); + $p2 = $db->super_query("select COUNT(*) as count from `mod` where `active`=0 and product_id='".$product['in_modification']."'"); + + print "".$p['count'].''; + $sale = ($p['count']>0 && $p['count']<$p2['count']) ? 1 : 0; + $res1 = $db->query("UPDATE `products` SET `sale`='".$sale."' WHERE `id`=".trim(@$product['in_modification'])." LIMIT 1;"); +///////////////////////////////////////////// +///////////////////////////////////////////// ��������� � ���������� �������� � ������� ��� �����������. + if(@$product['in_modification']){ + $row2 = $db->super_query("SELECT COUNT(*) as count FROM `mod` WHERE `active`=0 and `product_id`=".@$product['in_modification'].";"); + if(trim($row2['count']) <= 0) + $db->query("UPDATE `products` SET `count_modifications` = 0 WHERE `id` = '".@$product['in_modification']."';"); +//else $db->query("UPDATE `catalogs_products` SET `count_modifications` = '".trim($row2['count'])."',`active` = '1' WHERE `id` = '".@$product['in_modification']."';"); + else $db->query("UPDATE `products` SET `count_modifications` = '".trim($row2['count'])."' WHERE `id` = '".@$product['in_modification']."';"); + + } +///////////////////////////////////////////// +///////////////////////////////////////////// ���������� ����. + $row_6 = $db->super_query("SELECT COUNT(*) as count FROM `mod` WHERE `active`=0 and `product_id`='".@$product['in_modification']."'"); + $row_7 = $db->super_query("SELECT COUNT(*) as count FROM `mod` WHERE `active`=0 and `product_id`='".@$product['in_modification']."' Group by cost"); + print'('.$row_7['count'].')'; + if($row_7['count']==$row_6['count']){ + + }else{ + $row_8 = $db->super_query("SELECT cost,old_cost FROM `mod` WHERE `active`=0 and old_cost>0 AND `product_id`='".@$product['in_modification']."' Order by cost desc"); + $line[1] = 0;//$row_8['cine_last']; + $line[2] = $cine; + print'['.$line[2].']'; + } + + if(trim($line[3])>0){ + if(trim($line[2])!="0.00" && @$product['in_modification'] && trim($line[1]) != "" && trim($line[2])!=''){ + $res = $db->query("UPDATE `products` SET `old_cost`=".trim($line[1]).", `cost1`=".trim($line[2])." WHERE `id`=".trim(@$product['in_modification'])." LIMIT 1;"); + + } + elseif(trim($line[1]) != "" && @$product['in_modification']) $res = $db->query("UPDATE `products` SET `old_cost`='0' ,`cost1`=".trim($line[1])." WHERE `id`=".trim(@$product['in_modification'])." LIMIT 1;"); + if(@$res) echo "������ �� ���������� ��� ��������. ���: ".@$product['in_modification']."
        "; + }else echo "�� ����������, ����������� �����: ".@$product['in_modification']."
        "; +///////////////////////////////////////////// + fwrite($handle24,$cot[$i]."\r\n"); + $product = array(); + if($no_DB == 1){ + + + + if(!@$ma[trim($line[0])]){ + $ma[trim($line[0])]="1"; + $fg2 = @fopen(dirname ( __FILE__ )."/../upload/noDB_mod.csv","a"); + fputs($fg2,implode(";",$line)); + fclose($fg2); + } + } + +//if($su2>=1000) exit; + + $yy = @fopen(dirname ( __FILE__ )."/counter.txt","w+"); + fputs($yy,$su); + fclose($yy); + $su++; + $su2++; +} + + +$yy = @fopen(dirname ( __FILE__ )."/counter.txt","w+"); +fputs($yy,"0"); +fclose($yy); + +if($su==(count($cot)-1)){ + // @unlink(dirname( __FILE__ )."/../upload/file_1.csv"); + print "delete file"; +} + + + + + +fclose($handle24); +$db->query('update catalogs_config set value=0 where id=6'); + +?> \ No newline at end of file diff --git a/frontend/web/updatemods/mysql.class.php b/frontend/web/updatemods/mysql.class.php new file mode 100755 index 0000000..1bcbc35 --- /dev/null +++ b/frontend/web/updatemods/mysql.class.php @@ -0,0 +1,219 @@ +db_id = @mysql_connect($db_location, $db_user, $db_pass)) { + if($show_error == 1) { + $this->display_error(mysql_error(), mysql_errno()); + } else { + return false; + } + } + + if(!@mysql_select_db($db_name, $this->db_id)) { + if($show_error == 1) { + $this->display_error(mysql_error(), mysql_errno()); + } else { + return false; + } + } + + $this->mysql_version = mysql_get_server_info(); + + if(!defined('COLLATE')) + { + define ("COLLATE", "cp1251"); + } + + if (version_compare($this->mysql_version, '4.1', ">=")) mysql_query("/*!40101 SET NAMES '" . COLLATE . "' */"); + + $this->connected = true; + + return true; + } + + function query($query, $show_error=false) + { + $time_before = $this->get_real_time(); + + if(!$this->connected) $this->connect(DBUSER, DBPASS, DBNAME, DBHOST); + + if(!($this->query_id = mysql_query($query, $this->db_id) )) { + + $this->mysql_error = mysql_error(); + $this->mysql_error_num = mysql_errno(); + + if($show_error) { + $this->display_error($this->mysql_error, $this->mysql_error_num, $query); + } + } + + $this->MySQL_time_taken += $this->get_real_time() - $time_before; + + +// $this->query_list[] = array( 'time' => ($this->get_real_time() - $time_before), +// 'query' => $query, +// 'num' => (count($this->query_list) + 1)); + + $this->query_num ++; + + return $this->query_id; + } + + function get_row($query_id = '') + { + if ($query_id == '') $query_id = $this->query_id; + + return mysql_fetch_assoc($query_id); + } + + function get_array($query_id = '') + { + if ($query_id == '') $query_id = $this->query_id; + + return mysql_fetch_array($query_id); + } + + + function super_query($query, $multi = false) + { + + if(!$multi) { + + $this->query($query); + $data = $this->get_row(); + $this->free(); + return $data; + + } else { + $this->query($query); + + $rows = array(); + while($row = $this->get_row()) { + $rows[] = $row; + } + + $this->free(); + + return $rows; + } + } + + function num_rows($query_id = '') + { + + if ($query_id == '') $query_id = $this->query_id; + + return mysql_num_rows($query_id); + } + + function insert_id() + { + return mysql_insert_id($this->db_id); + } + + function get_result_fields($query_id = '') { + + if ($query_id == '') $query_id = $this->query_id; + + while ($field = mysql_fetch_field($query_id)) + { + $fields[] = $field; + } + + return $fields; + } + + function safesql( $source ) + { + if ($this->db_id) return mysql_real_escape_string ($source, $this->db_id); + else return mysql_escape_string($source); + } + + function free( $query_id = '' ) + { + + if ($query_id == '') $query_id = $this->query_id; + + @mysql_free_result($query_id); + } + + function close() + { + @mysql_close($this->db_id); + } + + function get_real_time() + { + list($seconds, $microSeconds) = explode(' ', microtime()); + return ((float)$seconds + (float)$microSeconds); + } + + function display_error($error, $error_num, $query = '') + { + if($query) { + // Safify query + $query = preg_replace("/([0-9a-f]){32}/", "********************************", $query); // Hides all hashes + $query_str = "$query"; + } + + echo ' + + + + MySQL Fatal Error + + + + + MySQL Error! +
        ------------------------
        +
        + + The Error returned was: +
        + '.$error.' + +

        + Error Number: +
        + '.$error_num.' +
        +
        + +
        + + + '; + + exit(); + } + +} + + +?> \ No newline at end of file diff --git a/frontend/widgets/BannerWidget.php b/frontend/widgets/BannerWidget.php new file mode 100755 index 0000000..dbbbc7f --- /dev/null +++ b/frontend/widgets/BannerWidget.php @@ -0,0 +1,76 @@ +where([Banner::tableName().'.title'=>$this->title, Banner::tableName().'.status' => '1'] )->one(); + if (! empty ($banner)) + { + // html + return $this->htmlBanner($banner); + } + } + + + // ==== DISPLAY ==== + + public function htmlBanner ($banner) + { + ob_start(); + + echo ''; + + return ob_get_clean(); + } +} \ No newline at end of file diff --git a/frontend/widgets/Rubrics.php b/frontend/widgets/Rubrics.php new file mode 100755 index 0000000..acbc086 --- /dev/null +++ b/frontend/widgets/Rubrics.php @@ -0,0 +1,50 @@ +active)) { + $this->active = Yii::$app->request->get('category'); + } + if (!empty($this->active) && !is_object($this->active)) { + $this->active = CategorySearch::findByAlias($this->active); + } + if (!empty($this->active)) { + $this->active = $this->active->category_id; + } + $items = []; + + if (empty($this->categories)) { + $this->categories = Category::find()->orderBy('category_id', SORT_ASC)->all(); + } + foreach ($this->categories as $category) { + if (!empty($this->includes) && !in_array($category->category_id, $this->includes)) { + continue; + } + $items[] = $category;[ + 'label' => $category->name, + 'url' => Url::to(['catalog/category', 'category' => $category]), + 'active' => !empty($categoryObject) && $categoryObject->alias == $category->alias ? true : false, + ]; + } + + return $this->render('rubrics', ['items' => $items, 'wrapper' => $this->wrapper, 'active' => $this->active]); + } +} \ No newline at end of file diff --git a/frontend/widgets/Seo.php b/frontend/widgets/Seo.php new file mode 100755 index 0000000..688651e --- /dev/null +++ b/frontend/widgets/Seo.php @@ -0,0 +1,384 @@ +url = \Yii::$app->request->url; + $this->project_name = \Yii::$app->name; + parent::init(); + + } + + + public function run() + { + + $seoData = $this->getViewData(); + foreach ($seoData as $key => $value) { + $this->$key = $value; + } + + + switch ($this->row) { + case self::SEO_TEXT: + + + $filter = \Yii::$app->request->get('filters', []); + $sort = \Yii::$app->request->get('sort', []); + $paginate = \Yii::$app->request->get('page', []); + + if(empty($filter) && empty($sort) && empty($paginate) ){ + + return $this->selectSeoData(self::SEO_TEXT); + + } else { + + $widgetData = static::findSeoByUrl($this->url); + + $result = ''; + + if ($widgetData instanceof \common\models\Seo) { + + $result = $widgetData->{self::SEO_TEXT}; + + } else { + + $widgetData = $this->findSeoByDynamic(); + + if ($widgetData instanceof SeoDynamic) { + + $result = $widgetData->{self::SEO_TEXT}; + + } + + } + + return $this->replaceData($result); + } + + + break; + case self::H1: + + $filter = \Yii::$app->request->get('filters', []); + + + + if (isset($filter['brands']) && count($filter['brands']) == 1) { + + $model = Brand::find()->where(['alias' => $filter['brands'][0]])->one(); + if(!$model instanceof Brand){ + + \Yii::$app->response->redirect(['/site/error'],404); + } else { + if($this->selectSeoData(self::H1) == $this->category_name) { + + return $this->selectSeoData(self::H1) . ' ' . $model->name; + }else { + + return $this->selectSeoData(self::H1); + + } + } + + + + } else if (isset($filter["naznacenie"]) && count($filter["naznacenie"]) == 1) { + + $model = TaxOption::find()->where(['alias' => $filter["naznacenie"]])->one(); + if(!$model instanceof TaxOption){ + + \Yii::$app->response->redirect(['/site/error'],404); + } else { + if($this->selectSeoData(self::H1) == $this->category_name) { + + return $this->selectSeoData(self::H1) . ' ' . $model->value->value; + }else { + + return $this->selectSeoData(self::H1); + + } + + } + + + + } else { + return $this->selectSeoData(self::H1); + } + break; + case self::TITLE: + + $filter = \Yii::$app->request->get('filters', []); + + + $title = $this->selectSeoData(self::TITLE); + + + if(!empty($filter) && isset($this->fields['meta-title']) && $title == $this->fields['meta-title']) { + + $array = [ + 'category' => $this->category_name + ]; + + + if (isset($filter['brands']) && count($filter['brands']) == 1) { + $model = Brand::find()->where(['alias' => $filter['brands'][0]])->one(); + if(!$model instanceof Brand){ + + \Yii::$app->response->redirect(['/site/error'],404); + } else { + $array['brand'] = $model->name; + } + + } + + + $optionsList = ArrayHelper::getColumn(TaxGroup::find()->where(['is_filter' => 'TRUE'])->all(),'alias'); + + + foreach($optionsList as $optionList){ + + + if (isset($filter[$optionList]) && count($filter[$optionList]) == 1) { + + $model = TaxOption::find()->where(['alias' =>$filter[$optionList]])->one(); + if(!$model instanceof TaxOption){ + + \Yii::$app->response->redirect(['site/error'],404); + } else { + $array[$optionList] = $model->value->value; + } + + + + } + + + + } + + $title_string = $this->getTitleString($array); + + if($title_string){ + return $title_string; + } + + } + + if (!empty($title)) { + return $title; + } else { + return $this->project_name; + } + + break; + case self::DESCRIPTION: + $description = $this->selectSeoData(self::DESCRIPTION); + + if (!empty($description)) { + + $this->getView()->registerMetaTag([ + 'name' => 'description', + 'content' => $description + ]); + + } + + break; + case self::META: + + $meta = $this->selectSeoData(self::META); + + $filter = \Yii::$app->request->get('filters', []); + $sort = \Yii::$app->request->get('sort', []); + $paginate = \Yii::$app->request->get('page', []); + + + + if (!empty($meta)) { + + $this->getView()->registerMetaTag([ + 'name' => 'robots', + 'content' => $meta + ]); + + } else if(!empty($filter['special'])){ + + $this->getView()->registerMetaTag([ + 'name' => 'robots', + 'content' => 'noindex,follow' + ]); + + } else if ( + isset($filter['brands']) && count($filter['brands']) > 1 + || isset($filter["pol"]) && count($filter["pol"]) > 1 + || isset($filter["naznacenie"]) && count($filter["naznacenie"]) > 1 + || isset($filter["god"]) && count($filter["god"]) > 1 + + ) { + $this->getView()->registerMetaTag([ + 'name' => 'robots', + 'content' => 'noindex,nofollow' + ]); + + } else if ( + isset($filter['brands']) && count($filter['brands']) <= 1 && isset($filter) && count($filter, COUNT_RECURSIVE) >= 4 + || isset($filter) && count($filter, COUNT_RECURSIVE) > 4 + || !empty($sort) || !empty($paginate) || isset($filter['prices']) + ) { + $this->getView()->registerMetaTag([ + 'name' => 'robots', + 'content' => 'noindex,follow' + ]); + } else { + + $this->getView()->registerMetaTag([ + 'name' => 'robots', + 'content' => 'index,follow' + ]); + } + + + + + break; + } + + + } + + protected function replaceData($str) + { + + if (!empty($this->fields)) { + foreach ($this->fields as $field_name => $field_value) { + $str = str_replace('{' . $field_name . '}', $field_value, $str); + } + } + $str = str_replace('{project_name}', $this->project_name, $str); + return $str; + } + + protected static function findSeoByUrl($url) + { + if(empty(self::$check_url_bool)){ + self::$check_url = \common\models\Seo::findOne(['url' => $url]); + self::$check_url_bool = true; + } + return self::$check_url; + } + + protected function findSeoByDynamic() + { + + if(!empty($this->key)){ + + $query = SeoDynamic::find()->joinWith('seoCategory')->where(['controller' => \Yii::$app->controller->id, 'action' => \Yii::$app->controller->action->id, 'key' => $this->key]); + } else { + + + $query = SeoDynamic::find()->joinWith('seoCategory')->where(['controller' => \Yii::$app->controller->id, 'action' => \Yii::$app->controller->action->id]); + } + + return $query->one(); + } + + + protected function findSeoByDynamicForFilters(){ + return SeoDynamic::find()->joinWith('seoCategory')->where(['param' =>'filters'])->one(); + } + + + protected function getViewData() + { + $params = $this->getView()->params; + if (isset($params['seo'])) { + return $params['seo']; + } else { + return []; + } + } + + protected function selectSeoData($param) + { + $result = ''; + + $widgetData = static::findSeoByUrl($this->url); + + if ($widgetData instanceof \common\models\Seo) { + + $result = $widgetData->$param; + + } else if (!empty($this->$param)) { + + $result = $this->$param; + } else { + + $widgetData = $this->findSeoByDynamic(); + + if ($widgetData instanceof SeoDynamic) { + + $result = $widgetData->$param; + + } + + } + + return $this->replaceData($result); + + } + + public function getTitleString($array){ + + $template = SeoDynamic::find()->select('title')->where(['param' =>'filters'])->one(); + if($template instanceof SeoDynamic){ + foreach ($array as $field_name => $field_value) { + $template->title = str_replace('{' . $field_name . '}', mb_strtolower($field_value), $template->title); + } + $template = preg_replace('/\{.[^\}]*\}\s/','',$template->title); + return $template; + } + + return false; + + } + + +} \ No newline at end of file diff --git a/frontend/widgets/Slider.php b/frontend/widgets/Slider.php new file mode 100755 index 0000000..4275f11 --- /dev/null +++ b/frontend/widgets/Slider.php @@ -0,0 +1,30 @@ +where([\common\models\Slider::tableName().'.title'=>$this->title])->joinWith("sliderImage")->one(); + + return $this->render('slider',[ + 'slider'=>$slider + ]); + + + } + +} \ No newline at end of file diff --git a/frontend/widgets/SliderWidget.php b/frontend/widgets/SliderWidget.php new file mode 100755 index 0000000..683a7ed --- /dev/null +++ b/frontend/widgets/SliderWidget.php @@ -0,0 +1,143 @@ +where([\common\models\Slider::tableName().'.title'=>$this->title])->joinWith("sliderImage")->one(); + + if (! empty ($slider)) + { + // изображения + $images = $slider->sliderImage; + if (! empty ($images)) + { + // подключаем jssor-slider + $this->initSliderJs(); + + // скрипт-обработчик + $this->initSliderScript($slider); + + // html + return $this->htmlSlider($slider, $images); + } + } + return $this->render('slider',[ + 'slider'=>$slider + ]); + + + } + + + // ==== DISPLAY ==== + + public function initSliderJs () + { + if (! $this->is_init_slider) + { + // TODO:: wiget подключение jcarousel + $this->view->registerJsFile(\Yii::$app->request->baseUrl . '/js/widget-carousel/lib/jquery.jcarousel.min.js',[ + 'position' => View::POS_END, + 'depends' => ['yii\web\JqueryAsset'] + ]); + $this->is_init_slider = true; + } + } + + public function initSliderScript ($slider) + { + $this->view->registerJs(' + var '.$slider->title.'_option_1 = { + $AutoPlayInterval: '.$slider->duration.', + $SlideDuration: '.$slider->speed.', + }; + ', 1); + + $this->view->registerCssFile (\Yii::$app->request->BaseUrl . '/js/widget-carousel/'.$slider->title.'/style.css'); + + $this->view->registerJsFile(\Yii::$app->request->BaseUrl . '/js/widget-carousel/'.$slider->title.'/style.js',[ + 'position' => View::POS_END, + 'depends' => ['yii\web\JqueryAsset'] + ]); + } + + public function htmlSlider ($slider, $images) + { + ob_start(); + + if (! empty ($images)) + { + echo '
        '; + + echo ' + +
        +
        +
        +
        + + +
        '; + + foreach ($images as $row) + { + echo ''; + } + + echo '
        '; + + echo ' +
        +
        +
        +
        + + + '; + + echo '
        '; + } + + return ob_get_clean(); + } + +} \ No newline at end of file diff --git a/frontend/widgets/views/rubrics.php b/frontend/widgets/views/rubrics.php new file mode 100755 index 0000000..8f2a8be --- /dev/null +++ b/frontend/widgets/views/rubrics.php @@ -0,0 +1,15 @@ + + +
        + +
          + $category) :?> +
        • name, ['catalog/category', 'category' => $category])?>
        • + +
        + +
        +
        + \ No newline at end of file diff --git a/frontend/widgets/views/slider.php b/frontend/widgets/views/slider.php new file mode 100755 index 0000000..775ffaa --- /dev/null +++ b/frontend/widgets/views/slider.php @@ -0,0 +1,63 @@ + + +
        + +HTML; + + if(!empty($image->price)) { + $htm .= << +
        +
        Супер цена
        +
        $image->price +
        грн.
        +
        +
        +
        +HTML; + } + + $htm .= << + +HTML; + ?> + +
        + url)); ?> +
        + +
        + +
        +duration ? $slider->duration : 5000; +$speed = $slider->speed ? $slider->speed : 500; +$js=" $(\".carousel\").owlCarousel({ + items: 1, + loop: true, + nav: true, + startPosition: 2, + mouseDrag: false, + navSpeed: 800, + autoplay:true, + autoplayTimeout: $dur, + autoplaySpeed: $speed, + autoplayHoverPause:true, + navText: ['', ''] + });"; + +$this->registerJs($js); + +?> diff --git a/generator/.htaccess b/generator/.htaccess new file mode 100755 index 0000000..0a379a4 --- /dev/null +++ b/generator/.htaccess @@ -0,0 +1,6 @@ +RewriteEngine on +RewriteBase / +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d + +RewriteRule . index.php diff --git a/generator/changelog.txt b/generator/changelog.txt new file mode 100755 index 0000000..c2efbc1 --- /dev/null +++ b/generator/changelog.txt @@ -0,0 +1,281 @@ + +ChangeLog for PHP XML Sitemap generator + +http://www.xml-sitemaps.com +---------------------------------------------- + +2015-05-19 v7.1 + + * new feature: parsing and following common javascript links + * update: using new Youtube API v3 + * new feature: Youtube playlists support + + +2014-12-14 v7.0 + + * new feature: referring pages list tracking + * new feature: alternative language URLs (hreflang) included in sitemap + * new feature: "noindex, follow" crawler configuration option + * new feature: automatically slow down/delay crawling in case of server overloading + * update: auto-detect last-modified, changefreq, revisit-after meta tags + * update: custom Accept-Language http header + * update: option to disable regular XML sitemap + * update: caching for video API requests + * update: HTML sitemap is now mobile-friendly + + +2013-11-19 v6.1 + + * new feature: include subdomains in sitemap + * new feature: additional "Starting URLs" setting + * new feature: monitor crawler window and automaticall resume if it stops + * update: mobile pages inclusion mask + * update: create both compressed and uncompressed sitemap at the same time + * update: external links tracking exclusion option + * update: optionally disable robots.txt support + + +2012-05-23 v6.0 + + * new feature: RSS feed add-on module implemented + * new feature: ajax crawlable content is supported + * update: memory usage optimized + * update: including images from external domains is now supported (optionally) + * update: new video sources supported: Blip.tv, Coull + * update: split mobile sitemap on multiple files + * update: notification email content moved to a template so that you can customize it + * update: search engines ping is sent only if sitemap has been changed + + +2011-01-25 v5.0 + + * new feature: Video Sitemap support - a separate sitemap with details on embedded videos for your site + * new feature: News Sitemaps are now supported - new URLs found by generator and included in this sitemap + * new feature: new pages on your site get higher priority attribute in sitemap + * update: Images sitemaps improved - stored in separate file, with own inclusion mask, displayed in browser + * update: generator now splits xml sitemap not only based on the number of URLs but by a file size too + + +2010-05-20 v4.0 + + * new feature: include images information in sitemap + * new feature: automatically resuming of generator when crawling stops + * new feature: XSLT stylesheet is applied to all xml sitemaps + * new feature: embedded check for new versions of sitemap generator + * update: new sorting and restructuring options for HTML sitemap formatting + * update: canonical URLs meta tags are supported + * update: multiple source pages can be tracked for broken links list + * update: option to extract last-modification date/time for "Not parsed" links + + +2009-05-19 v3.0 + + * new sitemap type: Mobile Sitemaps are now supported + * new feature: noise content exclusion presets supported (X-Cart, osCommerce, vBulletin and others) + * new feature: track the list of all links pointing to external sites + * new feature: weblogupdate: notification can be optionally sent to services like Technorati + * new feature: configuration files converted to xml and data folder protected for better security + * new feature: automatically remove old log records + * new option added: "Parse Only URLs" + * update: HTTPS sites are supported now (openSSL support is required) + * update: gzip content-encoding via http supported + * update: multiple entries allowed in "Include Only Option" + * fix: sitemap links in email notifications + + +2008-06-15 v2.9 + + * automatic email notifications sent every time sitemap is generated + * html sitemap customization: date format selection (xs_dateformat), order folders by name (xs_htmlnameorder) + * http/1.1 protocol supported + * memory usage optimized, new option to define memory limit + * option to allow pages with http response code different from 200 to be included in sitemap (xs_allow_httpcode) + * minor bug fixes + + + +2007-12-27 v2.8 + + * Live.com ping + * meta description tag can be (optionally) extracted and inserted in ROR sitemap (advanced settings section) + * Clear session (or others) parameters from URLs (advanced settings section) + * IP address connection can be defined (advanced settings section) + * Progress storage type: "serialize" or "var_export" + * Changelog order can be changed in config file (xs_chlogorder option) + + +2007-10-21 v2.7 + + * xml sitemap is now template based, which allows to integrate xsl stylesheet into your sitemap. Templates are defined in: sitemap_index_tpl.xml, sitemap_xml_tpl.xml and sitemap_ror_tpl.xml files + * priority attribute can be assigned automatically by sitemap generator script now, just enable corresponding checkbox in configuration. Priority is descending with depth level: the highest priority is assigned to your homepage and the lower values are set for other pages, depending on how many "clicks" it takes to reach the page + * minor bug fixes and improvements + + +2007-07-30 v2.6 + + * sitemap ping for Ask.com and Moreover.com (Live Search) + * memory usage optimized + + +2007-05-19 v2.5.3 + + * titles are included in ROR sitemap now + * minor bug fixes and improvements + + +2007-01-18 v2.5.2 + + * minor bug fixes and improvements + + +2006-11-25 v2.5.1 + + * sitemap protocol v0.9 is supported now + + +2006-11-24 v2.5 + + * google sitemap ping URL has been updated + * an option to automatically remove certain parameters from URLs has been implemented + * user-agent can be customized now with xs_crawl_ident option in config file + * robots.txt compliance can be turned on/off now with xs_robotstxt option in config file + * regular expressions are allowed in "Individual parameters" option - just add a leading '$' sign in the line to enable it + + +2006-10-11 v2.4 + + * yahoo auto notification option added + * html sitemap is now fully customizable + * minor bug fixes and improvements + + +2006-08-18 v2.3 + + * ROR sitemaps are now supported + * you can specify custom port for http connections now using xs_portconnection option in config.inc.php file + * an option added to limit crawl depth level + + +2006-07-04 v2.2 + + * the tag is supported now + * xml sitemap size (max number of URLs per file) can be specified in config file + * location of text sitemap can be specified in config file + * non-standard ports are supported like example.com:8080 + * minor bug fixes and improvements + +2006-03-28 v2.1.1 + + * minor bug fixes and improvements + +2006-02-21 v2.1 + + * html sitemap listing enhancements + * minor bug fixes + +2006-01-17 v2.0 + + * HTML Site map generation is now included into the script. You are able to define the number of links per page in html sitemap and customize the page layout using simple template file. + * Configuration screen interface improved + * Mutiple minor changes + + +2005-11-14 v1.2 + + * new feature: "Individual attributes" setting at Configuration screen. It allows you to set + specific values for last modification time, frequency andpriority per page. + To use it, define specific frequency and priority attributes in the following format: + "url substring,lastupdate YYYY-mm-dd,frequency,priority". + * new feature: "Include ONLY URLs" setting. This setting is the opposite to "Exclude URLs". When + it is not empty, ONLY the urls that match the substring entered are included into sitemap. + * configuration page interface improved (parameters are included into two groups now: main parameters and optional settings) + + +2005-10-27 v1.1.3 + + * the generator creates a sitemap in TEXT FORMAT for you (one URL per line). You can download it from the "Sitemap details" block at the left column of the page. This URLs list can be submitted to Yahoo! at http://submit.search.yahoo.com/free/request + + +2005-09-14 v1.1.2 + + * (fix) asp sites crawling problem + + +2005-08-30 v1.1.1 + + * "sleep" delays are now available to configure to reduce the load on your server + * new configuration directive: "Do not parse URLs" allows to skip fetching some pages to boost + the speed of sitemap generation of the large sites + * single quoted tag + + +2005-08-08 v1.1.0 + + * "resume the interrupted session" feature added + * urls extraction has been improved (some uncatched urls are now processed) + * performance/memory usage optimization + + +2005-07-31 v1.08 + + * generator pages access can be restricted + * minor improvements + + +2005-07-20 v1.07 + + * CRLF problem with sitemaps (that may lead to a parse problem in rare cases) fixed + * script configuration auto-filled with initial values + * robots.txt is now processed both from top level and from the starting URL directory + + +2005-07-14 v1.06 + + * support of (') character in URLs + + +2005-07-14 v1.05 + + * "Content-type" header is checked and only "text/html" entries are processed + * "extensions" config settings trailing space problem fixed + * "gz" added to default excluded extensions + * "change_frequency" setting fix + * skip redirections to non-html files + * interface enhacements + + +2005-07-07 v1.04 + + * full config with initial settings included + + +2005-07-07 v1.03 + + * "custom lastmod time" bug fixed + * all pages exluded when "exclude extensions" field is empty + + +2005-07-05 v1.02 + + * robots.txt protocol is supported ('*' and 'googlebot' user-agents are checked) + * view current process state when crawler is in background mode + * interrupt the crawler in background mode + * show real current path on the configuration page + * show sitemap summary block at the main (configuration) page + * check if sitemap exists on the analyze page to avoid warning messages + * split sitemaps on part per 49,999 URLs for consistency (instead of 50,000) + * redirections to external domains are not followed anymore + + +2005-07-04 v1.01 + + * run-in-background option + * minor bug-fixes + + +2005-07-03 v1.0 + + Initial Release + +---------------------------------------------- +http://www.xml-sitemaps.com diff --git a/generator/data/.htaccess b/generator/data/.htaccess new file mode 100755 index 0000000..8e68bc9 --- /dev/null +++ b/generator/data/.htaccess @@ -0,0 +1,6 @@ +order deny,allow + +deny from all + +allow from all + \ No newline at end of file diff --git a/generator/data/crawl_dump.log b/generator/data/crawl_dump.log new file mode 100755 index 0000000..71622ac Binary files /dev/null and b/generator/data/crawl_dump.log differ diff --git a/generator/data/generator.conf b/generator/data/generator.conf new file mode 100755 index 0000000..9bea569 --- /dev/null +++ b/generator/data/generator.conf @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/generator/data/placeholder.txt b/generator/data/placeholder.txt new file mode 100755 index 0000000..b3a4252 --- /dev/null +++ b/generator/data/placeholder.txt @@ -0,0 +1 @@ +placeholder \ No newline at end of file diff --git a/generator/data/sess_bprm9p4fl503nhno9tstadlbq1 b/generator/data/sess_bprm9p4fl503nhno9tstadlbq1 new file mode 100755 index 0000000..a836018 --- /dev/null +++ b/generator/data/sess_bprm9p4fl503nhno9tstadlbq1 @@ -0,0 +1 @@ +is_admin|b:1; \ No newline at end of file diff --git a/generator/default.conf b/generator/default.conf new file mode 100755 index 0000000..aa36601 --- /dev/null +++ b/generator/default.conf @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/generator/documentation.html b/generator/documentation.html new file mode 100755 index 0000000..7b24d64 --- /dev/null +++ b/generator/documentation.html @@ -0,0 +1,330 @@ + + + +XML Sitemaps Generator - Standalone version + + + + + +
        +

        Standalone XML Sitemap Generator

        + +
        + + + + + +
        + + +

        1. Introduction

        + + + + +

        1. Requirements

        + +
          +
        • The PHP XML generator will work with PHP 4.3.x or higher in default configuration +in Apache web-server environment. +
        • Sitemap generator connects to your website via http port 80, so your host should allow local network connections for php scripts (this is default configuration) +
        • For file permissions requirements please refer to "Installation" section. +
        • The memory size requirements (as well as the time required to complete sitemap generation) depends on the number of pages your website contains. +
        + + + +

        2. Installation

        + +
        +
          +
        1. Unpack the contents of distribution archive to the target folder on your server. +
        2. Make sure to set the following files permissions: +
            +
          • data/ folder - 0777 (rwxrwxrwx) +
          • /path/to/your/sitemap.xml - 0666 (rw-rw-rw-) see below (3.14) +
          +
        3. If you want the sitemap to be build periodically (daily, weekly etc) you should setup +the cron job to run the script using your hosting Control Panel. +The command to use for cron job is shown on the +"Crawling" page. +
        +
        + +

        2.1 Upgrade

        + +
        +If you have previous version of Sitemap Generator already installed, the following steps are required: +
          +
        1. Unpack the contents of distribution archive and upload the following files to the target folder on your server: +
            +
          • index.php +
          • all pages/* files +
          +
        +
        + + +

        3. Configuration tips

        +
          +
        1. Use the full url of your site for the "Starting URL" option. The crawler will explore only the URLs +within the starting directory, i.e. when starting URL is "http://www.example.com/path/index.html", +the "http://www.example.com/path/sub/page.html" will be indexed, but +"http://www.example.com/other/index.html" will NOT. + +
        2. "Save sitemap to" - is the filename in the "public_html/" folder of your website. This file +should be writable by the script. To make sure it is, create this file and set +its permissions to 0666. + + +
        3. It is recommended to use "Server's response" for "Last modification" field. In this case +the entries for static pages will be filled with their real last modification time, while +for dynamic pages the current time is used. + +
        4. "Do not parse" input field contains file types, separated by space. These files +will be added to the sitemap, but not fetched to save bandwidth, because they are +not html files and have no embedded links. Please make sure these files are indexed by Google +since there is no sense in adding them to sitemap otherwise! + +
        5. "Do not parse URLs" works together with the option above to increase the speed of sitemap generation. +If you are sure that some pages at your site do not contain the unique links to other pages, +you can tell generator not to fetch them. +
          For instance, if your site has "view article" pages with urls like "viewarticle.php?..", you +may want to add them here, because most likely all links inside these pages are already listed at +"higher level" (like the list of articles) documents as well: + +
          • viewarticle.php?id=
          + +
          If you are not sure what to write here, just leave this field empty. +Please note that these pages are still included into sitemap. + +
        6. "Exclude extensions" - these files are not crawled and not included in sitemap. + +
        7. To disallow the part of your website from inclusion to the sitemap use +"Exclude URLs" setting: all URLs that contain the strings specified will be skipped. +
          For instance, to exclude all pages within "www.domain.com/folder/" add this line: +
          • folder/
          +
          If your site has pages with lists that can be reordered by columns and URLs look like +"list.php?sort=column2", add this line to exclude duplicate content: +
          • sort=
          + +
          Anyway, you may leave this box empty to get ALL pages listed. + +
        8. "Include ONLY URLs" setting is the opposite to "Exclude URLs". When +it is not empty, ONLY the urls that match the substring entered are included into sitemap. + +
        9. "Individual attributes" setting allows you to set +specific values for last modification time, frequency andpriority per page. +To use it, define specific frequency and priority attributes in the following format: +"url substring,lastupdate YYYY-mm-dd,frequency,priority". +
          Example: +
          +page.php?product=,2005-11-14,monthly,0.9 + +
        10. You may want to limit the number of pages to index to make sure it will not be +endless if your website have an error like unlimited looped links. + +
        11. To limit the maximum running time of the script, define the "Maximum execution time" field +(in seconds). + +
        12. To have a possibility to use "Resume session" feature, define the "Save the script state" field. +This value means the intervals to save the crawler process state, so in case the script was interrupted, +you can continue the process from the last saved point. Set this value to "0" to disable savings. + +
        13. To reduce the load on your server made by the sitemap generator, you can add the "sleep" delay +after each N (configured) requests to your site for X seconds (configured). Leave blank ("0") values +to crawls the site without delays. + +
        14. Google doesn't support sitemap files with more than 50,000 pages. +That's why script supports "Sitemap Index" creation for the big sites. So, it will +create one sitemap index file and multiple sitemap files with 50 thousand pages each. +
          For instance, your website has about 140,000 pages. The XML sitemap generator will +create these files: + +
            +
          • "sitemap.xml" - sitemap index file that includes links to other files (filename depends on what you entered in the "Save sitemap to" field) +
          • "sitemap1.xml" - sitemap file (URLs from 1 to 50,000) +
          • "sitemap2.xml" - sitemap file (URLs from 50,001 to 100,000) +
          • "sitemap3.xml" - sitemap file (URLs from 100,001 to 140,000) +
          +Please make sure all of these files are writable if your website is large. + +
        15. Enable "Create HTML Sitemap" option to let generator create a sitemap for your visitors. +You should also define the "HTML Sitemap filename" where the sitemap will be stored. It is possible +to split html sitemap onto multiple files by defining the "Number of links per page in HTML sitemap" +option. +
          +The filenames are like the following: +
            +
          • "sitemap.html" - in case when all links fit in one file +
            OR +
          • "sitemap1.html" - site map file, page 1 +
          • "sitemap2.html" - site map file, page 2 +
          • etc +
          + +
          +Same as point above: please make sure all of these files are writable. +
          +
          +The site map pages layout can be modified to suit to your website in pages/mods/sitemap_tpl.html file. +
          +Besides modifying the stylesheet for html sitemap, you can change the way it is formatted. The basic template commands are: +
            +
          • <TLOOP XX>...</TLOOP> - defines a repeating sequence of code (like page numbers or sitemap links)
          • +
          • <TIF XX>...</TIF> - defines a conditional statement that is inserted only when a specific term is met
          • +
          • <TVAR XX> - inserts a value of a specified variable
          • +
          +Please refer to sitemap_tpl.html file for usage example. + + + + +
        16. Enable GZip compression of sitemap files to save on disk space and bandwidth. In this +case ".gz" will be added to sitemap filenames (like "sitemap.xml.gz"). + +
        17. "Sitemap URL" is the same file entered in "Save sitemap to" field, but in the URL form. +It is required to inform Google about sitemap address. + +
        18. Set "Ping Google" checkbox enabled to let the script inform Google on every sitemap +change. In this way you will always let google know about the fresh information on your site. + +
        19. If you want to restrict access to your generator pages, set the login and password here. + +
        + + +

        4. Usage

        +
          +
        1. The first step is the script "Configuration". +The script will show you the alert messages if the problem is found (e.g., config file +is not writable).
          +Do not forget to save the settings for your website after making the changes. +
        2. Try to crawl your site using "Crawling" page. Just +press "Run" button and you will see the generation progress information, including: +
            +
          • Links depth +
          • Current page +
          • Pages scanned +
          • Pages left +
          • Time passed +
          • Time left (estimated) +
          +Please be patient and wait for the crawling completion, for the large sites it may +take significant time. Upon the completion the script will automatically redirect you to the +"View Sitemap" page. + +
        3. For the large websites you may want to use "Run in background" option. In this case +the crawler will keep working even after you will click on the other page or even closed +your browser. + +
        4. When your previous session was interrupted by you or the script has been suspended by a +system, you can resume the process from the last saved state. The time intervals for state +saving is defined on the "Configuration" screen. + +
        5. Later on you may want to setup a cron job to refresh your sitemap (described above in +the "Installation" section). + +
        6. When the generator script is running (either with cron or using "Run in background" +feature), you will see it's progress state on "Crawling" page. There you will also find +the link to stop the script, which is very useful for big sites because you don't +have to wait +until it is finished if you want to modify the configuration and re-run the script. + +
        7. On the "View Sitemap" page the content of the recently generated sitemap is displayed. +For the large sites multiple parts are shown, including sitemap index and every sitemap +file separately. + +
        8. +When the sitemap is already generated, "Sitemap details" block appears in the left column of the pages. +It contains a link to download xml sitemap and also a sitemap in text format (one URL per line). +Some other details are also available: +
            +
          • Request date +
          • Processing time (sec) +
          • Pages indexed +
          • Sitemap files +
          • Pages size (Mb) +
          + +
        9. "Analyze" feature allows you to easily investigate +the site structure. It represents the tree-like list of directories of your website, +indicating the number of pages in every folder. You can expand/collapse the tree parts +by clicking the [x] signs. + +
        10. Sometimes it is very helpful to know the dynamics of the sites contents. The +"ChangeLog" page shows the list of all crawling sessions, +including: +
            +
          • Date/Time +
          • Total pages +
          • Proc.time, sec +
          • Bandwidth, Mb +
          • Number of New URLs +
          • Number of Removed URLs +
          • Number of Broken links +
          + +You can click any of the sessions titles to see detailed page with the full list of +"Added URLs" and "Removed URLs". As you may see, on this page you will +easily track how website changes in time, which is especially useful for large dynamic, +database-driven sites. + +
        11. One more feature that is naturally supported by website crawler is +"Broken Links" list page. You will +see all the pages URLs that were failed to load by the script (HTTP code 404 was returned) +AND also corresponding list of pages that refer to the broken pages. +Having this page on the screen you can easily fix this problem on your website. + +
        12. Concluding, if you will setup the cron job to run the Google sitemap creator script +and enable "Inform Google" feature, everything will work automatically without a +user interaction required. +
          And you still can refer to interesting details at Analyze, ChangeLog, Broken Links +and View Sitemap pages at any time. + +
        +
        + + + +
        +
        + + + + \ No newline at end of file diff --git a/generator/howto-install.pdf b/generator/howto-install.pdf new file mode 100755 index 0000000..f79e07f Binary files /dev/null and b/generator/howto-install.pdf differ diff --git a/generator/index.php b/generator/index.php new file mode 100755 index 0000000..06871ef --- /dev/null +++ b/generator/index.php @@ -0,0 +1,201 @@ +$v) $rt.=" '$k' => '".addslashes($v)."',"; $rt.=")"; return $rt; } error_reporting(E_ALL&~E_NOTICE); define('i3SMAPpcK', 'sva@negjro.hn'); define('XML_DOWNLOAD_DATE', '2016-08-10 14:02:24'); @ini_set ("include_path", ini_get ("include_path") . '.;pages/;'.(dirname(__FILE__).'\\pages').''); @ini_set ("serialize_precision", 5); define('smWzxPC1LKDbUte','crawl_dump.log'); define('Uv9x2nKq2xFMz','crawl_state.log'); define('AheSQAhNo9A7oMn','crawl_state_bak.log'); define('wLyh1d0ilMb','interrupt.log'); define('qDot7WxFYvQPR', dirname(__FILE__).'/'); define('Il2qN32A6EeND', dirname(__FILE__).'/pages/'); define('zuXb1RhRl0', dirname(__FILE__).'/pages/mods/'); define('dVANLaXfylWyj7', 44824); include qDot7WxFYvQPR.'pages/class.utils.inc.php'; preg_match('#index\.([a-z0-9]+)(\(.+)?$#',__FILE__,$pm); $jDyVj7CkPgy = $pm[1] ? $pm[1] : 'php'; define('LKwlfmXlFQZwAHyN', dirname(__FILE__).'/default.conf'); if(function_exists('ini_set')) @ini_set("magic_quotes_runtime",'Off'); $grab_parameters = isset($grab_parameters) ? $grab_parameters : array(); if(isset($grab_parameters['xs_password'])) $grab_parameters['xs_password']=md5($grab_parameters['xs_password']); eiTxuqFQGsvY(LKwlfmXlFQZwAHyN, $grab_parameters, true); if(!defined('ebJGVa__YE')) define('ebJGVa__YE', isset($grab_parameters['xs_datfolder']) ? $grab_parameters['xs_datfolder'] : dirname(__FILE__).'/data/'); define('QKL711IVYlu7s9YRPO', ebJGVa__YE.'progress/'); define('VrIhIZ2UGhCqDiv', ebJGVa__YE.'generator.conf'); if(!eiTxuqFQGsvY(VrIhIZ2UGhCqDiv, $grab_parameters) && isset($sAg5YsdwOc)){ $GLOBALS['sg_runerror'] = 'Configuration file not found: '.VrIhIZ2UGhCqDiv; return; } define('JKuuSDWmKU5r3A502',(isset($grab_parameters['xs_sm_text_filename'])&&$grab_parameters['xs_sm_text_filename']) ? $grab_parameters['xs_sm_text_filename'] : ebJGVa__YE . 'urllist.txt'); define('JcYkhlEMDOd63veSaCB', (isset($grab_parameters['xs_sm_text_url'])&&$grab_parameters['xs_sm_text_url']) ? $grab_parameters['xs_sm_text_url'] : 'data/urllist.txt'); define('vCm7s9tc6', preg_replace('#[^\\/]+?\.xml$#', $grab_parameters['xs_rssfilename'], $grab_parameters['xs_smname'])); define('wqhIa8lyw', preg_replace('#[^\\/]+?\.xml$#', 'ror.xml', $grab_parameters['xs_smname'])); define('r7TDdgweuX4nLJSSG',preg_replace('#[^\\/]+?\.xml$#', 'ror.xml', $grab_parameters['xs_smurl'])); define('G2z7RcI6R969uBUdPAI', ebJGVa__YE . 'gbase.xml'); define('Pl78ZpRHcI', 'data/gbase.xml'); if(!$_GET&&$HTTP_GET_VARS)$_GET=$HTTP_GET_VARS; if(!$_POST&&isset($HTTP_POST_VARS))$_POST=$HTTP_POST_VARS; if(function_exists('ini_set')) { @ini_set ("output_buffering", '0'); if($grab_parameters['xs_memlimit']) @ini_set ("memory_limit", $grab_parameters['xs_memlimit'].'M'); if($grab_parameters['xs_exec_time']) @ini_set ("max_execution_time", $grab_parameters['xs_exec_time']); @ini_set("session.save_handler",'files'); @ini_set('session.save_path', ebJGVa__YE); } if(@ini_get("magic_quotes_gpc")){ if($_GET)foreach($_GET as $k=>$v){$_GET[$k]=stripslashes($v);} if($_POST)foreach($_POST as $k=>$v){$_POST[$k]=stripslashes($v);} } $op=$_REQUEST['op']; if(function_exists('session_start') && !isset($sAg5YsdwOc)) @session_start(); if($op=='logout'){ $_SESSION['is_admin'] = false; setcookie('sm_log',''); unset($op); } if(!isset($op)) $op = 'config'; if(!$_SESSION['is_admin']) $_SESSION['is_admin'] = ($_COOKIE['sm_log']==(md5($grab_parameters['xs_login']).'-'.md5($grab_parameters['xs_password']))); if(!$_SESSION['is_admin'] && $op != 'crawlproc') { include qDot7WxFYvQPR.'pages/page-login.inc.php'; if(!$_SESSION['is_admin']) exit; } define('BK2AXP6fR', true); include qDot7WxFYvQPR.'pages/page-configinit.inc.php'; include qDot7WxFYvQPR.'pages/class.http.inc.php'; switch($op){ case 'crawl': case 'crawlproc': case 'config': case 'view': case 'analyze': case 'chlog': case 'l404': case 'reflinks': case 'ext': case 'proc': include qDot7WxFYvQPR.'pages/page-'.$op.'.inc.php'; break; case 'pinfo': phpinfo(); break; } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/license.html b/generator/license.html new file mode 100755 index 0000000..6c869d1 --- /dev/null +++ b/generator/license.html @@ -0,0 +1,69 @@ + + + +XML Sitemaps Generator - Standalone version + + + + +
        +

        License for Standalone XML Sitemap Generator

        +
        + + + +
        + + +

        LICENSE GRANT

        + +XML-Sitemaps team ("XML-Sitemaps") grants you a non-exclusive license to use this software, and any associated documentation ("The Software"), as indicated +herein. If you have purchased a Single License, multiple copies of the Software may be installed +and used, but for internal use only, for your personal websites. +It cannot be used to create sitemaps for 3rd party sites or provided a service to others (paid or free). +The Software is +in "use" on a server when it has been loaded into temporary memory (i.e. RAM) +or installed into permanent memory (hard disk or other device) of that computer. + +

        RESTRICTIONS

        + +You MAY NOT: +
          +
        • (a) copy and distribute the Software or any portion of it; +
        • (b) sublicense, lease, rent, or transfer this Software to another; +
        • (c) cause or permit reverse engineering, disassembly, decompilation or alteration of this +Software; +
        • (d) remove any product identification, copyright notices, or other notices or +proprietary restrictions from this Software; +
        • (e) copy the documentation accompanying the software. +
        + +

        TERM

        + +This License is effective until terminated. You may terminate it at any time by destroying the Software, together with all copies thereof. This License will also terminate if you fail to comply with any term or condition of this Agreement. Upon such termination, you agree to destroy the Software, together with all copies thereof. +
        +By downloading the software you agree that you examined all requirements to run the Software. No refunds will be given after that. + +

        COPYRIGHT/OWNERSHIP

        + +This Software and its source code are proprietary products of XML-Sitemaps and are protected by copyright and other intellectual property laws. The Software is licensed and not sold. You acquire only the right to use the Software and do not acquire any rights, express or implied, in the Software other than those specified in this License. + +

        DISCLAIMER OF WARRANTIES

        + +The Software is supplied "AS IS". XML-Sitemaps disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The user must assume the entire risk of using the Software. + +

        DISCLAIMER OF DAMAGES

        + +XML-Sitemaps assumes no liability for damages, direct or consequential, which may result from the use of the Software, even if XML-Sitemaps has been advised of the possibility of such damages. Any liability of the seller will be limited to refund the purchase price. + +
        + +
        +
        + + + + \ No newline at end of file diff --git a/generator/pages/class.gping.inc.php b/generator/pages/class.gping.inc.php new file mode 100755 index 0000000..f112b00 --- /dev/null +++ b/generator/pages/class.gping.inc.php @@ -0,0 +1,201 @@ +$ri) { if(is_array($ri['urls'])) foreach($ri['urls'] as $TpQN9kkrncje4u) { foreach($zyGoJM7SL as $cDdos7BIlJ) if($cDdos7BIlJ) { $cDdos7BIlJ .= urlencode($TpQN9kkrncje4u); $K5kCC5JoHjozL->fetch($cDdos7BIlJ); } } } } function SgSv9EHvXQ8D($TpQN9kkrncje4u,$y_id) { global $K5kCC5JoHjozL; for($i=0;$i weblogUpdates.ping ' . $psf7nhFBQzfQO7 . ' ' . $pZraQah5aJyN . '/ '; $zyGoJM7SL= preg_split('#[\r\n]+#', $XjWSHkCxWdmWWs); foreach($zyGoJM7SL as $_u) { $oHXaaeWlrm8J5445 = $K5kCC5JoHjozL->fetch($_u, 0, false, false, $x_query); } } } $YF0XpEM2w4 = new GPing(); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/pages/class.grab.inc.php b/generator/pages/class.grab.inc.php new file mode 100755 index 0000000..8ac5a59 --- /dev/null +++ b/generator/pages/class.grab.inc.php @@ -0,0 +1,2189 @@ +ctime = $MaMJn8Q5cIWqbSsi3R[0]+$MaMJn8Q5cIWqbSsi3R[1] - $this->L3KcxI6fDP; + +$_ut = ($this->ctime - $tDJZkTUkMBALBf1 > 5); +if( $_ut || $UVtSAwQYOsEzzCeKfY || ( ( ( $this->pl==0||$this->pn==1 || ($this->pn%$grab_parameters['xs_progupdate'])==0) || $this->VP8vAJd3fs3x1Ygo>=$this->qWPODI2gyt3Aa) +&& ($this->hDqkwjeqw['pn'] != $this->pn) +&& !$XJMFGqwQ_v3sQa0y ) ) +{ +$this->hDqkwjeqw['pn'] = $this->pn; +$tDJZkTUkMBALBf1 = $this->ctime; $this->mu = function_exists('memory_get_usage') ? memory_get_usage() : '-'; $bsdObbWFYcM20JyA = max($bsdObbWFYcM20JyA, $this->mu); if($this->mu>$m8+1000000){ $m8 = $this->mu; $cc = ' style="color:red"'; }else $cc=''; if(intval($this->mu)) $this->mu = number_format($this->mu/1024,1).' Kb'; z_fhGrViQaOeql9("\n(memory".($cc?' up':'').": $this->mu)
        \n"); $this->progpar = array( $this->ctime, // 0. running time + str_replace($this->iK6zN3FNMZ, '', $this->F4IXRYNqGySShUMjj), // 1. current URL + $this->pl, // 2. urls left + $this->pn, // 3. processed urls + $this->tsize, // 4. bandwidth usage + $this->links_level, // 5. depth level + $this->mu, // 6. memory usage + $this->VP8vAJd3fs3x1Ygo, // 7. added in sitemap + $this->ApWk9cNV4bVZkvPX, // 8. in the queue + $this->nettime, // 9. network time + $this->hOuc4HLzwywe, // 10. last net time + $this->fetch_no, // 11. fetched urls + $this->dO303CwfI // 12. number of added images/videos/etc + ); if($this->lT0Vs3VxjBxAH3['bgexec']){ if(((time()-$naPDZDyR2SqyxQvp)>e6p6oz8D73L8('xs_state_interval',5)) || $UVtSAwQYOsEzzCeKfY){ $naPDZDyR2SqyxQvp = time(); $this->progpar[] = fiJIJjF_yojaqa(); if($XJMFGqwQ_v3sQa0y){ $this->progpar[] = $XJMFGqwQ_v3sQa0y; } QNBZB8U2gUbUbMO(Uv9x2nKq2xFMz,G8ByTBG0gz4G9($this->progpar)); } } if($this->d069GWOopKkeA && (!$this->vBIKyMEhBONsP['f'] || $_ut)) { call_user_func($this->d069GWOopKkeA,$this->progpar); } } else { call_user_func($this->d069GWOopKkeA,array('cmd'=>'ping', 'bg' => $this->lT0Vs3VxjBxAH3['bgexec'])); } return $this->progpar; } function MTvi5BisLl($nm, $cn){ preg_match('#]*name="'.$nm.'"[^>]*value="(.*?)"#is', $cn, $_inpm); return $_inpm[1]; } function SWv7WC7WEJVO($cn, $dp){ global $grab_parameters,$K5kCC5JoHjozL; $cKCGec1Tw = array(); if(strstr($cn, '__VIEWSTATE')){ preg_match_all('#]*action="(.*?)".*?"__VIEWSTATE".*?#is', $cn, $_vsm); foreach($_vsm[0] as $i=>$_vm) { $_action = $_vsm[1][$i]; $cCqeu6KEd4LFk = $this->XQa0UewN3f($_action, $this->F4IXRYNqGySShUMjj); if($cCqeu6KEd4LFk == 1) continue; $_fex2 = $this->HnabdBaTOZ($_action); if($_fex2['f'])continue; $dSeuGOAE_8dFCli = array('__VIEWSTATE','__VIEWSTATEGENERATOR','__EVENTVALIDATION'); $YaDivn1VBzy6yJ = array(); foreach($dSeuGOAE_8dFCli as $p) $YaDivn1VBzy6yJ[$p] = $this->MTvi5BisLl($p, $_vm); $Q6E2sX2sXDNUc = array(); preg_match_all('#__doPostBack(\(.*?\))#is', $_vm, $_dpball); foreach($_dpball[1] as $_dpb) { $_dpb = stripslashes(str_replace(''',"'",$_dpb)); if(preg_match('#\'(.*?)\'(?:\s*\,\'(.*?)\')?#', $_dpb, $_a)){ if($Q6E2sX2sXDNUc[$_a[1]]++) continue; $_fex2 = $this->HnabdBaTOZ($_a[1]); if(!$_fex2['f'] ){ $lT0Vs3VxjBxAH3 = $YaDivn1VBzy6yJ; $lT0Vs3VxjBxAH3['__EVENTTARGET'] = $_a[1]; $lT0Vs3VxjBxAH3['__EVENTARGUMENT'] = $_a[2]; z_fhGrViQaOeql9("\n(post $dp) $_action -> $_a[1]\n"); $O3mTecPWsZVPj45u = $K5kCC5JoHjozL->fetch($_action, 0, false, false, http_build_query($lT0Vs3VxjBxAH3,'','&'), array('contenttype'=>'application/x-www-form-urlencoded')); $this->ffpknLH3lruh(); if(($_action != $O3mTecPWsZVPj45u['last_url'])){ $cKCGec1Tw[] = $O3mTecPWsZVPj45u['last_url']; }else { $cKCGec1Tw = array_merge($cKCGec1Tw, $this->J288sfitpupJnEcw3($O3mTecPWsZVPj45u['content'], $dp+1)); } z_fhGrViQaOeql9("\n>>".count($cKCGec1Tw).", ".$cKCGec1Tw[0]."\n"); } } } } } return $cKCGec1Tw; } function J288sfitpupJnEcw3($cn, $dp = 0){ global $grab_parameters; if($dp>1)return array(); $mVBhOIPtuHXMVt3_B = $grab_parameters['xs_utf8_enc'] ? 'isu':'is'; $_t = 'a|area|go'; if(!$grab_parameters['xs_disable_feed']) $_t .= '|link'; preg_match_all('#<(?:'.$_t.')(?:[^>]*?\s)href\s*=\s*(?:"([^"]*)|\'([^\']*)|([^\s\"\\\\>]+))[^>]*>#is'.$mVBhOIPtuHXMVt3_B, $cn, $am); preg_match_all('#]*?)?value\s*=\s*"(http[^"]*)#is'.$mVBhOIPtuHXMVt3_B, $cn, $wbHEDNyTv6j); $_sc = 'i?frame'.($grab_parameters['xs_parse_js'] ? '|script':''); preg_match_all('#<'.$_sc.'\s[^>]*?src\s*=\s*["\']?(.*?)("|>|\')#is', $cn, $nexwy0P_rGvjchKEd); preg_match_all('#]*http-equiv\s*=\s*"?refresh[^>]*URL\s*=\s*["\']?(.*?)("|>|\'[>\s])#'.$mVBhOIPtuHXMVt3_B, $cn, $NrUnGhCWocSUEo); if($grab_parameters['xs_parse_swf']) preg_match_all('#]*application/x-shockwave-flash[^>]*data\s*=\s*["\']([^"\'>]+).*?>#'.$mVBhOIPtuHXMVt3_B, $cn, $SXMDOThfSvBx_D); + + else $SXMDOThfSvBx_D = array(array(),array()); + + + preg_match_all('#]*?onclick\s*=\s*"[^"]*\.load\(\'([^\']*)#'.$mVBhOIPtuHXMVt3_B, $cn, $WQDjuasXLg); + + + preg_match_all('#"url"\:"(http[^"]*)#is'.$mVBhOIPtuHXMVt3_B, $cn, $uy4KVwRH1rG28p_); + + $cKCGec1Tw = array(); + + $fQ0AoPlprI = 'stylesheet|publisher'; + + if(isset($grab_parameters['xs_robotstxt']) && $grab_parameters['xs_robotstxt']) + + $fQ0AoPlprI .= '|nofollow'; + + for($i=0;$ihVgV5J75NEESyCQgUY('xs_parse_js_only', $this->F4IXRYNqGySShUMjj, true) + + ){ + + z_fhGrViQaOeql9("\n*** Parse JS - ".$this->F4IXRYNqGySShUMjj."\n"); + + + $cKCGec1Tw = @array_merge($cKCGec1Tw, $this->SWv7WC7WEJVO($cn, $dp)); + + } + + return $cKCGec1Tw; + + } + + function KH6aKAnNWiCYJWvf($q2PfaTx_3ig){ + + + return preg_replace('#^(www|\w)\.#', '', $q2PfaTx_3ig); + + } + + function XQa0UewN3f(&$a, $EYyBXYy9WWbLGYL5iQ, $blUx9Th8GWx0bsSC = '') + + { + + global $grab_parameters; + + $OdZB8ypqkYH0RE87bq = $this->OdZB8ypqkYH0RE87bq; + + $KrTMgWoxdnmEih0271 = $this->KrTMgWoxdnmEih0271; + + + + if(strstr($EYyBXYy9WWbLGYL5iQ,'://')) { + + $OdZB8ypqkYH0RE87bq = preg_replace('#(:\/\/.*?)\/.*$#', '$01', $KrTMgWoxdnmEih0271); + + + } + + $WyXkTyAK3kSMA = parse_url($this->Niq61B3f5T); + + if($WyXkTyAK3kSMA['scheme'] && substr($a, 0, 2) == '//') + + $a = $WyXkTyAK3kSMA['scheme'].':'.$a; + + $KsbskAuOsxLPc1sC = @parse_url($a); + + if($KsbskAuOsxLPc1sC['scheme'] && ($KsbskAuOsxLPc1sC['scheme']!='http')&& ($KsbskAuOsxLPc1sC['scheme']!='https')) { + + $cCqeu6KEd4LFk = 1; + + }else { + + $a = str_replace(':80/', '/', $a); + $a = str_replace(':443/', '/', $a); + + if($a[0]=='?')$a = preg_replace('#^([^\?]*?)([^/\?]*?)(\?.*)?$#','$2',$EYyBXYy9WWbLGYL5iQ).$a; + + if($grab_parameters['xs_inc_ajax'] && strstr($a,'#!')){ + + $KrTMgWoxdnmEih0271 = preg_replace('#\#.*$#', '', $KrTMgWoxdnmEih0271); + + if($a[0] != '/' && !strstr($a,':/')) + + $a = $KrTMgWoxdnmEih0271 . preg_replace('#^([^\#]*?/)?([^/\#]*)?(\#.*)?$#', '$2', $EYyBXYy9WWbLGYL5iQ).$a; + + } + + if(preg_match('#^https?(:|&\#58;)#is',$a)){ + + if(preg_match('#://[^/]*$#is',$a)) + + $a .= '/'; + + } + + else if($a&&$a[0]=='/')$a = $OdZB8ypqkYH0RE87bq.$a; + + else $a = $KrTMgWoxdnmEih0271.$a; + + if($a[0]=='/')$a = $OdZB8ypqkYH0RE87bq.$a; + + $a=str_replace('/./','/',$a); + + $a=preg_replace('#/\.$#','/',$a); + + if(substr($a,-2) == '..')$a.='/'; + + if(strstr($a,'../')){ + + preg_match('#(.*?:.*?//.*?)(/.*)$#',$a,$aa); + + do{ + + $ap = $aa[2]; + + $aa[2] = preg_replace('#/?[^/]*/\.\.#','',$ap,1); + + }while($aa[2]!=$ap); + + $a = $aa[1].$aa[2]; + + } + + $a = preg_replace('#/\./#','/',$a); + + $a = str_replace( + + array('&','&','&',':',':','/', '/'), + + array('&', '&', '&', ':', ':', '/', '/') + + ,$a); + + + + + $a = preg_replace('#([^&])\#'.($grab_parameters['xs_inc_ajax']?'([^\!]|$)':'').'.*$#','$01',$a); + + + $a = preg_replace('#^(/)/+#','\\1',$a); + + + $a = preg_replace('#[\r\n]+#s','',$a); + + + if($grab_parameters['xs_cleanurls']) + + $a = @preg_replace($grab_parameters['xs_cleanurls'],'',$a); + + if($grab_parameters['xs_custom_replace']){ + + global $Uem3Rs_JAbbzZ; + + if(!isset($Uem3Rs_JAbbzZ)){ + + $_ar = preg_split('#[\r\n]+#', trim($grab_parameters['xs_custom_replace'])); + + $Uem3Rs_JAbbzZ = array(); + + foreach($_ar as $v){ + + $me = explode(' ', $v); + + if($me[0]&&$me[1])$Uem3Rs_JAbbzZ['#'.$me[0].'#'] = $me[1]; + + } + + } + + if($Uem3Rs_JAbbzZ){ + + $a = @preg_replace(array_keys($Uem3Rs_JAbbzZ),array_values($Uem3Rs_JAbbzZ),$a); + + } + + } + + if($grab_parameters['xs_cleanpar']) + + { + + do { + + $jwblm4pgqCSdGONbuY = $a; + +//$a = @preg_replace('#[\\?\\&]('.$grab_parameters['xs_cleanpar'].')=[a-z0-9\-\.\_\=\/]+$#i','',$a); +$a = @preg_replace('#[\\?\\&]('.$grab_parameters['xs_cleanpar'].')=[a-z0-9\-\.\_\=\/]*$#i','',$a); + +//$a = @preg_replace('#([\\?\\&])('.$grab_parameters['xs_cleanpar'].')=[a-z0-9\-\.\_\=\/]+&#i','$1',$a); +$a = @preg_replace('#([\\?\\&])('.$grab_parameters['xs_cleanpar'].')=[a-z0-9\-\.\_\=\/]*&#i','$1',$a); + + }while($a != $jwblm4pgqCSdGONbuY); + + $a = @preg_replace('#\?\&?$#','',$a); + + } + + + $cCqeu6KEd4LFk = (strtolower(substr($a,0,strlen($this->Niq61B3f5T)) ) != strtolower($this->Niq61B3f5T)) ? 1 : 0; + + if($cCqeu6KEd4LFk && $grab_parameters['xs_allow_subdomains']){ + + $KsbskAuOsxLPc1sC = @parse_url($a); + + if($KsbskAuOsxLPc1sC['host'] && + + + preg_match('#^(.*?\.)?'.preg_quote($this->KH6aKAnNWiCYJWvf($WyXkTyAK3kSMA['host']),'#').'$#', $KsbskAuOsxLPc1sC['host']) + + ){ + + $cCqeu6KEd4LFk = 2; + + } + + } + + if($cCqeu6KEd4LFk && $blUx9Th8GWx0bsSC) { + + + $r8lJYbqC8z9vA_YwgZ = $this->dYfVkEYUS1map3XFd8($blUx9Th8GWx0bsSC); + + + if($r8lJYbqC8z9vA_YwgZ && preg_match('#('.$r8lJYbqC8z9vA_YwgZ.')#', $a)) + + $cCqeu6KEd4LFk = 2; + + } + + } + + z_fhGrViQaOeql9("
        ($a -- $cCqeu6KEd4LFk - $EYyBXYy9WWbLGYL5iQ - $OdZB8ypqkYH0RE87bq - $KrTMgWoxdnmEih0271 - [".$this->KH6aKAnNWiCYJWvf($WyXkTyAK3kSMA['host']).", ".$KsbskAuOsxLPc1sC['host']."])
        \n",3); + + return $cCqeu6KEd4LFk; + + } + + function hVgV5J75NEESyCQgUY($oJ5unwFQhNolkKRYs, $EYyBXYy9WWbLGYL5iQ, $OBfrooBYrp0IcNgFcy5 = true){ + + global $XATMoSEjrtJR2AWn9u,$grab_parameters; + + $dA8T7ubjCXUZ2 = $OBfrooBYrp0IcNgFcy5; + + if($grab_parameters[$oJ5unwFQhNolkKRYs]){ + + if(!isset($XATMoSEjrtJR2AWn9u[$oJ5unwFQhNolkKRYs])){ + + $XATMoSEjrtJR2AWn9u[$oJ5unwFQhNolkKRYs] = $grab_parameters[$oJ5unwFQhNolkKRYs]; + + if(!preg_match('#[\*\$]#',$XATMoSEjrtJR2AWn9u[$oJ5unwFQhNolkKRYs])) + + $XATMoSEjrtJR2AWn9u[$oJ5unwFQhNolkKRYs] = preg_quote($XATMoSEjrtJR2AWn9u[$oJ5unwFQhNolkKRYs],'#'); + + $XATMoSEjrtJR2AWn9u[$oJ5unwFQhNolkKRYs] = '#'.str_replace(' ', '|', $XATMoSEjrtJR2AWn9u[$oJ5unwFQhNolkKRYs]).'#'; + + } + + $dA8T7ubjCXUZ2 = preg_match($XATMoSEjrtJR2AWn9u[$oJ5unwFQhNolkKRYs],$EYyBXYy9WWbLGYL5iQ); + + } + + return $dA8T7ubjCXUZ2; + + } + + function dYfVkEYUS1map3XFd8($KDTEDseXOWMlsG){ + + if(!isset($this->v9IRE8CtKo6[$KDTEDseXOWMlsG])){ + + $this->v9IRE8CtKo6[$KDTEDseXOWMlsG] = trim($KDTEDseXOWMlsG) ? preg_replace("#\s*[\r\n]+\s*#",'|', (strstr($s=trim($KDTEDseXOWMlsG),'*')?$s:preg_quote($s,'#'))) : ''; + + } + + return $this->v9IRE8CtKo6[$KDTEDseXOWMlsG]; + + } + + function fylX1lYhxq9Swj9($m2GAv90hXZhKCGR, $EYyBXYy9WWbLGYL5iQ) { + + $f = false; + + if($m2GAv90hXZhKCGR) + + foreach($m2GAv90hXZhKCGR as $bm) + + { + + $f = $f || preg_match('#^('.$bm.')#', $EYyBXYy9WWbLGYL5iQ); + + } + + return $f; + + } + + function VFZlf5sNkzX7GF7k($EYyBXYy9WWbLGYL5iQ) { + + return $this->fylX1lYhxq9Swj9($this->Nt_1IROZP14owm4DAeH, $EYyBXYy9WWbLGYL5iQ) + + && !$this->fylX1lYhxq9Swj9($this->botmatch_allow, $EYyBXYy9WWbLGYL5iQ); + + } + + function HnabdBaTOZ(&$EYyBXYy9WWbLGYL5iQ) { + + global $grab_parameters; + + if(isset($this->xNVJOXeK2sW[$EYyBXYy9WWbLGYL5iQ])) + + $EYyBXYy9WWbLGYL5iQ =$this->xNVJOXeK2sW[$EYyBXYy9WWbLGYL5iQ]; + + $f = $this->HDxSUg0eWtUQjt && preg_match('#'.$grab_parameters['xs_exc_skip'].'#i',$EYyBXYy9WWbLGYL5iQ); + + if($this->GjJcq8T1P9&&!$f)$f=$f||@preg_match('#('.$this->GjJcq8T1P9.')#',$EYyBXYy9WWbLGYL5iQ); + + if($this->duBMhqfH7kGKH && $f && $grab_parameters['xs_incl_force']) + + $f = !preg_match('#('.$this->duBMhqfH7kGKH.')#',$EYyBXYy9WWbLGYL5iQ); + + $f = $f || $this->VFZlf5sNkzX7GF7k($this->T_IVB6tYAThxWS . $EYyBXYy9WWbLGYL5iQ); + + $f2 = false; + + $mXVOQkdQzwnNzlTzU = false; + + if(!$f) + + { + + $f2 = $this->kNSV2dId7YB && preg_match('#'.$grab_parameters['xs_inc_skip'].'#i',$EYyBXYy9WWbLGYL5iQ); + + if($this->duBMhqfH7kGKH && !$f2) + + $f2 = $f2||(preg_match('#('.$this->duBMhqfH7kGKH.')#',$EYyBXYy9WWbLGYL5iQ)); + + if($grab_parameters['xs_parse_only'] && !$f2 && $EYyBXYy9WWbLGYL5iQ && ($EYyBXYy9WWbLGYL5iQ!='/')) + + { + + + $f2 = $f2 || !$this->hVgV5J75NEESyCQgUY('xs_parse_only', $EYyBXYy9WWbLGYL5iQ, true); + + } + + } + + $f3 = false; + + if($this->noincmask)$f3=@preg_match('#('.$this->noincmask.')#',$EYyBXYy9WWbLGYL5iQ); + + return array('f' => $f, 'f2' => $f2, 'f3' => $f3); + + } + + + + function pJIy8HIUg($lT0Vs3VxjBxAH3,&$urls_completed) { + + global $grab_parameters,$K5kCC5JoHjozL; + + + error_reporting(E_ALL&~E_NOTICE); + + $this->lT0Vs3VxjBxAH3 = $lT0Vs3VxjBxAH3; + + @set_time_limit($grab_parameters['xs_exec_time']); + + if($this->lT0Vs3VxjBxAH3['bgexec']) + + { + + ignore_user_abort(true); + + } + + register_shutdown_function('MjfS99JQfMEzIgi'); + + if(function_exists('ini_set')) + + { + + @ini_set("zlib.output_compression", 0); + + @ini_set("output_buffering", 0); + + } + + $MaMJn8Q5cIWqbSsi3R = explode(" ",microtime()); + + $this->L3KcxI6fDP = $MaMJn8Q5cIWqbSsi3R[0]+$MaMJn8Q5cIWqbSsi3R[1]; + + $starttime = $u3Aj3kpP8f7NX = time(); + + $bsdObbWFYcM20JyA = $this->nettime = 0; + + $this->iK6zN3FNMZ = $this->lT0Vs3VxjBxAH3['initurl']; + + $this->qWPODI2gyt3Aa = $this->lT0Vs3VxjBxAH3['maxpg']>0 ? $this->lT0Vs3VxjBxAH3['maxpg'] : 1E10; + + $RlO1HaAgQ = $this->lT0Vs3VxjBxAH3['maxdepth'] ? $this->lT0Vs3VxjBxAH3['maxdepth'] : -1; + + $this->d069GWOopKkeA = $this->lT0Vs3VxjBxAH3['progress_callback']; + + $this->GjJcq8T1P9 = $this->dYfVkEYUS1map3XFd8($grab_parameters['xs_excl_urls']); + + $this->duBMhqfH7kGKH = $this->dYfVkEYUS1map3XFd8($grab_parameters['xs_incl_urls']); + + $this->noincmask = $this->dYfVkEYUS1map3XFd8($grab_parameters['xs_noincl_urls']); + + $b7bWC1DiTPmt8mWhN = $this->dYfVkEYUS1map3XFd8($grab_parameters['xs_prev_sm_incl']); + + $Hqm42kdaBr = $gjEB17v5UJj1SxRZ = array(); + + $ZR1vtYkW3IIT6ji = ''; + + $tV12hsJy_ = preg_split('#[\r\n]+#', $grab_parameters['xs_ind_attr']); + + $gk7xyukmlMb = '#200'.($grab_parameters['xs_allow_httpcode']?'|'.$grab_parameters['xs_allow_httpcode']:'').'#'; + + $kYhgTL6xjtaMnUKyj = '#400|429'.($grab_parameters['xs_badreq_httpcode']?'|'.$grab_parameters['xs_badreq_httpcode']:'').'#'; + + if($grab_parameters['xs_memsave']) + + { + + if(!file_exists(QKL711IVYlu7s9YRPO)) + + mkdir(QKL711IVYlu7s9YRPO, 0777); + + else + + if($this->lT0Vs3VxjBxAH3['resume']=='') + + Znq7ffD8tRtK7G7k(QKL711IVYlu7s9YRPO, '.txt'); + + } + + foreach($tV12hsJy_ as $ia) + + if($ia) + + { + + $is = explode(',', $ia); + + if($is[0][0]=='$') + + $fAd6l0J5ko7BH6Qi = substr($is[0], 1); + + else + + $fAd6l0J5ko7BH6Qi = str_replace(array('\\^', '\\$'), array('^','$'), preg_quote($is[0],'#')); + + $gjEB17v5UJj1SxRZ[] = $fAd6l0J5ko7BH6Qi; + + + $Hqm42kdaBr[] = + + array('lm' => $is[1], 'f' => $is[2], 'p' => $is[3]); + + } + + if($gjEB17v5UJj1SxRZ) + + $ZR1vtYkW3IIT6ji = '('.implode(')|(',$gjEB17v5UJj1SxRZ).')'; + + $bcUHiUvk1__NNu9qID = parse_url($this->iK6zN3FNMZ); + + if(!$bcUHiUvk1__NNu9qID['path']){$this->iK6zN3FNMZ.='/';$bcUHiUvk1__NNu9qID = parse_url($this->iK6zN3FNMZ);} + + if($grab_parameters['xs_moreurls']){ + + + $this->mu = preg_split('#[\r\n]+#', $grab_parameters['xs_moreurls']); + + foreach($this->mu as $mi=>$nO36g2p2q_KYnh7qxVo){ + + $nO36g2p2q_KYnh7qxVo = str_replace($this->Niq61B3f5T, '', $nO36g2p2q_KYnh7qxVo); + + $O3mTecPWsZVPj45u = $K5kCC5JoHjozL->fetch($nO36g2p2q_KYnh7qxVo,0,true); + + if($mi>3)break; + + } + + } + + $O3mTecPWsZVPj45u = $K5kCC5JoHjozL->fetch($this->iK6zN3FNMZ,0,true);// the first request is to skip session id + + + $X74d424h9xleHSS = !preg_match($gk7xyukmlMb,$O3mTecPWsZVPj45u['code']); + + + + if($X74d424h9xleHSS) + + { + + $X74d424h9xleHSS = ''; + + foreach($O3mTecPWsZVPj45u['headers'] as $k=>$v) + + $X74d424h9xleHSS .= $k.': '.$v.'
        '; + + return array( + + 'errmsg'=>'There was an error while retrieving the URL specified: '.$this->iK6zN3FNMZ.''. + + ($O3mTecPWsZVPj45u['errormsg']?'
        Error message: '.$O3mTecPWsZVPj45u['errormsg']:''). + + '
        HTTP Code:
        '.$O3mTecPWsZVPj45u['protoline']. + + '
        HTTP headers:
        '.$X74d424h9xleHSS. + + '
        HTTP output:
        '.$O3mTecPWsZVPj45u['content'] + + , + + ); + + } + + $this->iK6zN3FNMZ = $O3mTecPWsZVPj45u['last_url']; + + $urls_completed = array(); + + $urls_ext = array(); + + $urls_404 = array(); + + $this->OdZB8ypqkYH0RE87bq = $bcUHiUvk1__NNu9qID['scheme'].'://'.$bcUHiUvk1__NNu9qID['host'].((!$bcUHiUvk1__NNu9qID['port'] || ($bcUHiUvk1__NNu9qID['port']=='80'))?'':(':'.$bcUHiUvk1__NNu9qID['port'])); + + $this->pn = $this->tsize = $retrno = $D8EOhUUDgGFotoZ8 = $gOJkENRoH = $this->fetch_no = 0; + + $this->Niq61B3f5T = YePgHxjTNXTAB($this->OdZB8ypqkYH0RE87bq.'/', A4sNJQoe6O47I_YC4($bcUHiUvk1__NNu9qID['path'])); + + $MMwXOhanJ6q = parse_url($this->Niq61B3f5T); + + $this->T_IVB6tYAThxWS = preg_replace('#^.+://[^/]+#', '', $this->Niq61B3f5T); + + $fdata2 = $K5kCC5JoHjozL->fetch($this->iK6zN3FNMZ,0,true,true); + + $Ur6IsVd9ao9Ycn = str_replace($this->Niq61B3f5T,'',$this->iK6zN3FNMZ); + + $urls_list_full = array($Ur6IsVd9ao9Ycn=>1); + + if(!$Ur6IsVd9ao9Ycn)$Ur6IsVd9ao9Ycn=''; + + $urls_list = array($Ur6IsVd9ao9Ycn=>1); + + $urls_list2 = $urls_list_skipped = array(); + + $this->xNVJOXeK2sW = array(); + + $this->links_level = 0; + + $eYgPj3ZHK0T12hAy = $ref_links = $ref_links2 = $ref_links_list = array(); + + $NgBWwllTme = 0; + + + + $Ho3EyQEy5sso9sRWd = $this->qWPODI2gyt3Aa; + + if(!$grab_parameters['xs_progupdate'])$grab_parameters['xs_progupdate'] = 20; + + $this->Nt_1IROZP14owm4DAeH = array(); + + $this->botmatch_allow = array(); + + if(isset($grab_parameters['xs_robotstxt']) && $grab_parameters['xs_robotstxt']) + + { + + $YlUEXWvoXpwz6PaGySd = $K5kCC5JoHjozL->fetch($this->OdZB8ypqkYH0RE87bq.'/robots.txt'); + + if($this->OdZB8ypqkYH0RE87bq.'/' != $this->Niq61B3f5T) + + { + + $GRmeg_68ZvfdvyJw8v = $K5kCC5JoHjozL->fetch($this->Niq61B3f5T.'robots.txt'); + + $YlUEXWvoXpwz6PaGySd['content'] .= "\n".$GRmeg_68ZvfdvyJw8v['content']; + + } + + $ra=preg_split('#user-agent:\s*#im',$YlUEXWvoXpwz6PaGySd['content']); + + $NBx_26Cujx04fN=$KPnlaCP0s89m=array(); + + for($i=1;$iNt_1IROZP14owm4DAeH[]=implode('|', array_slice($NBx_26Cujx04fN, $i,200)); + + for($i=0;$ibotmatch_allow[]=implode('|', array_slice($KPnlaCP0s89m, $i,200)); + + } + + if($grab_parameters['xs_inc_ajax']) + + $grab_parameters['xs_proto_skip'] = str_replace( + + '\#', '\#(?:[^\!]|$)', $grab_parameters['xs_proto_skip']); + + $this->HDxSUg0eWtUQjt = $grab_parameters['xs_exc_skip']!='\\.()'; + + $this->kNSV2dId7YB = $grab_parameters['xs_inc_skip']!='\\.()'; + + $grab_parameters['xs_inc_skip'] .= '(?:$|\?)'; + + $grab_parameters['xs_exc_skip'] .= '(?:$|\?)'; + + if($grab_parameters['xs_debug']) { + + $_GET['ddbg']=1; + + PMVKiWGsLbTpXo0qagQ(); + + } + + $paeh3sXfU = 0; + + $runstate = array(); + + $url_ind = 0; + + $cnu = 1; + + $pf = tMsFwxcfs9YfeVoHZkr(ebJGVa__YE.wLyh1d0ilMb,'w');fclose($pf); + + $Qw4OhMRiQXE9Pvp0y22 = false; + + if($this->lT0Vs3VxjBxAH3['resume']!=''){ + + $AngxaIfOJ = @IcPgk0YCJ(RWenvmRCuyBW(ebJGVa__YE.smWzxPC1LKDbUte, true)); + + if($AngxaIfOJ) + + { + + $Qw4OhMRiQXE9Pvp0y22 = true; + + echo 'Resuming the last session (last updated: '.date('Y-m-d H:i:s',$AngxaIfOJ['time']).')'."\n"; + + extract($AngxaIfOJ); + + foreach($AngxaIfOJ as $k=>$v){ + + if(isset($this->$k))$this->$k=$v; + + } + + $this->L3KcxI6fDP-=$this->ctime; + + $paeh3sXfU = $this->ctime; + + unset($AngxaIfOJ); + + } + + } + + $CycjTbE1bsdEES4EbPq = 0; + + if(!$Qw4OhMRiQXE9Pvp0y22){ + + if($grab_parameters['xs_moreurls']){ + + $this->mu = preg_split('#[\r\n]+#', $grab_parameters['xs_moreurls']); + + foreach($this->mu as $nO36g2p2q_KYnh7qxVo){ + + + + $cCqeu6KEd4LFk = $this->XQa0UewN3f($nO36g2p2q_KYnh7qxVo, $this->F4IXRYNqGySShUMjj); + + + $urls_list[$nO36g2p2q_KYnh7qxVo]++; + + } + + } + + if($grab_parameters['xs_prev_sm_base']){ + + if($sm_base = @RWenvmRCuyBW(ebJGVa__YE.'sm_base.db',true)){ + + $sm_base = @unserialize($sm_base); + + } + + if(is_array($sm_base) + + && ($grab_parameters['xs_prev_sm_base_min']$_e) + + $urls_list[$_u]++; + + } + + else + + $sm_base = array(); + + } + + $CycjTbE1bsdEES4EbPq = count($urls_list); + + $urls_list_full = $urls_list; + + $cnu = count($urls_list); + + } + + $CUx3ZI0WzO = explode('|', $grab_parameters['xs_force_inc']); + + $fge8exEbRfdVJOzP8V_ = $bT1vStOWyX = array(); + + $this->VP8vAJd3fs3x1Ygo = count($urls_completed); + + $this->ApWk9cNV4bVZkvPX = count($urls_list2); + + sleep(1); @jgYSLBDPtmpAo(ebJGVa__YE.wLyh1d0ilMb); + + + $this->ffpknLH3lruh(); + + + if($urls_list) + + do { + + YHHPuGcJpxLDUfERty('pre',true); + + YHHPuGcJpxLDUfERty('pre1'); + + if($fge8exEbRfdVJOzP8V_) { + + $_ul = array_shift($fge8exEbRfdVJOzP8V_); + + }else + + $_ul = each($urls_list); + + list($this->F4IXRYNqGySShUMjj, $DUZrQcBoQ) = $_ul; + + $b5bOuoZcPCglzF = ($DUZrQcBoQ>0 && $DUZrQcBoQ<1) ? $DUZrQcBoQ : 0; + + $url_ind++; + + z_fhGrViQaOeql9("\n[ $url_ind - $this->F4IXRYNqGySShUMjj, $DUZrQcBoQ] \n"); + + unset($urls_list[$this->F4IXRYNqGySShUMjj]); + + $KDdCtJPGUBu9Wq = yiI3GJqLr5Z($this->F4IXRYNqGySShUMjj); + + $XSgHgDDEhTbwopK_PT = false; + + $LyZYub5sAF58GG = ''; + + YHHPuGcJpxLDUfERty('pre1',true); + + YHHPuGcJpxLDUfERty('pre2a'); + + $O3mTecPWsZVPj45u = array(); + + $cn = ''; + + $this->vBIKyMEhBONsP = $_fex = $this->HnabdBaTOZ($this->F4IXRYNqGySShUMjj); + + extract($_fex); + + + + YHHPuGcJpxLDUfERty('pre2a',true); + + YHHPuGcJpxLDUfERty('pre2b'); + + if(!$f && ($this->VP8vAJd3fs3x1Ygo>0) && ($mXVOQkdQzwnNzlTzU = $sm_base[$this->F4IXRYNqGySShUMjj])){ + + $f2 = true; + + } + + + YHHPuGcJpxLDUfERty('pre2b',true); +if($fdata2 && strstr($fdata2['content'],'header'))$f2 = true; + + do{ + + $sHQF4BoAenBu9haawqS = count($urls_list) + $this->ApWk9cNV4bVZkvPX + $this->VP8vAJd3fs3x1Ygo; + + $f3 = $CUx3ZI0WzO[2] && ( + + ($Ho3EyQEy5sso9sRWd*$CUx3ZI0WzO[2]+1000)< + + ($M_05edZvR-$url_ind-$CycjTbE1bsdEES4EbPq)); + + if(!$f && !$f2) + + { + + + $E45nP_d0Gh = ($CUx3ZI0WzO[1] && + + ( + + (($this->ctime>$CUx3ZI0WzO[0]) && ($this->pn>$this->qWPODI2gyt3Aa*$CUx3ZI0WzO[1])) + + || $f3)); + + $i64_RzaxP7PMd7s = ($CUx3ZI0WzO[3] && $this->qWPODI2gyt3Aa && (($sHQF4BoAenBu9haawqS>$this->qWPODI2gyt3Aa*$CUx3ZI0WzO[3]))); + + if($CUx3ZI0WzO[3] && $this->qWPODI2gyt3Aa && (($this->pn>$this->qWPODI2gyt3Aa*$CUx3ZI0WzO[3]))){ + + $urls_list = $urls_list2 = array(); + + $this->ApWk9cNV4bVZkvPX = 0; + + $cnu = 0; + + } + + if($RlO1HaAgQ<=0 || $this->links_level<$RlO1HaAgQ) + + { + + YHHPuGcJpxLDUfERty('extract'); + + $nBkwKlofG1 = microtime(true); + + $Pj81O2W_d6lwy = YePgHxjTNXTAB($this->Niq61B3f5T, $this->F4IXRYNqGySShUMjj); + + if(e6p6oz8D73L8('xs_http_parallel')){ + + if(!$fge8exEbRfdVJOzP8V_ && !isset($K5kCC5JoHjozL->mPLdZvfSTzaO[$Pj81O2W_d6lwy])){ + + $fge8exEbRfdVJOzP8V_ = array(); + + $bT1vStOWyX = array($Pj81O2W_d6lwy); + + $_par = e6p6oz8D73L8('xs_http_parallel_num', 10); + + for($i=0;($i<$_par*5)&&(count($bT1vStOWyX)<$_par);$i++) + + if($_ul = each($urls_list)) { + + $fge8exEbRfdVJOzP8V_[] = $_ul; + + $_fex2 = $this->HnabdBaTOZ($_ul[0]); + + if(!$_fex2['f'] && !$_fex2['f2']){ + + $_u1 = YePgHxjTNXTAB($this->Niq61B3f5T, $_ul[0]); + + if(!isset($sm_base[$_u1])){ + + $bT1vStOWyX[] = $_u1; + + } + + } + + } + + $K5kCC5JoHjozL->t7RRTKqTzMKk($bT1vStOWyX); + + } + + } + + + + z_fhGrViQaOeql9("

        { $Pj81O2W_d6lwy }

        \n"); + + $lv3sjQRQ1U1=0; + + $D8EOhUUDgGFotoZ8++; + + do { + + $O3mTecPWsZVPj45u = $K5kCC5JoHjozL->fetch($Pj81O2W_d6lwy, 0, 0); + + $this->ffpknLH3lruh(); + + $_to = $O3mTecPWsZVPj45u['flags']['socket_timeout']; + + if($_to && ($MMwXOhanJ6q['host']!=$O3mTecPWsZVPj45u['purl']['host'])){ + + $O3mTecPWsZVPj45u['flags']['error'] = 'Host doesn\'t match'; + + } + + $_ic = intval($O3mTecPWsZVPj45u['code']); + + $jqShMclc87KzIClgU = preg_match($kYhgTL6xjtaMnUKyj,$_ic); + + $vPMSF5pieFsrixtq8t = ($_ic == 403); + + if($gk7xyukmlMb && preg_match($gk7xyukmlMb,$_ic)){ + + $jqShMclc87KzIClgU = $vPMSF5pieFsrixtq8t = false; + + } + + $ICfKWr5QeaWZ6O = (($_ic == 301)||($_ic==302)) && ($Pj81O2W_d6lwy == $O3mTecPWsZVPj45u['last_url']); + + if( !$O3mTecPWsZVPj45u['flags']['error'] && + + (($jqShMclc87KzIClgU || $vPMSF5pieFsrixtq8t || $ICfKWr5QeaWZ6O) || !$O3mTecPWsZVPj45u['code'] || $_to) + + ) + + { + + $lv3sjQRQ1U1++; + + $_sl = $grab_parameters['xs_delay_ms']?$grab_parameters['xs_delay_ms']:1; + + if($O3mTecPWsZVPj45u['headers'] && ($_csl = $O3mTecPWsZVPj45u['headers']['retry-after'])) + + $_sl = max($_sl, $_csl + ($lv3sjQRQ1U1+1)*$_sl); + + + if(($_to) && $grab_parameters['xs_timeout_break']){ + + z_fhGrViQaOeql9("

        # TIMEOUT - $_to #

        \n"); + + if($lv3sjQRQ1U1==3){ + + + if(strstr($_to,'read') ){ + + z_fhGrViQaOeql9("

        read200 break?

        \n"); + + break ; + + } + + if($gOJkENRoH++>5) { + + $hFdFC9FutftfbQcPCF = "Too many timeouts detected"; + + break 2; + + } + + z_fhGrViQaOeql9("

        # MULTI TIMEOUT - BREAK #

        \n"); + + $_sl = 60; + + $lv3sjQRQ1U1 = 0; + + } + + } + + z_fhGrViQaOeql9("

        # RETRY - ".$O3mTecPWsZVPj45u['code']." - ".(intval($O3mTecPWsZVPj45u['code']))." - ".$O3mTecPWsZVPj45u['flags']['error']."# zZz $_sl

        \n"); + + sleep($_sl); + + } + + else + + break; + + }while($lv3sjQRQ1U1<3); + + $this->fetch_no++; + + YHHPuGcJpxLDUfERty('extract', true); + + YHHPuGcJpxLDUfERty('analyze'); + + $this->hOuc4HLzwywe = microtime(true)-$nBkwKlofG1; + + $this->nettime += $this->hOuc4HLzwywe; + + + z_fhGrViQaOeql9("
        \n[[[ ".$O3mTecPWsZVPj45u['code']." ]]] - ".number_format($this->hOuc4HLzwywe,2)."s (".number_format($K5kCC5JoHjozL->wR70CK76khtA4O6VZ4I,2).' + '.number_format($K5kCC5JoHjozL->HQZ0___sxrUQHbO4gb,2).")\n".var_export($O3mTecPWsZVPj45u['headers'],1)); + + $QzwMd7YvjRlwM = is_array($O3mTecPWsZVPj45u['headers']) ? strtolower($O3mTecPWsZVPj45u['headers']['content-type']) : ''; + + $Sd_5PqYOkY = strstr($QzwMd7YvjRlwM,'text/html') || strstr($QzwMd7YvjRlwM,'/xhtml') || !$QzwMd7YvjRlwM; + + + if((strstr($QzwMd7YvjRlwM,'application/') && strstr($QzwMd7YvjRlwM,'pdf')) + + ||strstr($QzwMd7YvjRlwM,'/xml') + + ||strstr($QzwMd7YvjRlwM,'text/plain') + + ) + + { + + $O3mTecPWsZVPj45u['content'] = ''; + + $Sd_5PqYOkY = true; + + } + + $mB38DEhdYf = ($grab_parameters['xs_parse_swf'] && strstr($QzwMd7YvjRlwM, 'shockwave-flash')); + + $K8zTIUVnwPDUDC = ($grab_parameters['xs_parse_js'] && strstr($QzwMd7YvjRlwM, 'javascript')); + + if($QzwMd7YvjRlwM && !$Sd_5PqYOkY && !$mB38DEhdYf && !$K8zTIUVnwPDUDC){ + + if(!$E45nP_d0Gh){ + + $LyZYub5sAF58GG = $QzwMd7YvjRlwM; + + continue; + + } + + } + + $cKCGec1Tw = array(); + + + if($O3mTecPWsZVPj45u['code']==404 + + || ($grab_parameters['xs_force_404'] + + && preg_match('#'.implode('|',preg_split('#\s+#',$grab_parameters['xs_force_404'])).'#', $this->F4IXRYNqGySShUMjj) + + ) + + ){ + + if($this->links_level>0) + + if(!$grab_parameters['xs_chlog_list_max'] || + + count($urls_404) < $grab_parameters['xs_chlog_list_max']) { + + $V8LkdUr76kWKRNwEM8b = $ref_links2[$this->F4IXRYNqGySShUMjj]; + + if($V8LkdUr76kWKRNwEM8b && isset($this->xNVJOXeK2sW[$V8LkdUr76kWKRNwEM8b[0]]) + + && isset($ref_links_list[$V8LkdUr76kWKRNwEM8b[0]]) + + ){ + + $V8LkdUr76kWKRNwEM8b = array_merge($V8LkdUr76kWKRNwEM8b,$ref_links_list[$V8LkdUr76kWKRNwEM8b[0]]); + + } + + $urls_404[]=array($this->F4IXRYNqGySShUMjj,$V8LkdUr76kWKRNwEM8b); + + } + + } + + + $cn = $O3mTecPWsZVPj45u['content']; +z_fhGrViQaOeql9("\n\n
        \n\n$cn\n\n
        \n\n",4); + + $this->tsize+=strlen($cn); + + if($aJAUx_d6Kz = preg_replace('#)#is', '',$cn)) + + $cn = $aJAUx_d6Kz; + + preg_match('#]*?href=[\'"](.*?)[\'"]#is',$cn,$bm); + + if(isset($bm[1])&&$bm[1]){ + + if($bcUHiUvk1__NNu9qID['scheme'] && substr($bm[1], 0, 2) == '//') + + $bm[1] = $bcUHiUvk1__NNu9qID['scheme'].':'.$bm[1]; + + $this->KrTMgWoxdnmEih0271 = A4sNJQoe6O47I_YC4($bm[1].(preg_match('#//.*/#',$bm[1])?'-':'/-')); + + } + + else + + $this->KrTMgWoxdnmEih0271 = A4sNJQoe6O47I_YC4(strstr($this->F4IXRYNqGySShUMjj,'://') ? $this->F4IXRYNqGySShUMjj : $this->Niq61B3f5T . $this->F4IXRYNqGySShUMjj); + + if($grab_parameters['xs_canonical']) + + if(($Pj81O2W_d6lwy == $O3mTecPWsZVPj45u['last_url']) + + && + + ( + + preg_match('#]*rel=[\'"]canonical[\'"][^>]*\shref=[\'"]([^>]*?)[\'"]#is', $cn, $MiqXpOB9QIO9l) || + + preg_match('#]*\shref=[\'"]([^>]*?)[\'"][^>]*rel=[\'"]canonical[\'"]#is', $cn, $MiqXpOB9QIO9l)) + + ){ + + $O3mTecPWsZVPj45u['last_url'] = trim($MiqXpOB9QIO9l[1]); + + } + + if($O3mTecPWsZVPj45u['last_url']){ + + $cCqeu6KEd4LFk = $this->XQa0UewN3f($O3mTecPWsZVPj45u['last_url'], $this->F4IXRYNqGySShUMjj); + + if($cCqeu6KEd4LFk == 1){ + + $LyZYub5sAF58GG = 'lu (ext) - '.$O3mTecPWsZVPj45u['last_url']; + + if($O3mTecPWsZVPj45u['last_url'] != $Pj81O2W_d6lwy) { + + + continue; + + } + + } + + } + + $lOLd5T3bchft8O9 = preg_replace('#^.*?'.preg_quote($this->Niq61B3f5T,'#').'#','',$O3mTecPWsZVPj45u['last_url']); + + if(($Pj81O2W_d6lwy != $O3mTecPWsZVPj45u['last_url']))// && ($Pj81O2W_d6lwy != $O3mTecPWsZVPj45u['last_url'].'/')) + + { + + $this->xNVJOXeK2sW[$this->F4IXRYNqGySShUMjj]=$O3mTecPWsZVPj45u['last_url']; $io=$this->F4IXRYNqGySShUMjj; + + if(strlen($lOLd5T3bchft8O9) <= 2048) + + if(!isset($urls_list_full[$lOLd5T3bchft8O9])) { + + $urls_list2[$lOLd5T3bchft8O9]++; + + if(count($ref_links[$lOLd5T3bchft8O9])F4IXRYNqGySShUMjj; + + if( + + $grab_parameters['xs_ref_list_store'] && + + ($_rlmax = $grab_parameters['xs_ref_list_max']) + + ){ + + if( + + (isset($ref_links_list[$lOLd5T3bchft8O9]) + + || count($ref_links_list)<$_rlmax) + + && + + (count($ref_links_list[$lOLd5T3bchft8O9])F4IXRYNqGySShUMjj, $ref_links_list[$lOLd5T3bchft8O9])) + + $ref_links_list[$lOLd5T3bchft8O9][] = $this->F4IXRYNqGySShUMjj; + + } + + } + + } + + $LyZYub5sAF58GG = 'lu - '.$O3mTecPWsZVPj45u['last_url']; + + if(!$E45nP_d0Gh)continue; + + } + + if($gk7xyukmlMb && !preg_match($gk7xyukmlMb,$O3mTecPWsZVPj45u['code'])){ + + $LyZYub5sAF58GG = $O3mTecPWsZVPj45u['code']; + + continue; + + } + + $retrno++; + + if($E45nP_d0Gh||$i64_RzaxP7PMd7s) { + + + $Sd_5PqYOkY = false; + + } + + YHHPuGcJpxLDUfERty('analyze',true); + + if($mB38DEhdYf) + + { + + include_once Il2qN32A6EeND.'class.pfile.inc.php'; + + $am = new SWFParser(); + + $am->sEHr9E0d1xL1nk($cn); + + $SXMDOThfSvBx_D = $am->sMuf2pf0iKaQ(); + + }else + + if($Sd_5PqYOkY || $K8zTIUVnwPDUDC) + + { + + YHHPuGcJpxLDUfERty('parse'); + + if($K8zTIUVnwPDUDC) { + + $LyZYub5sAF58GG = 'js'; + + $f = true; // Do not index + + preg_match_all('#(?:add|menu)item\s*\([^\)]*?["\']((?:\.+\/|http).*?)["\)\']#is', $cn, $nexwy0P_rGvjchKEd); + + $cKCGec1Tw = $nexwy0P_rGvjchKEd[1]; + + }else { + + $cKCGec1Tw = $this->J288sfitpupJnEcw3($cn); + + } + + } + + $cKCGec1Tw = array_unique($cKCGec1Tw); + + + $nn = $nt = 0; + + reset($cKCGec1Tw); + + if(isset($grab_parameters['xs_robotstxt']) && $grab_parameters['xs_robotstxt']) + + if(preg_match('#]*?charset=([^">]*)"#is',$cn, $tqAifGeogXJRviudvJ1)) + + $runstate['charset'] = $tqAifGeogXJRviudvJ1[1]; + + } + + YHHPuGcJpxLDUfERty('parse', true); + + YHHPuGcJpxLDUfERty('llist'); + + foreach($cKCGec1Tw as $i=>$ll) + + if($ll) + + { + + $a = $sa = trim($ll); + + $a = str_replace(':',':',$a); + + if($grab_parameters['xs_proto_skip'] && + + (preg_match('#^'.$grab_parameters['xs_proto_skip'].'#i',$a)|| + + ($this->HDxSUg0eWtUQjt && preg_match('#'.$grab_parameters['xs_exc_skip'].'#i',$a))|| + + preg_match('#^'.$grab_parameters['xs_proto_skip'].'#i',function_exists('html_entity_decode')?html_entity_decode($a):$a) + + )) + + continue; + + + if(strlen($a) > 4096) continue; + + $cCqeu6KEd4LFk = $this->XQa0UewN3f($a, $this->F4IXRYNqGySShUMjj); + + if($cCqeu6KEd4LFk == 1) + + { + + if($grab_parameters['xs_extlinks'] && + + (!$grab_parameters['xs_extlinks_excl'] || !preg_match('#'.$this->dYfVkEYUS1map3XFd8($grab_parameters['xs_extlinks_excl']).'#',$a)) && + + (!$grab_parameters['xs_ext_max'] || (count($urls_ext)<$grab_parameters['xs_ext_max'])) + + ) + + { + + if(!$urls_ext[$a] && + + (!$grab_parameters['xs_ext_skip'] || + + !preg_match('#'.$grab_parameters['xs_ext_skip'].'#',$a) + + ) + + ) + + $urls_ext[$a] = $Pj81O2W_d6lwy; + + } + + continue; + + } + + $lOLd5T3bchft8O9 = $cCqeu6KEd4LFk ? $a : substr($a,strlen($this->Niq61B3f5T)); + + $lOLd5T3bchft8O9 = str_replace(' ', '%20', $lOLd5T3bchft8O9); + + if($urls_list_full[$lOLd5T3bchft8O9] || ($lOLd5T3bchft8O9 == $this->F4IXRYNqGySShUMjj)) + + continue; + + if($grab_parameters['xs_exclude_check']) + + { + + $_f=$_f2=false; + + $_f=$this->GjJcq8T1P9&&preg_match('#('.$this->GjJcq8T1P9.')#',$lOLd5T3bchft8O9); + + $_f = $_f || $this->VFZlf5sNkzX7GF7k($this->T_IVB6tYAThxWS.$lOLd5T3bchft8O9); + + if($_f)continue; + + } + + z_fhGrViQaOeql9("[$lOLd5T3bchft8O9]
        \n",2);//exit; + + $urls_list2[$lOLd5T3bchft8O9]++; + + if( + + $grab_parameters['xs_ref_list_store'] && + + ($_rlmax = $grab_parameters['xs_ref_list_max']) + + ){ + + if( + + (isset($ref_links_list[$lOLd5T3bchft8O9]) + + || count($ref_links_list)<$_rlmax) + + && + + (count($ref_links_list[$lOLd5T3bchft8O9])F4IXRYNqGySShUMjj, $ref_links_list[$lOLd5T3bchft8O9])) + + $ref_links_list[$lOLd5T3bchft8O9][] = $this->F4IXRYNqGySShUMjj; + + } + + } + + if($grab_parameters['xs_maxref'] && count($ref_links[$lOLd5T3bchft8O9])<$grab_parameters['xs_maxref']) + + $ref_links[$lOLd5T3bchft8O9][] = $this->F4IXRYNqGySShUMjj; + + $nt++; + + } + + unset($cKCGec1Tw); + + YHHPuGcJpxLDUfERty('llist', true); + + } + + } + + + $this->ApWk9cNV4bVZkvPX = count($urls_list2); + + YHHPuGcJpxLDUfERty('analyze', true); + + YHHPuGcJpxLDUfERty('post'); + + if(!$f){ + + + $f = $f || !$this->hVgV5J75NEESyCQgUY('xs_incl_only', $this->Niq61B3f5T.$this->F4IXRYNqGySShUMjj, true); + + } + + if($_fex['f3']) { + + $f = true; + + } + + if(!$f) + + if(isset($grab_parameters['xs_robotstxt']) && $grab_parameters['xs_robotstxt']) + + { + + $f = $f||preg_match('# preg_replace('#//+$#','/', + + preg_replace('#^([^/\:\?]/)/+#','\\1', + + (preg_match('#^\w+://#',$this->F4IXRYNqGySShUMjj) ? $this->F4IXRYNqGySShUMjj : $this->Niq61B3f5T . $this->F4IXRYNqGySShUMjj) + + )) + + ); + + if($grab_parameters['xs_makehtml']||$grab_parameters['xs_makeror']||$grab_parameters['xs_rssinfo']) + + { + + preg_match('#([^<]*?)#is', $O3mTecPWsZVPj45u['content'], $D3AGbIACouD10); + + $mXVOQkdQzwnNzlTzU['t'] = strip_tags($D3AGbIACouD10[1]); + + } + + if($grab_parameters['xs_metadesc']) + + { + + preg_match('#]*(?:http-equiv|name)\s*=\s*"?description[^>]*content\s*=\s*["]?([^>\"]*)#is', $cn, $ubgR29rFB); + + if($ubgR29rFB[1]) + + $mXVOQkdQzwnNzlTzU['d'] = $ubgR29rFB[1]; + + } + + if($grab_parameters['xs_makeror']||$grab_parameters['xs_autopriority']) + + $mXVOQkdQzwnNzlTzU['o'] = max(0,$this->links_level); + + if($b5bOuoZcPCglzF) + + $mXVOQkdQzwnNzlTzU['p'] = $b5bOuoZcPCglzF; + + if(preg_match('#]*(?:http-equiv|name)\s*=\s*"?last-modified[^>]*content\s*=\s*["]?([^>\"]*)#is', $cn, $ubgR29rFB)){ + + $mXVOQkdQzwnNzlTzU['clm'] = str_replace('@',' ',$ubgR29rFB[1]); + + } + + if(preg_match('#]*(?:http-equiv|name)\s*=\s*"?changefreq[^>]*content\s*=\s*["]?([^>\"]*)#is', $cn, $ubgR29rFB)){ + + $mXVOQkdQzwnNzlTzU['f'] = $ubgR29rFB[1]; + + }else + + if(preg_match('#]*(?:http-equiv|name)\s*=\s*"?revisit-after[^>]*content\s*=\s*["]?([^>\"]*)#is', $cn, $ubgR29rFB)){ + + if(preg_match('#(\d+)\s*hour#',$ubgR29rFB[1])){ + + $mXVOQkdQzwnNzlTzU['f'] = 'hourly'; + + } + + if(preg_match('#(\d+)\s*month#',$ubgR29rFB[1])){ + + $mXVOQkdQzwnNzlTzU['f'] = 'monthly'; + + } + + if(preg_match('#(\d+)\s*day#',$ubgR29rFB[1], $ubgR29rFB)){ + + $d = $ubgR29rFB[1]+0; + + if($d<4)$mXVOQkdQzwnNzlTzU['f'] = 'daily'; + + else + + if($d<22)$mXVOQkdQzwnNzlTzU['f'] = 'weekly'; + + else + + $mXVOQkdQzwnNzlTzU['f'] = 'monthly'; + + } + + } + + if(preg_match('#'.$ZR1vtYkW3IIT6ji.'#',$this->Niq61B3f5T.$this->F4IXRYNqGySShUMjj,$fjOiR1rimG)) + + { + + for($_i=0;$_i]*rel\s*=\s*"alternate"[^>]*>#is', $cn, $o5dbZtmDCSktjDlJt3, PREG_SET_ORDER) + + ){ + + $_la = array(); + + foreach($o5dbZtmDCSktjDlJt3 as $_alt1){ + + if(preg_match('#\s(hreflang|media)\s*=\s*"([^">]*?)"[^>]*>#is', $_alt1[0], $_alt) + + && preg_match('#\s*href\s*=\s*[\'"]([^>]*?)[\'"]#is', $_alt1[0], $_hm) + + ) + + $_la[] = array('t' => $_alt[1], 'l' => $_alt[2], 'u' => $_hm[1]); + + } + + $mXVOQkdQzwnNzlTzU['hl'] = $_la; + + } + + } + + if($grab_parameters['xs_lastmod_notparsed'] && $f2) + + { + + $O3mTecPWsZVPj45u = $K5kCC5JoHjozL->fetch($Pj81O2W_d6lwy, 0, 1, false, "", array('req'=>'HEAD')); + + } + + if(!$mXVOQkdQzwnNzlTzU['lm'] && isset($O3mTecPWsZVPj45u['headers']['last-modified'])) + + $mXVOQkdQzwnNzlTzU['lm'] = $O3mTecPWsZVPj45u['headers']['last-modified']; + + } + + YHHPuGcJpxLDUfERty('post', true); + + YHHPuGcJpxLDUfERty('post-save1'); + + z_fhGrViQaOeql9("\n((include ".$mXVOQkdQzwnNzlTzU['link']."))
        \n"); + + $XSgHgDDEhTbwopK_PT = true; + + if($grab_parameters['xs_memsave']) + + { + + oL4Wd5vimhWp8DF0q($KDdCtJPGUBu9Wq, $mXVOQkdQzwnNzlTzU); + + $urls_completed[] = $KDdCtJPGUBu9Wq; + + }else + + $urls_completed[] = serialize($mXVOQkdQzwnNzlTzU); + + $this->VP8vAJd3fs3x1Ygo++; + + + YHHPuGcJpxLDUfERty('post-save1',true); + + YHHPuGcJpxLDUfERty('post-save2'); + + if($grab_parameters['xs_prev_sm_base'] + + && $b7bWC1DiTPmt8mWhN && + + preg_match('#('.$b7bWC1DiTPmt8mWhN.')#',$this->F4IXRYNqGySShUMjj)){ + + $sm_base[$this->F4IXRYNqGySShUMjj] = $mXVOQkdQzwnNzlTzU; + + } + + $Ho3EyQEy5sso9sRWd = $this->qWPODI2gyt3Aa - $this->VP8vAJd3fs3x1Ygo; + + YHHPuGcJpxLDUfERty('post-save2',true); + + + } + + }while(false);// zerowhile + + YHHPuGcJpxLDUfERty('post-progress1'); + + if($url_ind>=$cnu) + + { + + unset($urls_list); + + $url_ind = 0; + + $urls_list = $urls_list2; + + + $urls_list_full += $urls_list; + + $cnu = count($urls_list); + + unset($ref_links2); + + $ref_links2 = $ref_links; + + unset($ref_links); unset($urls_list2); + + $ref_links = array(); + + $urls_list2 = array(); + + $this->links_level++; + + z_fhGrViQaOeql9("\n
        NEXT LEVEL:$this->links_level
        \n"); + + } + + if(!$XSgHgDDEhTbwopK_PT){ + + + z_fhGrViQaOeql9("\n({skipped ".$this->F4IXRYNqGySShUMjj." - $LyZYub5sAF58GG})
        \n"); + + if(!$grab_parameters['xs_chlog_list_max'] || + + count($urls_list_skipped) < $grab_parameters['xs_chlog_list_max']) { + + $urls_list_skipped[$this->F4IXRYNqGySShUMjj] = $LyZYub5sAF58GG; + + } + + } + + YHHPuGcJpxLDUfERty('post-progress1',true); + + YHHPuGcJpxLDUfERty('post-progress2'); + + $this->pn++; + + s_kA5FLQ9p4i(); + + $this->pl=min($cnu-$url_ind,$Ho3EyQEy5sso9sRWd); + + $uIZDnQOguALfQ = ($this->VP8vAJd3fs3x1Ygo>=$this->qWPODI2gyt3Aa) || ($url_ind>=$cnu); + + if(!$hFdFC9FutftfbQcPCF) { + + + if($hFdFC9FutftfbQcPCF = N_Fm0hhD3owWta()){ + + if(!@jgYSLBDPtmpAo($hFdFC9FutftfbQcPCF)) + + $hFdFC9FutftfbQcPCF=0; + + } + + } + + YHHPuGcJpxLDUfERty('post-progress2',true); + + YHHPuGcJpxLDUfERty('post-progress3'); + + $progpar = $this->ffpknLH3lruh(false, $uIZDnQOguALfQ||$hFdFC9FutftfbQcPCF); + + YHHPuGcJpxLDUfERty('post-progress3',true); + + YHHPuGcJpxLDUfERty('post-progress4'); + + if($grab_parameters['xs_exec_time'] && + + ((time()-$u3Aj3kpP8f7NX) > $grab_parameters['xs_exec_time']) ){ + + $hFdFC9FutftfbQcPCF = 'Time limit exceeded - '.($grab_parameters['xs_exec_time']).' - '.(time()-$u3Aj3kpP8f7NX); + + } + + if($grab_parameters['xs_savestate_time']>0 && + + ( + + ($this->ctime-$paeh3sXfU>$grab_parameters['xs_savestate_time']) + + || $uIZDnQOguALfQ + + || $hFdFC9FutftfbQcPCF + + ) + + ) + + { + + $paeh3sXfU = $this->ctime; + + z_fhGrViQaOeql9("(saving dump)
        \n"); + + $AngxaIfOJ = array(); + + $ugr2aG5lxR = array( + + 'url_ind', + + 'urls_list','urls_list2','cnu', + + 'ref_links','ref_links2','ref_links_list', + + 'urls_list_full','urls_completed', + + 'urls_404', + + 'nt','tsize','pn','links_level','ctime', 'urls_ext','fetch_no', + + 'starttime', 'retrno', 'nettime', 'urls_list_skipped', + + 'imlist','imlist2', 'progpar', 'runstate', 'sm_base' + + ); + + foreach($ugr2aG5lxR as $k){ + + $AngxaIfOJ[$k] = isset($this->$k) ? $this->$k : $$k; + + } + + $AngxaIfOJ['time']=time(); + + $k88k5WVVH7HOa=G8ByTBG0gz4G9($AngxaIfOJ); + + QNBZB8U2gUbUbMO(smWzxPC1LKDbUte,$k88k5WVVH7HOa,ebJGVa__YE,true); + + unset($AngxaIfOJ); + + unset($k88k5WVVH7HOa); + + } + + if($grab_parameters['xs_delay_req'] && $grab_parameters['xs_delay_ms'] && + + (($D8EOhUUDgGFotoZ8%$grab_parameters['xs_delay_req'])==0)) + + { + + sleep(intval($grab_parameters['xs_delay_ms'])); + + } + + YHHPuGcJpxLDUfERty('post-progress4', true); + + }while(!$uIZDnQOguALfQ && !$hFdFC9FutftfbQcPCF); + + z_fhGrViQaOeql9("\n\n

        Crawling completed
        \n"); + + if($_GET['ddbgexit']){ + + echo '

        Dbg exit

        '; + + echo $K5kCC5JoHjozL->ZwgAtu5BO_NYpaRWr.' / '.$K5kCC5JoHjozL->nettime.'
        '; + + echo fiJIJjF_yojaqa().'
        '; + + exit; + + } + + return array( + + 'u404'=>$urls_404, + + 'ref_links_list'=>$ref_links_list, + + 'starttime'=>$starttime, + + 'topmu' => $bsdObbWFYcM20JyA, + + 'ctime'=>$this->ctime, + + 'tsize'=>$this->tsize, + + 'retrno' => $retrno, + + 'nettime' => $this->nettime, + + 'errmsg'=>'', + + 'initurl'=>$this->iK6zN3FNMZ, + + 'initdir'=>$this->Niq61B3f5T, + + 'ucount'=>$this->VP8vAJd3fs3x1Ygo, + + 'crcount'=>$this->pn, + + 'fetch_no'=>$this->fetch_no, + + 'time'=>time(), + + 'params'=>$this->lT0Vs3VxjBxAH3, + + 'interrupt'=>$hFdFC9FutftfbQcPCF, + + 'runstate' => $runstate, + + 'sm_base' => $sm_base, + + 'urls_ext'=>$urls_ext, + + 'urls_list_skipped' => $urls_list_skipped, + + 'max_reached' => $this->VP8vAJd3fs3x1Ygo>=$this->qWPODI2gyt3Aa + + ); + + } + + } + + $X5pGy9XVxZmKajMLt = new SiteCrawler(); + + function MjfS99JQfMEzIgi(){ + + @jgYSLBDPtmpAo(ebJGVa__YE.AheSQAhNo9A7oMn); + + if(@file_exists(ebJGVa__YE.Uv9x2nKq2xFMz)) + + @rename(ebJGVa__YE.Uv9x2nKq2xFMz,ebJGVa__YE.AheSQAhNo9A7oMn); + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/pages/class.html-creator.inc.php b/generator/pages/class.html-creator.inc.php new file mode 100755 index 0000000..8c193f6 --- /dev/null +++ b/generator/pages/class.html-creator.inc.php @@ -0,0 +1,202 @@ +
        ';flush(); $KpqQMAo204oEII = $grab_parameters['xs_initurl']; if(substr_count($KpqQMAo204oEII,'/')>2) $KpqQMAo204oEII = substr($KpqQMAo204oEII, 0, strrpos($KpqQMAo204oEII,'/')); function vG7J6UyVuJmr7C4U52($os8tVH12X, $i) { global $_tm; s_kA5FLQ9p4i(); z_fhGrViQaOeql9("($os8tVH12X / $i / ".(time()-$_tm)." / ". (function_exists('memory_get_usage') ? number_format(memory_get_usage()/1024/1024):'')."M) "); $_tm=time(); } $lIRwDqHQC2tIuP= ''; $YlnYTfdc4 = array(); $KRr98TLai1Fm69wjk = 0; $DSZ7onyKhTY= ceil(count($urls_completed) / $grab_parameters['xs_htmlpart']); $C79HmoYonnik = intval($Yqz1QyXnf8Zlfu9jU['istart']); if($Yqz1QyXnf8Zlfu9jU) { $KRr98TLai1Fm69wjk = $Yqz1QyXnf8Zlfu9jU['curpage']; } $t8rgs9a7d2FUS7l=$LgLI0zBLaiF=$oaLtuQx7VUYT=$z8VNwWnfpJY = array(); for($i=0;$i"; return " ". str_repeat("\n    ",$dh6mwOEumX3JD)."
        $sk ".$CWn2PfUbyyKhdNQWN." pages
        $JkWlL2a0m "; } function KC5A4W9FxdMzpD0q($_a, $_b) { global $grab_parameters, $vmCbGLUXBFFGXsy1p, $_tm; $a = is_array($_a) ? $_a: ((substr($_a, 0, 2)=='a:') ? @unserialize($_a) : $_a); $b = is_array($_b) ? $_b: ((substr($_b, 0, 2)=='a:') ? @unserialize($_b) : $_b); if(($GLOBALS['_iter']++ %100) == 0)vG7J6UyVuJmr7C4U52('sort',$GLOBALS['_iter']); $at = is_array($a)?($a['t']?$a['t']:$a['link']):$a; $bt = is_array($b)?($b['t']?$b['t']:$b['link']):$b; if($grab_parameters['xs_htmlsort'] == 3) { if(!$vmCbGLUXBFFGXsy1p)$vmCbGLUXBFFGXsy1p=rand(1E10,1E12); $at = md5($at.$vmCbGLUXBFFGXsy1p); $bt = md5($bt.$vmCbGLUXBFFGXsy1p); } if ($at == $bt) { return 0; } $rs = ($at < $bt) ? -1 : 1; if($grab_parameters['xs_htmlsort'] == 2)$rs = -$rs; return $rs; } function YcU5l0MyRpXPO($sl,$dh6mwOEumX3JD=0,&$inOnsdwxENV3KRYY){ global $q0PNLQD52dm6SKSyg, $grab_parameters, $lIRwDqHQC2tIuP, $YlnYTfdc4, $KRr98TLai1Fm69wjk, $urls_completed, $C79HmoYonnik, $V15cq9dPNt8iS8, $_tm; $D_ezG4BPksZTM79mUvk = ''; if($grab_parameters['xs_htmlsort']) { z_fhGrViQaOeql9("sorting.."); @uksort($sl, 'KC5A4W9FxdMzpD0q'); } $ls = $dh6mwOEumX3JD*2; if(is_array($sl)) foreach($sl as $sk=>$sn){ $JkWlL2a0m = ""; $kprq2zgUtc0Do=array(); if(is_array($sn['pages'])) { if($grab_parameters['xs_htmlsort']) { z_fhGrViQaOeql9("sorting.."); @usort($sn['pages'], 'KC5A4W9FxdMzpD0q'); } foreach($sn['pages'] as $_pg) { if(($GLOBALS['_iter']++ %100) == 0){ vG7J6UyVuJmr7C4U52('BDURPicA56HxjrUUp',$GLOBALS['_iter']); global $X5pGy9XVxZmKajMLt;$X5pGy9XVxZmKajMLt->ffpknLH3lruh(array('smcreate'=>array('html',$GLOBALS['_iter'],count($urls_completed)))); } $inOnsdwxENV3KRYY++; if($inOnsdwxENV3KRYY<=$C79HmoYonnik)continue; $pg = is_array($_pg) ? $_pg : @unserialize($_pg); $t = $pg['t'] ? $pg['t'] : basename($pg['link']); $kprq2zgUtc0Do[] = array ( 'link'=>$pg['link'], 'title'=>$t, 'desc'=>$pg['d'], 'title_clean'=>str_replace('&amp;', '&',htmlspecialchars($t)), 'file'=>basename($pg['link']) ); $JkWlL2a0m .= "\n".$t.""; if($inOnsdwxENV3KRYY%10==0) jLo1X8O3OGZlDH54AjS(array( 'cmd'=> 'info', 'id' => 'percprog2', 'text'=> number_format($inOnsdwxENV3KRYY*100/count($urls_completed),0).'%' )); if(($inOnsdwxENV3KRYY%$grab_parameters['xs_htmlpart'])==0) { $lIRwDqHQC2tIuP .= Gg5AAIeuiYp($sk,$sn['cnt'],$dh6mwOEumX3JD,$JkWlL2a0m); $YlnYTfdc4[] = array ( 'folder' => str_replace('/',' ',$sk), 'cnt' => $sn['cnt'], 'cntmulti' => $sn['cnt']>1, 'level' => $dh6mwOEumX3JD, 'alevel' => $dh6mwOEumX3JD ? range(1,$dh6mwOEumX3JD) : array(), 'level100' => 100-$dh6mwOEumX3JD, 'pages' => $kprq2zgUtc0Do ); $JkWlL2a0m=''; $kprq2zgUtc0Do=array(); VGnW7iJnFC33aI7tL0($lIRwDqHQC2tIuP, $YlnYTfdc4); $KRr98TLai1Fm69wjk++; $lIRwDqHQC2tIuP='';$YlnYTfdc4=array(); QNBZB8U2gUbUbMO($V15cq9dPNt8iS8,G8ByTBG0gz4G9(array('istart'=>$inOnsdwxENV3KRYY,'curpage'=>$KRr98TLai1Fm69wjk))); } } } $FYOswqt0cSs = trim(str_replace('/',' ',$sk)); if(1) { $lIRwDqHQC2tIuP.=Gg5AAIeuiYp($sk,$sn['cnt'],$dh6mwOEumX3JD,$JkWlL2a0m); $YlnYTfdc4[]=array( 'folder'=>$FYOswqt0cSs, 'cnt'=>$sn['cnt'], 'cntmulti'=>$sn['cnt']>1, 'level'=>$dh6mwOEumX3JD, 'alevel'=>$dh6mwOEumX3JD?range(1,$dh6mwOEumX3JD):array(), 'level100'=>100-$dh6mwOEumX3JD, 'pages'=>$kprq2zgUtc0Do); } if($sn['elem']) YcU5l0MyRpXPO($sn['elem'],$dh6mwOEumX3JD+1,$inOnsdwxENV3KRYY); } if($dh6mwOEumX3JD == 0 && $lIRwDqHQC2tIuP) VGnW7iJnFC33aI7tL0($lIRwDqHQC2tIuP, $YlnYTfdc4); } $inOnsdwxENV3KRYY=0; YcU5l0MyRpXPO($t8rgs9a7d2FUS7l['elem'],0,$inOnsdwxENV3KRYY); include Il2qN32A6EeND.'class.templates.inc.php'; jLo1X8O3OGZlDH54AjS(array('cmd'=> 'info','id' => 'percprog2','')); function VGnW7iJnFC33aI7tL0($ht, $hv) { global $grab_parameters, $KpqQMAo204oEII, $urls_completed, $KRr98TLai1Fm69wjk, $DSZ7onyKhTY, $DViaBKXmteSZF4cgvzj, $P2_ltWpf5; if($KRr98TLai1Fm69wjk>=$DSZ7onyKhTY)return; $qHEfslblz = $P2_ltWpf5['runstate']['charset']; $kSqnsSOfXlo8ln = new kejdU2faYCAU("pages/mods/"); $kSqnsSOfXlo8ln->MddRgpIor(AQEJpzp83PVPuONNJ(zuXb1RhRl0, 'sitemap_tpl.html')); $Kd9n5bwrnd17vZn9U = $grab_parameters['xs_htmlname']; $XvaJJE34XW = basename($grab_parameters['xs_htmlname']); $eodgEPwkY = ''; $f7bXAUhh2lr=array(); if($DSZ7onyKhTY>1) { for($i1=0;$i1<$DSZ7onyKhTY;$i1++) { $ZrR3YZKDY = joeXw9f7bW7PyEcEv($i1+1,$XvaJJE34XW,true); $eodgEPwkY .= ($i1==$KRr98TLai1Fm69wjk)?' ['.($i1+1).']': ' '.($i1+1).''; $f7bXAUhh2lr[]=array('current'=>($i1==$KRr98TLai1Fm69wjk),'link'=>$ZrR3YZKDY,'num'=>$i1+1); } $eodgEPwkY = ''.$eodgEPwkY.''; } $PBCaMycHB = "\n".$ht."\n
        \n"; $kSqnsSOfXlo8ln->ZoknvuUYP('slots',$hv); $kSqnsSOfXlo8ln->ZoknvuUYP('LASTUPDATE',date($grab_parameters['xs_dateformat']?$grab_parameters['xs_dateformat']:'Y, F j')); $kSqnsSOfXlo8ln->ZoknvuUYP('NOBRAND',$grab_parameters['xs_nobrand']?1:0); $kSqnsSOfXlo8ln->ZoknvuUYP('PCHARSET',$qHEfslblz); $kSqnsSOfXlo8ln->ZoknvuUYP('TOPURL',$KpqQMAo204oEII); $kSqnsSOfXlo8ln->ZoknvuUYP('PAGE',$DSZ7onyKhTY?' Page '.($KRr98TLai1Fm69wjk+1):''); $kSqnsSOfXlo8ln->ZoknvuUYP('PAGES',$eodgEPwkY); $kSqnsSOfXlo8ln->ZoknvuUYP('APAGER',$f7bXAUhh2lr); $kSqnsSOfXlo8ln->ZoknvuUYP('TOTALURLS',count($urls_completed)); $qavYsvb7U31aFIKJR = $kSqnsSOfXlo8ln->parse(); $qavYsvb7U31aFIKJR = preg_replace( array('#%SITEMAP%#', '#%LASTUPDATE%#', '#%TOPURL%#', '#%PAGE%#', '#%PAGER%#', '#%TOTALURLS%#'), array($PBCaMycHB, date('Y, F j'), $KpqQMAo204oEII, $DSZ7onyKhTY?' Page '.($KRr98TLai1Fm69wjk+1):'', $eodgEPwkY, count($urls_completed)), $qavYsvb7U31aFIKJR); $ZrR3YZKDY = $DSZ7onyKhTY>1 ? joeXw9f7bW7PyEcEv($KRr98TLai1Fm69wjk+1, $Kd9n5bwrnd17vZn9U, true) : $Kd9n5bwrnd17vZn9U; $pf = tMsFwxcfs9YfeVoHZkr($ZrR3YZKDY, 'w'); if(!$pf) $DViaBKXmteSZF4cgvzj[] = $ZrR3YZKDY; c0plShyyY3($pf, $qavYsvb7U31aFIKJR); fclose($pf); } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/pages/class.http.inc.php b/generator/pages/class.http.inc.php new file mode 100755 index 0000000..a9d1b9f --- /dev/null +++ b/generator/pages/class.http.inc.php @@ -0,0 +1,218 @@ +_vertype = $WKLxFNU9Afmx3X['version']; } function fbWEyZNrRSnYdpJt($pZraQah5aJyN) { if (preg_match('#^([^/]*\://[^/]*)(\?.*)$#', $pZraQah5aJyN, $um)) { + $pZraQah5aJyN = $um[1] . '/' . $um[2]; } return $pZraQah5aJyN; } function JZ2Q3m_aFWmNaBt(){ global $grab_parameters; if(!$this->BkrUa2m_ZoFXT) $this->BkrUa2m_ZoFXT = $grab_parameters['xs_socket_timeout'] ? $grab_parameters['xs_socket_timeout'] : 5; @ini_set('default_socket_timeout', $this->BkrUa2m_ZoFXT); return $this->BkrUa2m_ZoFXT; } function yiiKZ5G8MupycZIidc_($KDTEDseXOWMlsG) { } function IkN8UDC3Sq4($NFSoLbL5O5) { return $this->fetch($NFSoLbL5O5['url'], 0, $NFSoLbL5O5['follow'], false, $NFSoLbL5O5['htpost'], $NFSoLbL5O5); } function t7RRTKqTzMKk($Vz1MJUA8RCHpI) { $rr = array(); foreach ($Vz1MJUA8RCHpI as $pZraQah5aJyN) { $pZraQah5aJyN = $this->JeiEW9oYgoZfniA2zxe($pZraQah5aJyN); $nU2EnpjUuKWLpRXI = @parse_url($pZraQah5aJyN); $xZqlshGDcY = $this->dxY5KOhQceAuFRoi( $nU2EnpjUuKWLpRXI ); extract($xZqlshGDcY); $S0BtLzEJVxMK_RX = $this->i0c9crUM5phHcmd1CrY($xZqlshGDcY, true); if($S0BtLzEJVxMK_RX) { $NR3tQ8cMptFBaNs2 = $this->GHJEfA2QYqwa($hGDRw8r7gFTRrA4CimX, $nU2EnpjUuKWLpRXI); $ri = $this->itBggRphyUbnww_vK($pZraQah5aJyN, $S0BtLzEJVxMK_RX, $NR3tQ8cMptFBaNs2); }else { z_fhGrViQaOeql9("\n%%% %%% $pZraQah5aJyN\n"); } } $this->JiNZdZTQFJ(); $this->mPLdZvfSTzaO = $this->Lg2LpVDBA2Ws; $this->ph65n7MGm00Ha(); } function dxY5KOhQceAuFRoi($nU2EnpjUuKWLpRXI, $n1wH_ODWIOBSpdzlT = false) { global $grab_parameters; if (preg_match('#(.+):(.+)#', $grab_parameters['xs_curlproxy'], $pm)) { $grab_parameters['xs_ipconnection'] = $pm[1]; $grab_parameters['xs_portconnection'] = $pm[2]; } $mKNc3ZuibHw8 = ($nU2EnpjUuKWLpRXI['scheme'] == 'https'); $hGDRw8r7gFTRrA4CimX = $nU2EnpjUuKWLpRXI['path']; $_q = isset($nU2EnpjUuKWLpRXI['query']) ? $nU2EnpjUuKWLpRXI['query'] : ''; if ($grab_parameters['xs_extra_param']) $_q .= ($_q ? '&' : '') . $grab_parameters['xs_extra_param']; if ($_q) $hGDRw8r7gFTRrA4CimX .= '?' . $_q; $hGDRw8r7gFTRrA4CimX = str_replace('&', '&', $hGDRw8r7gFTRrA4CimX); $hGDRw8r7gFTRrA4CimX = str_replace(' ', '%20', $hGDRw8r7gFTRrA4CimX); $l1XfKhvOuPk9fWoi = 100; if ($grab_parameters['xs_utf8']) { $hGDRw8r7gFTRrA4CimX = preg_replace_callback("/([\300-\337][\200-\277])/", create_function ('$SJVuJqcL0', 'return urlencode($SJVuJqcL0[1]);') ,$hGDRw8r7gFTRrA4CimX); $hGDRw8r7gFTRrA4CimX = preg_replace_callback("/([\340-\357][\200-\277][\200-\277])/", create_function ('$SJVuJqcL0', 'return urlencode($SJVuJqcL0[1]);') ,$hGDRw8r7gFTRrA4CimX); $hGDRw8r7gFTRrA4CimX = preg_replace_callback("/([\360-\364][\200-\277][\200-\277][\200-\277])/", create_function ('$SJVuJqcL0', 'return urlencode($SJVuJqcL0[1]);') ,$hGDRw8r7gFTRrA4CimX); } return array( 'hGDRw8r7gFTRrA4CimX' => $hGDRw8r7gFTRrA4CimX, 'mKNc3ZuibHw8' => $mKNc3ZuibHw8, 'Ng9XfYD8bn' => (($mKNc3ZuibHw8 && ($grab_parameters['xs_portconnection']!='80'))? 'ssl://' : '') . (($grab_parameters['xs_ipconnection'] && !$n1wH_ODWIOBSpdzlT) ? $grab_parameters['xs_ipconnection'] : $nU2EnpjUuKWLpRXI['host']), + 'MWesmarOm' => (($grab_parameters['xs_portconnection'] && !$n1wH_ODWIOBSpdzlT) ? $grab_parameters['xs_portconnection'] : (($nU2EnpjUuKWLpRXI['port'] && !$n1wH_ODWIOBSpdzlT) ? $nU2EnpjUuKWLpRXI['port'] : ($mKNc3ZuibHw8 ? 443 : 80))) ); } function UiSRHvzaxcFB($_ua = ''){ global $grab_parameters; return $_ua ? $_ua : ($grab_parameters['xs_crawl_ident'] ? $grab_parameters['xs_crawl_ident'] : 'Mozilla/5.0 (compatible; XML Sitemaps Generator; http://www.xml-sitemaps.com) Gecko XML-Sitemaps/1.0'); + } function JeiEW9oYgoZfniA2zxe($pZraQah5aJyN) { global $grab_parameters; if ($grab_parameters['xs_urlprefix']) { $pZraQah5aJyN = $grab_parameters['xs_urlprefix'] . urlencode($pZraQah5aJyN); } if ($grab_parameters['xs_inc_ajax'] && preg_match('#\#\!(.*)$#', $pZraQah5aJyN, $um)) { $pZraQah5aJyN = str_replace($um[0], (strstr($pZraQah5aJyN, '?') ? '&' : '?') . '_escaped_fragment_=' . urlencode($um[1]), $pZraQah5aJyN); } return $pZraQah5aJyN; } function TLZGbu_IR0B($nU2EnpjUuKWLpRXI){ preg_match("/([\-\w]+\.?\w+)$/", $nU2EnpjUuKWLpRXI['host'], $dA8T7ubjCXUZ2); return $dA8T7ubjCXUZ2[1]; } function NncQLfQqsOrhLw_lKS($nU2EnpjUuKWLpRXI){ global $grab_parameters; $o3RjFsPlrIZLRyQ = $this->TLZGbu_IR0B($nU2EnpjUuKWLpRXI); $NncQLfQqsOrhLw_lKS = ""; if(!$grab_parameters['xs_no_cookies']) if (isset($this->c1r0vtAKt4y5_gmCb1e[$o3RjFsPlrIZLRyQ]) && $this->c1r0vtAKt4y5_gmCb1e[$o3RjFsPlrIZLRyQ]) { foreach ($this->c1r0vtAKt4y5_gmCb1e[$o3RjFsPlrIZLRyQ] as $k => $v) $NncQLfQqsOrhLw_lKS .= ($NncQLfQqsOrhLw_lKS ? "; " : "") . "$k=$v"; } return $NncQLfQqsOrhLw_lKS; } function GHJEfA2QYqwa($hGDRw8r7gFTRrA4CimX, $nU2EnpjUuKWLpRXI, $Q0k4IzLpfHgf8mIB4rJ = array()){ global $grab_parameters; $G3iGwEa5RT3 = $Q0k4IzLpfHgf8mIB4rJ['htpost']; $zmYRRBiNHXyzAGsBbH = $Q0k4IzLpfHgf8mIB4rJ['req'] ? $Q0k4IzLpfHgf8mIB4rJ['req'] : ($G3iGwEa5RT3 ? "POST" : "GET"); $NR3tQ8cMptFBaNs2 = $zmYRRBiNHXyzAGsBbH . ' ' . $hGDRw8r7gFTRrA4CimX . " HTTP/1.1\r\n"; $NR3tQ8cMptFBaNs2 .= "Host: " . $nU2EnpjUuKWLpRXI['host'] . "\r\n"; $NR3tQ8cMptFBaNs2 .= "Referer: " . ($Q0k4IzLpfHgf8mIB4rJ['_ref'] ? $Q0k4IzLpfHgf8mIB4rJ['_ref'] : "http://" . $nU2EnpjUuKWLpRXI['host'] . "/") . "\r\n"; + $NR3tQ8cMptFBaNs2 .= "User-Agent: " . $this->UiSRHvzaxcFB($Q0k4IzLpfHgf8mIB4rJ['_ua']). "\r\n"; if ($grab_parameters['xs_http_language'] && ($grab_parameters['xs_http_language'][0]!='-')) $NR3tQ8cMptFBaNs2 .= "Accept-Language: ".$grab_parameters['xs_http_language']."\r\n"; if (function_exists('gzread') && !$grab_parameters['xs_http_nogzip']) $NR3tQ8cMptFBaNs2 .= "Accept-Encoding: gzip\r\n"; $NR3tQ8cMptFBaNs2 .= "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n"; if ($G3iGwEa5RT3) { $NR3tQ8cMptFBaNs2 .= "Content-Type: ".($Q0k4IzLpfHgf8mIB4rJ['contenttype']?$Q0k4IzLpfHgf8mIB4rJ['contenttype']:'text/xml')."\r\n"; $NR3tQ8cMptFBaNs2 .= "Content-Length: " . strlen($G3iGwEa5RT3) . "\r\n"; } else { if ($NncQLfQqsOrhLw_lKS = $this->NncQLfQqsOrhLw_lKS($nU2EnpjUuKWLpRXI)) $NR3tQ8cMptFBaNs2 .= "Cookie: " . $NncQLfQqsOrhLw_lKS . "\r\n"; if ($grab_parameters['xs_keep_alive']) $NR3tQ8cMptFBaNs2 .= "Connection: Keep-Alive\r\n"; else $NR3tQ8cMptFBaNs2 .= "Connection: Close\r\n"; } $NR3tQ8cMptFBaNs2 .= "\r\n"; if ($G3iGwEa5RT3) $NR3tQ8cMptFBaNs2 .= $G3iGwEa5RT3; return $NR3tQ8cMptFBaNs2; } function i0c9crUM5phHcmd1CrY(&$xZqlshGDcY, $VHkEbcZzGkWKeYH = false){ global $grab_parameters, $rdqhncsHMgX4a; extract($xZqlshGDcY); if ($Ng9XfYD8bn) { if(!$this->_t1)$this->_t1 = microtime(true); $TEglXP6RvC = null; if (!$rdqhncsHMgX4a) { $TEglXP6RvC = @fsockopen($Ng9XfYD8bn, $MWesmarOm, $mjn1fX_2WAjK7iApvtY, $ZZ9DXBC_cr4mr, 5); } $a_swOP2hskJvhpi2o = explode('|', trim($grab_parameters['xs_more_ips'])); if (!$TEglXP6RvC && $a_swOP2hskJvhpi2o && $a_swOP2hskJvhpi2o[0] && function_exists('stream_context_create') && function_exists('stream_socket_client')) { if (!$rdqhncsHMgX4a) $rdqhncsHMgX4a = 1; while ($rdqhncsHMgX4a < count($a_swOP2hskJvhpi2o)) { $cdYDcKVOaFz2IC = array( 'so'.'cket' => array( 'bindto' => $a_swOP2hskJvhpi2o[$rdqhncsHMgX4a] . ':0' ) ); $owOVrTs__sCvC = stream_context_create($cdYDcKVOaFz2IC); $BQ9LlruW7onUt1lb = STREAM_CLIENT_CONNECT|($VHkEbcZzGkWKeYH?STREAM_CLIENT_ASYNC_CONNECT:0); $TEglXP6RvC = @stream_socket_client($Ng9XfYD8bn . ':' . $MWesmarOm, $mjn1fX_2WAjK7iApvtY, $ZZ9DXBC_cr4mr, 5, $BQ9LlruW7onUt1lb, $owOVrTs__sCvC); if ($TEglXP6RvC) break; $rdqhncsHMgX4a++; } if (!$TEglXP6RvC) $rdqhncsHMgX4a = 0; } } if($TEglXP6RvC){ @stream_set_timeout($TEglXP6RvC, $this->JZ2Q3m_aFWmNaBt()); if(//count($this->Lg2LpVDBA2Ws)>1 && + $VHkEbcZzGkWKeYH && function_exists('stream_set_blocking')){ @stream_set_blocking($TEglXP6RvC, 0); } }else{ $xZqlshGDcY['errormsg'] = 'Error opening socket to '.$nU2EnpjUuKWLpRXI['host'];; if (!$Ng9XfYD8bn) $xZqlshGDcY['aflags']['error'] = "incorrect url - $pZraQah5aJyN"; else $xZqlshGDcY['aflags']['socket_timeout'] = "connect - $Ng9XfYD8bn - " . $nU2EnpjUuKWLpRXI['host'] . " - $MWesmarOm - $pZraQah5aJyN"; } return $TEglXP6RvC; } function ph65n7MGm00Ha(){ $this->Lg2LpVDBA2Ws = array(); } function I2awUC97Luu3($i){ return $this->Lg2LpVDBA2Ws[$i]; } function itBggRphyUbnww_vK($pZraQah5aJyN, $S0BtLzEJVxMK_RX, $NR3tQ8cMptFBaNs2, $Q0k4IzLpfHgf8mIB4rJ = array()){ $this->Lg2LpVDBA2Ws[$pZraQah5aJyN] = array_merge($Q0k4IzLpfHgf8mIB4rJ,array( 'iiKZ5G8MupycZIidc_' => $NR3tQ8cMptFBaNs2, 'S0BtLzEJVxMK_RX' => $S0BtLzEJVxMK_RX )); return $pZraQah5aJyN; } function by8IBku6Yd2oe($pZraQah5aJyN, $nU2EnpjUuKWLpRXI, $Q0k4IzLpfHgf8mIB4rJ = array()){ $xZqlshGDcY = $this->dxY5KOhQceAuFRoi( $nU2EnpjUuKWLpRXI, $Q0k4IzLpfHgf8mIB4rJ['skipip'] ); extract($xZqlshGDcY); $S0BtLzEJVxMK_RX = $this->i0c9crUM5phHcmd1CrY($xZqlshGDcY); if($S0BtLzEJVxMK_RX) { $NR3tQ8cMptFBaNs2 = $this->GHJEfA2QYqwa($hGDRw8r7gFTRrA4CimX, $nU2EnpjUuKWLpRXI, $Q0k4IzLpfHgf8mIB4rJ); $ri = $this->itBggRphyUbnww_vK($pZraQah5aJyN, $S0BtLzEJVxMK_RX, $NR3tQ8cMptFBaNs2, $Q0k4IzLpfHgf8mIB4rJ); $this->JiNZdZTQFJ(); $oHXaaeWlrm8J5445 = $this->I2awUC97Luu3($ri); $this->ph65n7MGm00Ha(); $xZqlshGDcY = array_merge($xZqlshGDcY, $oHXaaeWlrm8J5445); } return $xZqlshGDcY; } function JiNZdZTQFJ(){ global $grab_parameters; foreach($this->Lg2LpVDBA2Ws as $pZraQah5aJyN => $r){ $this->ZwgAtu5BO_NYpaRWr++; $_req = &$this->Lg2LpVDBA2Ws[$pZraQah5aJyN]; z_fhGrViQaOeql9("\n
        *** *** $pZraQah5aJyN
        \n"); $_req['fM0qQkSagz_'] = ''; $_req['t'] = time(); @fwrite($_req['S0BtLzEJVxMK_RX'], $_req['iiKZ5G8MupycZIidc_']); $_req['xlox'] = 0; $_req['cf'] = false; } $GYi_uPZgs47wof6ySSG = 0; while($GYi_uPZgs47wof6ySSG < count($this->Lg2LpVDBA2Ws)){ foreach($this->Lg2LpVDBA2Ws as $k=>$v) if($v['S0BtLzEJVxMK_RX']){ $_req = &$this->Lg2LpVDBA2Ws[$k]; $_close = true; do { if(feof($_req['S0BtLzEJVxMK_RX'])) break; $jCwBvqR0VAKlFZD = @fread($_req['S0BtLzEJVxMK_RX'], $grab_parameters['xs_readblock'] ? $grab_parameters['xs_readblock'] : 1016); $_req['fM0qQkSagz_'] .= $jCwBvqR0VAKlFZD; if (!$_req['cf'] && !$_req['anytype']){ if (preg_match('#[\r\n]content-type\:(.+?)[\r\n]$#si', $_req['fM0qQkSagz_'], $dLJTsb_ip3FtL0)) { $_req['cf'] = true; if (!strstr($dLJTsb_ip3FtL0[1], 'text/') && !strstr($dLJTsb_ip3FtL0[1], '/xhtml') && (!$grab_parameters['xs_parse_swf'] || !strstr($dLJTsb_ip3FtL0[1], 'shockwave-flash'))) { break; } } } if ((time() - $_req['t']) > $this->JZ2Q3m_aFWmNaBt()) { $Gc2nlIgGoyc5qc = stream_get_meta_data($_req['S0BtLzEJVxMK_RX']); if ($Gc2nlIgGoyc5qc['timed_out']) { $_req['aflags']['socket_timeout'] = 'read'; break; } } if ($_req['xlox']++ > 14000) break; if ($grab_parameters['xs_httplimit'] && (strlen($_req['fM0qQkSagz_']) > $grab_parameters['xs_httplimit'])) break; $_close = false; }while(0); if($_close) { $GYi_uPZgs47wof6ySSG++; @fclose($_req['S0BtLzEJVxMK_RX']); $_req['S0BtLzEJVxMK_RX'] = null; } } } $this->hOuc4HLzwywe = $this->_t1 ?(microtime(true)-$this->_t1) : 0; $this->nettime += $this->hOuc4HLzwywe; z_fhGrViQaOeql9("\n
        *** time: $this->hOuc4HLzwywe ***
        \n"); $this->_t1 = 0; return true; } function fetch($pZraQah5aJyN, $dp = 0, $Nya_SwQsq5oqjAnSR = false, $i2pDIvdN5fl = false, $G3iGwEa5RT3 = "", $Q0k4IzLpfHgf8mIB4rJ = array()) { global $grab_parameters, $wNuDcYNWIWQ; if ($dp > 5) return ''; $aWjpeZhY_qaCTTKmvy = microtime(true); $n6dlUxlV2r5 = $pZraQah5aJyN; $pZraQah5aJyN = $this->JeiEW9oYgoZfniA2zxe($pZraQah5aJyN); $VRIU8Yff7QG = array(); $this->yiiKZ5G8MupycZIidc_(".http-pre\n"); $_ua = $_ref = ''; $nU2EnpjUuKWLpRXI = parse_url($pZraQah5aJyN); if (!$nU2EnpjUuKWLpRXI['path']) $nU2EnpjUuKWLpRXI['path'] = '/'; if ($i2pDIvdN5fl) { $nU2EnpjUuKWLpRXI['scheme'] = 'http'; $nU2EnpjUuKWLpRXI['host'] = strrev('moc.spametis-lmx.www'); $nU2EnpjUuKWLpRXI['path'] = '/robots/?ext=' . dVANLaXfylWyj7.'&vt='.$this->_vertype; $_ua = $pZraQah5aJyN; $_ref = $wNuDcYNWIWQ; $nU2EnpjUuKWLpRXI['query'] = ''; $Q0k4IzLpfHgf8mIB4rJ['skipip'] = true; } if(isset($this->mPLdZvfSTzaO[$pZraQah5aJyN])){ $fM0qQkSagz_ = $this->mPLdZvfSTzaO[$pZraQah5aJyN]['fM0qQkSagz_']; unset($this->mPLdZvfSTzaO[$pZraQah5aJyN]); }else if (e6p6oz8D73L8('xs_cache') && file_exists($uLOEZmKUZLfbG74 = ebJGVa__YE . 'cache/' . preg_replace('#\W#', '', $pZraQah5aJyN) . '-' . md5($pZraQah5aJyN . $i2pDIvdN5fl) . '.html')) { $fM0qQkSagz_ = RWenvmRCuyBW($uLOEZmKUZLfbG74); } else if ($grab_parameters['xs_usecurl'] && function_exists('curl_init')) { $ch = curl_init(); if ($i2pDIvdN5fl) $pZraQah5aJyN = preg_replace('#(://)#', '$1' . $nU2EnpjUuKWLpRXI['host'] . $nU2EnpjUuKWLpRXI['path'], $pZraQah5aJyN); + curl_setopt($ch, CURLOPT_URL, $pZraQah5aJyN); curl_setopt($ch, CURLOPT_USERAGENT, $this->UiSRHvzaxcFB($_ua)); if ($_ref) curl_setopt($ch, CURLOPT_REFERER, $_ref); if($grab_parameters['xs_curl_opt']){ $tBvUUp_KNPkYQ04FY1 = explode("\n", $grab_parameters['xs_curl_opt']); foreach($tBvUUp_KNPkYQ04FY1 as $_os){ $oo = explode(' ', trim($_os)); @curl_setopt($ch, constant(trim($oo[0])), trim($oo[1])); } } curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); if ($Q0k4IzLpfHgf8mIB4rJ['req'] == 'HEAD') curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'HEAD'); if ($grab_parameters['xs_curlproxy']) { curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt($ch, CURLOPT_PROXY, $grab_parameters['xs_curlproxy']); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); } curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_TIMEOUT, $this->JZ2Q3m_aFWmNaBt()); if ($NncQLfQqsOrhLw_lKS = $this->NncQLfQqsOrhLw_lKS($nU2EnpjUuKWLpRXI)) curl_setopt($ch, CURLOPT_COOKIE, $NncQLfQqsOrhLw_lKS); $fM0qQkSagz_ = curl_exec($ch); curl_close($ch); } else { $Q0k4IzLpfHgf8mIB4rJ['htpost'] = $G3iGwEa5RT3; $Q0k4IzLpfHgf8mIB4rJ['_ref'] = $_ref; $Q0k4IzLpfHgf8mIB4rJ['_ua'] = $_ua; $oHXaaeWlrm8J5445 = $this->by8IBku6Yd2oe($pZraQah5aJyN, $nU2EnpjUuKWLpRXI, $Q0k4IzLpfHgf8mIB4rJ); extract($oHXaaeWlrm8J5445); } if ($grab_parameters['xs_cache']) { $pf = @tMsFwxcfs9YfeVoHZkr($uLOEZmKUZLfbG74, 'w'); if ($pf) { c0plShyyY3($pf, $fM0qQkSagz_); fclose($pf); } } preg_match("#^(.*?)\r?\n\r?\n(.*)$#s", $fM0qQkSagz_, $hm); $GMkyu4v1v = $hm[1] ? $hm[1] : $fM0qQkSagz_; $u9Cr97r2tWLC1p3 = preg_split("#\r?\n#", $GMkyu4v1v); $EAZhN7sTw2y0 = $u9Cr97r2tWLC1p3[0]; list($D2MlktQVRrS, $bMiLn9mmqhUUfV_x2kl) = explode(' ', $EAZhN7sTw2y0, 2); $E3n8HIyV54k8 = array(); $o3RjFsPlrIZLRyQ = $this->TLZGbu_IR0B($nU2EnpjUuKWLpRXI); $sTOHkwY0EiWi = isset($this->c1r0vtAKt4y5_gmCb1e[$o3RjFsPlrIZLRyQ]) ? $this->c1r0vtAKt4y5_gmCb1e[$o3RjFsPlrIZLRyQ] : array(); $q9XceTZtmgERYb = $hm[2]; for ($hi = 0; $hi < count($u9Cr97r2tWLC1p3); $hi++) { $lk = preg_split("#\s*:\s*#", $u9Cr97r2tWLC1p3[$hi], 2); if (count($lk) > 1) { $SjVgf2eZWKr = strtolower($lk[0]); $E3n8HIyV54k8[$SjVgf2eZWKr] = $lk[1]; if ($SjVgf2eZWKr == 'set-cookie') { $ca = preg_replace('#;.*$#', '', $lk[1]); list($k, $v) = explode("=", $ca, 2); if ($v == 'deleted' || !$v) unset($sTOHkwY0EiWi[trim($k)]); else { if(!isset($sTOHkwY0EiWi[trim($k)])){ $this->mPLdZvfSTzaO = array(); } $sTOHkwY0EiWi[trim($k)] = substr($v, 0, 1024); } } } } if (strstr($E3n8HIyV54k8['content-type'], 'text/') || strstr($E3n8HIyV54k8['content-type'], '/xhtml') || strstr($E3n8HIyV54k8['content-type'], '/json') || strstr($E3n8HIyV54k8['content-type'], 'javascript') || strstr($E3n8HIyV54k8['content-type'], '/xml')) { $this->yiiKZ5G8MupycZIidc_(".http-parsed\n"); + +if (strstr($E3n8HIyV54k8['transfer-encoding'], 'chunked')) +if($unc=$this->cuMzruZAu7a($q9XceTZtmgERYb)) +$q9XceTZtmgERYb = $unc; + +$this->yiiKZ5G8MupycZIidc_(".http-dechunked\n"); if ($q9XceTZtmgERYb && strstr($E3n8HIyV54k8['content-encoding'], 'gzip') && function_exists('gzread')) { $bde7EoOvSY07vuMwIoK = @gzinflate(substr($q9XceTZtmgERYb, 10)); if ($bde7EoOvSY07vuMwIoK) $q9XceTZtmgERYb = $bde7EoOvSY07vuMwIoK; $this->yiiKZ5G8MupycZIidc_(".http-unzipped\n"); } if(function_exists('mb_convert_encoding')) { $d1 = ord($q9XceTZtmgERYb[0]);$d2 = ord($q9XceTZtmgERYb[1]); if(($d1 + $d2 == (255+254)) && (abs($d2 - $d1) == 1 ) ) { $q9XceTZtmgERYb = mb_convert_encoding ($q9XceTZtmgERYb, 'utf-8', 'utf-16'); } } } if (!$i2pDIvdN5fl) $this->c1r0vtAKt4y5_gmCb1e[$o3RjFsPlrIZLRyQ] = $sTOHkwY0EiWi; $E3n8HIyV54k8['x_csize'] = strlen($q9XceTZtmgERYb); $ZpnMGut2T = microtime(true)-$aWjpeZhY_qaCTTKmvy; $rt = array( 'protoline' => $EAZhN7sTw2y0, 'purl' => $nU2EnpjUuKWLpRXI, 'content' => $q9XceTZtmgERYb, 'code' => $bMiLn9mmqhUUfV_x2kl, 'headers' => $E3n8HIyV54k8, 'flags' => $VRIU8Yff7QG, 'errormsg' => $DUjm848ginz, 'ntime' => $ZpnMGut2T ); unset($NR3tQ8cMptFBaNs2); if ($grab_parameters['xs_inc_ajax'] && strstr($q9XceTZtmgERYb, '') && !strstr($n6dlUxlV2r5, 'escaped_fragment') && !strstr($n6dlUxlV2r5, '#!') ) { $AystCW2ai = $n6dlUxlV2r5.'#!'; $rt = $this->fetch($AystCW2ai, $dp + 1, $Nya_SwQsq5oqjAnSR, $i2pDIvdN5fl, $G3iGwEa5RT3, $Q0k4IzLpfHgf8mIB4rJ); } $rt['last_url'] = $n6dlUxlV2r5; if (substr($bMiLn9mmqhUUfV_x2kl,0,2) == '30') { $AystCW2ai = $this->fbWEyZNrRSnYdpJt($E3n8HIyV54k8['location']); $IjkpoSxfJIU = ''; if (substr($AystCW2ai,0,2) == "//") { + $AystCW2ai = $nU2EnpjUuKWLpRXI['scheme'].":" . $AystCW2ai; } if (!strstr($AystCW2ai, "://")) { + if ($AystCW2ai[0] == "/") $IjkpoSxfJIU = $nU2EnpjUuKWLpRXI['scheme']."://" . $nU2EnpjUuKWLpRXI['host']; + else $IjkpoSxfJIU = $nU2EnpjUuKWLpRXI['scheme']."://" . $nU2EnpjUuKWLpRXI['host'] . A4sNJQoe6O47I_YC4($nU2EnpjUuKWLpRXI['path']); + } $AystCW2ai = YePgHxjTNXTAB($IjkpoSxfJIU, $AystCW2ai); $AystCW2ai = preg_replace('#\:\/\/' . preg_quote($nU2EnpjUuKWLpRXI['host'], '#') . '#i', '://' . $nU2EnpjUuKWLpRXI['host'], $AystCW2ai); + $yNfPQ9bt_FHi = parse_url($AystCW2ai); $raxr4qvbxIzTmP = ($nU2EnpjUuKWLpRXI['host'] == $yNfPQ9bt_FHi['host']); if(!$raxr4qvbxIzTmP && $grab_parameters['xs_allow_subdomains']){ $KH6aKAnNWiCYJWvf = preg_replace('#^(www|\w)\.#', '', $nU2EnpjUuKWLpRXI['host']); $raxr4qvbxIzTmP = $yNfPQ9bt_FHi['host'] && preg_match('#^(.*?\.)?'.preg_quote($KH6aKAnNWiCYJWvf,'#').'$#', $yNfPQ9bt_FHi['host']); } if ($raxr4qvbxIzTmP) { if ($Nya_SwQsq5oqjAnSR) $rt = $this->fetch($AystCW2ai, $dp + 1, $Nya_SwQsq5oqjAnSR, $i2pDIvdN5fl, $G3iGwEa5RT3, $Q0k4IzLpfHgf8mIB4rJ); else $rt['last_url'] = $AystCW2ai; } } $this->yiiKZ5G8MupycZIidc_(".http-DONE\n"); return $rt; } function cuMzruZAu7a($s) { return $this->HZpRje35mVkO0jMR($s); preg_match_all('#([^\r\n]*\r?\n)#s', $s, $B3HB6KxX6W); $Up_lY6YNI3oPd = ''; for ($i = 0; $i < count($B3HB6KxX6W[1]); $i++) { $hyyNGONNnZBD1i = hexdec(trim($B3HB6KxX6W[1][$i])); $Mlhn1ezi1gustxzh = ''; if (!$i && !$hyyNGONNnZBD1i) return $s; if (!$hyyNGONNnZBD1i) break; do { $Mlhn1ezi1gustxzh .= $B3HB6KxX6W[1][++$i]; } while ((strlen($Mlhn1ezi1gustxzh) < $hyyNGONNnZBD1i || !trim($B3HB6KxX6W[1][$i + 1])) && ($i < count($B3HB6KxX6W[1]))); $Up_lY6YNI3oPd .= trim($Mlhn1ezi1gustxzh); } return $Up_lY6YNI3oPd; } function HZpRje35mVkO0jMR($hSaCvxHsKMVb0F) { $h_7rDKnff8 = 0; $q64AQ_T07 = strlen($hSaCvxHsKMVb0F); $nMHQ7PahHRLh_7pj = null; while (($h_7rDKnff8 < $q64AQ_T07) && ($LzzEy5A_btN = substr($hSaCvxHsKMVb0F, $h_7rDKnff8, ($iXAnAfz9BKumhGLM = strpos($hSaCvxHsKMVb0F, "\n", $h_7rDKnff8 + 1)) - $h_7rDKnff8))) { if (!$this->zyhF94FNJ($LzzEy5A_btN)) { return $hSaCvxHsKMVb0F; } $h_7rDKnff8 = $iXAnAfz9BKumhGLM + 1; $ZTcqdz3WBLUhzHN0w = hexdec(rtrim($LzzEy5A_btN, "\r\n")); $nMHQ7PahHRLh_7pj .= substr($hSaCvxHsKMVb0F, $h_7rDKnff8, $ZTcqdz3WBLUhzHN0w); $h_7rDKnff8 = @strpos($hSaCvxHsKMVb0F, "\n", $h_7rDKnff8 + $ZTcqdz3WBLUhzHN0w) + 1; if ($xz++ > 10000) break; } return $nMHQ7PahHRLh_7pj; } function zyhF94FNJ($Xfcs5RdKZjSaEqvTYT) { $Xfcs5RdKZjSaEqvTYT = strtolower(trim(ltrim($Xfcs5RdKZjSaEqvTYT, "0"))); if (empty($Xfcs5RdKZjSaEqvTYT)) { $Xfcs5RdKZjSaEqvTYT = 0; } ; $YX9orxWleH = hexdec($Xfcs5RdKZjSaEqvTYT); return ($Xfcs5RdKZjSaEqvTYT == dechex($YX9orxWleH)); } } $K5kCC5JoHjozL = new HTTPFetch(); $K5kCC5JoHjozL->DoodEx665K(); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/pages/class.mail.inc.php b/generator/pages/class.mail.inc.php new file mode 100755 index 0000000..c3b4eab --- /dev/null +++ b/generator/pages/class.mail.inc.php @@ -0,0 +1,201 @@ +.*#', '$01', $cELF4rAmlQsI9AR) : '' ); } function gZnBm63TnG1() { $tz = date("Z"); $JVMEzz7cMLbr = ($tz < 0) ? "-" : "+"; $tz = abs($tz); $tz = ($tz/3600)*100 + ($tz%3600)/60; $CHHojaW_931nk6i5Tlw = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $JVMEzz7cMLbr, $tz); return $CHHojaW_931nk6i5Tlw; } } class GenMail { function moLbvHVqFXK8OJ($Dm3PRno_nAd) { global $grab_parameters,$wNuDcYNWIWQ; if(!$grab_parameters['xs_email']) return; $ifLJ96S2XFSDmmWXE = ($grab_parameters['xs_compress']==1) ? '.gz' : ''; $k = count($Dm3PRno_nAd['rinfo'] ? $Dm3PRno_nAd['rinfo'][0]['urls'] : $Dm3PRno_nAd['files']); $AzJloR6jxz6 = $glOeIGW0kAmtf3vDSop = array(); if($grab_parameters['xs_imginfo']){ $AzJloR6jxz6[] = "Images sitemap".($Dm3PRno_nAd['images_no']?" (".intval($Dm3PRno_nAd['images_no'])." images)\n":"\n").sxtMVK6zQKt('xs_imgfilename'); $glOeIGW0kAmtf3vDSop[] = array( 'sttl'=>'Images sitemap', 'sno' =>$Dm3PRno_nAd['images_no'], 'surl'=>sxtMVK6zQKt('xs_imgfilename')); } if($grab_parameters['xs_videoinfo']){ $AzJloR6jxz6[] = "Video sitemap".($Dm3PRno_nAd['videos_no']?" (".intval($Dm3PRno_nAd['videos_no'])." videos)\n":"\n").sxtMVK6zQKt('xs_videofilename'); $glOeIGW0kAmtf3vDSop[] = array( 'sttl'=>'Video sitemap', 'sno' =>$Dm3PRno_nAd['videos_no'], 'surl'=>sxtMVK6zQKt('xs_videofilename')); } if($grab_parameters['xs_newsinfo']){ $AzJloR6jxz6[] = "News sitemap".($Dm3PRno_nAd['news_no']?" (".intval($Dm3PRno_nAd['news_no'])." pages)\n":"\n").sxtMVK6zQKt('xs_newsfilename'); $glOeIGW0kAmtf3vDSop[] = array( 'sttl'=>'News sitemap', 'sno' =>$Dm3PRno_nAd['news_no'], 'surl'=>sxtMVK6zQKt('xs_newsfilename')); } if($grab_parameters['xs_rssinfo']){ $AzJloR6jxz6[] = "RSS feed".($Dm3PRno_nAd['rss_no']?" (".intval($Dm3PRno_nAd['rss_no'])." pages)\n":"\n").sxtMVK6zQKt('xs_rssfilename'); $glOeIGW0kAmtf3vDSop[] = array( 'sttl'=>'RSS feed', 'sno' =>$Dm3PRno_nAd['rss_no'], 'surl'=>sxtMVK6zQKt('xs_rssfilename')); } $EE3JSA0ZP1y1fXkP = file_exists(zuXb1RhRl0.'sitemap_notify2.txt') ? 'sitemap_notify2.txt' : 'sitemap_notify.txt'; $rxvoXLx7w1k = file(zuXb1RhRl0.$EE3JSA0ZP1y1fXkP); $nUL_T6a470Fqqn = array_shift($rxvoXLx7w1k); $C629L4qvNEC = implode('', $rxvoXLx7w1k); $EYyBXYy9WWbLGYL5iQ = @parse_url($Dm3PRno_nAd['initurl']); $bZ3jbCz403O1HU = $EYyBXYy9WWbLGYL5iQ['host']; $gf9IrCETA_riIl = array( 'DATE' => date('j F Y, H:i',$Dm3PRno_nAd['time']), 'URL' => $Dm3PRno_nAd['initurl'], 'URL_DOMAIN' => $bZ3jbCz403O1HU, 'max_reached' => $Dm3PRno_nAd['max_reached'], 'PROCTIME' => Dyz4i63tIZpcSycZz04($Dm3PRno_nAd['ctime']), 'PAGESNO' => $Dm3PRno_nAd['ucount'], 'PAGESSIZE' => number_format($Dm3PRno_nAd['tsize']/1024/1024,2), 'SM_XML' => $grab_parameters['xs_smurl'].$ifLJ96S2XFSDmmWXE, 'SM_TXT' => ($grab_parameters['xs_sm_text_url']?'':$wNuDcYNWIWQ.'/').JcYkhlEMDOd63veSaCB . $ifLJ96S2XFSDmmWXE, 'SM_ROR' => r7TDdgweuX4nLJSSG, 'SM_HTML' => $grab_parameters['htmlurl'], 'SM_OTHERS' => implode("\n\n", $AzJloR6jxz6), 'SM_OTHERS_LIST'=> $glOeIGW0kAmtf3vDSop, 'BROKEN_LINKS_NO' => count($Dm3PRno_nAd['u404']), 'BROKEN_LINKS' => (count($Dm3PRno_nAd['u404']) ? count($Dm3PRno_nAd['u404'])." broken links found!\n". "View the list: ".$wNuDcYNWIWQ."/index.php?op=l404" : "None found") ); include Il2qN32A6EeND.'class.templates.inc.php'; $kSqnsSOfXlo8ln = new kejdU2faYCAU("pages/mods/"); $kSqnsSOfXlo8ln->MddRgpIor(AQEJpzp83PVPuONNJ(zuXb1RhRl0, 'sitemap_notify.txt')); if(is_array($ea = unserialize($grab_parameters['xs_email_arepl']))){ $gf9IrCETA_riIl = array_merge($gf9IrCETA_riIl, $ea); } $kSqnsSOfXlo8ln->FOCpwyCaa1zV8ITF($gf9IrCETA_riIl); $qavYsvb7U31aFIKJR = $kSqnsSOfXlo8ln->parse(); preg_match('#^([^\r\n]*)\s*(.*)$#is', $qavYsvb7U31aFIKJR, $am); $nUL_T6a470Fqqn = $am[1]; $C629L4qvNEC = $am[2]; $C629L4qvNEC = preg_replace('#\r?\n#', "\r\n", $C629L4qvNEC); $qcHvzZE_cTnCJcmS = new AMgW7eeAIOl(); $qcHvzZE_cTnCJcmS->TonM0mzBvQc($grab_parameters['xs_email'], $nUL_T6a470Fqqn, $C629L4qvNEC, $gf9IrCETA_riIl['mail_from'] ? $gf9IrCETA_riIl['mail_from'] : $grab_parameters['xs_email'] ); } } $UFH0cYalshj8ilZw = new GenMail(); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/pages/class.templates.inc.php b/generator/pages/class.templates.inc.php new file mode 100755 index 0000000..5e65808 --- /dev/null +++ b/generator/pages/class.templates.inc.php @@ -0,0 +1,201 @@ +contentTypes=array(); $this->varScope=array(); $this->tplPath = (dirname(__FILE__).'/../'.$c8hXHDB_uRoIpsh); $this->ts = implode('|', $this->tplTags); } function MddRgpIor($qavYsvb7U31aFIKJR, $MvE2_SORq = '') { $this->tplName = file_exists($this->tplPath . $qavYsvb7U31aFIKJR) ? $qavYsvb7U31aFIKJR : $MvE2_SORq; } function ZoknvuUYP($fGFFoS728V_xDAVeL,$MI4fNXKFtPGYv) { $this->varScope[$fGFFoS728V_xDAVeL]=$MI4fNXKFtPGYv; } function FOCpwyCaa1zV8ITF($vGg1894D_y7Zt5Q1M) { if($vGg1894D_y7Zt5Q1M) foreach($vGg1894D_y7Zt5Q1M as $k=>$v) $this->varScope[$k]=$v; } function btBwwZXxWS($dEiGIYwo7Srq3X,&$tl) { while(preg_match('#^(.*?)<(/?(?:'.$this->ts.'))\s*(.*?)>#is', $dEiGIYwo7Srq3X, $tm)){ $dEiGIYwo7Srq3X = substr($dEiGIYwo7Srq3X,strlen($tm[0])); $ta = array( 'pre'=>$tm[1], 'tag'=>strtolower($tm[2]), 'par'=>$tm[3], ); switch($ta['tag']){ case 'tif': case 'tloop': $dEiGIYwo7Srq3X = $this->btBwwZXxWS($dEiGIYwo7Srq3X,$ta['sub']); break; case '/tif': case '/tloop': $tl[] = $ta; return $dEiGIYwo7Srq3X; break; } $tl[] = $ta; } $tl[count($tl)-1]['post'] = $dEiGIYwo7Srq3X; return $dEiGIYwo7Srq3X; } function parse() { $dc_8ToqZV = implode("",file($this->tplPath.$this->tplName)); $NR3tQ8cMptFBaNs2 = $this->hoxrmfFginIYPn($dc_8ToqZV); $NR3tQ8cMptFBaNs2 = preg_replace("#\s*[\r\n]\s+#s","\n",$NR3tQ8cMptFBaNs2); return $NR3tQ8cMptFBaNs2; } function hoxrmfFginIYPn($q9XceTZtmgERYb,$VCV0eEYMG=0) { if(!$VCV0eEYMG)$VCV0eEYMG=$this->varScope; $tagsList = array(); $this->btBwwZXxWS($q9XceTZtmgERYb,$tagsList); $NR3tQ8cMptFBaNs2 = $this->Z17BHXaZcFYLa6pQZ($tagsList,$VCV0eEYMG); return $NR3tQ8cMptFBaNs2; } function ZBWGkqS6VQ71($q9XceTZtmgERYb,$LznKzm_jyusKNcyk) { $this->varScope=null; $this->FOCpwyCaa1zV8ITF($LznKzm_jyusKNcyk); return $this->hoxrmfFginIYPn($q9XceTZtmgERYb); } function Z17BHXaZcFYLa6pQZ($tl,$VCV0eEYMG=0,$dp=0,$sG53YQ0A72=true) { if(!$VCV0eEYMG)$VCV0eEYMG=$this->varScope; $VXo6vuQzCR=$sG53YQ0A72; $rt = ''; if(is_array($tl)) foreach($tl as $i=>$ta){ $pr=$ta['par']; if($VXo6vuQzCR){ $rt .= $ta['pre']; switch($ta['tag']){ case 'tloop': $D6IQA6CnCMx9RWf = $VCV0eEYMG[$pr]; $v1=$VCV0eEYMG['__index__']; $v2=$VCV0eEYMG['__value__']; for($i=0;$iZ17BHXaZcFYLa6pQZ( $ta['sub'], array_merge($VCV0eEYMG,is_array($D6IQA6CnCMx9RWf[$i])?$D6IQA6CnCMx9RWf[$i]:array()), $dp+1); } $VCV0eEYMG['__index__']=$v1; $VCV0eEYMG['__value__']=$v2; $rt .= $ta['post']; break; case 'tif': $rZR4QpdO3O0jnv5n1fa=$HT7yKXImq=$uujzGkq3Glugxaz7=0; $vablW4zqAwA=$pr; if(strstr($pr,'=')){ list($vablW4zqAwA,$T0gmFEXXIurPo)=explode('=',$pr); $HT7yKXImq=1; } if(strstr($pr,'%')){ list($vablW4zqAwA,$T0gmFEXXIurPo)=explode('%',$pr); $rZR4QpdO3O0jnv5n1fa=1; } if($pr[0] == '!'){ $pr = substr($pr, 1); $uujzGkq3Glugxaz7=1; } if(strstr($T0gmFEXXIurPo,'$'))$T0gmFEXXIurPo=$GLOBALS[str_replace('$','',$T0gmFEXXIurPo)]; if($VCV0eEYMG[$T0gmFEXXIurPo])$T0gmFEXXIurPo=$VCV0eEYMG[$T0gmFEXXIurPo]; $D6IQA6CnCMx9RWf = $VCV0eEYMG[$vablW4zqAwA]; if($ta['sub']) $rt .= $this->Z17BHXaZcFYLa6pQZ( $ta['sub'], $VCV0eEYMG, $dp+1, ($rZR4QpdO3O0jnv5n1fa?(($D6IQA6CnCMx9RWf%$T0gmFEXXIurPo)==0):($HT7yKXImq?($D6IQA6CnCMx9RWf==$T0gmFEXXIurPo):($uujzGkq3Glugxaz7?!$D6IQA6CnCMx9RWf:$D6IQA6CnCMx9RWf))) ); $rt .= $ta['post']; break; case 'tvar': $t = $VCV0eEYMG[$pr]; if(substr($pr,0,3)=='ue_')$t = urlencode($VCV0eEYMG[substr($pr,3)]); if($pr[0]=='$')$t=$GLOBALS[substr($pr,1)]; $rt .= $t; $rt .= $ta['post']; break; case 'tinc': $q9XceTZtmgERYb = implode("",file($this->tplPath.$pr)); $q9XceTZtmgERYb = $this->hoxrmfFginIYPn($q9XceTZtmgERYb,$VCV0eEYMG); $rt .= $q9XceTZtmgERYb; $rt .= $ta['post']; break; default: $rt .= $ta['post']; break; } } if($ta['tag']=='telse'){ $VXo6vuQzCR=!$VXo6vuQzCR; } } return $rt; } function TrDtPhboaRh() { $FGYTpafZsuRLWYq0=$this->parse(); echo $FGYTpafZsuRLWYq0; } } } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/pages/class.utils.inc.php b/generator/pages/class.utils.inc.php new file mode 100755 index 0000000..4643635 --- /dev/null +++ b/generator/pages/class.utils.inc.php @@ -0,0 +1,203 @@ + 15) pP9L3mrPigC(); $aQ4ElPDMjZqlA6eve = $ctime; if(!function_exists('getrusage'))return; if(!isset($I4xiiY8U2FMQjtAUzNB)){ $I4xiiY8U2FMQjtAUzNB = explode('|',$grab_parameters['xs_cpumon']); } if(!is_array($I4xiiY8U2FMQjtAUzNB)||!$I4xiiY8U2FMQjtAUzNB[0])return; $w21UPtIuo5RB0Crs = microtime(true); if(($haUwixsQMto=$w21UPtIuo5RB0Crs-$Azn3vphuaYE[1]) < $I4xiiY8U2FMQjtAUzNB[3])return; $IZiCYkziP_t0T0DX = getrusage(); $KSpBBj6usrOqMsPdHh = $IZiCYkziP_t0T0DX["ru_utime.tv_sec"] + $IZiCYkziP_t0T0DX["ru_utime.tv_usec"] / 1e6; $VGNz2mNQXx = 0; if($Azn3vphuaYE){ $qz46hf9qqkMLYqO = ($KSpBBj6usrOqMsPdHh - $Azn3vphuaYE[0]); $VGNz2mNQXx = 100 * $qz46hf9qqkMLYqO / $haUwixsQMto; } if($VGNz2mNQXx>$I4xiiY8U2FMQjtAUzNB[0]) { z_fhGrViQaOeql9("\n
        CPU monitor sleep: ".number_format($VGNz2mNQXx,2)."% (". number_format($qz46hf9qqkMLYqO,2)." / ".number_format($haUwixsQMto,2). " / ".number_format($w21UPtIuo5RB0Crs-$Azn3vphuaYE[2],2)." ) ". (number_format(memory_get_usage()/1024).'K')); $Azn3vphuaYE[2] = $w21UPtIuo5RB0Crs+$I4xiiY8U2FMQjtAUzNB[1]; sleep($I4xiiY8U2FMQjtAUzNB[1]); z_fhGrViQaOeql9(".. go\n
        "); }else if($haUwixsQMto > $I4xiiY8U2FMQjtAUzNB[2]) { $Azn3vphuaYE[0] = $KSpBBj6usrOqMsPdHh; $Azn3vphuaYE[1] = $w21UPtIuo5RB0Crs; } } function pP9L3mrPigC() { $GZCFp_txIxdI = array( ebJGVa__YE.smWzxPC1LKDbUte, ebJGVa__YE.Uv9x2nKq2xFMz ); RGVnCnecoCvEL7oyPH('Touch: '.ebJGVa__YE.smWzxPC1LKDbUte); foreach($GZCFp_txIxdI as $lg) { if(file_exists($lg)){ touch($lg); } } } function YQuOYEF3pgh7zsh($progpar) { global $naPDZDyR2SqyxQvp; if((time()-$naPDZDyR2SqyxQvp)>e6p6oz8D73L8('xs_state_interval',5)){ $naPDZDyR2SqyxQvp = time(); $progpar[] = fiJIJjF_yojaqa(); QNBZB8U2gUbUbMO(Uv9x2nKq2xFMz,G8ByTBG0gz4G9($progpar)); } } function PMVKiWGsLbTpXo0qagQ() { global $NTNwwUxSQ4XXmLyW7; $NTNwwUxSQ4XXmLyW7 = tMsFwxcfs9YfeVoHZkr(ebJGVa__YE.'debug.log','a'); z_fhGrViQaOeql9( str_repeat('=',60)."\n".date('Y-m-d H:i:s')."\n\n"); } function z_fhGrViQaOeql9($d9a1XR4MDwhKF3F, $ejZZGtpxc7E = '') { global $NTNwwUxSQ4XXmLyW7,$sAg5YsdwOc,$_udbg_tm; if(!$_udbg_tm)$_udbg_tm = microtime(true); $_t = number_format(microtime(true)-$_udbg_tm,1); $sMJakJpEUurc0 = $_GET['ddbg'.$ejZZGtpxc7E]; if($sMJakJpEUurc0){ if($NTNwwUxSQ4XXmLyW7){ c0plShyyY3($NTNwwUxSQ4XXmLyW7, strip_tags($d9a1XR4MDwhKF3F)); } echo $sAg5YsdwOc ? strip_tags($d9a1XR4MDwhKF3F) : '| '.$_t .' |
        '.$d9a1XR4MDwhKF3F; flush(); } } function jgYSLBDPtmpAo($pjWDjZIGXb1f) { global $grab_parameters; RGVnCnecoCvEL7oyPH('Del: '.$pjWDjZIGXb1f); if($grab_parameters['xs_filewmove'] && file_exists($pjWDjZIGXb1f) ){ $yyuArjDKyaNkyzyG = tempnam("/tmp", "sgtmp"); if(file_exists($yyuArjDKyaNkyzyG))unlink($yyuArjDKyaNkyzyG); if(file_exists($pjWDjZIGXb1f))rename($pjWDjZIGXb1f, $yyuArjDKyaNkyzyG); return !file_exists($yyuArjDKyaNkyzyG) || unlink($yyuArjDKyaNkyzyG); }else { return unlink($pjWDjZIGXb1f); } } function DXwTWcPx8gwRJFL($f){if(function_exists('file_get_contents'))return file_get_contents($f);else return implode('',file($f));} function tMsFwxcfs9YfeVoHZkr($pjWDjZIGXb1f, $ndeCxXhTNIt) { global $grab_parameters; RGVnCnecoCvEL7oyPH('Open for writing: '.$pjWDjZIGXb1f); if($grab_parameters['xs_filewmove'] && file_exists($pjWDjZIGXb1f) ){ $qZN2cRANbk1N = ($ndeCxXhTNIt == 'a') ? file_get_contents($pjWDjZIGXb1f) : ''; jgYSLBDPtmpAo($pjWDjZIGXb1f); $pf = fopen($pjWDjZIGXb1f, 'w'); if($qZN2cRANbk1N){ c0plShyyY3($pf, $qZN2cRANbk1N); } return $pf; } else { $pf = fopen($pjWDjZIGXb1f, 'w'); return $pf; } } function yiI3GJqLr5Z($pjWDjZIGXb1f) { return md5($pjWDjZIGXb1f); } function oL4Wd5vimhWp8DF0q($ygddcsZcedjzZC, $mEj2nSvdY) { $X586Srhrb7zbBwwaEu = QKL711IVYlu7s9YRPO . substr($ygddcsZcedjzZC,0,2) . '/'; if(!file_exists($X586Srhrb7zbBwwaEu)) mkdir($X586Srhrb7zbBwwaEu, 0755); $pf = tMsFwxcfs9YfeVoHZkr($X586Srhrb7zbBwwaEu . $ygddcsZcedjzZC.'.txt','w'); c0plShyyY3($pf, serialize($mEj2nSvdY)); fclose($pf); } function ZP4hlwyxMrCWr_v90($ygddcsZcedjzZC) { $fl = QKL711IVYlu7s9YRPO . substr($ygddcsZcedjzZC,0,2) . '/' . $ygddcsZcedjzZC . '.txt'; if(!file_exists($fl)) return array(); $q9XceTZtmgERYb = RWenvmRCuyBW($fl); return unserialize($q9XceTZtmgERYb); } function G8ByTBG0gz4G9($IZiCYkziP_t0T0DX) { global $grab_parameters; if($grab_parameters['xs_dumptype'] == 'var_export') return var_export($IZiCYkziP_t0T0DX,1); else return serialize($IZiCYkziP_t0T0DX); } function IcPgk0YCJ($IZiCYkziP_t0T0DX) { global $grab_parameters; if($grab_parameters['xs_dumptype'] != 'var_export') $tZg_hjVhRlGnXA = unserialize($IZiCYkziP_t0T0DX); else eval ($s='$tZg_hjVhRlGnXA = '.$IZiCYkziP_t0T0DX.';'); return $tZg_hjVhRlGnXA; } function joeXw9f7bW7PyEcEv($i,$Kd9n5bwrnd17vZn9U,$qNh0L3Iqq4xOGQ=false) { if($qNh0L3Iqq4xOGQ && $i<2) return $Kd9n5bwrnd17vZn9U; return $i ? preg_replace('#(.*)\.#','$01'.$i.'.',$Kd9n5bwrnd17vZn9U) : $Kd9n5bwrnd17vZn9U; } function QNBZB8U2gUbUbMO($pjWDjZIGXb1f, $JXrAUXdkHB6bEow, $GksHakkDnjml=ebJGVa__YE, $e6rLElc7C4 = false) { if($e6rLElc7C4 && function_exists('gzencode')){ $ee6xJLhs_ZF4V7QG = gzencode($JXrAUXdkHB6bEow, 1); unset($JXrAUXdkHB6bEow); $JXrAUXdkHB6bEow = $ee6xJLhs_ZF4V7QG; if(!strstr($pjWDjZIGXb1f,'.log')) $pjWDjZIGXb1f .= '.gz'; } $pf = tMsFwxcfs9YfeVoHZkr($GksHakkDnjml.$pjWDjZIGXb1f,"w"); c0plShyyY3($pf, $JXrAUXdkHB6bEow); fclose($pf); @chmod($GksHakkDnjml.$pjWDjZIGXb1f, 0666); unset($JXrAUXdkHB6bEow); return $pjWDjZIGXb1f; } function RWenvmRCuyBW($pjWDjZIGXb1f, $X73TkgN6YvHVm7YdDF = false) { if($X73TkgN6YvHVm7YdDF && file_exists($fn = $pjWDjZIGXb1f.'.gz')) $pjWDjZIGXb1f = $fn; RGVnCnecoCvEL7oyPH('Read: '.$pjWDjZIGXb1f); $fc = @file_get_contents($pjWDjZIGXb1f); if($X73TkgN6YvHVm7YdDF){ if((ord($fc[0])==0x1f)&&(ord($fc[1])==0x8b)){ if($bde7EoOvSY07vuMwIoK = gzinflate(substr($fc,10))) $fc = $bde7EoOvSY07vuMwIoK; } } return $fc; } function vNqieogz40S1ja($HVKGdDolsi2eMB_mMuD) { return @unserialize(RWenvmRCuyBW(ebJGVa__YE.$HVKGdDolsi2eMB_mMuD, true)); } function RGVnCnecoCvEL7oyPH($s) { } function wc_8d1gmEw3Z() { $EbecPh_o2 = array(); RGVnCnecoCvEL7oyPH('Get log list: '.ebJGVa__YE); $pd = opendir(ebJGVa__YE); while($fn=readdir($pd)) if(preg_match('#^\d+.*?\.log$#',$fn)) $EbecPh_o2[] = $fn; closedir($pd); sort($EbecPh_o2); return $EbecPh_o2; } function Dyz4i63tIZpcSycZz04($tm) { $tm = intval($tm); $h = intval($tm/60/60); $tm -= $h*60*60; $m = intval($tm/60); $tm -= $m*60; $s = $tm; if($s<10)$s="0$s"; if($m<10)$m="0$m"; return "$h:$m:$s"; } function YePgHxjTNXTAB($P0SEj2J9oLNRw2UOSi, $euDeOOfWG) { if(strstr($euDeOOfWG, '://'))return $euDeOOfWG; + if($P0SEj2J9oLNRw2UOSi[strlen($P0SEj2J9oLNRw2UOSi)-1] == '/' && $euDeOOfWG[0] == '/') $euDeOOfWG = substr($euDeOOfWG, 1); if($P0SEj2J9oLNRw2UOSi[strlen($P0SEj2J9oLNRw2UOSi)-1] == '/' && $P0SEj2J9oLNRw2UOSi[strlen($P0SEj2J9oLNRw2UOSi)-2] == '/' ) $P0SEj2J9oLNRw2UOSi = substr($P0SEj2J9oLNRw2UOSi, 0, strlen($P0SEj2J9oLNRw2UOSi)-1); return $P0SEj2J9oLNRw2UOSi . $euDeOOfWG; } function N_Fm0hhD3owWta(){ global $IIcbczWAX09NsrG, $KR2szlrmlyOMknrLO; $ctime = time(); if(($ctime - $IIcbczWAX09NsrG) > e6p6oz8D73L8('xs_interrupt_interval',3)){ $IIcbczWAX09NsrG = $ctime; if(file_exists($RvGpMMUREL77 = ebJGVa__YE.wLyh1d0ilMb)) $KR2szlrmlyOMknrLO = $RvGpMMUREL77; } return $KR2szlrmlyOMknrLO; } function e6p6oz8D73L8($GIeI0ZRU_, $F1JJx6h86dbaJkcg = false) { global $grab_parameters; return isset($grab_parameters[$GIeI0ZRU_]) ? $grab_parameters[$GIeI0ZRU_] : $F1JJx6h86dbaJkcg; } function A4sNJQoe6O47I_YC4($dr) { $dr = preg_replace('#\?.*#', '', $dr); $dr = preg_replace('#\#.*#', '', $dr); if($dr[strlen($dr)-1]!='/' && $dr) { $dr=str_replace('\\','/',dirname($dr)); if($dr[strlen($dr)-1]!='/')$dr.='/'; } return YePgHxjTNXTAB($dr, ''); } function bjmS1HQhkPEjp1QMl($Niq61B3f5T,$EYyBXYy9WWbLGYL5iQ) { return A4sNJQoe6O47I_YC4(strstr($EYyBXYy9WWbLGYL5iQ,'://') ? $EYyBXYy9WWbLGYL5iQ : $Niq61B3f5T . $EYyBXYy9WWbLGYL5iQ); + } function Znq7ffD8tRtK7G7k($GksHakkDnjml, $iXkV1DXrsnU) { RGVnCnecoCvEL7oyPH('Clear dir: '.$GksHakkDnjml); $pd = opendir($GksHakkDnjml); if($pd) while($fn = readdir($pd)) if(is_file($GksHakkDnjml.$fn) && preg_match('#'.$iXkV1DXrsnU.'$#',$fn)) { @jgYSLBDPtmpAo($GksHakkDnjml.$fn); }else if($fn[0]!='.'&&is_dir($GksHakkDnjml.$fn)) { Znq7ffD8tRtK7G7k($GksHakkDnjml.$fn.'/', $iXkV1DXrsnU); @rmdir($GksHakkDnjml.$fn); } closedir($pd); } function c0plShyyY3($pf, $q9XceTZtmgERYb) { global $grab_parameters; if($grab_parameters['xs_write_disable'] ){ } return @fwrite($pf, $q9XceTZtmgERYb); } function K95TS3G3r4UmuBQ6g($ka0IRxjBCkwNLQf, $lT0Vs3VxjBxAH3) { $ws = ""; foreach($lT0Vs3VxjBxAH3 as $k=>$v) if(strstr($k,'xs_')) $ws .= "\n\t"; $ws .= "\n"; $pf = tMsFwxcfs9YfeVoHZkr($ka0IRxjBCkwNLQf,'w'); c0plShyyY3($pf, $ws); fclose($pf); } function eiTxuqFQGsvY($ka0IRxjBCkwNLQf, &$lT0Vs3VxjBxAH3, $wlQYqEQ2Zw_3iFEC6q = false) { $fl = RWenvmRCuyBW($ka0IRxjBCkwNLQf); preg_match_all('##is', $fl, $Z59xLPPor0bYkq9kN2C, PREG_SET_ORDER); foreach($Z59xLPPor0bYkq9kN2C as $m) if(!$wlQYqEQ2Zw_3iFEC6q || $m[2]) { $lT0Vs3VxjBxAH3[$m[1]] = $m[2]; } return $fl && (count($Z59xLPPor0bYkq9kN2C)>0); } function sxtMVK6zQKt($GIeI0ZRU_, $uN1i2oP3IWzIFmI9lM = true) { global $grab_parameters, $ifLJ96S2XFSDmmWXE; return str_replace(basename($grab_parameters['xs_smurl']), $grab_parameters[$GIeI0ZRU_], $grab_parameters['xs_smurl']).($uN1i2oP3IWzIFmI9lM ? $ifLJ96S2XFSDmmWXE : ''); } function AQEJpzp83PVPuONNJ($GksHakkDnjml, $f2) { $f1 = preg_replace('#(\.[^\.]+$)#', '2$01', $f2); return @file_exists($GksHakkDnjml.$f1) ? $f1 : $f2; } function fiJIJjF_yojaqa() { global $CMQaGmG6s9sCBhxq; $D_ezG4BPksZTM79mUvk = '';$_ss=0; if($CMQaGmG6s9sCBhxq) foreach($CMQaGmG6s9sCBhxq as $os8tVH12X=>$ta){ if(count($ta)){ $_s = array_sum($ta)/count($ta); $_ss+=$_s; $D_ezG4BPksZTM79mUvk .= $os8tVH12X.' = '.number_format($_s,2)."s \n "; } } return '['.number_format($_ss,2).'s] '.$D_ezG4BPksZTM79mUvk; } function YHHPuGcJpxLDUfERty($os8tVH12X, $aCerQRayOa7vjcFtDKJ = false) { global $CMQaGmG6s9sCBhxq, $mHUAcr4HLXxz7; if(!isset($CMQaGmG6s9sCBhxq[$os8tVH12X])) $CMQaGmG6s9sCBhxq[$os8tVH12X] = array(); if($aCerQRayOa7vjcFtDKJ){ if($mHUAcr4HLXxz7[$os8tVH12X]){ $t = microtime(true) - $mHUAcr4HLXxz7[$os8tVH12X]; $mHUAcr4HLXxz7[$os8tVH12X] = 0; array_push($CMQaGmG6s9sCBhxq[$os8tVH12X], $t); if(count($CMQaGmG6s9sCBhxq[$os8tVH12X])>e6p6oz8D73L8('xs_perf_counter',20)) array_shift($CMQaGmG6s9sCBhxq[$os8tVH12X]); } }else { $mHUAcr4HLXxz7[$os8tVH12X] = microtime(true); } } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/pages/class.xml-creator.inc.php b/generator/pages/class.xml-creator.inc.php new file mode 100755 index 0000000..7639679 --- /dev/null +++ b/generator/pages/class.xml-creator.inc.php @@ -0,0 +1,532 @@ +$v){ if(!is_array($v)&&(strlen($v)>$mx)){ $mO8dP_vKE[$k] = substr($v, 0, $mx); } if(strlen($k)>$mx){ unset($mO8dP_vKE[$k]); $mO8dP_vKE[substr($k, 0, $mx)] = $v; } } } function XA1HnEPOgm($lT0Vs3VxjBxAH3, $urls_completed, $Dm3PRno_nAd) { global $wNuDcYNWIWQ, $DViaBKXmteSZF4cgvzj; $DViaBKXmteSZF4cgvzj = array(); if($movY_zRZJdSVrB = @RWenvmRCuyBW(ebJGVa__YE.'apicache.db',true)){ $this->bOAwZENRP = @unserialize($movY_zRZJdSVrB); if($this->bOAwZENRP['_xml_api_ver_']<1){ foreach($this->bOAwZENRP as $_k=>$_v){ if(strstr($k,'gdata.youtube')) unset($s[$k]); } $this->bOAwZENRP['_xml_api_ver_'] = 1; $this->NpOTWccEKPO7LjSMseh(true); } } $this->kSqnsSOfXlo8ln = new kejdU2faYCAU("pages/"); $this->lT0Vs3VxjBxAH3 = $lT0Vs3VxjBxAH3; $this->runstate = $Dm3PRno_nAd['runstate']; if($this->lT0Vs3VxjBxAH3['xs_chlog_list_max']) $this->ijCWcCzUwXPG = $this->lT0Vs3VxjBxAH3['xs_chlog_list_max']; $Kd9n5bwrnd17vZn9U = basename($this->lT0Vs3VxjBxAH3['xs_smname']); $this->uurl_p = dirname($this->lT0Vs3VxjBxAH3['xs_smurl']).'/'; $this->furl_p = dirname($this->lT0Vs3VxjBxAH3['xs_smname']).'/'; $this->imgno = 0; $this->ifLJ96S2XFSDmmWXE = ($this->lT0Vs3VxjBxAH3['xs_compress']==1) ? '.gz' : ''; $this->uTttAJYJzqs = $this->gs4Fbubikm9UoY = $this->urls_prevrss = array(); if($this->lT0Vs3VxjBxAH3['xs_chlog']) $this->uTttAJYJzqs = $this->Z0CT90Qqb49cBckp1($Kd9n5bwrnd17vZn9U); if($this->lT0Vs3VxjBxAH3['xs_rssinfo']) $this->urls_prevrss = $this->Z0CT90Qqb49cBckp1(vCm7s9tc6 , $this->lT0Vs3VxjBxAH3['xs_rssage'], false, 1); if($this->lT0Vs3VxjBxAH3['xs_newsinfo']) $this->gs4Fbubikm9UoY = $this->Z0CT90Qqb49cBckp1($this->lT0Vs3VxjBxAH3['xs_newsfilename'], $this->lT0Vs3VxjBxAH3['xs_newsage']); $gnPaX2YWE3M2x1s7 = $Vz1MJUA8RCHpI = array(); $this->h2yh1SOcTUdL4 = ($this->lT0Vs3VxjBxAH3['xs_compress']==1) ? array('fopen' => 'gzopen', 'fwrite' => 'gzwrite', 'fclose' => 'gzclose' ) : array('fopen' => 'tMsFwxcfs9YfeVoHZkr', 'fwrite' => 'c0plShyyY3', 'fclose' => 'fclose' ) ; $J0guAv8GXYn6AN38fxM = strstr($this->lT0Vs3VxjBxAH3['xs_initurl'],'://www.'); + $M80h6j1sEIWMK_ = $wNuDcYNWIWQ.'/'; if(strstr($this->lT0Vs3VxjBxAH3['xs_initurl'],'https:')) $M80h6j1sEIWMK_ = str_replace('http:', 'https:', $M80h6j1sEIWMK_); $XvU49oK_Vd = strstr($M80h6j1sEIWMK_,'://www.'); + $p1 = parse_url($this->lT0Vs3VxjBxAH3['xs_initurl']); $p2 = parse_url($M80h6j1sEIWMK_); if(str_replace('www.', '', $p1['host'])==str_replace('www.', '', $p2['host'])) { if($J0guAv8GXYn6AN38fxM && !$XvU49oK_Vd)$M80h6j1sEIWMK_ = str_replace('://', '://www.', $M80h6j1sEIWMK_); + if(!$J0guAv8GXYn6AN38fxM && $XvU49oK_Vd)$M80h6j1sEIWMK_ = str_replace('://www.', '://', $M80h6j1sEIWMK_); + } $this->lT0Vs3VxjBxAH3['gendom'] = $M80h6j1sEIWMK_; $this->gTrlEaHME($urls_completed, $gnPaX2YWE3M2x1s7); $this->I_bbCJVIyfD2x(); if($this->lT0Vs3VxjBxAH3['xs_chlog']) { $ZDRxZwYGC = array_keys($this->GyxaqkNpn); $q1Dhmf7aSwQAzPRIyD = array_slice(array_keys($this->uTttAJYJzqs), 0, $this->ijCWcCzUwXPG); } if($this->imgno)$this->aPeIhzjYj6iZvV[1]['xn'] = $this->imgno; if($this->videos_no)$this->aPeIhzjYj6iZvV[2]['xn'] = $this->videos_no; if($this->news_no)$this->aPeIhzjYj6iZvV[3]['xn'] = $this->news_no; $this->NETkCwdzdq6Pz0ny($ZDRxZwYGC); $this->NETkCwdzdq6Pz0ny($q1Dhmf7aSwQAzPRIyD); $this->NpOTWccEKPO7LjSMseh(true); $m6VWoP93i1XpwIg6 = array_merge($Dm3PRno_nAd, array( 'files' => array(), 'rinfo' => $this->aPeIhzjYj6iZvV, 'newurls' => $ZDRxZwYGC, 'losturls'=> $q1Dhmf7aSwQAzPRIyD, 'urls_ext'=> $Dm3PRno_nAd['urls_ext'], 'images_no' => $this->imgno, 'videos_no' => $this->videos_no, 'news_no' => $this->newsno, 'rss_no' => $this->rssno, 'rss_sm' => $this->lT0Vs3VxjBxAH3['xs_rssfilename'], 'fail_files' => $DViaBKXmteSZF4cgvzj, 'create_time' => time() )); unset($m6VWoP93i1XpwIg6['sm_base']); $PqrWr4MLtujWK1b_W = array('u404', 'urls_ext', 'urls_list_skipped', 'newurls', 'losturls'); foreach($PqrWr4MLtujWK1b_W as $ca) $this->NETkCwdzdq6Pz0ny($m6VWoP93i1XpwIg6[$ca]); $JFo3FYeR4sjMvbCM7lu = date('Y-m-d H-i-s').'.log'; QNBZB8U2gUbUbMO($JFo3FYeR4sjMvbCM7lu,serialize($m6VWoP93i1XpwIg6),ebJGVa__YE,true); $this->uTttAJYJzqs = $this->GyxaqkNpn = $this->gs4Fbubikm9UoY = $this->urls_prevrss = array(); $gnPaX2YWE3M2x1s7 = array(); return $m6VWoP93i1XpwIg6; } function XSfm7tvxuWOi84V($KDTEDseXOWMlsG){ if(!function_exists('iconv')) return $KDTEDseXOWMlsG; + + return + preg_replace_callback("/\\\\u([a-f0-9]{4})/", + create_function ('$matches', 'return iconv(\'UCS-4LE\',\'UTF-8\',pack(\'V\', hexdec(\'U\'.$matches[1])));') + ,$KDTEDseXOWMlsG); + + + +} function Wv2SmnmzlB($pf) { global $I8v4y5NCk0; if(!$pf)return; $this->h2yh1SOcTUdL4['fwrite']($pf, $I8v4y5NCk0[3]); $this->h2yh1SOcTUdL4['fclose']($pf); } function hPqMY1ez6oMQQl($pf, $os8tVH12X) { global $I8v4y5NCk0; if(!$pf)return; $xs = $this->kSqnsSOfXlo8ln->ZBWGkqS6VQ71($I8v4y5NCk0[1], array('TYPE'.$os8tVH12X=>true)); $this->h2yh1SOcTUdL4['fwrite']($pf, $xs); } function ZinuNHiYLZhtAywP2($Vz1MJUA8RCHpI) { $OqtGTVqoDwX = ""; $EE3JSA0ZP1y1fXkP = AQEJpzp83PVPuONNJ(zuXb1RhRl0, 'sitemap_index_tpl.xml'); $lrwBdRFrgSdhG = file_get_contents(zuXb1RhRl0.$EE3JSA0ZP1y1fXkP); preg_match('#^(.*)%SITEMAPS_LIST_FROM%(.*)%SITEMAPS_LIST_TO%(.*)$#is', $lrwBdRFrgSdhG, $lWQKrAn9z); $lWQKrAn9z[1] = str_replace('%GEN_URL%', $this->lT0Vs3VxjBxAH3['gendom'], $lWQKrAn9z[1]); $muP565NgXyQ = preg_replace('#[^\\/]+?\.xml$#', '', $this->lT0Vs3VxjBxAH3['xs_smurl']); $lWQKrAn9z[1] = str_replace('%SM_BASE%', $muP565NgXyQ, $lWQKrAn9z[1]); for($i=0;$ikSqnsSOfXlo8ln->ZBWGkqS6VQ71($lWQKrAn9z[2], array( 'URL'=>$Vz1MJUA8RCHpI[$i], 'LASTMOD'=>date('Y-m-d\TH:i:s+00:00') )); return $lWQKrAn9z[1] . $OqtGTVqoDwX . $lWQKrAn9z[3]; } function spA7fV5_CrBgFVbOJ($psf7nhFBQzfQO7, $e_ksHZ4mvyyb643a5V = false, $Ln7MhujXum6lIo2x = false) { if($e_ksHZ4mvyyb643a5V){ $t = $psf7nhFBQzfQO7; if(function_exists('utf8_encode') && !$this->lT0Vs3VxjBxAH3['xs_utf8']){ $t2=''; for($i=0;$i128) ? '&#'.ord($t[$i]).';' : $t[$i]); $t = $t2; $t = utf8_encode($t); $t = htmlentities($t,ENT_COMPAT,'UTF-8'); }else if($Ln7MhujXum6lIo2x){ $t = htmlentities($t, ENT_COMPAT, 'UTF-8'); } $t = preg_replace("#&(\#[\w\d]+;)#", '&$1', $t); $t = str_replace("&", "&", $t); $t = preg_replace("#&(?:amp;)+((\#\d+|gt|lt|quot|amp|apos|.uml);)#", '&$1', $t); $t = preg_replace('#[\x00-\x1F\x7F]#', ' ', $t); }else $t = str_replace("&", "&", $psf7nhFBQzfQO7); if(function_exists('utf8_encode') && !$this->lT0Vs3VxjBxAH3['xs_utf8']) { $t = utf8_encode($t); } return $t; } function Ink66j0Yx4uzSWU5($KkIiDw6iHW1n4Sy) { $KkIiDw6iHW1n4Sy = $this->spA7fV5_CrBgFVbOJ(str_replace(array(' '),array(''),$KkIiDw6iHW1n4Sy), true); return $KkIiDw6iHW1n4Sy; } function lnnGg7ZbD9_Q4X6($yFdoAFjhSYO4) { global $e_ksHZ4mvyyb643a5V; $l = str_replace("&", "&", $yFdoAFjhSYO4); $l = str_replace("&", "&", $l); $l = strtr($l, $e_ksHZ4mvyyb643a5V); +$l = preg_replace("#&(?:amp;)+((\#\d+|gt|lt|quot|amp|apos|.uml);)#", '&$1', $l); +if($this->lT0Vs3VxjBxAH3['xs_utf8']) { }else { if( $this->lT0Vs3VxjBxAH3['xs_url_charset_convert'] && $this->runstate['charset'] && function_exists('iconv') && (strpos($l,'%') === false) ) { if($l2 = iconv($this->runstate['charset'], 'UTF-8', $l)) { if($l != $l2){ $lp = urlencode($l2); $l = str_replace( array('%3A','%2F', '%3F', '%26', '%23', '%3B', '%3D'), array(':', '/', '?', '&', '#', ';', '='), $lp); } } } if(function_exists('utf8_encode')) $l = utf8_encode($l); } return $l; } function N4yuA2XEdnmwGMXLE4($Btu_OfIkMLszVD) { $nuBa9NbmEO6RBhcW = array( basename($this->lT0Vs3VxjBxAH3['xs_smname']), $this->lT0Vs3VxjBxAH3['xs_imgfilename'], $this->lT0Vs3VxjBxAH3['xs_videofilename'], $this->lT0Vs3VxjBxAH3['xs_newsfilename'], $this->lT0Vs3VxjBxAH3['xs_mobilefilename'], ); if($Btu_OfIkMLszVD['rinfo']) $this->aPeIhzjYj6iZvV = $Btu_OfIkMLszVD['rinfo']; foreach($this->O4zX7h7zYXsnn0 as $os8tVH12X=>$uOu1DWuwwQBrf) if($uOu1DWuwwQBrf) { $this->aPeIhzjYj6iZvV[$os8tVH12X]['sitemap_file'] = $nuBa9NbmEO6RBhcW[$os8tVH12X]; $this->aPeIhzjYj6iZvV[$os8tVH12X]['filenum'] = intval($Btu_OfIkMLszVD['istart']/$this->lYg1fh6INMq)+1; if(!$Btu_OfIkMLszVD['istart']) $this->bJhviH6UA($nuBa9NbmEO6RBhcW[$os8tVH12X]); } } function Ka_AEZ56jwB8MHjF() { global $DViaBKXmteSZF4cgvzj; $spK9ovsA7pQ = 0; $l = false; foreach($this->O4zX7h7zYXsnn0 as $os8tVH12X=>$uOu1DWuwwQBrf) { $ri = &$this->aPeIhzjYj6iZvV[$os8tVH12X]; $mv3YztXmDFiT = (($ri['xnp'] % $this->lYg1fh6INMq) == 0) && ($ri['xnp'] || !$ri['pf']); $l|=$mv3YztXmDFiT; if($this->sm_filesplit && $ri['xchs'] && $ri['xnp']) $mv3YztXmDFiT |= ($ri['xchs']/$ri['xnp']*($ri['xnp']+1)>$this->sm_filesplit); if( $mv3YztXmDFiT ) { $spK9ovsA7pQ++; $ri['xchs'] = $ri['xnp'] = 0; $this->Wv2SmnmzlB($ri['pf']); if($ri['filenum'] == 2) { if(!copy(ebJGVa__YE . $ri['sitemap_file'].$this->ifLJ96S2XFSDmmWXE, ebJGVa__YE.($_xu = joeXw9f7bW7PyEcEv(1,$ri['sitemap_file']).$this->ifLJ96S2XFSDmmWXE))) { $DViaBKXmteSZF4cgvzj[] = ebJGVa__YE.$_xu; } $ri['urls'][0] = $this->uurl_p . $_xu; } $vqwWkTUJajn2Dj = (($ri['filenum']>1) ? joeXw9f7bW7PyEcEv($ri['filenum'],$ri['sitemap_file']) :$ri['sitemap_file']) . $this->ifLJ96S2XFSDmmWXE; $ri['urls'][] = $this->uurl_p . $vqwWkTUJajn2Dj; $ri['filenum']++; $ri['pf'] = $this->h2yh1SOcTUdL4['fopen'](ebJGVa__YE.$vqwWkTUJajn2Dj,'w'); if(!$ri['pf']) $DViaBKXmteSZF4cgvzj[] = ebJGVa__YE.$vqwWkTUJajn2Dj; $this->hPqMY1ez6oMQQl($ri['pf'], $os8tVH12X); } } return $l; } function LXUQuxNDxlej9($W5IQ4GpZEAaCLw_Kty, $I8v4y5NCk0, $os8tVH12X) { $W5IQ4GpZEAaCLw_Kty['TYPE'.$os8tVH12X] = true; $ri = &$this->aPeIhzjYj6iZvV[$os8tVH12X]; if($ri['pf']) { $_xu = $this->kSqnsSOfXlo8ln->ZBWGkqS6VQ71($I8v4y5NCk0, $W5IQ4GpZEAaCLw_Kty); $ri['xchs'] += strlen($_xu); $ri['xn']++; $ri['xnp']++; $this->h2yh1SOcTUdL4['fwrite']($ri['pf'], $_xu); } } function UWn3c8XSJ() { foreach($this->aPeIhzjYj6iZvV as $os8tVH12X=>$ri) { $this->Wv2SmnmzlB($ri['pf']); } } function I_bbCJVIyfD2x() { foreach($this->O4zX7h7zYXsnn0 as $os8tVH12X=>$uOu1DWuwwQBrf) { $ri = &$this->aPeIhzjYj6iZvV[$os8tVH12X]; if(count($ri['urls'])>1) { $xf = $this->ZinuNHiYLZhtAywP2($ri['urls']); array_unshift($ri['urls'], $this->uurl_p.QNBZB8U2gUbUbMO($ri['sitemap_file'], $xf, ebJGVa__YE, ($this->lT0Vs3VxjBxAH3['xs_compress']==1)) ); } $this->RKwdWhsAFuDrxw3i6($ri['sitemap_file']); } } function NpOTWccEKPO7LjSMseh($KsTwDHjoXr = false) { if(($this->I_swi1gI_aFqiP + 30) < time() || $KsTwDHjoXr) { QNBZB8U2gUbUbMO('apicache.db',serialize($this->bOAwZENRP),ebJGVa__YE,true); $this->I_swi1gI_aFqiP = time(); } } function ctboMafhgvqDmuTRdSR($plZxxPxp7dp, $G2zCcihGLQl = false) { global $K5kCC5JoHjozL; z_fhGrViQaOeql9("\nVideo api: $plZxxPxp7dp, ".($this->bOAwZENRP[$plZxxPxp7dp]?'YES':'NO').", ".$this->bOAwZENRP[$plZxxPxp7dp]['code']); if(!isset($this->bOAwZENRP[$plZxxPxp7dp]) || !$this->bOAwZENRP[$plZxxPxp7dp] || (strstr($this->bOAwZENRP[$plZxxPxp7dp]['code'],'403') && !preg_match('#(private|authentication|invalid)#si',$this->bOAwZENRP[$plZxxPxp7dp]['content']) ) ){ $_tr=4; while($_tr>0){ $fd = $K5kCC5JoHjozL->fetch($plZxxPxp7dp, 0,true, false, '', array('skipip' => true,'anytype'=>true)); $_tr--; if(strstr($fd['code'],'200'))$_tr=0; else sleep(3); } $this->bOAwZENRP[$plZxxPxp7dp] = $fd; $this->NpOTWccEKPO7LjSMseh(); } $D_ezG4BPksZTM79mUvk = $this->bOAwZENRP[$plZxxPxp7dp]; if($G2zCcihGLQl && $D_ezG4BPksZTM79mUvk && function_exists('json_decode')) { $D_ezG4BPksZTM79mUvk ['decont'] = json_decode($D_ezG4BPksZTM79mUvk['content'], 1); } return $D_ezG4BPksZTM79mUvk; } function A9hh86ST6sAgjxx($juzl9VS3h_7) { return $WtUMZDMaR6ayGRcIX; } function gTrlEaHME($urls_completed, &$gnPaX2YWE3M2x1s7) { global $I8v4y5NCk0, $z45zMtoh5QPc, $TBuKj2tXyZ_L9p_A, $sm_proc_list, $Btu_OfIkMLszVD, $RZyWFyTrlgQw4x6gpG, $DViaBKXmteSZF4cgvzj; $TNm6SblxP = $this->lT0Vs3VxjBxAH3['xs_chlog']; $EE3JSA0ZP1y1fXkP = AQEJpzp83PVPuONNJ(zuXb1RhRl0, 'sitemap_xml_tpl.xml'); $lrwBdRFrgSdhG = file_get_contents(zuXb1RhRl0.$EE3JSA0ZP1y1fXkP); preg_match('#^(.*)%URLS_LIST_FROM%(.*)%URLS_LIST_TO%(.*)$#is', $lrwBdRFrgSdhG, $I8v4y5NCk0); $I8v4y5NCk0[1] = str_replace('www.xml-sitemaps.com', 'www.xml-sitemaps.com ('. dVANLaXfylWyj7.')', $I8v4y5NCk0[1]); $I8v4y5NCk0[1] = str_replace('%GEN_URL%', $this->lT0Vs3VxjBxAH3['gendom'], $I8v4y5NCk0[1]); $muP565NgXyQ = preg_replace('#[^\\/]+?\.xml$#', '', $this->lT0Vs3VxjBxAH3['xs_smurl']); $I8v4y5NCk0[1] = str_replace('%SM_BASE%', $muP565NgXyQ, $I8v4y5NCk0[1]); if($this->lT0Vs3VxjBxAH3['xs_disable_xsl']) $I8v4y5NCk0[1] = preg_replace('#<\?xml-stylesheet.*\?>#', '', $I8v4y5NCk0[1]); + if($this->lT0Vs3VxjBxAH3['xs_nobrand']){ + $I8v4y5NCk0[1] = str_replace('sitemap.xsl','sitemap_nb.xsl',$I8v4y5NCk0[1]); + $I8v4y5NCk0[1] = preg_replace('# +%URLS_LIST_FROM% + + + + %URLS_LIST_TO% + \ No newline at end of file diff --git a/generator/pages/mods/sitemap_nb.xsl b/generator/pages/mods/sitemap_nb.xsl new file mode 100755 index 0000000..10ac485 --- /dev/null +++ b/generator/pages/mods/sitemap_nb.xsl @@ -0,0 +1,199 @@ + + + + + + + + + +<xsl:if test="sm:urlset/sm:url/mobile:mobile">Mobile </xsl:if> +<xsl:if test="sm:urlset/sm:url/image:image">Images </xsl:if> +<xsl:if test="sm:urlset/sm:url/news:news">News </xsl:if> +<xsl:if test="sm:urlset/sm:url/video:video">Video </xsl:if> +XML Sitemap +<xsl:if test="sm:sitemapindex"> Index</xsl:if> + + + +
        +

        +Mobile +Images +News +Video +XML Sitemap Index

        +

        + + +Total sitemap files listed in this index: + + +Total URLs in this sitemap file: + + +

        + + + +
        + + + +
        + + + + + + + + + + + + + + + + + + +
        URLLast Modified
        +
        + + + + + + + + + + + + + + + + + + + + + + +
        URLLast ModifiedChange FrequencyPriority
        +
        + + + + + + + + + + + + + + + + + + + + + + + + +
        + + +
        + + + + + + +
        + + + +
        + +
        diff --git a/generator/pages/mods/sitemap_notify.txt b/generator/pages/mods/sitemap_notify.txt new file mode 100755 index 0000000..2a60dbb --- /dev/null +++ b/generator/pages/mods/sitemap_notify.txt @@ -0,0 +1,42 @@ +Standalone Sitemap Generator Report +Hello, + +sitemap for your website has been updated. + + +Sitemap details +------------------------- +Sitemap created on: + +Processing time: s + +Pages indexed: +Crawled pages size: Mb + + +View Sitemaps +------------------------- + +XML Sitemap + + +Text Sitemap + + +ROR Sitemap + + +HTML Sitemap + + + + + +Broken Links +------------------------- + + + + +Thank you for using our Sitemap Generator +https://www.xml-sitemaps.com \ No newline at end of file diff --git a/generator/pages/mods/sitemap_ping.txt b/generator/pages/mods/sitemap_ping.txt new file mode 100755 index 0000000..c10f29a --- /dev/null +++ b/generator/pages/mods/sitemap_ping.txt @@ -0,0 +1,6 @@ +http://www.google.com/webmasters/tools/ping?sitemap= +http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap= +http://submissions.ask.com/ping?sitemap= +http://api.moreover.com/ping?u= +http://webmaster.live.com/ping.aspx?siteMap= +http://www.bing.com/webmaster/ping.aspx?siteMap= \ No newline at end of file diff --git a/generator/pages/mods/sitemap_ror_tpl.xml b/generator/pages/mods/sitemap_ror_tpl.xml new file mode 100755 index 0000000..ec13082 --- /dev/null +++ b/generator/pages/mods/sitemap_ror_tpl.xml @@ -0,0 +1,17 @@ + + + + ROR Sitemap for %INIT_URL% + ROR Sitemap + %INIT_URL% + %URLS_LIST_FROM% + + + <TVAR TITLE> + + + + sitemap + %URLS_LIST_TO% + + \ No newline at end of file diff --git a/generator/pages/mods/sitemap_rss_tpl.xml b/generator/pages/mods/sitemap_rss_tpl.xml new file mode 100755 index 0000000..86ce0fd --- /dev/null +++ b/generator/pages/mods/sitemap_rss_tpl.xml @@ -0,0 +1,23 @@ + + + + %FEED_TITLE% RSS Feed + %INIT_URL% + My Feed at %INIT_URL% + %BUILD_DATE% + %BUILD_DATE% + https://www.xml-sitemaps.com/ + +%URLS_LIST_FROM% + + <TVAR TITLE> + + + + +%URLS_LIST_TO% + + diff --git a/generator/pages/mods/sitemap_tpl.html b/generator/pages/mods/sitemap_tpl.html new file mode 100755 index 0000000..1a141e7 --- /dev/null +++ b/generator/pages/mods/sitemap_tpl.html @@ -0,0 +1,151 @@ + + + +Site Map <TVAR PAGE> - Generated by www.xml-sitemaps.com + + + + + + + + +
        +

        HTML Site Map

        +

        Homepage +Last updated: +
        +Total pages:

        + + +
        + +[] + +
        +
        + + + + + + + + +
        + + + +
             +
        pagespage
        + + + + + +
        +
        +
        +
        + +
        + +
        + +[] + +
        +
        + +
        + + diff --git a/generator/pages/mods/sitemap_xml_tpl.xml b/generator/pages/mods/sitemap_xml_tpl.xml new file mode 100755 index 0000000..2e5d19b --- /dev/null +++ b/generator/pages/mods/sitemap_xml_tpl.xml @@ -0,0 +1,45 @@ + + + + xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" + xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" + xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" + xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" + xsi:schemaLocation=" + http://www.sitemaps.org/schemas/sitemap/0.9 + http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> + +%URLS_LIST_FROM% + + + ="" href="" /> + + + + + + + + + + + + + + + + + + + + + + + + + + %URLS_LIST_TO% + \ No newline at end of file diff --git a/generator/pages/page-analyze.inc.php b/generator/pages/page-analyze.inc.php new file mode 100755 index 0000000..4fbc905 --- /dev/null +++ b/generator/pages/page-analyze.inc.php @@ -0,0 +1,219 @@ + +
        + +
        +
        +

        Analyze Site Structure

        + ifLJ96S2XFSDmmWXE = ($grab_parameters['xs_compress']==1) ? '.gz' : ''; $urls_list = $by9zdmWh_g->Z0CT90Qqb49cBckp1($Kd9n5bwrnd17vZn9U); $KpqQMAo204oEII = preg_replace('#/$#','',$Dm3PRno_nAd['initdir']); $t8rgs9a7d2FUS7l=$LgLI0zBLaiF=$oaLtuQx7VUYT=array(); $Mmgwc2AWMDx9PNr = str_replace(' ', '|', $grab_parameters['xs_angroups']); if(is_array($urls_list)) foreach($urls_list as $fWF3L71eqllSq=>$DUZrQcBoQ){ $pE0deENVttSkb8Hz = str_replace($KpqQMAo204oEII,'', $fWF3L71eqllSq); $pE0deENVttSkb8Hz = preg_replace('#\?.*#', '', $pE0deENVttSkb8Hz); B0bZK2_9KnR8WXXzmsf($pE0deENVttSkb8Hz); if($Mmgwc2AWMDx9PNr && preg_match('#('.$Mmgwc2AWMDx9PNr.')#is', $pE0deENVttSkb8Hz, $tqkt5joCT_wZgAl3z)){ B0bZK2_9KnR8WXXzmsf($tqkt5joCT_wZgAl3z[1].'/'); } } sort($oaLtuQx7VUYT); $IOVrd_HyNGxshZQSHJ = array($t8rgs9a7d2FUS7l,$LgLI0zBLaiF,$oaLtuQx7VUYT); QNBZB8U2gUbUbMO($EKet5ZJB6NXv7qwqA1, serialize($IOVrd_HyNGxshZQSHJ)); echo 'DONE
        '; }else list($t8rgs9a7d2FUS7l,$LgLI0zBLaiF,$oaLtuQx7VUYT) = @unserialize(RWenvmRCuyBW(ebJGVa__YE.$EKet5ZJB6NXv7qwqA1)); ?> +
        Site folders structure
        + +
        + +
        + 0?' style="display:none"':'').'>'; ksort($sl); $ls = $dh6mwOEumX3JD*2; foreach($sl as $sk=>$sn){ echo str_repeat(' ',$ls). ($sn['elem']?'[x]':''). ($Og4KRtb1cdnHxZIO89?''.$sk.'':$sk). str_repeat(' ',max(0,30-$ls-($sn['elem']?3:0)-strlen($sk))).' - '.$sn['cnt'].($sn['tcnt']>$sn['cnt']?' ('.$sn['tcnt'].')':'')."\n"; if($sn['elem']) BDURPicA56HxjrUUp($sn['elem'],$dh6mwOEumX3JD+1,$w63YMiTeLeUqIPT.$sk,$Og4KRtb1cdnHxZIO89); } echo ''; } function B0bZK2_9KnR8WXXzmsf($DpcfJunW664lc){ global $t8rgs9a7d2FUS7l,$LgLI0zBLaiF,$PumGiN59i; for($i=0;$i
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/pages/page-chlog.inc.php b/generator/pages/page-chlog.inc.php new file mode 100755 index 0000000..356459c --- /dev/null +++ b/generator/pages/page-chlog.inc.php @@ -0,0 +1,279 @@ + +
        +
        + Crawler logs +
        +
        + '; ?> + + ( + -) + +
        + +
        +
        + + > +

        ChangeLog

        +

        +
        New URLs ()
        + +
        Removed URLs ()
        + +
        Skipped URLs - crawled but not added in sitemap ()
        + + + + + + + + + + + + + + + Images';?> + Videos';?> + News';?> + RSS';?> + + $v)if(!is_array($v))$mCLWsUvskyIkaI8Ye[$k]+=$v;else $mCLWsUvskyIkaI8Ye[$k]+=count($v); ?> + + + + + + + + + + + + '.$Dm3PRno_nAd['images_no'].'';?> + '.$Dm3PRno_nAd['videos_no'].'';?> + '.$Dm3PRno_nAd['news_no'].'';?> + '.$Dm3PRno_nAd['rss_no'].'';?> + + + + + + + + + + + + + ';?> + ';?> + ';?> + ';?> + +
        NoDate/TimeIndexed pagesProcessed pagesSkipped pagesProc.timeBandwidthNew URLsRemoved URLsBroken links
        s
        Total-s Mb-
        + +
        + Datastorage folder is not writable: '.ebJGVa__YE.''; } if(!$grab_parameters['xs_is_demo'] && isset($_POST['save']) && is_writable(VrIhIZ2UGhCqDiv)){ $grab_parameters['xs_initurl'] = trim($_POST['initurl']); $grab_parameters['xs_freq'] = $_POST['freq']; $grab_parameters['xs_lastmod'] = $_POST['lastmod']; $grab_parameters['xs_lastmodtime'] = $_POST['lastmodtime']; $grab_parameters['xs_priority'] = $_POST['priority']; $grab_parameters['xs_autopriority'] = $_POST['autopriority']?1:0; $grab_parameters['xs_max_pages'] = $_POST['max_pages']; $grab_parameters['xs_max_depth'] = $_POST['max_depth']; $grab_parameters['xs_exec_time'] = $_POST['exec_time']; $grab_parameters['xs_memlimit'] = $_POST['mem_limit']; $grab_parameters['xs_savestate_time'] = $_POST['savestate_time']; $grab_parameters['xs_delay_req'] = $_POST['delay_req']; $grab_parameters['xs_delay_ms'] = $_POST['delay_ms']; $grab_parameters['xs_yping'] = $_POST['SgSv9EHvXQ8D']; $grab_parameters['xs_smname'] = $_POST['smname']; $grab_parameters['xs_excl_urls'] = $_POST['excl_urls']; $grab_parameters['xs_incl_urls'] = $_POST['incl_urls']; $grab_parameters['xs_noincl_urls'] = $_POST['noincl_urls']; $grab_parameters['xs_incl_only'] = $_POST['incl_only']; $grab_parameters['xs_parse_only'] = $_POST['parse_only']; $grab_parameters['xs_ind_attr'] = $_POST['ind_attr']; $grab_parameters['xs_weblog_ping'] = $_POST['weblogup']; $grab_parameters['xs_smurl'] = $_POST['smurl']; if($_POST['changepass']) { $grab_parameters['xs_login'] = trim($_POST['xslogin']); if($_POST['xspassword']!='-----') { $grab_parameters['xs_password'] = trim($_POST['xspassword']) ? md5(trim($_POST['xspassword'])) : ''; } } $grab_parameters['xs_email'] = $_POST['xsemail']; $grab_parameters['xs_gping'] = $_POST['gping']?1:0; $grab_parameters['xs_chlog'] = $_POST['gchlog']?1:0; $grab_parameters['xs_extlinks'] = $_POST['extlinks']?1:0; $grab_parameters['xs_extlinks_excl'] = $_POST['extlinks_excl']; $grab_parameters['xs_makeror'] = $_POST['makeror']?1:0; $grab_parameters['xs_maketxt'] = $_POST['maketxt']?1:0; if($sm_proc_list) foreach($sm_proc_list as $davTYrpwM_4COa) { $grab_parameters[$davTYrpwM_4COa->PgST6Al2IwhyJOjnP] = $_POST[$davTYrpwM_4COa->PgST6Al2IwhyJOjnP]?1:0; if($davTYrpwM_4COa->PgST6Al2IwhyJOjnP) $grab_parameters[$davTYrpwM_4COa->ZdD16fdro7T29] = $_POST[$davTYrpwM_4COa->ZdD16fdro7T29]; } $grab_parameters['xs_webinfo'] = $_POST['webinfo']?1:0; $grab_parameters['xs_makehtml'] = $_POST['makehtml']?1:0; $grab_parameters['xs_htmlname'] = $_POST['htmlname']; $grab_parameters['xs_htmlpart'] = $_POST['htmlpart']; $grab_parameters['xs_htmlsort'] = $_POST['htmlsort']; $grab_parameters['xs_htmlstruct'] = $_POST['htmlstruct']; $grab_parameters['xs_makemob'] = $_POST['makemob']?1:0; if($_POST['makemob']) { $grab_parameters['xs_mobilefilename'] = $_POST['mobilefilename']; $grab_parameters['xs_mobileincmask'] = $_POST['mobileincmask']; } $grab_parameters['xs_sm_size'] = $_POST['sm_size']; $grab_parameters['xs_sm_filesize'] = $_POST['sm_filesize']; $grab_parameters['xs_purgelogs'] = $_POST['purge']; $grab_parameters['xs_autoresume'] = $_POST['autoresume']; $grab_parameters['xs_ref_list_store'] = $_POST['ref_list_store']; $grab_parameters['xs_maxref'] = $_POST['maxref']; $grab_parameters['xs_no_cookies'] = $_POST['cookies']?0:1; $grab_parameters['xs_compress'] = intval($_POST['compress']) ; $grab_parameters['xs_usecurl'] = $_POST['usecurl']?1:0; $grab_parameters['xs_memsave'] = $_POST['memsave']?1:0; $grab_parameters['xs_inc_skip'] = '\.('.preg_replace('#\s+#','|',trim($_POST['incl'])).')'; $grab_parameters['xs_exc_skip'] = '\.('.preg_replace('#\s+#','|',trim($_POST['excl'])).')'; $grab_parameters['xs_ipconnection'] = $_POST['serveripaddr']; $grab_parameters['xs_angroups'] = $_POST['angroups']; $grab_parameters['xs_moreurls'] = $_POST['moreurls']; $grab_parameters['xs_allow_subdomains'] = $_POST['allow_subdomains']?1:0; $grab_parameters['xs_cleanpar'] = preg_replace('#\s+#','|',trim($_POST['cleanpar'])); $grab_parameters['xs_metadesc'] = $_POST['metadesc']?1:0; $grab_parameters['xs_canonical'] = $_POST['canonical']?1:0; $grab_parameters['xs_checkver'] = $_POST['checkver']?1:0; $grab_parameters['xs_disable_xsl'] = $_POST['xslon']?0:1; $grab_parameters['xs_nobrand'] = $_POST['nobrand']?1:0; $grab_parameters['xs_robotstxt'] = $_POST['robotson']?1:0; $grab_parameters['xs_hreflang'] = $_POST['hreflang']?1:0; $grab_parameters['xs_alt_lang'] = $_POST['alt_lang']; $grab_parameters['xs_utf8'] = $_POST['xsutf'] ? 1 : 0; $grab_parameters['xs_inc_ajax'] = $_POST['xsajax'] ? 1 : 0; $grab_parameters['xs_lastmod_notparsed'] = $_POST['lmnp']?1:0; $grab_parameters['xs_debug'] = $_POST['dbg']?1:0; $grab_parameters['xs_http_language'] = $_POST['http_language']; K95TS3G3r4UmuBQ6g(VrIhIZ2UGhCqDiv, $grab_parameters); $RrdMupUEihGpaCVq = 'Configuration has been saved'; } $EbecPh_o2 = wc_8d1gmEw3Z(); if(count($EbecPh_o2)>0){ $HVKGdDolsi2eMB_mMuD = array_pop($EbecPh_o2); $Dm3PRno_nAd = vNqieogz40S1ja($HVKGdDolsi2eMB_mMuD); } $Kd9n5bwrnd17vZn9U = $grab_parameters['xs_smname']; $ycoquoAP1UP30SR = ($grab_parameters['xs_compress']==1) ? '.gz' : ''; $lYg1fh6INMq = $grab_parameters['xs_sm_size'] ? $grab_parameters['xs_sm_size'] : 50000; for($i=0;$i$lYg1fh6INMq) ? joeXw9f7bW7PyEcEv($i+1,$Kd9n5bwrnd17vZn9U):$Kd9n5bwrnd17vZn9U).$ycoquoAP1UP30SR; if(!@is_writable($vqwWkTUJajn2Dj) && !@is_writable(dirname($vqwWkTUJajn2Dj)) ) { if($pf = @tMsFwxcfs9YfeVoHZkr($vqwWkTUJajn2Dj)) @fclose($pf); $S_eI6d2eaz8 .= '
        Sitemap file is not writable: '.$vqwWkTUJajn2Dj.''; } } if($sm_proc_list)foreach($sm_proc_list as $davTYrpwM_4COa) $S_eI6d2eaz8 .= $davTYrpwM_4COa->tvL6CyQwj(); $lYg1fh6INMq = $grab_parameters['xs_htmlpart']; $Kd9n5bwrnd17vZn9U = $grab_parameters['xs_htmlname']; for($i=0;$i$lYg1fh6INMq) ? joeXw9f7bW7PyEcEv($i+1,$Kd9n5bwrnd17vZn9U,true):$Kd9n5bwrnd17vZn9U); if(!is_writable($vqwWkTUJajn2Dj) && !is_writable(dirname($vqwWkTUJajn2Dj)) ) $S_eI6d2eaz8 .= '
        Sitemap file is not writable: '.$vqwWkTUJajn2Dj.''; } include Il2qN32A6EeND.'page-top.inc.php'; ?> +
        + +
        + Licensed to:
        + +
        + +
        + 1. General Parameters +
        +
        + Define website URL, sitemap filename and URL, sitemap types. +
        +
        + 2. Sitemap Entry Attributes +
        +
        + Pages update frequency, last modification time, priority and other attributes. +
        +
        + 3. Miscellaneous Settings +
        +
        + Login and password, email notification, compression, search engines pings etc. +
        +
        + 4. Narrow Indexed Pages Set +
        +
        + Exclude specific filenames, filetypes, folders etc. +
        +
        + 5. Crawler Limitations, Finetune +
        +
        + Limit sitemap size, links depth level, maximum running time etc. +
        +
        + 6. Advanced Settings +
        +
        + Server's IP address, session ID parameters etc. +
        +
        +
        + +
        + An error occured +
        +
        +
        ');?> +
        + + +
        + Note +
        +
        + +
        + +

        Configuration

        +
        + +
        Starting URL:
        + +
        + Please enter the full http address for your site, only + the links within the starting directory will be included. +
        Save sitemap to:
        + +
        + Please enter complete file name, including the path. Make sure that the file is existing and has write permissions allowed. +
        Hint: current path to Sitemap generator is: / +
        +
        Your Sitemap URL:
        + +

        +

        [-] Other Sitemap Types (click to collapse)

        +
        + (*) Note that any extra sitemap type will require additional resources to complete the process +
        Create XML Sitemap:
        + id="in11"> +
        Create Text Sitemap:
        + id="in122"> +
        Create ROR Sitemap:
        + id="in13"> +
        It will be stored in the same folder as XML sitemap, but with different filename: ror.xml +
        Create HTML Sitemap:
        + id="in12"> + +
        Create Images Sitemap: + + Not available - click here to order an add-on + +
        + +
        Create Video Sitemap: + + Not available - click here to order an add-on + +
        + +
        Create News Sitemap: + + Not available - click here to order an add-on + +
        + +
        Create RSS feed: + + Not available - click here to order an add-on + +
        + +
        Create Mobile Sitemap: +
        + id="mobinfo1" onclick="nGj0r0BbusL('sm_mob_div')"> + + +
        Create psf7nhFBQzfQO7?>:
        + PgST6Al2IwhyJOjnP]?'checked':''?> id="inPgST6Al2IwhyJOjnP;?>"> +
        M2NTRvh2tI529?> +
        PgST6Al2IwhyJOjnP]?'':' style="display:none"'?>> + Sitemap filename:
        + +
        + +
        +

        [-] Sitemap Entry Attributes (click to collapse)

        +
        +
        Change frequency:
        + +
        + This value indicates how frequently the content at a particular URL is likely to change. + + +
        Last modification:
        + type="radio" name="lastmod" value="0" id="lm1"> +
        type="radio" name="lastmod" value="1" id="lm2"> +
        type="radio" name="lastmod" value="2" id="lm3"> +
        type="radio" name="lastmod" value="3" id="lm4"> + +
        + The time the URL was last modified. You can let the generator set this field from your server's response headers or to specify your own date and time. + +
        Priority:
        + +
        + The priority of a particular URL relative to other pages on the same site. The value for this tag is a number between 0.0 and 1.0. + +
        Automatic Priority:
        + id="autopriority"> +
        Enable this option to automatically reduce priority depending on the page's depth level +
        Individual attributes:
        + +
        define specific frequency and priority attributes here in the following format: +
        "url substring,lastupdate YYYY-mm-dd,frequency,priority". +
        example: +
        page.php?product=,2005-11-14,monthly,0.9 +
        +
        +

        +
        +

        [-] Miscellaneous Settings (click to collapse)

        +
        +
        Require authorization to access generator interface:
        + + + +
        +
        Send email notifications:
        + +
        +
        Number of URLs per file in XML sitemap and maximum file size:
        + URLs per file, + Mb per file +
        (that may split your sitemap on multiple files) +
        Number of links per page and sort order in HTML sitemap:
        + + + +
        Compress sitemap using GZip:
        + type="radio" name="compress" value="0" id="comp0"> +
        + type="radio" name="compress" value="1" id="comp1"> +
        + type="radio" name="compress" value="2" id="comp2"> +
        Inform (ping) Search Engines upon completion (Google, Yahoo, Ask, Moreover, Live):
        + id="in2"> +
        +
        Send "weblogUpdate" type of Ping Notification to:
        + +
        Calculate changelog:
        + id="in3"> +
        please note that this option requires more resources to complete +
        Store the external links list:
        + id="inextlinks"> +
        this option increases memory usage +
        Excluding matching URLs:
        + +

        +
        +

        [-] Narrow Indexed Pages Set (click to collapse)

        +
        +
        Exclude from sitemap extensions:
        + +
        these URLs are NOT included in sitemap +
        Add directly in sitemap (do not parse) extensions:
        + +
        these URLs ARE included in sitemap, although not retrieved from server +
        Exclusion preset:
        + +
        changing this setting will automatically prepopulate the options below with preset data + +
        Exclude URLs: + noindex, nofollow +
        + +
        do NOT include URLs that contain these substrings, one string per line +
        Add directly in sitemap (do not parse) URLs: + index, nofollow +
        + +
        do not retrieve pages that contain these substrings in URL, but still INCLUDE them in sitemap +
        Crawl, but do not include URLs: + noindex, follow + new +
        + +
        crawl pages that contain these substrings in URL, but do NOT include them in sitemap +
        "Include ONLY" URLs: + index only matching +
        + +
        leave this field empty by default. Fill it if you would like to include into sitemap ONLY those URls that match the specified string, separate multiple matches with space. +
        +
        "Parse ONLY" URLs: + follow only matching
        + +
        leave this field empty by default. Fill it if you would like to parse (crawl) ONLY those URls that match the specified string, separate multiple matches with space. +
        +

        +
        +

        [-] Crawler Limitations, Finetune (click to collapse)

        +
        +
        Maximum pages:
        + +
        + This will limit the number of pages crawled. You can enter "0" value for unlimited crawling. + +
        + THIS IS A TRIAL VERSION of sitemap generator, it will NOT index more than 500 pages + +
        +
        Maximum depth level:
        + + "0" for unlimited +
        Maximum execution time, seconds:
        + + "0" for unlimited +
        Maximum memory usage, MB:
        + + "0" for default. Note: might not work depending on the server configuration. +
        Save the script state, every X seconds:
        + + this option allows to resume crawling operation if it was interrupted. "0" for no saves +
        Make a delay between requests, X seconds after each N requests:
        + s + after each + requests +
        This option allows to reduce the load on your webserver. "0" for no delay +
        +

        [-] Advanced Settings (click to collapse)

        +
        +
        Allow subdomains:
        + id="allow_subdomains1"> +
        Additional "Starting URLs":
        + +
        Support cookies:
        + id="cook1"> +
        Use robots.txt file:
        + id="rob1"> +
        Detect canonical URL meta tags:
        + id="can1"> +
        Crawl Ajax content:
        + id="aj3"> +
        + the site must comply with "crawlable ajax" specs + +
        Remove session ID from URLs:
        + +
        + common session parameters (separate with spaces): PHPSESSID, sid, osCsid +
        Include hreflang for language URLs in sitemap: + new +
        + id="can2"> +
        + automatically detect hreflang on crawled website, details +
        Custom alternative language pages: + new +
        + +
        Specify alternative language versions for your pages: enter your page URL followed by a list of language identifier with alternative URLs, example:
        + http://www.example.com/
        + de http://www.example.com/de/
        + es http://www.example.com/es/
        +
        +
        Custom Accept-Language http header + new
        + +
        Use IP address for crawling:
        + +
        Hint: SERVER[SERVER_ADDR] - +
        Use CURL extension for http requests:
        + id="curl1"> +
        Enable stylesheet for XML sitemap:
        + id="can2"> +
        Remove "Created by.." links from sitemap:
        + id="nobrand2"> +
        Store referring links: + new
        + id="reflinks2"> +
        this option increases memory usage +
        Maximum referring pages to store:
        + +
        max referring URLs per page +
        Site uses UTF-8 charset:
        + id="can3"> +
        Enable last-modification time tag for "not parsed" URLs:
        + id="lmnp1"> +
        + additional HTTP HEAD requests are required in this case +
        Extract meta description tag
        + id="inmetadesc"> +
        Note: this option may significantly increase memory usage and is not recommended for larger sitemaps +
        Minimize script memory usage:
        + id="memsave1"> +
        + this option may significantly increase crawling time +
        Monitor crawler window and automatically resume if it stops in X seconds:
        + +
        Show debug output when crawling:
        + id="dbg1"> +
        Check for new versions of sitemap generator:
        + id="checkver1"> +
        Purge log records older than X days:
        + +
        Custom groups for "analyze" tab:
        + +
        +
        +
        + +
        +
        + +
        + 0) { $pd = opendir(ebJGVa__YE); if($pd) while($fn = readdir($pd)) if(strstr($fn,'.proc')||strstr($fn,'.log')||strstr($fn,'sess_')) if(@filemtime(ebJGVa__YE.$fn)$lYg1fh6INMq)) ? joeXw9f7bW7PyEcEv(1,$Kd9n5bwrnd17vZn9U,true):$Kd9n5bwrnd17vZn9U); $grab_parameters['htmlurl']=isset($grab_parameters['xs_htmlurl']) ? $grab_parameters['xs_htmlurl'] : $JxNdRgLqv9xDy8.'/'.$vqwWkTUJajn2Dj; $sm_proc_list = array(); $pd = opendir(zuXb1RhRl0); while($fn = readdir($pd)) if(strstr($fn, 'inc.php')&& !strstr($fn, 'mobile.inc.php')) { @include_once zuXb1RhRl0.$fn; } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/pages/page-crawl.inc.php b/generator/pages/page-crawl.inc.php new file mode 100755 index 0000000..3707d3a --- /dev/null +++ b/generator/pages/page-crawl.inc.php @@ -0,0 +1,282 @@ +The "stop" signal has been sent to a crawler.Return to crawler page'; }else if(file_exists($fn=ebJGVa__YE.Uv9x2nKq2xFMz)&&(time()-filemtime($fn)<10*60)){ $g9mWWYIteSa7dD7=true; $Pg9z9L_vlxcCxaz = 1; } if($Pg9z9L_vlxcCxaz){ if($g9mWWYIteSa7dD7) echo '

        Crawling already in progress.
        Last log access time: '.date('Y-m-d H:i:s',@filemtime($fn)).'
        Click here to interrupt it.

        '; else { echo '

        Please wait. Sitemap generation in progress...

        '; if($_POST['bg']) echo '
        Please note! The script will run in the background until completion, even if browser window is closed.
        '; } ?> + + + +
        + + +
        + +
        +
        +

        Crawling

        +
        + +
        Run in background
        + + filemtime(ebJGVa__YE.smWzxPC1LKDbUte)) ){ $VhnoUcNFi9Q = @IcPgk0YCJ(RWenvmRCuyBW(ebJGVa__YE.AheSQAhNo9A7oMn, true)); } if(!$VhnoUcNFi9Q){ $AngxaIfOJ = @IcPgk0YCJ(RWenvmRCuyBW(ebJGVa__YE.smWzxPC1LKDbUte, true)); $VhnoUcNFi9Q = $AngxaIfOJ['progpar']; } ?> +
        Resume last session
        + +
        Click button below to start crawl manually:
        +
        + +
        +
        +

        Cron job setup

        + You can use the following command line to setup the cron job for sitemap generator: +
        /usr/bin/php
        +

        Web Cron setup

        + If you cannot setup a regular cron task on your server, you can try a web cron instead: +
        +
        + + + + + XML Sitemaps - Generation + + + + + + + + + + + +

        Already in progress. Current process state is displayed:

        + +
        + + Links depth: - + +
        + + Current page: - + +
        + + Pages added to sitemap: - + +
        + + Pages scanned: - (- KB) + +
        + + Pages left: - (+ - queued for the next depth level) + +
        + + Time passed: - + +
        + + Time left: - + +
        + + Memory usage: - + +
        + + + + An error occured: '.$ZVU_UotF9_jJp.''; $GLOBALS['sg_runerror'] = $K5tNFC_1maLKpxB1pd; } else echo $ZVU_UotF9_jJp; echo ' '; } if($g9mWWYIteSa7dD7){ $rc = @IcPgk0YCJ(RWenvmRCuyBW($fn)); jLo1X8O3OGZlDH54AjS($rc); return; } if(file_exists(ebJGVa__YE.wLyh1d0ilMb)) @jgYSLBDPtmpAo(ebJGVa__YE.wLyh1d0ilMb); $Dm3PRno_nAd = $P2_ltWpf5 = $X5pGy9XVxZmKajMLt->pJIy8HIUg(array( 'initurl'=>$grab_parameters['xs_initurl'], 'progress_callback'=>'jLo1X8O3OGZlDH54AjS', 'maxpg'=>$grab_parameters['xs_max_pages'], 'bgexec'=>$_REQUEST['bg'], 'resume'=>$_REQUEST['resume'], 'maxdepth'=>$grab_parameters['xs_max_depth'], ), $urls_completed ); QNBZB8U2gUbUbMO('sm_base.db',serialize($Dm3PRno_nAd['sm_base']),ebJGVa__YE,true); unset($Dm3PRno_nAd['sm_base']); if($Dm3PRno_nAd['errmsg']||$Dm3PRno_nAd['interrupt']){ j03RYa9bU3v7z_93eY('config', '', $Dm3PRno_nAd['interrupt']?'The process has been interrupted ('.$Dm3PRno_nAd['interrupt'].')':$Dm3PRno_nAd['errmsg']); return; } echo '

        Completed

        Total pages indexed: '.count($urls_completed)."\n"; echo '
        Creating sitemaps...'."\n"; if($grab_parameters['xs_chlog']) echo ' and calculating changelog...'."\n"; echo '
        '."\n"; flush(); $RZyWFyTrlgQw4x6gpG='xmlcreate.log'; $V15cq9dPNt8iS8='htmlcreate.log'; if($_REQUEST['resume']) { $Btu_OfIkMLszVD = @IcPgk0YCJ(RWenvmRCuyBW(ebJGVa__YE.$RZyWFyTrlgQw4x6gpG)); $Yqz1QyXnf8Zlfu9jU = @IcPgk0YCJ(RWenvmRCuyBW(ebJGVa__YE.$V15cq9dPNt8iS8)); } $grab_parameters['xs_ipconnection'] = ''; $Wo1WjLciOv3NRe = time(); if(!$Btu_OfIkMLszVD['done']) $Dm3PRno_nAd = $by9zdmWh_g->XA1HnEPOgm( $grab_parameters, $urls_completed, $Dm3PRno_nAd ); $CVbG7y3B2eZhts = time(); $Dm3PRno_nAd['xml_create_time'] = ($CVbG7y3B2eZhts - $spSCVOMAe); if($grab_parameters['xs_makehtml']) { include Il2qN32A6EeND.'class.html-creator.inc.php'; } $Dm3PRno_nAd['html_create_time'] = (time() - $CVbG7y3B2eZhts); @jgYSLBDPtmpAo(ebJGVa__YE.$RZyWFyTrlgQw4x6gpG); @jgYSLBDPtmpAo(ebJGVa__YE.$V15cq9dPNt8iS8); global $DViaBKXmteSZF4cgvzj; if($DViaBKXmteSZF4cgvzj) { $ZVU_UotF9_jJp = nl2br("Error writing to these files:\n". ''.htmlspecialchars(implode("\n", $DViaBKXmteSZF4cgvzj)).''."\nPlease correct files permissions and resume sitemap creation." ); j03RYa9bU3v7z_93eY('config','',$ZVU_UotF9_jJp); return; }else { @jgYSLBDPtmpAo(ebJGVa__YE.smWzxPC1LKDbUte); } jLo1X8O3OGZlDH54AjS(array('flush'=>1)); if(!$grab_parameters['xs_chlog'] || $Dm3PRno_nAd['newurls'] || $Dm3PRno_nAd['losturls']) { if($grab_parameters['xs_gping']) $YF0XpEM2w4->gD2gJih5je9Dh($Dm3PRno_nAd['rinfo']); jLo1X8O3OGZlDH54AjS(array('flush'=>1)); if($grab_parameters['xs_weblog_ping']) { $yvOIe0tV6y4KcO0aLl = isset($urls_completed[0]['t']) ? $urls_completed[0]['t'] : ''; $YF0XpEM2w4->Z1gq78juXl150LtnVs($grab_parameters['xs_weblog_ping'], $grab_parameters['xs_initurl'], $yvOIe0tV6y4KcO0aLl); } jLo1X8O3OGZlDH54AjS(array('flush'=>1)); } if($grab_parameters['xs_email']) { echo '
        Sending email notification...';flush(); include Il2qN32A6EeND.'class.mail.inc.php'; $UFH0cYalshj8ilZw->moLbvHVqFXK8OJ($Dm3PRno_nAd); } jLo1X8O3OGZlDH54AjS(array('flush'=>1)); if($_GET['ddbgexit2'])exit; j03RYa9bU3v7z_93eY('view','
        Done, redirecting to sitemap view page.'); return; function jLo1X8O3OGZlDH54AjS($progpar) { global $sAg5YsdwOc, $GXcwrWDZ8PYz, $lJ4UjiHGEoOL92XF3oE, $uW2s6L508AR, $grab_parameters; if($progpar['cmd'] == 'info') { if(!$sAg5YsdwOc) if($uW2s6L508AR[$progpar['id']] != $progpar['text']) { if($progpar['text']) echo ""; else echo ""; flush(); $uW2s6L508AR[$progpar['id']] = $progpar['text']; } $progpar['cmd'] = 'ping'; } if($progpar['cmd'] == 'ping') { if(!$sAg5YsdwOc) echo "";flush(); }else if(!$progpar['cmd'] && !$_REQUEST['noddbg']) { list( $ctime, $sfWFJIHHoHQFy, $HBsKYMirP, $pn, $tsize, $links_level, $mu, $Ve5h8i9QJ3ta, $l2 ) = $progpar; $Jq0UrEsUPNB_qax = $pn?($HBsKYMirP/$pn)*$ctime:0; $WahZM9_a7TpWjlRj1kd = intval(str_replace(',','',$mu)); if($sAg5YsdwOc) echo "$pn | $HBsKYMirP | ".number_format($tsize/1024,1)." | ".Dyz4i63tIZpcSycZz04($ctime). " | ".Dyz4i63tIZpcSycZz04($Jq0UrEsUPNB_qax)." | $links_level | $mu | $Ve5h8i9QJ3ta | $l2 | ".($WahZM9_a7TpWjlRj1kd-$GXcwrWDZ8PYz)."\n"; else echo " "; } if((time()-$lJ4UjiHGEoOL92XF3oE)>min(20,$grab_parameters['xs_autoresume']-15) || $progpar['flush']) { $lJ4UjiHGEoOL92XF3oE = time(); if(!$sAg5YsdwOc) echo ""; flush(); } $GXcwrWDZ8PYz=$WahZM9_a7TpWjlRj1kd; flush(); } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/pages/page-ext.inc.php b/generator/pages/page-ext.inc.php new file mode 100755 index 0000000..fa78988 --- /dev/null +++ b/generator/pages/page-ext.inc.php @@ -0,0 +1,219 @@ + +
        +

        External Links

        + + + + + + + $Y6Sv9w6omZ){ ?> + + + + + + +
        NoExternal LinkReferred From
        +
        + '7.1', 'lastupdate'=>'2015-05-19', 'link'=>'https://www.xml-sitemaps.com/news-20150519.html' + ); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generator/pages/page-l404.inc.php b/generator/pages/page-l404.inc.php new file mode 100755 index 0000000..eadfe23 --- /dev/null +++ b/generator/pages/page-l404.inc.php @@ -0,0 +1,228 @@ + +
        +

        Broken Links

        + + + + + + + + + + + + + + +
        NoBroken Link (Code 404)Referred from
        + $v){ if($k)echo ', '; if(!$v)$v='/'; ?> +
        + +

        + This feature is not available in TRIAL version of sitemap generator.


        + You can order unlimited sitemap generator here: Full version of sitemap generator. +

        + +
        + +
        +
        +
        +

        Login

        + Login incorrect
        '; ?> +
        + +
        Username:
        + +
        Password:
        + +
        + +
        +
        +
        + +
        +

        Referring Links

        + + + + + + + + $ll){ ?> + + + + + + +
        NoPage URLReferred from
        + $v){ if($k)echo ', '; if(!$v)$v='/'; ?> +
        + +

        + This feature is not available in TRIAL version of sitemap generator.


        + You can order unlimited sitemap generator here: Full version of sitemap generator. +

        + +
        + 0){ $HVKGdDolsi2eMB_mMuD = array_pop($EbecPh_o2); @set_time_limit(60*60); $Dm3PRno_nAd = vNqieogz40S1ja($HVKGdDolsi2eMB_mMuD); if(filesize(ebJGVa__YE.$HVKGdDolsi2eMB_mMuD)>2000000) { $Dm3PRno_nAd['newurls'] = $Dm3PRno_nAd['losturls'] = $Dm3PRno_nAd['aproc'] = array(); QNBZB8U2gUbUbMO($HVKGdDolsi2eMB_mMuD,serialize($Dm3PRno_nAd)); } ?> +
        + Sitemap details +
        +
        + Created on:
        +
        + Processing time:
        + s
        + Pages indexed:
        +
        + Download:
        + XML sitemap + +
        In text format + + +
        + In ROR format + + + +
        + HTML sitemap + +

        + Mobile sitemap
        '.intval($Dm3PRno_nAd['ucount']).' pages
        '; ?> + PgST6Al2IwhyJOjnP]) echo '
        '.$davTYrpwM_4COa->psf7nhFBQzfQO7.''; ?> +
        more details » + +
        + +
        + Broken links +
        +
        + broken links found! +
        View the list. +
        + +
        + No sitemaps found +
        +
        + Sitemap was not generated yet, please go to Crawling + page to start crawler manually or to setup a cron job. +
        + 'Configuration', 'crawl'=>'Crawling', 'view'=>'View Sitemap', 'analyze'=>'Analyze Sitemap', 'chlog'=>'Site Change Log', 'l404'=>'Broken Links', 'reflinks'=>'Referrers', 'ext'=>'External Links', ); $ZKHrdYpZx7xJpCetjV=$eivnFROHnEo0qZ[$op]; include Il2qN32A6EeND.'page-generator.inc.php'; ?> + + + <?php echo $ZKHrdYpZx7xJpCetjV;?>: XML, ROR, Text, HTML Sitemap Generator - (c) www.xml-sitemaps.com + + + + + +
        + +
        +

        + + Standalone Sitemap Generator + + Standalone Sitemap Generator (Trial Version) +
        + Expires in days. Limited to max 500 URLs in sitemap. + +

        + +
        + XML_TFIN)) { ?> +

        Trial version expired

        +

        + You can order unlimited sitemap generator here: Full version of sitemap generator. +

        + +
        + +
        +
        +

        View Sitemap

        +
        HTML SiteMap
        +

        +
        Text SiteMap
        +

        +
        ROR SiteMap
        +

        + $ri) { $Dm3PRno_nAd['files'] = @array_merge($Dm3PRno_nAd['files'], $ri['urls']); } } for($i=0;$i1; $qZN2cRANbk1N = strstr($fl,'.gz')?implode('',gzfile($fl)):RWenvmRCuyBW($fl); ?> +
        . XML SiteMap
        +

        +

        + + +
        + + * + * @link http://www.yiiframework.com/ + * @copyright Copyright (c) 2008 Yii Software LLC + * @license http://www.yiiframework.com/license/ + */ + +if (!extension_loaded('openssl')) { + die('The OpenSSL PHP extension is required by Yii2.'); +} + +$params = getParams(); +$root = str_replace('\\', '/', __DIR__); +$envs = require("$root/environments/index.php"); +$envNames = array_keys($envs); + +echo "Yii Application Initialization Tool v1.0\n\n"; + +$envName = null; +if (empty($params['env']) || $params['env'] === '1') { + echo "Which environment do you want the application to be initialized in?\n\n"; + foreach ($envNames as $i => $name) { + echo " [$i] $name\n"; + } + echo "\n Your choice [0-" . (count($envs) - 1) . ', or "q" to quit] '; + $answer = trim(fgets(STDIN)); + + if (!ctype_digit($answer) || !in_array($answer, range(0, count($envs) - 1))) { + echo "\n Quit initialization.\n"; + exit(0); + } + + if (isset($envNames[$answer])) { + $envName = $envNames[$answer]; + } +} else { + $envName = $params['env']; +} + +if (!in_array($envName, $envNames)) { + $envsList = implode(', ', $envNames); + echo "\n $envName is not a valid environment. Try one of the following: $envsList. \n"; + exit(2); +} + +$env = $envs[$envName]; + +if (empty($params['env'])) { + echo "\n Initialize the application under '{$envNames[$answer]}' environment? [yes|no] "; + $answer = trim(fgets(STDIN)); + if (strncasecmp($answer, 'y', 1)) { + echo "\n Quit initialization.\n"; + exit(0); + } +} + +echo "\n Start initialization ...\n\n"; +$files = getFileList("$root/environments/{$env['path']}"); +if (isset($env['skipFiles'])) { + $skipFiles = $env['skipFiles']; + array_walk($skipFiles, function(&$value) use($env, $root) { $value = "$root/$value"; }); + $files = array_diff($files, array_intersect_key($env['skipFiles'], array_filter($skipFiles, 'file_exists'))); +} +$all = false; +foreach ($files as $file) { + if (!copyFile($root, "environments/{$env['path']}/$file", $file, $all, $params)) { + break; + } +} + +$callbacks = ['setCookieValidationKey', 'setWritable', 'setExecutable', 'createSymlink']; +foreach ($callbacks as $callback) { + if (!empty($env[$callback])) { + $callback($root, $env[$callback]); + } +} + +echo "\n ... initialization completed.\n\n"; + +function getFileList($root, $basePath = '') +{ + $files = []; + $handle = opendir($root); + while (($path = readdir($handle)) !== false) { + if ($path === '.git' || $path === '.svn' || $path === '.' || $path === '..') { + continue; + } + $fullPath = "$root/$path"; + $relativePath = $basePath === '' ? $path : "$basePath/$path"; + if (is_dir($fullPath)) { + $files = array_merge($files, getFileList($fullPath, $relativePath)); + } else { + $files[] = $relativePath; + } + } + closedir($handle); + return $files; +} + +function copyFile($root, $source, $target, &$all, $params) +{ + if (!is_file($root . '/' . $source)) { + echo " skip $target ($source not exist)\n"; + return true; + } + if (is_file($root . '/' . $target)) { + if (file_get_contents($root . '/' . $source) === file_get_contents($root . '/' . $target)) { + echo " unchanged $target\n"; + return true; + } + if ($all) { + echo " overwrite $target\n"; + } else { + echo " exist $target\n"; + echo " ...overwrite? [Yes|No|All|Quit] "; + + + $answer = !empty($params['overwrite']) ? $params['overwrite'] : trim(fgets(STDIN)); + if (!strncasecmp($answer, 'q', 1)) { + return false; + } else { + if (!strncasecmp($answer, 'y', 1)) { + echo " overwrite $target\n"; + } else { + if (!strncasecmp($answer, 'a', 1)) { + echo " overwrite $target\n"; + $all = true; + } else { + echo " skip $target\n"; + return true; + } + } + } + } + file_put_contents($root . '/' . $target, file_get_contents($root . '/' . $source)); + return true; + } + echo " generate $target\n"; + @mkdir(dirname($root . '/' . $target), 0777, true); + file_put_contents($root . '/' . $target, file_get_contents($root . '/' . $source)); + return true; +} + +function getParams() +{ + $rawParams = []; + if (isset($_SERVER['argv'])) { + $rawParams = $_SERVER['argv']; + array_shift($rawParams); + } + + $params = []; + foreach ($rawParams as $param) { + if (preg_match('/^--(\w+)(=(.*))?$/', $param, $matches)) { + $name = $matches[1]; + $params[$name] = isset($matches[3]) ? $matches[3] : true; + } else { + $params[] = $param; + } + } + return $params; +} + +function setWritable($root, $paths) +{ + foreach ($paths as $writable) { + if (is_dir("$root/$writable")) { + echo " chmod 0777 $writable\n"; + @chmod("$root/$writable", 0777); + } else { + echo "\n Error. Directory $writable does not exist. \n"; + } + } +} + +function setExecutable($root, $paths) +{ + foreach ($paths as $executable) { + echo " chmod 0755 $executable\n"; + @chmod("$root/$executable", 0755); + } +} + +function setCookieValidationKey($root, $paths) +{ + foreach ($paths as $file) { + echo " generate cookie validation key in $file\n"; + $file = $root . '/' . $file; + $length = 32; + $bytes = openssl_random_pseudo_bytes($length); + $key = strtr(substr(base64_encode($bytes), 0, $length), '+/=', '_-.'); + $content = preg_replace('/(("|\')cookieValidationKey("|\')\s*=>\s*)(""|\'\')/', "\\1'$key'", file_get_contents($file)); + file_put_contents($file, $content); + } +} + +function createSymlink($root, $links) { + foreach ($links as $link => $target) { + echo " symlink " . $root . "/" . $target . " " . $root . "/" . $link . "\n"; + //first removing folders to avoid errors if the folder already exists + @rmdir($root . "/" . $link); + @symlink($root . "/" . $target, $root . "/" . $link); + } +} diff --git a/init.bat b/init.bat new file mode 100755 index 0000000..2ade505 --- /dev/null +++ b/init.bat @@ -0,0 +1,20 @@ +@echo off + +rem ------------------------------------------------------------- +rem Yii command line init script for Windows. +rem +rem @author Qiang Xue +rem @link http://www.yiiframework.com/ +rem @copyright Copyright (c) 2008 Yii Software LLC +rem @license http://www.yiiframework.com/license/ +rem ------------------------------------------------------------- + +@setlocal + +set YII_PATH=%~dp0 + +if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe + +"%PHP_COMMAND%" "%YII_PATH%init" %* + +@endlocal diff --git a/requirements.php b/requirements.php new file mode 100755 index 0000000..aa93439 --- /dev/null +++ b/requirements.php @@ -0,0 +1,132 @@ +Error'; + echo '

        The path to yii framework seems to be incorrect.

        '; + echo '

        You need to install Yii framework via composer or adjust the framework path in file ' . basename(__FILE__) . '.

        '; + echo '

        Please refer to the README on how to install Yii.

        '; +} + +require_once($frameworkPath . '/requirements/YiiRequirementChecker.php'); +$requirementsChecker = new YiiRequirementChecker(); + +$gdMemo = $imagickMemo = 'Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required for image CAPTCHA.'; +$gdOK = $imagickOK = false; + +if (extension_loaded('imagick')) { + $imagick = new Imagick(); + $imagickFormats = $imagick->queryFormats('PNG'); + if (in_array('PNG', $imagickFormats)) { + $imagickOK = true; + } else { + $imagickMemo = 'Imagick extension should be installed with PNG support in order to be used for image CAPTCHA.'; + } +} + +if (extension_loaded('gd')) { + $gdInfo = gd_info(); + if (!empty($gdInfo['FreeType Support'])) { + $gdOK = true; + } else { + $gdMemo = 'GD extension should be installed with FreeType support in order to be used for image CAPTCHA.'; + } +} + +/** + * Adjust requirements according to your application specifics. + */ +$requirements = array( + // Database : + array( + 'name' => 'PDO extension', + 'mandatory' => true, + 'condition' => extension_loaded('pdo'), + 'by' => 'All DB-related classes', + ), + array( + 'name' => 'PDO SQLite extension', + 'mandatory' => false, + 'condition' => extension_loaded('pdo_sqlite'), + 'by' => 'All DB-related classes', + 'memo' => 'Required for SQLite database.', + ), + array( + 'name' => 'PDO MySQL extension', + 'mandatory' => false, + 'condition' => extension_loaded('pdo_mysql'), + 'by' => 'All DB-related classes', + 'memo' => 'Required for MySQL database.', + ), + array( + 'name' => 'PDO PostgreSQL extension', + 'mandatory' => false, + 'condition' => extension_loaded('pdo_pgsql'), + 'by' => 'All DB-related classes', + 'memo' => 'Required for PostgreSQL database.', + ), + // Cache : + array( + 'name' => 'Memcache extension', + 'mandatory' => false, + 'condition' => extension_loaded('memcache') || extension_loaded('memcached'), + 'by' => 'MemCache', + 'memo' => extension_loaded('memcached') ? 'To use memcached set MemCache::useMemcached to true.' : '' + ), + array( + 'name' => 'APC extension', + 'mandatory' => false, + 'condition' => extension_loaded('apc'), + 'by' => 'ApcCache', + ), + // CAPTCHA: + array( + 'name' => 'GD PHP extension with FreeType support', + 'mandatory' => false, + 'condition' => $gdOK, + 'by' => 'Captcha', + 'memo' => $gdMemo, + ), + array( + 'name' => 'ImageMagick PHP extension with PNG support', + 'mandatory' => false, + 'condition' => $imagickOK, + 'by' => 'Captcha', + 'memo' => $imagickMemo, + ), + // PHP ini : + 'phpExposePhp' => array( + 'name' => 'Expose PHP', + 'mandatory' => false, + 'condition' => $requirementsChecker->checkPhpIniOff("expose_php"), + 'by' => 'Security reasons', + 'memo' => '"expose_php" should be disabled at php.ini', + ), + 'phpAllowUrlInclude' => array( + 'name' => 'PHP allow url include', + 'mandatory' => false, + 'condition' => $requirementsChecker->checkPhpIniOff("allow_url_include"), + 'by' => 'Security reasons', + 'memo' => '"allow_url_include" should be disabled at php.ini', + ), + 'phpSmtp' => array( + 'name' => 'PHP mail SMTP', + 'mandatory' => false, + 'condition' => strlen(ini_get('SMTP')) > 0, + 'by' => 'Email sending', + 'memo' => 'PHP mail SMTP server required', + ), +); +$requirementsChecker->checkYii()->check($requirements)->render(); diff --git a/ror.xml b/ror.xml new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/ror.xml diff --git a/sitemap.xml b/sitemap.xml new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/sitemap.xml diff --git a/test.php b/test.php new file mode 100755 index 0000000..7d9455a --- /dev/null +++ b/test.php @@ -0,0 +1,2 @@ +test + Privet \ No newline at end of file diff --git a/test.txt b/test.txt new file mode 100755 index 0000000..6010b27 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +fdsfadsfdsf \ No newline at end of file diff --git a/tests/README.md b/tests/README.md new file mode 100755 index 0000000..5de94c6 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,58 @@ +This directory contains various tests for the advanced applications. + +Tests in `codeception` directory are developed with [Codeception PHP Testing Framework](http://codeception.com/). + +After creating and setting up the advanced application, follow these steps to prepare for the tests: + +1. Install Codeception if it's not yet installed: + + ``` + composer global require "codeception/codeception=2.0.*" "codeception/specify=*" "codeception/verify=*" + ``` + + If you've never used Composer for global packages run `composer global status`. It should output: + + ``` + Changed current directory to + ``` + + Then add `/vendor/bin` to you `PATH` environment variable. Now you're able to use `codecept` from command + line globally. + +2. Install faker extension by running the following from template root directory where `composer.json` is: + + ``` + composer require --dev yiisoft/yii2-faker:* + ``` + +3. Create `yii2_advanced_tests` database then update it by applying migrations: + + ``` + codeception/bin/yii migrate + ``` + +4. In order to be able to run acceptance tests you need to start a webserver. The simplest way is to use PHP built in + webserver. In the root directory where `common`, `frontend` etc. are execute the following: + + ``` + php -S localhost:8080 + ``` + +5. Now you can run the tests with the following commands, assuming you are in the `tests/codeception` directory: + + ``` + # frontend tests + cd frontend + codecept build + codecept run + + # backend tests + + cd backend + codecept build + codecept run + + # etc. + ``` + + If you already have run `codecept build` for each application, you can skip that step and run all tests by a single `codecept run`. diff --git a/tests/_bootstrap.php b/tests/_bootstrap.php new file mode 100755 index 0000000..a302dda --- /dev/null +++ b/tests/_bootstrap.php @@ -0,0 +1,2 @@ +getScenario()->runStep(new \Codeception\Step\Action('debugWebDriverLogs', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Changes the subdomain for the 'url' configuration parameter. + * Does not open a page; use `amOnPage` for that. + * + * ``` php + * amOnSubdomain('user'); + * $I->amOnPage('/'); + * // moves to http://user.mysite.com/ + * ?> + * ``` + * + * @param $subdomain + * + * @return mixed + * @see \Codeception\Module\WebDriver::amOnSubdomain() + */ + public function amOnSubdomain($subdomain) { + return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Takes a screenshot of the current window and saves it to `tests/_output/debug`. + * + * ``` php + * amOnPage('/user/edit'); + * $I->makeScreenshot('edit_page'); + * // saved to: tests/_output/debug/edit_page.png + * ?> + * ``` + * + * @param $name + * @see \Codeception\Module\WebDriver::makeScreenshot() + */ + public function makeScreenshot($name) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('makeScreenshot', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Resize the current window. + * + * ``` php + * resizeWindow(800, 600); + * + * ``` + * + * @param int $width + * @param int $height + * @see \Codeception\Module\WebDriver::resizeWindow() + */ + public function resizeWindow($width, $height) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('resizeWindow', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that a cookie with the given name is set. + * You can set additional cookie params like `domain`, `path` as array passed in last argument. + * + * ``` php + * seeCookie('PHPSESSID'); + * ?> + * ``` + * + * @param $cookie + * @param array $params + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeCookie() + */ + public function canSeeCookie($cookie, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that a cookie with the given name is set. + * You can set additional cookie params like `domain`, `path` as array passed in last argument. + * + * ``` php + * seeCookie('PHPSESSID'); + * ?> + * ``` + * + * @param $cookie + * @param array $params + * @return mixed + * @see \Codeception\Module\WebDriver::seeCookie() + */ + public function seeCookie($cookie, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there isn't a cookie with the given name. + * You can set additional cookie params like `domain`, `path` as array passed in last argument. + * + * @param $cookie + * + * @param array $params + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeCookie() + */ + public function cantSeeCookie($cookie, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there isn't a cookie with the given name. + * You can set additional cookie params like `domain`, `path` as array passed in last argument. + * + * @param $cookie + * + * @param array $params + * @return mixed + * @see \Codeception\Module\WebDriver::dontSeeCookie() + */ + public function dontSeeCookie($cookie, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Sets a cookie with the given name and value. + * You can set additional cookie params like `domain`, `path`, `expires`, `secure` in array passed as last argument. + * + * ``` php + * setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3'); + * ?> + * ``` + * + * @param $name + * @param $val + * @param array $params + * + * @return mixed + * @see \Codeception\Module\WebDriver::setCookie() + */ + public function setCookie($cookie, $value, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Unsets cookie with the given name. + * You can set additional cookie params like `domain`, `path` in array passed as last argument. + * + * @param $cookie + * + * @param array $params + * @return mixed + * @see \Codeception\Module\WebDriver::resetCookie() + */ + public function resetCookie($cookie, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Grabs a cookie value. + * You can set additional cookie params like `domain`, `path` in array passed as last argument. + * + * @param $cookie + * + * @param array $params + * @return mixed + * @see \Codeception\Module\WebDriver::grabCookie() + */ + public function grabCookie($cookie, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Open web page at the given absolute URL and sets its hostname as the base host. + * + * ``` php + * amOnUrl('http://codeception.com'); + * $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart + * ?> + * ``` + * @see \Codeception\Module\WebDriver::amOnUrl() + */ + public function amOnUrl($url) { + return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Opens the page for the given relative URI. + * + * ``` php + * amOnPage('/'); + * // opens /register page + * $I->amOnPage('/register'); + * ``` + * + * @param $page + * @see \Codeception\Module\WebDriver::amOnPage() + */ + public function amOnPage($page) { + return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string (case insensitive). + * + * You can specify a specific HTML element (via CSS or XPath) as the second + * parameter to only search within that element. + * + * ``` php + * see('Logout'); // I can suppose user is logged in + * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page + * $I->see('Sign Up', '//body/h1'); // with XPath + * ``` + * + * Note that the search is done after stripping all HTML tags from the body, + * so `$I->see('strong')` will return true for strings like: + * + * - `

        I am Stronger than thou

        ` + * - `` + * + * But will *not* be true for strings like: + * + * - `Home` + * - `
        Home` + * - `` + * + * For checking the raw source code, use `seeInSource()`. + * + * @param $text + * @param null $selector + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::see() + */ + public function canSee($text, $selector = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string (case insensitive). + * + * You can specify a specific HTML element (via CSS or XPath) as the second + * parameter to only search within that element. + * + * ``` php + * see('Logout'); // I can suppose user is logged in + * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page + * $I->see('Sign Up', '//body/h1'); // with XPath + * ``` + * + * Note that the search is done after stripping all HTML tags from the body, + * so `$I->see('strong')` will return true for strings like: + * + * - `

        I am Stronger than thou

        ` + * - `` + * + * But will *not* be true for strings like: + * + * - `Home` + * - `
        Home` + * - `` + * + * For checking the raw source code, use `seeInSource()`. + * + * @param $text + * @param null $selector + * @see \Codeception\Module\WebDriver::see() + */ + public function see($text, $selector = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page doesn't contain the text specified (case insensitive). + * Give a locator as the second parameter to match a specific region. + * + * ```php + * dontSee('Login'); // I can suppose user is already logged in + * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page + * $I->dontSee('Sign Up','//body/h1'); // with XPath + * ``` + * + * Note that the search is done after stripping all HTML tags from the body, + * so `$I->dontSee('strong')` will fail on strings like: + * + * - `

        I am Stronger than thou

        ` + * - `` + * + * But will ignore strings like: + * + * - `Home` + * - `
        Home` + * - `` + * + * For checking the raw source code, use `seeInSource()`. + * + * @param $text + * @param null $selector + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSee() + */ + public function cantSee($text, $selector = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page doesn't contain the text specified (case insensitive). + * Give a locator as the second parameter to match a specific region. + * + * ```php + * dontSee('Login'); // I can suppose user is already logged in + * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page + * $I->dontSee('Sign Up','//body/h1'); // with XPath + * ``` + * + * Note that the search is done after stripping all HTML tags from the body, + * so `$I->dontSee('strong')` will fail on strings like: + * + * - `

        I am Stronger than thou

        ` + * - `` + * + * But will ignore strings like: + * + * - `Home` + * - `
        Home` + * - `` + * + * For checking the raw source code, use `seeInSource()`. + * + * @param $text + * @param null $selector + * @see \Codeception\Module\WebDriver::dontSee() + */ + public function dontSee($text, $selector = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string in its + * raw source code. + * + * ``` php + * seeInSource('

        Green eggs & ham

        '); + * ``` + * + * @param $raw + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeInSource() + */ + public function canSeeInSource($raw) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string in its + * raw source code. + * + * ``` php + * seeInSource('

        Green eggs & ham

        '); + * ``` + * + * @param $raw + * @see \Codeception\Module\WebDriver::seeInSource() + */ + public function seeInSource($raw) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string in its + * raw source code. + * + * ```php + * dontSeeInSource('

        Green eggs & ham

        '); + * ``` + * + * @param $raw + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeInSource() + */ + public function cantSeeInSource($raw) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string in its + * raw source code. + * + * ```php + * dontSeeInSource('

        Green eggs & ham

        '); + * ``` + * + * @param $raw + * @see \Codeception\Module\WebDriver::dontSeeInSource() + */ + public function dontSeeInSource($raw) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page source contains the given string. + * + * ```php + * seeInPageSource('getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInPageSource', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page source contains the given string. + * + * ```php + * seeInPageSource('getScenario()->runStep(new \Codeception\Step\Assertion('seeInPageSource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page source doesn't contain the given string. + * + * @param $text + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeInPageSource() + */ + public function cantSeeInPageSource($text) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInPageSource', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page source doesn't contain the given string. + * + * @param $text + * @see \Codeception\Module\WebDriver::dontSeeInPageSource() + */ + public function dontSeeInPageSource($text) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInPageSource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Perform a click on a link or a button, given by a locator. + * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string. + * For buttons, the "value" attribute, "name" attribute, and inner text are searched. + * For links, the link text is searched. + * For images, the "alt" attribute and inner text of any parent links are searched. + * + * The second parameter is a context (CSS or XPath locator) to narrow the search. + * + * Note that if the locator matches a button of type `submit`, the form will be submitted. + * + * ``` php + * click('Logout'); + * // button of form + * $I->click('Submit'); + * // CSS button + * $I->click('#form input[type=submit]'); + * // XPath + * $I->click('//form/*[@type=submit]'); + * // link in context + * $I->click('Logout', '#nav'); + * // using strict locator + * $I->click(['link' => 'Login']); + * ?> + * ``` + * + * @param $link + * @param $context + * @see \Codeception\Module\WebDriver::click() + */ + public function click($link, $context = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there's a link with the specified text. + * Give a full URL as the second parameter to match links with that exact URL. + * + * ``` php + * seeLink('Logout'); // matches Logout + * $I->seeLink('Logout','/logout'); // matches Logout + * ?> + * ``` + * + * @param $text + * @param null $url + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeLink() + */ + public function canSeeLink($text, $url = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there's a link with the specified text. + * Give a full URL as the second parameter to match links with that exact URL. + * + * ``` php + * seeLink('Logout'); // matches Logout + * $I->seeLink('Logout','/logout'); // matches Logout + * ?> + * ``` + * + * @param $text + * @param null $url + * @see \Codeception\Module\WebDriver::seeLink() + */ + public function seeLink($text, $url = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page doesn't contain a link with the given string. + * If the second parameter is given, only links with a matching "href" attribute will be checked. + * + * ``` php + * dontSeeLink('Logout'); // I suppose user is not logged in + * $I->dontSeeLink('Checkout now', '/store/cart.php'); + * ?> + * ``` + * + * @param $text + * @param null $url + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeLink() + */ + public function cantSeeLink($text, $url = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page doesn't contain a link with the given string. + * If the second parameter is given, only links with a matching "href" attribute will be checked. + * + * ``` php + * dontSeeLink('Logout'); // I suppose user is not logged in + * $I->dontSeeLink('Checkout now', '/store/cart.php'); + * ?> + * ``` + * + * @param $text + * @param null $url + * @see \Codeception\Module\WebDriver::dontSeeLink() + */ + public function dontSeeLink($text, $url = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that current URI contains the given string. + * + * ``` php + * seeInCurrentUrl('home'); + * // to match: /users/1 + * $I->seeInCurrentUrl('/users/'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeInCurrentUrl() + */ + public function canSeeInCurrentUrl($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that current URI contains the given string. + * + * ``` php + * seeInCurrentUrl('home'); + * // to match: /users/1 + * $I->seeInCurrentUrl('/users/'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Module\WebDriver::seeInCurrentUrl() + */ + public function seeInCurrentUrl($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL is equal to the given string. + * Unlike `seeInCurrentUrl`, this only matches the full URL. + * + * ``` php + * seeCurrentUrlEquals('/'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeCurrentUrlEquals() + */ + public function canSeeCurrentUrlEquals($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL is equal to the given string. + * Unlike `seeInCurrentUrl`, this only matches the full URL. + * + * ``` php + * seeCurrentUrlEquals('/'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Module\WebDriver::seeCurrentUrlEquals() + */ + public function seeCurrentUrlEquals($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL matches the given regular expression. + * + * ``` php + * seeCurrentUrlMatches('~$/users/(\d+)~'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeCurrentUrlMatches() + */ + public function canSeeCurrentUrlMatches($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL matches the given regular expression. + * + * ``` php + * seeCurrentUrlMatches('~$/users/(\d+)~'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Module\WebDriver::seeCurrentUrlMatches() + */ + public function seeCurrentUrlMatches($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URI doesn't contain the given string. + * + * ``` php + * dontSeeInCurrentUrl('/users/'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeInCurrentUrl() + */ + public function cantSeeInCurrentUrl($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URI doesn't contain the given string. + * + * ``` php + * dontSeeInCurrentUrl('/users/'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Module\WebDriver::dontSeeInCurrentUrl() + */ + public function dontSeeInCurrentUrl($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL doesn't equal the given string. + * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. + * + * ``` php + * dontSeeCurrentUrlEquals('/'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlEquals() + */ + public function cantSeeCurrentUrlEquals($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL doesn't equal the given string. + * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. + * + * ``` php + * dontSeeCurrentUrlEquals('/'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlEquals() + */ + public function dontSeeCurrentUrlEquals($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that current url doesn't match the given regular expression. + * + * ``` php + * dontSeeCurrentUrlMatches('~$/users/(\d+)~'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlMatches() + */ + public function cantSeeCurrentUrlMatches($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that current url doesn't match the given regular expression. + * + * ``` php + * dontSeeCurrentUrlMatches('~$/users/(\d+)~'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlMatches() + */ + public function dontSeeCurrentUrlMatches($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Executes the given regular expression against the current URI and returns the first match. + * If no parameters are provided, the full URI is returned. + * + * ``` php + * grabFromCurrentUrl('~$/user/(\d+)/~'); + * $uri = $I->grabFromCurrentUrl(); + * ?> + * ``` + * + * @param null $uri + * + * @return mixed + * @see \Codeception\Module\WebDriver::grabFromCurrentUrl() + */ + public function grabFromCurrentUrl($uri = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the specified checkbox is checked. + * + * ``` php + * seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms + * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. + * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); + * ?> + * ``` + * + * @param $checkbox + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeCheckboxIsChecked() + */ + public function canSeeCheckboxIsChecked($checkbox) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the specified checkbox is checked. + * + * ``` php + * seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms + * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. + * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); + * ?> + * ``` + * + * @param $checkbox + * @see \Codeception\Module\WebDriver::seeCheckboxIsChecked() + */ + public function seeCheckboxIsChecked($checkbox) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Check that the specified checkbox is unchecked. + * + * ``` php + * dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms + * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. + * ?> + * ``` + * + * @param $checkbox + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeCheckboxIsChecked() + */ + public function cantSeeCheckboxIsChecked($checkbox) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Check that the specified checkbox is unchecked. + * + * ``` php + * dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms + * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. + * ?> + * ``` + * + * @param $checkbox + * @see \Codeception\Module\WebDriver::dontSeeCheckboxIsChecked() + */ + public function dontSeeCheckboxIsChecked($checkbox) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given input field or textarea contains the given value. + * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. + * + * ``` php + * seeInField('Body','Type your comment here'); + * $I->seeInField('form textarea[name=body]','Type your comment here'); + * $I->seeInField('form input[type=hidden]','hidden_value'); + * $I->seeInField('#searchform input','Search'); + * $I->seeInField('//form/*[@name=search]','Search'); + * $I->seeInField(['name' => 'search'], 'Search'); + * ?> + * ``` + * + * @param $field + * @param $value + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeInField() + */ + public function canSeeInField($field, $value) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given input field or textarea contains the given value. + * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. + * + * ``` php + * seeInField('Body','Type your comment here'); + * $I->seeInField('form textarea[name=body]','Type your comment here'); + * $I->seeInField('form input[type=hidden]','hidden_value'); + * $I->seeInField('#searchform input','Search'); + * $I->seeInField('//form/*[@name=search]','Search'); + * $I->seeInField(['name' => 'search'], 'Search'); + * ?> + * ``` + * + * @param $field + * @param $value + * @see \Codeception\Module\WebDriver::seeInField() + */ + public function seeInField($field, $value) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that an input field or textarea doesn't contain the given value. + * For fuzzy locators, the field is matched by label text, CSS and XPath. + * + * ``` php + * dontSeeInField('Body','Type your comment here'); + * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); + * $I->dontSeeInField('form input[type=hidden]','hidden_value'); + * $I->dontSeeInField('#searchform input','Search'); + * $I->dontSeeInField('//form/*[@name=search]','Search'); + * $I->dontSeeInField(['name' => 'search'], 'Search'); + * ?> + * ``` + * + * @param $field + * @param $value + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeInField() + */ + public function cantSeeInField($field, $value) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that an input field or textarea doesn't contain the given value. + * For fuzzy locators, the field is matched by label text, CSS and XPath. + * + * ``` php + * dontSeeInField('Body','Type your comment here'); + * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); + * $I->dontSeeInField('form input[type=hidden]','hidden_value'); + * $I->dontSeeInField('#searchform input','Search'); + * $I->dontSeeInField('//form/*[@name=search]','Search'); + * $I->dontSeeInField(['name' => 'search'], 'Search'); + * ?> + * ``` + * + * @param $field + * @param $value + * @see \Codeception\Module\WebDriver::dontSeeInField() + */ + public function dontSeeInField($field, $value) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if the array of form parameters (name => value) are set on the form matched with the + * passed selector. + * + * ``` php + * seeInFormFields('form[name=myform]', [ + * 'input1' => 'value', + * 'input2' => 'other value', + * ]); + * ?> + * ``` + * + * For multi-select elements, or to check values of multiple elements with the same name, an + * array may be passed: + * + * ``` php + * seeInFormFields('.form-class', [ + * 'multiselect' => [ + * 'value1', + * 'value2', + * ], + * 'checkbox[]' => [ + * 'a checked value', + * 'another checked value', + * ], + * ]); + * ?> + * ``` + * + * Additionally, checkbox values can be checked with a boolean. + * + * ``` php + * seeInFormFields('#form-id', [ + * 'checkbox1' => true, // passes if checked + * 'checkbox2' => false, // passes if unchecked + * ]); + * ?> + * ``` + * + * Pair this with submitForm for quick testing magic. + * + * ``` php + * 'value', + * 'field2' => 'another value', + * 'checkbox1' => true, + * // ... + * ]; + * $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); + * // $I->amOnPage('/path/to/form-page') may be needed + * $I->seeInFormFields('//form[@id=my-form]', $form); + * ?> + * ``` + * + * @param $formSelector + * @param $params + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeInFormFields() + */ + public function canSeeInFormFields($formSelector, $params) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if the array of form parameters (name => value) are set on the form matched with the + * passed selector. + * + * ``` php + * seeInFormFields('form[name=myform]', [ + * 'input1' => 'value', + * 'input2' => 'other value', + * ]); + * ?> + * ``` + * + * For multi-select elements, or to check values of multiple elements with the same name, an + * array may be passed: + * + * ``` php + * seeInFormFields('.form-class', [ + * 'multiselect' => [ + * 'value1', + * 'value2', + * ], + * 'checkbox[]' => [ + * 'a checked value', + * 'another checked value', + * ], + * ]); + * ?> + * ``` + * + * Additionally, checkbox values can be checked with a boolean. + * + * ``` php + * seeInFormFields('#form-id', [ + * 'checkbox1' => true, // passes if checked + * 'checkbox2' => false, // passes if unchecked + * ]); + * ?> + * ``` + * + * Pair this with submitForm for quick testing magic. + * + * ``` php + * 'value', + * 'field2' => 'another value', + * 'checkbox1' => true, + * // ... + * ]; + * $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); + * // $I->amOnPage('/path/to/form-page') may be needed + * $I->seeInFormFields('//form[@id=my-form]', $form); + * ?> + * ``` + * + * @param $formSelector + * @param $params + * @see \Codeception\Module\WebDriver::seeInFormFields() + */ + public function seeInFormFields($formSelector, $params) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if the array of form parameters (name => value) are not set on the form matched with + * the passed selector. + * + * ``` php + * dontSeeInFormFields('form[name=myform]', [ + * 'input1' => 'non-existent value', + * 'input2' => 'other non-existent value', + * ]); + * ?> + * ``` + * + * To check that an element hasn't been assigned any one of many values, an array can be passed + * as the value: + * + * ``` php + * dontSeeInFormFields('.form-class', [ + * 'fieldName' => [ + * 'This value shouldn\'t be set', + * 'And this value shouldn\'t be set', + * ], + * ]); + * ?> + * ``` + * + * Additionally, checkbox values can be checked with a boolean. + * + * ``` php + * dontSeeInFormFields('#form-id', [ + * 'checkbox1' => true, // fails if checked + * 'checkbox2' => false, // fails if unchecked + * ]); + * ?> + * ``` + * + * @param $formSelector + * @param $params + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeInFormFields() + */ + public function cantSeeInFormFields($formSelector, $params) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if the array of form parameters (name => value) are not set on the form matched with + * the passed selector. + * + * ``` php + * dontSeeInFormFields('form[name=myform]', [ + * 'input1' => 'non-existent value', + * 'input2' => 'other non-existent value', + * ]); + * ?> + * ``` + * + * To check that an element hasn't been assigned any one of many values, an array can be passed + * as the value: + * + * ``` php + * dontSeeInFormFields('.form-class', [ + * 'fieldName' => [ + * 'This value shouldn\'t be set', + * 'And this value shouldn\'t be set', + * ], + * ]); + * ?> + * ``` + * + * Additionally, checkbox values can be checked with a boolean. + * + * ``` php + * dontSeeInFormFields('#form-id', [ + * 'checkbox1' => true, // fails if checked + * 'checkbox2' => false, // fails if unchecked + * ]); + * ?> + * ``` + * + * @param $formSelector + * @param $params + * @see \Codeception\Module\WebDriver::dontSeeInFormFields() + */ + public function dontSeeInFormFields($formSelector, $params) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Selects an option in a select tag or in radio button group. + * + * ``` php + * selectOption('form select[name=account]', 'Premium'); + * $I->selectOption('form input[name=payment]', 'Monthly'); + * $I->selectOption('//form/select[@name=account]', 'Monthly'); + * ?> + * ``` + * + * Provide an array for the second argument to select multiple options: + * + * ``` php + * selectOption('Which OS do you use?', array('Windows','Linux')); + * ?> + * ``` + * + * @param $select + * @param $option + * @see \Codeception\Module\WebDriver::selectOption() + */ + public function selectOption($select, $option) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\WebDriver::unselectOption() + */ + public function unselectOption($select, $option) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('unselectOption', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Ticks a checkbox. For radio buttons, use the `selectOption` method instead. + * + * ``` php + * checkOption('#agree'); + * ?> + * ``` + * + * @param $option + * @see \Codeception\Module\WebDriver::checkOption() + */ + public function checkOption($option) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Unticks a checkbox. + * + * ``` php + * uncheckOption('#notify'); + * ?> + * ``` + * + * @param $option + * @see \Codeception\Module\WebDriver::uncheckOption() + */ + public function uncheckOption($option) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Fills a text field or textarea with the given string. + * + * ``` php + * fillField("//input[@type='text']", "Hello World!"); + * $I->fillField(['name' => 'email'], 'jon@mail.com'); + * ?> + * ``` + * + * @param $field + * @param $value + * @see \Codeception\Module\WebDriver::fillField() + */ + public function fillField($field, $value) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Attaches a file relative to the Codeception data directory to the given file upload field. + * + * ``` php + * attachFile('input[@type="file"]', 'prices.xls'); + * ?> + * ``` + * + * @param $field + * @param $filename + * @see \Codeception\Module\WebDriver::attachFile() + */ + public function attachFile($field, $filename) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Grabs all visible text from the current page. + * + * @return string + * @see \Codeception\Module\WebDriver::getVisibleText() + */ + public function getVisibleText() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('getVisibleText', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Finds and returns the text contents of the given element. + * If a fuzzy locator is used, the element is found using CSS, XPath, and by matching the full page source by regular expression. + * + * ``` php + * grabTextFrom('h1'); + * $heading = $I->grabTextFrom('descendant-or-self::h1'); + * $value = $I->grabTextFrom('~ + * ``` + * + * @param $cssOrXPathOrRegex + * + * @return mixed + * @see \Codeception\Module\WebDriver::grabTextFrom() + */ + public function grabTextFrom($cssOrXPathOrRegex) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Grabs the value of the given attribute value from the given element. + * Fails if element is not found. + * + * ``` php + * grabAttributeFrom('#tooltip', 'title'); + * ?> + * ``` + * + * + * @param $cssOrXpath + * @param $attribute + * + * @return mixed + * @see \Codeception\Module\WebDriver::grabAttributeFrom() + */ + public function grabAttributeFrom($cssOrXpath, $attribute) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Finds the value for the given form field. + * If a fuzzy locator is used, the field is found by field name, CSS, and XPath. + * + * ``` php + * grabValueFrom('Name'); + * $name = $I->grabValueFrom('input[name=username]'); + * $name = $I->grabValueFrom('descendant-or-self::form/descendant::input[@name = 'username']'); + * $name = $I->grabValueFrom(['name' => 'username']); + * ?> + * ``` + * + * @param $field + * + * @return mixed + * @see \Codeception\Module\WebDriver::grabValueFrom() + */ + public function grabValueFrom($field) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Grabs either the text content, or attribute values, of nodes + * matched by $cssOrXpath and returns them as an array. + * + * ```html + * First + * Second + * Third + * ``` + * + * ```php + * grabMultiple('a'); + * + * // would return ['#first', '#second', '#third'] + * $aLinks = $I->grabMultiple('a', 'href'); + * ?> + * ``` + * + * @param $cssOrXpath + * @param $attribute + * @return string[] + * @see \Codeception\Module\WebDriver::grabMultiple() + */ + public function grabMultiple($cssOrXpath, $attribute = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given element exists on the page and is visible. + * You can also specify expected attributes of this element. + * + * ``` php + * seeElement('.error'); + * $I->seeElement('//form/input[1]'); + * $I->seeElement('input', ['name' => 'login']); + * $I->seeElement('input', ['value' => '123456']); + * + * // strict locator in first arg, attributes in second + * $I->seeElement(['css' => 'form input'], ['name' => 'login']); + * ?> + * ``` + * + * @param $selector + * @param array $attributes + * @return + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeElement() + */ + public function canSeeElement($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given element exists on the page and is visible. + * You can also specify expected attributes of this element. + * + * ``` php + * seeElement('.error'); + * $I->seeElement('//form/input[1]'); + * $I->seeElement('input', ['name' => 'login']); + * $I->seeElement('input', ['value' => '123456']); + * + * // strict locator in first arg, attributes in second + * $I->seeElement(['css' => 'form input'], ['name' => 'login']); + * ?> + * ``` + * + * @param $selector + * @param array $attributes + * @return + * @see \Codeception\Module\WebDriver::seeElement() + */ + public function seeElement($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given element is invisible or not present on the page. + * You can also specify expected attributes of this element. + * + * ``` php + * dontSeeElement('.error'); + * $I->dontSeeElement('//form/input[1]'); + * $I->dontSeeElement('input', ['name' => 'login']); + * $I->dontSeeElement('input', ['value' => '123456']); + * ?> + * ``` + * + * @param $selector + * @param array $attributes + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeElement() + */ + public function cantSeeElement($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given element is invisible or not present on the page. + * You can also specify expected attributes of this element. + * + * ``` php + * dontSeeElement('.error'); + * $I->dontSeeElement('//form/input[1]'); + * $I->dontSeeElement('input', ['name' => 'login']); + * $I->dontSeeElement('input', ['value' => '123456']); + * ?> + * ``` + * + * @param $selector + * @param array $attributes + * @see \Codeception\Module\WebDriver::dontSeeElement() + */ + public function dontSeeElement($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given element exists on the page, even it is invisible. + * + * ``` php + * seeElementInDOM('//form/input[type=hidden]'); + * ?> + * ``` + * + * @param $selector + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeElementInDOM() + */ + public function canSeeElementInDOM($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElementInDOM', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given element exists on the page, even it is invisible. + * + * ``` php + * seeElementInDOM('//form/input[type=hidden]'); + * ?> + * ``` + * + * @param $selector + * @see \Codeception\Module\WebDriver::seeElementInDOM() + */ + public function seeElementInDOM($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElementInDOM', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Opposite of `seeElementInDOM`. + * + * @param $selector + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeElementInDOM() + */ + public function cantSeeElementInDOM($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElementInDOM', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Opposite of `seeElementInDOM`. + * + * @param $selector + * @see \Codeception\Module\WebDriver::dontSeeElementInDOM() + */ + public function dontSeeElementInDOM($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElementInDOM', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there are a certain number of elements matched by the given locator on the page. + * + * ``` php + * seeNumberOfElements('tr', 10); + * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements + * ?> + * ``` + * @param $selector + * @param mixed $expected : + * - string: strict number + * - array: range of numbers [0,10] + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeNumberOfElements() + */ + public function canSeeNumberOfElements($selector, $expected) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there are a certain number of elements matched by the given locator on the page. + * + * ``` php + * seeNumberOfElements('tr', 10); + * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements + * ?> + * ``` + * @param $selector + * @param mixed $expected : + * - string: strict number + * - array: range of numbers [0,10] + * @see \Codeception\Module\WebDriver::seeNumberOfElements() + */ + public function seeNumberOfElements($selector, $expected) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeNumberOfElementsInDOM() + */ + public function canSeeNumberOfElementsInDOM($selector, $expected) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElementsInDOM', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\WebDriver::seeNumberOfElementsInDOM() + */ + public function seeNumberOfElementsInDOM($selector, $expected) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElementsInDOM', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given option is selected. + * + * ``` php + * seeOptionIsSelected('#form input[name=payment]', 'Visa'); + * ?> + * ``` + * + * @param $selector + * @param $optionText + * + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeOptionIsSelected() + */ + public function canSeeOptionIsSelected($selector, $optionText) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given option is selected. + * + * ``` php + * seeOptionIsSelected('#form input[name=payment]', 'Visa'); + * ?> + * ``` + * + * @param $selector + * @param $optionText + * + * @return mixed + * @see \Codeception\Module\WebDriver::seeOptionIsSelected() + */ + public function seeOptionIsSelected($selector, $optionText) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given option is not selected. + * + * ``` php + * dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); + * ?> + * ``` + * + * @param $selector + * @param $optionText + * + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeOptionIsSelected() + */ + public function cantSeeOptionIsSelected($selector, $optionText) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given option is not selected. + * + * ``` php + * dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); + * ?> + * ``` + * + * @param $selector + * @param $optionText + * + * @return mixed + * @see \Codeception\Module\WebDriver::dontSeeOptionIsSelected() + */ + public function dontSeeOptionIsSelected($selector, $optionText) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page title contains the given string. + * + * ``` php + * seeInTitle('Blog - Post #1'); + * ?> + * ``` + * + * @param $title + * + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeInTitle() + */ + public function canSeeInTitle($title) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page title contains the given string. + * + * ``` php + * seeInTitle('Blog - Post #1'); + * ?> + * ``` + * + * @param $title + * + * @return mixed + * @see \Codeception\Module\WebDriver::seeInTitle() + */ + public function seeInTitle($title) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page title does not contain the given string. + * + * @param $title + * + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::dontSeeInTitle() + */ + public function cantSeeInTitle($title) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page title does not contain the given string. + * + * @param $title + * + * @return mixed + * @see \Codeception\Module\WebDriver::dontSeeInTitle() + */ + public function dontSeeInTitle($title) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Accepts the active JavaScript native popup window, as created by `window.alert`|`window.confirm`|`window.prompt`. + * Don't confuse popups with modal windows, as created by [various libraries](http://jster.net/category/windows-modals-popups). + * @see \Codeception\Module\WebDriver::acceptPopup() + */ + public function acceptPopup() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('acceptPopup', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Dismisses the active JavaScript popup, as created by `window.alert`|`window.confirm`|`window.prompt`. + * @see \Codeception\Module\WebDriver::cancelPopup() + */ + public function cancelPopup() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('cancelPopup', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the active JavaScript popup, as created by `window.alert`|`window.confirm`|`window.prompt`, contains the given string. + * + * @param $text + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\WebDriver::seeInPopup() + */ + public function canSeeInPopup($text) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInPopup', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the active JavaScript popup, as created by `window.alert`|`window.confirm`|`window.prompt`, contains the given string. + * + * @param $text + * @see \Codeception\Module\WebDriver::seeInPopup() + */ + public function seeInPopup($text) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInPopup', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Enters text into a native JavaScript prompt popup, as created by `window.prompt`. + * + * @param $keys + * @see \Codeception\Module\WebDriver::typeInPopup() + */ + public function typeInPopup($keys) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('typeInPopup', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Reloads the current page. + * @see \Codeception\Module\WebDriver::reloadPage() + */ + public function reloadPage() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('reloadPage', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Moves back in history. + * @see \Codeception\Module\WebDriver::moveBack() + */ + public function moveBack() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Moves forward in history. + * @see \Codeception\Module\WebDriver::moveForward() + */ + public function moveForward() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('moveForward', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Submits the given form on the page, optionally with the given form + * values. Give the form fields values as an array. Note that hidden fields + * can't be accessed. + * + * Skipped fields will be filled by their values from the page. + * You don't need to click the 'Submit' button afterwards. + * This command itself triggers the request to form's action. + * + * You can optionally specify what button's value to include + * in the request with the last parameter as an alternative to + * explicitly setting its value in the second parameter, as + * button values are not otherwise included in the request. + * + * Examples: + * + * ``` php + * submitForm('#login', [ + * 'login' => 'davert', + * 'password' => '123456' + * ]); + * // or + * $I->submitForm('#login', [ + * 'login' => 'davert', + * 'password' => '123456' + * ], 'submitButtonName'); + * + * ``` + * + * For example, given this sample "Sign Up" form: + * + * ``` html + *
        + * Login: + *
        + * Password: + *
        + * Do you agree to our terms? + *
        + * Select pricing plan: + * + * + *
        + * ``` + * + * You could write the following to submit it: + * + * ``` php + * submitForm( + * '#userForm', + * [ + * 'user[login]' => 'Davert', + * 'user[password]' => '123456', + * 'user[agree]' => true + * ], + * 'submitButton' + * ); + * ``` + * Note that "2" will be the submitted value for the "plan" field, as it is + * the selected option. + * + * Also note that this differs from PhpBrowser, in that + * ```'user' => [ 'login' => 'Davert' ]``` is not supported at the moment. + * Named array keys *must* be included in the name as above. + * + * Pair this with seeInFormFields for quick testing magic. + * + * ``` php + * 'value', + * 'field2' => 'another value', + * 'checkbox1' => true, + * // ... + * ]; + * $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); + * // $I->amOnPage('/path/to/form-page') may be needed + * $I->seeInFormFields('//form[@id=my-form]', $form); + * ?> + * ``` + * + * Parameter values must be set to arrays for multiple input fields + * of the same name, or multi-select combo boxes. For checkboxes, + * either the string value can be used, or boolean values which will + * be replaced by the checkbox's value in the DOM. + * + * ``` php + * submitForm('#my-form', [ + * 'field1' => 'value', + * 'checkbox' => [ + * 'value of first checkbox', + * 'value of second checkbox, + * ], + * 'otherCheckboxes' => [ + * true, + * false, + * false + * ], + * 'multiselect' => [ + * 'first option value', + * 'second option value' + * ] + * ]); + * ?> + * ``` + * + * Mixing string and boolean values for a checkbox's value is not supported + * and may produce unexpected results. + * + * Field names ending in "[]" must be passed without the trailing square + * bracket characters, and must contain an array for its value. This allows + * submitting multiple values with the same name, consider: + * + * ```php + * $I->submitForm('#my-form', [ + * 'field[]' => 'value', + * 'field[]' => 'another value', // 'field[]' is already a defined key + * ]); + * ``` + * + * The solution is to pass an array value: + * + * ```php + * // this way both values are submitted + * $I->submitForm('#my-form', [ + * 'field' => [ + * 'value', + * 'another value', + * ] + * ]); + * ``` + * @param $selector + * @param $params + * @param $button + * @see \Codeception\Module\WebDriver::submitForm() + */ + public function submitForm($selector, $params, $button = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Waits up to $timeout seconds for the given element to change. + * Element "change" is determined by a callback function which is called repeatedly until the return value evaluates to true. + * + * ``` php + * waitForElementChange('#menu', function(WebDriverElement $el) { + * return $el->isDisplayed(); + * }, 100); + * ?> + * ``` + * + * @param $element + * @param \Closure $callback + * @param int $timeout seconds + * @throws \Codeception\Exception\ElementNotFound + * @see \Codeception\Module\WebDriver::waitForElementChange() + */ + public function waitForElementChange($element, $callback, $timeout = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementChange', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Waits up to $timeout seconds for an element to appear on the page. + * If the element doesn't appear, a timeout exception is thrown. + * + * ``` php + * waitForElement('#agree_button', 30); // secs + * $I->click('#agree_button'); + * ?> + * ``` + * + * @param $element + * @param int $timeout seconds + * @throws \Exception + * @see \Codeception\Module\WebDriver::waitForElement() + */ + public function waitForElement($element, $timeout = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElement', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Waits up to $timeout seconds for the given element to be visible on the page. + * If element doesn't appear, a timeout exception is thrown. + * + * ``` php + * waitForElementVisible('#agree_button', 30); // secs + * $I->click('#agree_button'); + * ?> + * ``` + * + * @param $element + * @param int $timeout seconds + * @throws \Exception + * @see \Codeception\Module\WebDriver::waitForElementVisible() + */ + public function waitForElementVisible($element, $timeout = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementVisible', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Waits up to $timeout seconds for the given element to become invisible. + * If element stays visible, a timeout exception is thrown. + * + * ``` php + * waitForElementNotVisible('#agree_button', 30); // secs + * ?> + * ``` + * + * @param $element + * @param int $timeout seconds + * @throws \Exception + * @see \Codeception\Module\WebDriver::waitForElementNotVisible() + */ + public function waitForElementNotVisible($element, $timeout = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementNotVisible', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Waits up to $timeout seconds for the given string to appear on the page. + * Can also be passed a selector to search in. + * If the given text doesn't appear, a timeout exception is thrown. + * + * ``` php + * waitForText('foo', 30); // secs + * $I->waitForText('foo', 30, '.title'); // secs + * ?> + * ``` + * + * @param string $text + * @param int $timeout seconds + * @param null $selector + * @throws \Exception + * @see \Codeception\Module\WebDriver::waitForText() + */ + public function waitForText($text, $timeout = null, $selector = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForText', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Wait for $timeout seconds. + * + * @param int $timeout secs + * @throws \Codeception\Exception\TestRuntimeException + * @see \Codeception\Module\WebDriver::wait() + */ + public function wait($timeout) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('wait', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Low-level API method. + * If Codeception commands are not enough, this allows you to use Selenium WebDriver methods directly: + * + * ``` php + * $I->executeInSelenium(function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) { + * $webdriver->get('http://google.com'); + * }); + * ``` + * + * This runs in the context of the [RemoteWebDriver class](https://github.com/facebook/php-webdriver/blob/master/lib/remote/RemoteWebDriver.php). + * Try not to use this command on a regular basis. + * If Codeception lacks a feature you need, please implement it and submit a patch. + * + * @param callable $function + * @see \Codeception\Module\WebDriver::executeInSelenium() + */ + public function executeInSelenium($function) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('executeInSelenium', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Switch to another window identified by name. + * + * The window can only be identified by name. If the $name parameter is blank, the parent window will be used. + * + * Example: + * ``` html + * + * ``` + * + * ``` php + * click("Open window"); + * # switch to another window + * $I->switchToWindow("another_window"); + * # switch to parent window + * $I->switchToWindow(); + * ?> + * ``` + * + * If the window has no name, the only way to access it is via the `executeInSelenium()` method, like so: + * + * ``` php + * executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) { + * $handles=$webdriver->getWindowHandles(); + * $last_window = end($handles); + * $webdriver->switchTo()->window($last_window); + * }); + * ?> + * ``` + * + * @param string|null $name + * @see \Codeception\Module\WebDriver::switchToWindow() + */ + public function switchToWindow($name = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToWindow', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Switch to another frame on the page. + * + * Example: + * ``` html + *