diff --git a/common/components/Mailer.php b/common/components/Mailer.php new file mode 100644 index 0000000..d150fe0 --- /dev/null +++ b/common/components/Mailer.php @@ -0,0 +1,43 @@ +IsSMTP(); + + $mail->CharSet = 'UTF-8'; + $mail->Username = "dockdep@gmail.com"; + $mail->Password = "k0l0b04eg"; + $mail->SetFrom('dockdep@gmail.com'); + $mail->Subject = $this->subject; + $mail->MsgHTML($this->text); + $address = "dockdep@gmail.com"; + $mail->AddAddress($address); + if(!$mail->send()) { + \Yii::$app->getSession()->setFlash('error', 'Mailer Error: ' . $mail->ErrorInfo); + return 'Mailer Error: ' . $mail->ErrorInfo; + } else { + \Yii::$app->getSession()->setFlash('success', 'Мастер-приемщик свяжется с вами в ближайшее время'); + return 'Message has been sent'; + } + } + +} + diff --git a/common/models/Banner.php b/common/models/Banner.php index 74be80c..a2c8067 100644 --- a/common/models/Banner.php +++ b/common/models/Banner.php @@ -47,14 +47,14 @@ class Banner extends \yii\db\ActiveRecord public function attributeLabels() { return [ - 'banner_id' => Yii::t('app', 'Banner 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'), - 'width' => Yii::t('app', 'Width'), - 'height' => Yii::t('app', 'Height'), + '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'), ]; } } diff --git a/common/models/Blog.php b/common/models/Blog.php index 1547b6b..5375804 100755 --- a/common/models/Blog.php +++ b/common/models/Blog.php @@ -93,15 +93,15 @@ public function attributeLabels() { return [ - 'blog_id' => Yii::t('app', 'Blog ID'), - 'user_id' => Yii::t('app', 'User ID'), - 'name' => Yii::t('app', 'Название'), - 'link' => Yii::t('app', 'URL'), - 'date_add' => Yii::t('app', 'Дата добавления'), - 'user_add_id' => Yii::t('app', 'User Add ID'), - 'view_count' => Yii::t('app', 'Количество просмотров'), - 'description' => Yii::t('app', 'Описание'), - 'cover' => Yii::t('app', 'Фото главное'), + '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'), ]; } } diff --git a/common/models/Customers.php b/common/models/Customers.php index fc01726..32c1176 100755 --- a/common/models/Customers.php +++ b/common/models/Customers.php @@ -79,16 +79,16 @@ class Customers extends User { return [ 'id' => Yii::t('app', 'ID'), - 'username' => Yii::t('app', 'Username'), - 'surname' => Yii::t('app', 'Surname'), - 'auth_key' => Yii::t('app', 'Auth Key'), - 'password_hash' => Yii::t('app', 'Password Hash'), - 'password_reset_token' => Yii::t('app', 'Password Reset Token'), - 'email' => Yii::t('app', 'Email'), - 'phone' => Yii::t('app', 'Phone'), - 'status' => Yii::t('app', 'Status'), - 'created_at' => Yii::t('app', 'Created At'), - 'updated_at' => Yii::t('app', 'Updated At'), + 'username' => Yii::t('app', 'username'), + 'surname' => Yii::t('app', 'surname'), + 'auth_key' => Yii::t('app', 'auth_key'), + 'password_hash' => Yii::t('app', 'password_hash'), + 'password_reset_token' => Yii::t('app', 'password_reset_token'), + 'email' => Yii::t('app', 'email'), + 'phone' => Yii::t('app', 'phone'), + 'status' => Yii::t('app', 'status'), + 'created_at' => Yii::t('app', 'created_at'), + 'updated_at' => Yii::t('app', 'updated_at'), ]; } } diff --git a/common/models/Event.php b/common/models/Event.php index a65e8bd..d091c63 100644 --- a/common/models/Event.php +++ b/common/models/Event.php @@ -85,18 +85,18 @@ class Event extends \yii\db\ActiveRecord 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'), + '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'), ]; } } diff --git a/common/models/OrderItems.php b/common/models/OrderItems.php index e148f5d..852565f 100755 --- a/common/models/OrderItems.php +++ b/common/models/OrderItems.php @@ -46,11 +46,11 @@ class OrderItems extends \yii\db\ActiveRecord public function attributeLabels() { return [ - 'order_items_id' => Yii::t('app', 'Order Items ID'), - 'order_id' => Yii::t('app', 'Order ID'), - 'item_id' => Yii::t('app', 'Item ID'), - 'item_count' => Yii::t('app', 'Item Count'), - 'price' => Yii::t('app', 'Price'), + 'order_items_id' => Yii::t('app', 'order_items_id'), + 'order_id' => Yii::t('app', 'order_id'), + 'item_id' => Yii::t('app', 'item_id'), + 'item_count' => Yii::t('app', 'item_count'), + 'price' => Yii::t('app', 'price'), ]; } diff --git a/common/models/Orders.php b/common/models/Orders.php index ea746ef..47d8fa4 100755 --- a/common/models/Orders.php +++ b/common/models/Orders.php @@ -82,17 +82,17 @@ class Orders extends \yii\db\ActiveRecord public function attributeLabels() { return [ - 'order_id' => Yii::t('app', 'Order ID'), - 'customer_id' => Yii::t('app', 'Customer ID'), - 'name' => Yii::t('app', 'Name'), - 'email' => Yii::t('app', 'Email'), - 'phone' => Yii::t('app', 'Phone'), - 'delivery' => Yii::t('app', 'Delivery'), - 'payment' => Yii::t('app', 'Payment'), - 'code' => Yii::t('app', 'Code'), - 'status' => Yii::t('app', 'Status'), - 'created_at' => Yii::t('app', 'Created At'), - 'updated_at' => Yii::t('app', 'Updated At'), + 'order_id' => Yii::t('app', 'order_id'), + 'customer_id' => Yii::t('app', 'customer_id'), + 'name' => Yii::t('app', 'name'), + 'email' => Yii::t('app', 'email'), + 'phone' => Yii::t('app', 'phone'), + 'delivery' => Yii::t('app', 'delivery'), + 'payment' => Yii::t('app', 'payment'), + 'code' => Yii::t('app', 'code'), + 'status' => Yii::t('app', 'status'), + 'created_at' => Yii::t('app', 'created_at'), + 'updated_at' => Yii::t('app', 'updated_at'), ]; } diff --git a/common/models/Page.php b/common/models/Page.php index 0644205..76d62c4 100644 --- a/common/models/Page.php +++ b/common/models/Page.php @@ -46,15 +46,15 @@ class Page extends \yii\db\ActiveRecord public function attributeLabels() { return [ - 'id' => 'ID', - 'name' => 'Название', - 'alias' => 'alias', - 'title' => 'Title', - 'body' => 'Body', - 'meta_title' => 'Meta Title', - 'description' => 'Description', - 'h1' => 'H1', - 'seo_text' => 'Seo Text', + 'id' => Yii::t('app', 'id'), + 'name' => Yii::t('app', 'name'), + 'alias' => Yii::t('app', 'alias'), + 'title' => Yii::t('app', 'title'), + 'body' => Yii::t('app', 'body'), + 'meta_title' => 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/Seo.php b/common/models/Seo.php index 968ca81..8fccb9a 100644 --- a/common/models/Seo.php +++ b/common/models/Seo.php @@ -42,12 +42,12 @@ class Seo extends \yii\db\ActiveRecord public function attributeLabels() { return [ - 'seo_id' => Yii::t('app', 'Seo ID'), - 'url' => Yii::t('app', 'Url'), - 'title' => Yii::t('app', 'Title'), - 'description' => Yii::t('app', 'Description'), - 'h1' => Yii::t('app', 'H1'), - 'seo_text' => Yii::t('app', 'Seo Text'), + 'seo_id' => Yii::t('app', 'seo_id'), + 'url' => Yii::t('app', 'url'), + 'title' => Yii::t('app', '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 index 74757d9..4cd7459 100644 --- a/common/models/SeoCategory.php +++ b/common/models/SeoCategory.php @@ -42,10 +42,10 @@ class SeoCategory extends \yii\db\ActiveRecord 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'), + 'seo_category_id' => Yii::t('app', 'seo_category_id'), + 'name' => Yii::t('app', 'name'), + 'controller' => Yii::t('app', 'controller'), + 'status' => Yii::t('app', 'status'), ]; } diff --git a/common/models/SeoDynamic.php b/common/models/SeoDynamic.php index 54f9a6a..7ec02cd 100644 --- a/common/models/SeoDynamic.php +++ b/common/models/SeoDynamic.php @@ -52,18 +52,18 @@ class SeoDynamic extends \yii\db\ActiveRecord 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'), - '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'), + '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'), + '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'), ]; } diff --git a/common/models/Service.php b/common/models/Service.php index e368e03..05ed8f8 100644 --- a/common/models/Service.php +++ b/common/models/Service.php @@ -65,17 +65,17 @@ class Service extends \yii\db\ActiveRecord 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'), + '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/Slider.php b/common/models/Slider.php index 61186fd..4ce0975 100755 --- a/common/models/Slider.php +++ b/common/models/Slider.php @@ -48,13 +48,13 @@ class Slider extends \yii\db\ActiveRecord 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'), + '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'), ]; } diff --git a/common/models/SliderImage.php b/common/models/SliderImage.php index 22a0abd..a759c26 100644 --- a/common/models/SliderImage.php +++ b/common/models/SliderImage.php @@ -48,15 +48,15 @@ class SliderImage extends \yii\db\ActiveRecord 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'), - 'price' => Yii::t('app', 'Price'), + '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'), + 'price' => Yii::t('app', 'price'), ]; } diff --git a/common/translation/ru/app.php b/common/translation/ru/app.php index 9397773..e1eea62 100755 --- a/common/translation/ru/app.php +++ b/common/translation/ru/app.php @@ -8,7 +8,7 @@ return [ 'password_reset_token' => 'Password Reset Token', 'email' => 'Логин (e-mail)', 'phone' => 'Телефон', - 'status' => 'Status', + 'status' => 'Статус', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'verifyCode' => 'Код проверки', @@ -32,4 +32,50 @@ return [ '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/composer.json b/composer.json index a7b5861..adf08b5 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,9 @@ "FortAwesome/Font-Awesome": "*", "kartik-v/yii2-widget-datepicker": "*", "unclead/yii2-multiple-input": "~1.0", - "codeception/codeception":"*" + "codeception/codeception":"*", + "phpmailer/phpmailer": "^5.2", + "league/oauth2-client": "^1.3" }, "require-dev": { "yiisoft/yii2-codeception": "*", diff --git a/composer.lock b/composer.lock index dfb8f78..52d5386 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "a7d36c8cf4be5f624bef0426936b9594", - "content-hash": "1e53816a430c74ec792d83ade8eac412", + "hash": "d817e95d434dbdfff82796cc0b6e9c9e", + "content-hash": "a704572d721b5adc21f823d363fcd4de", "packages": [ { "name": "2amigos/yii2-transliterator-helper", @@ -559,7 +559,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/a04ceaea52d2a050d8df19df1a85fb1b24456477", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/c3a92199d02598de6fb59fa57913a10909628e4f", "reference": "a04ceaea52d2a050d8df19df1a85fb1b24456477", "shasum": "" }, @@ -739,7 +739,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/416fb8ad1d095a87f1d21bc40711843cd122fd4a", "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", "shasum": "" }, @@ -880,7 +880,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FortAwesome/Font-Awesome/zipball/f97ab41d187553e86abb8c7f6c057c9c0b88de58", + "url": "https://api.github.com/repos/FortAwesome/Font-Awesome/zipball/06b2efcda0d4612eccdaf8b79ae428fd079f2dfb", "reference": "f97ab41d187553e86abb8c7f6c057c9c0b88de58", "shasum": "" }, @@ -928,7 +928,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/85cb758d7367f3aaaa8ffc9269e777919c5f68bb", "reference": "d094e337976dff9d8e2424e8485872194e768662", "shasum": "" }, @@ -1147,6 +1147,106 @@ "time": "2014-06-13 10:54:04" }, { + "name": "ircmaxell/random-lib", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/ircmaxell/RandomLib.git", + "reference": "ad6a37d7bce67b0954be63feb1b4c47da77c527f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ircmaxell/RandomLib/zipball/ad6a37d7bce67b0954be63feb1b4c47da77c527f", + "reference": "ad6a37d7bce67b0954be63feb1b4c47da77c527f", + "shasum": "" + }, + "require": { + "ircmaxell/security-lib": "1.1.*@dev", + "php": ">=5.3.2" + }, + "require-dev": { + "mikey179/vfsstream": "1.1.*", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "RandomLib": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthony Ferrara", + "email": "ircmaxell@ircmaxell.com", + "homepage": "http://blog.ircmaxell.com" + } + ], + "description": "A Library For Generating Secure Random Numbers", + "homepage": "https://github.com/ircmaxell/RandomLib", + "keywords": [ + "cryptography", + "random", + "random-numbers", + "random-strings" + ], + "time": "2016-02-22 13:55:31" + }, + { + "name": "ircmaxell/security-lib", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/ircmaxell/SecurityLib.git", + "reference": "f3db6de12c20c9bcd1aa3db4353a1bbe0e44e1b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ircmaxell/SecurityLib/zipball/f3db6de12c20c9bcd1aa3db4353a1bbe0e44e1b5", + "reference": "f3db6de12c20c9bcd1aa3db4353a1bbe0e44e1b5", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "mikey179/vfsstream": "1.1.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "SecurityLib": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthony Ferrara", + "email": "ircmaxell@ircmaxell.com", + "homepage": "http://blog.ircmaxell.com" + } + ], + "description": "A Base Security Library", + "homepage": "https://github.com/ircmaxell/SecurityLib", + "time": "2015-03-20 14:31:23" + }, + { "name": "kartik-v/yii2-krajee-base", "version": "dev-master", "source": { @@ -1156,7 +1256,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kartik-v/yii2-krajee-base/zipball/3e491e51ed742663b239cd6e0b7f76d403bed7e1", + "url": "https://api.github.com/repos/kartik-v/yii2-krajee-base/zipball/3115b09aeb15a5e06f38dc16860baf153d9bf70e", "reference": "3e491e51ed742663b239cd6e0b7f76d403bed7e1", "shasum": "" }, @@ -1207,7 +1307,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kartik-v/yii2-widget-colorinput/zipball/18537fcdab0f5491d5eebff8e2464ef6a616ee4c", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-colorinput/zipball/1a10c5e9a528270e22dc8a5eba404c72f417665a", "reference": "18537fcdab0f5491d5eebff8e2464ef6a616ee4c", "shasum": "" }, @@ -1261,7 +1361,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kartik-v/yii2-widget-datepicker/zipball/3f7b38886e334a2c8c4262f155d98812461efd36", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-datepicker/zipball/52606c8764a174aa0d5e6483ed811f617c74ee4e", "reference": "3f7b38886e334a2c8c4262f155d98812461efd36", "shasum": "" }, @@ -1359,6 +1459,69 @@ "time": "2016-03-10 11:33:59" }, { + "name": "league/oauth2-client", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/oauth2-client.git", + "reference": "5e5c0bc5bd219515c8d8db8bcb61f19753101b7c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/oauth2-client/zipball/5e5c0bc5bd219515c8d8db8bcb61f19753101b7c", + "reference": "5e5c0bc5bd219515c8d8db8bcb61f19753101b7c", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "guzzlehttp/guzzle": "~6.0", + "ircmaxell/random-lib": "~1.1", + "php": ">=5.5.0" + }, + "require-dev": { + "jakub-onderka/php-parallel-lint": "0.8.*", + "mockery/mockery": "~0.9", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "0.6.*", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\OAuth2\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alex Bilbie", + "email": "hello@alexbilbie.com", + "homepage": "http://www.alexbilbie.com", + "role": "Developer" + } + ], + "description": "OAuth 2.0 Client Library", + "keywords": [ + "Authentication", + "SSO", + "authorization", + "identity", + "idp", + "oauth", + "oauth2", + "single sign on" + ], + "time": "2016-02-13 20:18:03" + }, + { "name": "lusitanian/oauth", "version": "v0.3.6", "source": { @@ -1670,6 +1833,60 @@ "time": "2015-02-03 12:10:50" }, { + "name": "phpmailer/phpmailer", + "version": "5.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "3d4e3b1a0da0a33889f8b0b2afda6ad4f6d011b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/3d4e3b1a0da0a33889f8b0b2afda6ad4f6d011b5", + "reference": "3d4e3b1a0da0a33889f8b0b2afda6ad4f6d011b5", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "4.*" + }, + "suggest": { + "league/oauth2-client": "Needed for XOAUTH2 authentication" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "time": "2016-04-07 09:04:03" + }, + { "name": "phpspec/prophecy", "version": "dev-master", "source": { @@ -1981,7 +2198,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1a1b63266c046e1856fd03812a4e0ac2b51aa2d5", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/496745aeba741e63b7149da3e1f712d441751182", "reference": "1a1b63266c046e1856fd03812a4e0ac2b51aa2d5", "shasum": "" }, @@ -2743,7 +2960,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/6b1175135bc2a74c08a28d89761272de8beed8cd", + "url": "https://api.github.com/repos/symfony/console/zipball/7541c505d2b804cc65a4edf90a6f1cb496523fef", "reference": "6b1175135bc2a74c08a28d89761272de8beed8cd", "shasum": "" }, @@ -2856,7 +3073,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/18a06d7a9af41718c20764a674a0ebba3bc40d1f", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/49b588841225b205700e5122fa01911cabada857", "reference": "18a06d7a9af41718c20764a674a0ebba3bc40d1f", "shasum": "" }, @@ -2912,7 +3129,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9002dcf018d884d294b1ef20a6f968efc1128f39", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/17b04e6b1ede45b57d3ad5146abe50df6c3968b4", "reference": "9002dcf018d884d294b1ef20a6f968efc1128f39", "shasum": "" }, @@ -3174,7 +3391,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/bcc317666439a8ec1dc28874e0577b860b6dd6b3", + "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/b7e62df2cfa1dfab4e70223770a99c3798d4a412", "reference": "bcc317666439a8ec1dc28874e0577b860b6dd6b3", "shasum": "" }, @@ -3268,7 +3485,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/4dd9f52e2a376a875d998de6ab4c381291b0c69e", + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/772b610ea7940059584f9220f7b87e4b2b1a0e78", "reference": "4dd9f52e2a376a875d998de6ab4c381291b0c69e", "shasum": "" }, @@ -3318,7 +3535,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/348122de0b2c2e343b579f93fcda1da78cab4912", + "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/f5fe6ba58dbc92b37daed5d9bd94cda777852ee4", "reference": "348122de0b2c2e343b579f93fcda1da78cab4912", "shasum": "" }, @@ -3365,7 +3582,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-imagine/zipball/a6c34ef6b69fb4670ba987ce4b9cfdb2131a8b99", + "url": "https://api.github.com/repos/yiisoft/yii2-imagine/zipball/3be1ecc324aa156a97f03e3fc59045c8d61be1f8", "reference": "a6c34ef6b69fb4670ba987ce4b9cfdb2131a8b99", "shasum": "" }, @@ -3413,7 +3630,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-jui/zipball/69cd9763b4807dbbce367d599dc615c5b8a8ef4f", + "url": "https://api.github.com/repos/yiisoft/yii2-jui/zipball/9ab9a2cb17cd7f13921339e11e5146295cf39083", "reference": "69cd9763b4807dbbce367d599dc615c5b8a8ef4f", "shasum": "" }, @@ -3463,7 +3680,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/20775fef1047cd927908270a8d7983580304eb57", + "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/163b9c6273e133c43a596aef46a9f5b1537731f9", "reference": "20775fef1047cd927908270a8d7983580304eb57", "shasum": "" }, @@ -3542,7 +3759,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/8deb6343c80c4edf546a6fff01a2b05c7dc59ac4", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/1c33e894fbbad6cf65bd42871719cd33227ed6a7", "reference": "8deb6343c80c4edf546a6fff01a2b05c7dc59ac4", "shasum": "" }, @@ -3592,7 +3809,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/php-diff/zipball/30e103d19519fe678ae64a60d77884ef3d71b28a", + "url": "https://api.github.com/repos/phpspec/php-diff/zipball/0464787bfa7cd13576c5a1e318709768798bec6a", "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a", "shasum": "" }, @@ -3626,7 +3843,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-codeception/zipball/e01b3c46917b3f00c42f6a4aabf612cc36d792e6", + "url": "https://api.github.com/repos/yiisoft/yii2-codeception/zipball/572a6d46d942cc5733c45931fdbd1d60228f3c89", "reference": "e01b3c46917b3f00c42f6a4aabf612cc36d792e6", "shasum": "" }, @@ -3671,7 +3888,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/081795536b31d29106b0d1de0cb3aefa3e05e995", + "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/e26905af4bc1ca5ecbababac112c7f7f722cabd2", "reference": "081795536b31d29106b0d1de0cb3aefa3e05e995", "shasum": "" }, @@ -3718,7 +3935,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-faker/zipball/a8daa97749e7154d91676405a1c59ed81e1ca999", + "url": "https://api.github.com/repos/yiisoft/yii2-faker/zipball/6e6eb430809e3f9c05e367303909a05a4912d4c0", "reference": "a8daa97749e7154d91676405a1c59ed81e1ca999", "shasum": "" }, @@ -3765,7 +3982,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/989d6c52c92e51f0d562729c329ee1012191cba2", + "url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/70edab5a7938b5bf4b5dc3ad1e1c3ce673552f48", "reference": "989d6c52c92e51f0d562729c329ee1012191cba2", "shasum": "" }, diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index b6b60fb..f777f79 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -1,6 +1,7 @@ render('index'); } + + public function actionMail(){ + $num = Yii::$app->request->post('num'); + $type = Yii::$app->request->post('type'); + + switch ($type) { + case 'call_me': + if(!empty($num)){ + return json_encode(Mailer::widget(['text' => $num, 'subject' => 'Обратный звонок'])); + } + + break; + + } + } + /** * Logs in a user. * diff --git a/frontend/views/event/view.php b/frontend/views/event/view.php index fdc644a..b6e8727 100644 --- a/frontend/views/event/view.php +++ b/frontend/views/event/view.php @@ -47,5 +47,5 @@ $this->params['name'] = $this->title; ?>