Commit 71bb42d5c9093bb45130e2b5e678f5a913cd6b2e

Authored by Administrator
1 parent ecf49b1b

second

Showing 440 changed files with 45 additions and 285 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 440 files are displayed.

backend/assets/AdminLteAsset.php deleted
1   -<?php
2   -/**
3   - * @link http://www.yiiframework.com/
4   - * @copyright Copyright (c) 2008 Yii Software LLC
5   - * @license http://www.yiiframework.com/license/
6   - */
7   -
8   -namespace backend\assets;
9   -
10   -use yii\web\AssetBundle;
11   -
12   -/**
13   - * @author Qiang Xue <qiang.xue@gmail.com>
14   - * @since 2.0
15   - */
16   -class AdminLteAsset extends AssetBundle
17   -{
18   - public $sourcePath = '@bower/';
19   - public $css = [
20   - 'admin-lte/dist/css/AdminLTE.css',
21   - 'admin-lte/dist/css/skins/_all-skins.css'
22   - ];
23   -
24   - public $js = [
25   - 'admin-lte/dist/js/app.js',
26   -
27   - ];
28   - public $depends = [
29   - 'yii\web\YiiAsset',
30   - 'yii\bootstrap\BootstrapAsset',
31   - 'yii\bootstrap\BootstrapPluginAsset',
32   - 'backend\assets\FontAwesomeAsset',
33   - 'common\modules\file\FileUploadAsset'
34   - ];
35   -}
36 0 \ No newline at end of file
backend/assets/AppAsset.php deleted
1   -<?php
2   -/**
3   - * @link http://www.yiiframework.com/
4   - * @copyright Copyright (c) 2008 Yii Software LLC
5   - * @license http://www.yiiframework.com/license/
6   - */
7   -
8   -namespace backend\assets;
9   -
10   -use yii\web\AssetBundle;
11   -
12   -/**
13   - * @author Qiang Xue <qiang.xue@gmail.com>
14   - * @since 2.0
15   - */
16   -class AppAsset extends AssetBundle
17   -{
18   - public $basePath = '@webroot';
19   - public $baseUrl = '@web';
20   - public $css = [
21   - 'css/site.css',
22   - ];
23   - public $js = [
24   - 'js/fieldWidget.js',
25   - ];
26   - public $depends = [
27   - 'yii\web\YiiAsset',
28   - 'yii\bootstrap\BootstrapAsset',
29   - ];
30   -}
backend/assets/FontAwesomeAsset.php deleted
1   -<?php
2   -namespace backend\assets;
3   -
4   -use yii\web\AssetBundle;
5   -
6   -class FontAwesomeAsset extends AssetBundle
7   -{
8   - // The files are not web directory accessible, therefore we need
9   - // to specify the sourcePath property. Notice the @vendor alias used.
10   - public $sourcePath = '@vendor/fortawesome/font-awesome';
11   - public $css = [
12   - 'css/font-awesome.css',
13   - ];
14   -}
15 0 \ No newline at end of file
common/components/LangRequest.php deleted
1   -<?php
2   -
3   -namespace common\components;
4   -
5   -use Yii;
6   -use yii\base\InvalidConfigException;
7   -use yii\web\Request;
8   -use common\models\Language;
9   -use common\models\Page;
10   -use yii\helpers\Url;
11   -
12   -class LangRequest extends Request
13   -{
14   - private $_lang_url;
15   -
16   - public function getBaseUrl()
17   - {
18   - return str_replace ((IS_FRONT ? '/frontend/web' : '/backend/web'), '', parent::getBaseUrl()) . (IS_FRONT ? '' : '/admin');
19   - }
20   -
21   - public function getLangUrl()
22   - {
23   - if ($this->_lang_url === null)
24   - {
25   - $this->_lang_url = $this->getUrl();
26   -
27   - $url_list = explode ('/', $this->_lang_url);
28   -
29   - $lang_url = isset ($url_list[1]) ? $url_list[1] : null;
30   -
31   - Language::setCurrent($lang_url);
32   -
33   - if ($lang_url !== null && $lang_url === Language::getCurrent()->language_code
34   - && strpos($this->_lang_url, Language::getCurrent()->language_code) === 1)
35   - {
36   - $this->_lang_url = substr ($this->_lang_url, strlen (Language::getCurrent()->language_code) + 1);
37   - }
38   - }
39   -
40   - return $this->_lang_url;
41   - }
42   -
43   - protected function resolvePathInfo()
44   - {
45   - $pathInfo = $this->getLangUrl();
46   -
47   - if (($pos = strpos ($pathInfo, '?')) !== false)
48   - {
49   - $pathInfo = substr ($pathInfo, 0, $pos);
50   - }
51   -
52   - $pathInfo = urldecode ($pathInfo);
53   -
54   - // try to encode in UTF8 if not so
55   - // http://w3.org/International/questions/qa-forms-utf-8.html
56   - if (! preg_match ('%^(?:
57   - [\x09\x0A\x0D\x20-\x7E] # ASCII
58   - | [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
59   - | \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
60   - | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
61   - | \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
62   - | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
63   - | [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
64   - | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
65   - )*$%xs', $pathInfo)
66   - )
67   - {
68   - $pathInfo = utf8_encode($pathInfo);
69   - }
70   -
71   - $scriptUrl = $this->getScriptUrl();
72   -
73   - $baseUrl = $this->getBaseUrl();
74   -
75   - if (strpos($pathInfo, $scriptUrl) === 0)
76   - {
77   - $pathInfo = substr($pathInfo, strlen($scriptUrl));
78   - }
79   - else if ($baseUrl === '' || strpos($pathInfo, $baseUrl) === 0)
80   - {
81   - $pathInfo = substr($pathInfo, strlen($baseUrl));
82   - }
83   - elseif (isset ($_SERVER['PHP_SELF']) && strpos ($_SERVER['PHP_SELF'], $scriptUrl) === 0)
84   - {
85   - $pathInfo = substr($_SERVER['PHP_SELF'], strlen($scriptUrl));
86   - }
87   - else
88   - {
89   - throw new InvalidConfigException('Unable to determine the path info of the current request.');
90   - }
91   -
92   - if ($pathInfo[0] === '/')
93   - {
94   - $pathInfo = substr ($pathInfo, 1);
95   - }
96   -
97   - return (string) $pathInfo;
98   - }
99   -}
100 0 \ No newline at end of file
common/components/LangUrlManager.php deleted
1   -<?php
2   -
3   -namespace common\components;
4   -
5   -use yii\web\UrlManager;
6   -use common\models\Language;
7   -
8   -class LangUrlManager extends UrlManager
9   -{
10   - public function createUrl ($params)
11   - {
12   - if (isset ($params['language_id']))
13   - {
14   - //Если указан идентификатор языка, то делаем попытку найти язык в БД,
15   - //иначе работаем с языком по умолчанию
16   - if (($lang_code = Language::findOne($params['language_id'])) === null)
17   - {
18   - $lang_code = Language::getDefaultLang();
19   - }
20   -
21   - unset ($params['language_id']);
22   -
23   - }
24   - else
25   - {
26   - //Если не указан параметр языка, то работаем с текущим языком
27   - $lang_code = Language::getCurrent();
28   - }
29   -
30   - //Получаем сформированный URL(без префикса идентификатора языка)
31   - $url = parent::createUrl($params);
32   -
33   - // Добавляем к URL префикс - буквенный идентификатор языка
34   -
35   - return $url == '/' ? '/'.$url : ($lang_code->is_default == 1 ? $url : '/'.$lang_code->lang_code.$url);
36   - }
37   -}
38 0 \ No newline at end of file
common/components/urlManager/.htaccess 100644 → 100755
common/components/urlManager/LangRequest.php 100644 → 100755
common/components/urlManager/LangUrlManager.php 100644 → 100755
... ... @@ -24,8 +24,6 @@ class LangUrlManager extends UrlManager{
24 24  
25 25 if(!isset($params[$this->langParam])){ if(Yii::$app->language != $this->lang)$params[$this->langParam]=Yii::$app->language;}
26 26 else if($params[$this->langParam] == $this->lang)unset($params[$this->langParam]);
27   -
28   -
29 27 return parent::createUrl($params);
30 28 }
31 29 //put your code here
... ...
common/components/urlManager/LangUrlRule.php 100644 → 100755
common/config/main.php
1 1 <?php
2 2 return [
3   - 'language' => 'ru-RU',
  3 + 'language' => 'ru',
4 4 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
5 5 'controllerMap' => [
6 6 'elfinder' => [
... ... @@ -42,50 +42,7 @@ return [
42 42 'cache' => [
43 43 'class' => 'yii\caching\FileCache',
44 44 ],
45   - 'urlManager' => [
46   - 'enablePrettyUrl' => true,
47   - 'showScriptName' => false,
48   - 'rules' => [
49   - '' => 'site/index',
50   - 'login' => 'login/index',
51   - 'iam' => 'iam/index',
52   - 'text/<translit:\w+>' => 'text/index',
53   - '<language:(ru|ua|en)>/text/<translit:\w+>' => 'text/index',
54   - 'catalog' => 'catalog/all',
55   - 'catalog/<translit:\w+>' => 'catalog/index',
56   - 'products/search' => 'products/search',
57   - 'products/compare' => 'products/compare',
58   - 'products/<translit:\w+>' => 'products/index',
59   - 'products/<translit_rubric:\w+>/<translit:[\w\-]+>-<id:\d+>' => 'products/show',
60   - 'news/<translit:\w+>-<id:\d+>' => 'news/show',
61   - 'brends/<translit:[\w\-]+>' => 'brends/show',
62   - 'brends' => 'brends/index',
63   - 'blog' => 'articles/index',
64   - 'blog/<translit:[\w\-]+>-<id:\d+>' => 'articles/show',
65   - '<language:(ru|ua|en)>/<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',
66   - '<language:(ru|ua|en)>/<controller:\w+>/<action:\w+>' => '<controller>/<action>',
67   - '<language:(ru|ua|en)>/admin' => 'admin/default/index',
68   - '<language:(ru|ua|en)>/admin/users' => 'admin/users/index',
69   - 'admin' => 'admin/menu/index',
70   - 'admin/users' => 'admin/users/index',
71   - 'admin/users/save' => 'admin/users/save',
72   - 'admin/users/delete' => 'admin/users/delete',
73   - 'admin/menu' => 'admin/menu/index',
74   - 'admin/menu/save' => 'admin/menu/save',
75   - 'admin/menu/delete' => 'admin/menu/delete',
76   - 'admin/text' => 'admin/text/index',
77   - 'admin/text/save' => 'admin/text/save',
78   - 'admin/text/delete' => 'admin/text/delete',
79   - 'admin/catalog' => 'admin/catalog/index',
80   - 'admin/catalog/save' => 'admin/catalog/save',
81   - 'admin/catalog/delete' => 'admin/catalog/delete',
82   - 'module/<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',
83   - ],
84   - 'class' => 'common\components\urlManager\LangUrlManager',
85   - 'languages' => ['ru', 'ua', 'en'],
86   - 'lang' => 'ru',
87   - 'langParam' => 'language',
88   - ],
  45 +
89 46 'i18n' => [
90 47 'translations' => [
91 48 '*' => [
... ...
common/models/Bg.php 100644 → 100755
console/migrations/m160505_202248_bg.php 100644 → 100755
console/migrations/m160505_235100_page.php 100644 → 100755
frontend/assets/AppAsset.php 100644 → 100755
frontend/components/BgWidget.php 100644 → 100755
frontend/components/HreflangWidget.php 100644 → 100755
frontend/components/Text.php 100644 → 100755
frontend/config/main.php
... ... @@ -41,30 +41,49 @@ return [
41 41 'errorAction' => 'site/error',
42 42 ],
43 43  
44   - 'urlManager' => [
45   - 'baseUrl' => '/',
  44 + 'urlManager' => [
46 45 'enablePrettyUrl' => true,
47   - 'showScriptName' => false,
48   - 'rules' => [
49   - [
50   - 'class' => '\common\modules\product\CatalogUrlManager',
51   - 'route_map' => [
52   - 'catalog' => 'catalog/category',
53   - 'product' => 'catalog/product',
54   - 'brand' => 'catalog/brand',
55   - ]
56   - ],
57   - 'page/<translit:[A-Za-z0-9_-]++>'=>'page/show',
58   - 'event/view/<alias:[A-Za-z0-9_-]+>'=>'event/view',
59   - 'service/view/<alias:[A-Za-z0-9_-]+>'=>'service/view',
60   -//// 'catalog' => 'catalog/category',
61   -// 'catalog/<alias:[A-Za-z0-9_-]+>' => 'catalog/category',
62   -// 'catalog/<alias:[A-Za-z0-9_-]+>/<filter>' => 'catalog/category',
63   -// 'product/<alias:[A-Za-z0-9_-]+>' => 'catalog/product',
64   -// 'brand' => 'catalog/brands',
65   -// 'brand/<alias:[A-Za-z0-9_-]+>' => 'catalog/brand',
66   - ]
67   - ]
  46 + 'showScriptName' => false,
  47 + 'rules' => [
  48 + '' => 'site/index',
  49 + 'login' => 'login/index',
  50 + 'iam' => 'iam/index',
  51 + 'text/<translit:\w+>' => 'text/index',
  52 + '<language:(ru|ua|en)>/text/<translit:\w+>' => 'text/index',
  53 + 'catalog' => 'catalog/all',
  54 + 'catalog/<translit:\w+>' => 'catalog/index',
  55 + 'products/search' => 'products/search',
  56 + 'products/compare' => 'products/compare',
  57 + 'products/<translit:\w+>' => 'products/index',
  58 + 'products/<translit_rubric:\w+>/<translit:[\w\-]+>-<id:\d+>' => 'products/show',
  59 + 'news/<translit:\w+>-<id:\d+>' => 'news/show',
  60 + 'brends/<translit:[\w\-]+>' => 'brends/show',
  61 + 'brends' => 'brends/index',
  62 + 'blog' => 'articles/index',
  63 + 'blog/<translit:[\w\-]+>-<id:\d+>' => 'articles/show',
  64 + '<language:(ru|ua|en)>/<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',
  65 + '<language:(ru|ua|en)>/<controller:\w+>/<action:\w+>' => '<controller>/<action>',
  66 + '<language:(ru|ua|en)>/admin' => 'admin/default/index',
  67 + '<language:(ru|ua|en)>/admin/users' => 'admin/users/index',
  68 + 'admin' => 'admin/menu/index',
  69 + 'admin/users' => 'admin/users/index',
  70 + 'admin/users/save' => 'admin/users/save',
  71 + 'admin/users/delete' => 'admin/users/delete',
  72 + 'admin/menu' => 'admin/menu/index',
  73 + 'admin/menu/save' => 'admin/menu/save',
  74 + 'admin/menu/delete' => 'admin/menu/delete',
  75 + 'admin/text' => 'admin/text/index',
  76 + 'admin/text/save' => 'admin/text/save',
  77 + 'admin/text/delete' => 'admin/text/delete',
  78 + 'admin/catalog' => 'admin/catalog/index',
  79 + 'admin/catalog/save' => 'admin/catalog/save',
  80 + 'admin/catalog/delete' => 'admin/catalog/delete',
  81 + ],
  82 + 'class' => 'common\components\urlManager\LangUrlManager',
  83 + 'languages' => ['ru', 'ua', 'en'],
  84 + 'lang' => 'ru',
  85 + 'langParam' => 'language',
  86 + ],
68 87  
69 88 ],
70 89 'params' => $params,
... ...
frontend/controllers/ArticlesController.php 100644 → 100755
frontend/controllers/BasketController.php 100644 → 100755
frontend/controllers/BrendsController.php 100644 → 100755
frontend/controllers/CallController.php 100644 → 100755
frontend/controllers/CatalogController.php 100644 → 100755
frontend/controllers/IamController.php 100644 → 100755
frontend/controllers/LoginController.php 100644 → 100755
frontend/controllers/NewsController.php 100644 → 100755
frontend/controllers/ProductsController.php 100644 → 100755
frontend/controllers/RegController.php 100644 → 100755
frontend/controllers/SiteController.php 100644 → 100755
frontend/controllers/SubscribeController.php 100644 → 100755
frontend/controllers/TextController.php 100644 → 100755
frontend/controllers/error_log 100644 → 100755
frontend/views/articles/index.php 100644 → 100755
frontend/views/articles/show.php 100644 → 100755
frontend/views/basket/_popup.php 100644 → 100755
frontend/views/basket/ajax_info.php 100644 → 100755
frontend/views/basket/ajax_items.php 100644 → 100755
frontend/views/basket/index.php 100644 → 100755
frontend/views/basket/success.php 100644 → 100755
frontend/views/brends/index.php 100644 → 100755
frontend/views/brends/show.php 100644 → 100755
frontend/views/call/index.php 100644 → 100755
frontend/views/call/success.php 100644 → 100755
frontend/views/catalog/_catalog_box.php 100644 → 100755
frontend/views/catalog/all.php 100644 → 100755
frontend/views/catalog/index.php 100644 → 100755
frontend/views/iam/1person.php 100644 → 100755
frontend/views/iam/admin.php 100644 → 100755
frontend/views/iam/company.php 100644 → 100755
frontend/views/iam/customer.php 100644 → 100755
frontend/views/iam/edit_company.php 100644 → 100755
frontend/views/iam/edit_customer.php 100644 → 100755
frontend/views/iam/edit_person.php 100644 → 100755
frontend/views/iam/myorders.php 100644 → 100755
frontend/views/iam/person.php 100644 → 100755
frontend/views/iam/price.php 100644 → 100755
frontend/views/iam/share.php 100644 → 100755
frontend/views/iam/show_order.php 100644 → 100755
frontend/views/login/error_log 100644 → 100755
frontend/views/login/forgot.php 100644 → 100755
frontend/views/login/index.php 100644 → 100755
frontend/views/news/index.php 100644 → 100755
frontend/views/news/show.php 100644 → 100755
frontend/views/products/_product.php 100644 → 100755
frontend/views/products/_show.php 100644 → 100755
frontend/views/products/compare.php 100644 → 100755
frontend/views/products/index.php 100644 → 100755
frontend/views/products/search.php 100644 → 100755
frontend/views/products/show.php 100644 → 100755
frontend/views/reg/company.php 100644 → 100755
frontend/views/reg/customer.php 100644 → 100755
frontend/views/reg/person.php 100644 → 100755
frontend/views/site/_index.php 100644 → 100755
frontend/views/site/about.php 100644 → 100755
frontend/views/site/contact.php 100644 → 100755
frontend/views/site/error.php 100644 → 100755
frontend/views/site/error_log 100644 → 100755
frontend/views/site/index.php 100644 → 100755
frontend/views/site/login.php 100644 → 100755
frontend/views/subscribe/index.php 100644 → 100755
frontend/views/text/index.php 100644 → 100755
frontend/web/css/1style.css 100644 → 100755
frontend/web/css/_style.css 100644 → 100755
frontend/web/css/begunok.css 100644 → 100755
frontend/web/css/style.css 100644 → 100755
frontend/web/favicon.ico 100644 → 100755
No preview for this file type
frontend/web/files/.tmb/l1_c2l0ZV9leHRyZW1fbmV3X25ld3NfYnV0dG9uXzIuanBn1437031556.png 100644 → 100755

2.51 KB | W: | H:

2.51 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/_logo.png 100644 → 100755

3.56 KB | W: | H:

3.56 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/arrow-next.png 100644 → 100755

1.77 KB | W: | H:

1.77 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/arrow-prev.png 100644 → 100755

1.75 KB | W: | H:

1.75 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/artweb.png 100644 → 100755

1.46 KB | W: | H:

1.46 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/banner1.jpg 100644 → 100755

138 KB | W: | H:

138 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/banner_akciya.jpg 100644 → 100755

50.4 KB | W: | H:

50.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/begunok_slider.png 100644 → 100755

1.34 KB | W: | H:

1.34 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/buy.png 100644 → 100755

1.09 KB | W: | H:

1.09 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/children_sub.jpg 100644 → 100755

35.9 KB | W: | H:

35.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/close_modal.jpg 100644 → 100755

527 Bytes | W: | H:

527 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/del.png 100644 → 100755

1.02 KB | W: | H:

1.02 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/favicon.ico 100644 → 100755
No preview for this file type
frontend/web/img/help.png 100644 → 100755

1.18 KB | W: | H:

1.18 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin