diff --git a/.htaccess b/.htaccess index f261e70..1640484 100755 --- a/.htaccess +++ b/.htaccess @@ -88,73 +88,73 @@ AddDefaultCharset utf-8 -#для возможности загрузки файлов парсера - - 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 - +##для возможности загрузки файлов парсера +# +# 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/common/widgets/Mailer.php b/common/widgets/Mailer.php index 26332f8..d0f0ecd 100755 --- a/common/widgets/Mailer.php +++ b/common/widgets/Mailer.php @@ -25,20 +25,19 @@ class Mailer extends Widget{ $mail->IsSMTP(); $mail->CharSet = 'UTF-8'; -// $mail->SMTPDebug = 1; +// $mail->SMTPDebug = 2; $mail->SMTPAuth = true; $mail->SMTPSecure = 'ssl'; $mail->Host = "smtp.gmail.com"; - $mail->Port = 465; // or 587 - $mail->IsHTML(true); - $mail->Username = "login@gmail.com"; // Google email account - $mail->Password = "password"; // Password to this account + $mail->Port = 465; // 465 or 587 + $mail->Username = "nissanleaf17@gmail.com"; // Google email account + $mail->Password = "parol123"; // Password to this account $mail->SetFrom("leaf@electrocars.ua"); $mail->isHTML(true); $mail->Subject = $this->subject; $mail->Body = $this->render($this->type, ['params' => $this->params]); - $mail->AddAddress('zhegal@gmail.com'); - $mail->AddAddress('pmartweb1@gmail.com'); + $mail->AddAddress('kennen.md@gmail.com'); +// $mail->AddAddress('pmartweb1@gmail.com'); if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { diff --git a/common/widgets/views/buy.php b/common/widgets/views/buy.php index 0e38417..4adf0b1 100755 --- a/common/widgets/views/buy.php +++ b/common/widgets/views/buy.php @@ -1,6 +1,13 @@ + + Name:
Phone:
Email:
-Model:
-Year:
-Color: \ No newline at end of file +Model: model ?>
+Year: year ?>
+Color: color ?> \ No newline at end of file diff --git a/composer.lock b/composer.lock index 4517d12..a33ce21 100755 --- a/composer.lock +++ b/composer.lock @@ -9,20 +9,20 @@ "packages": [ { "name": "bower-asset/bootstrap", - "version": "v3.3.5", + "version": "v3.3.7", "source": { "type": "git", "url": "https://github.com/twbs/bootstrap.git", - "reference": "16b48259a62f576e52c903c476bd42b90ab22482" + "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twbs/bootstrap/zipball/16b48259a62f576e52c903c476bd42b90ab22482", - "reference": "16b48259a62f576e52c903c476bd42b90ab22482", + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/0b9c4a4007c44201dce9a6cc1a38407005c26c86", + "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86", "shasum": "" }, "require": { - "bower-asset/jquery": ">=1.9.1" + "bower-asset/jquery": ">=1.9.1,<=3" }, "type": "bower-asset-library", "extra": { @@ -114,16 +114,16 @@ }, { "name": "bower-asset/jquery.inputmask", - "version": "3.2.7", + "version": "3.3.4", "source": { "type": "git", - "url": "https://github.com/RobinHerbots/jquery.inputmask.git", - "reference": "5a72c563b502b8e05958a524cdfffafe9987be38" + "url": "https://github.com/RobinHerbots/Inputmask.git", + "reference": "8a882bc471ba4077c4f8ecbe3d9d61c7558f3ef2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RobinHerbots/jquery.inputmask/zipball/5a72c563b502b8e05958a524cdfffafe9987be38", - "reference": "5a72c563b502b8e05958a524cdfffafe9987be38", + "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/8a882bc471ba4077c4f8ecbe3d9d61c7558f3ef2", + "reference": "8a882bc471ba4077c4f8ecbe3d9d61c7558f3ef2", "shasum": "" }, "require": { @@ -132,7 +132,14 @@ "type": "bower-asset-library", "extra": { "bower-asset-main": [ - "./dist/inputmask/inputmask.js" + "./dist/inputmask/inputmask.dependencyLib", + "./dist/inputmask/inputmask", + "./dist/inputmask/inputmask.extensions", + "./dist/inputmask/inputmask.date.extensions", + "./dist/inputmask/inputmask.numeric.extensions", + "./dist/inputmask/inputmask.phone.extensions", + "./dist/inputmask/inputmask.regex.extensions", + "./dist/inputmask/jquery.inputmask" ], "bower-asset-ignore": [ "**/*", @@ -226,12 +233,12 @@ "source": { "type": "git", "url": "https://github.com/cebe/markdown.git", - "reference": "04bfcaa26356cf86c6c4a2420eb95857a86e03ab" + "reference": "8287ddea024caa2a79f59077b3db50d4ff0c65ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cebe/markdown/zipball/04bfcaa26356cf86c6c4a2420eb95857a86e03ab", - "reference": "04bfcaa26356cf86c6c4a2420eb95857a86e03ab", + "url": "https://api.github.com/repos/cebe/markdown/zipball/8287ddea024caa2a79f59077b3db50d4ff0c65ad", + "reference": "8287ddea024caa2a79f59077b3db50d4ff0c65ad", "shasum": "" }, "require": { @@ -278,20 +285,20 @@ "markdown", "markdown-extra" ], - "time": "2016-06-20 21:09:53" + "time": "2016-12-11 13:37:11" }, { "name": "ezyang/htmlpurifier", - "version": "v4.7.0", + "version": "v4.8.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "ae1828d955112356f7677c465f94f7deb7d27a40" + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/ae1828d955112356f7677c465f94f7deb7d27a40", - "reference": "ae1828d955112356f7677c465f94f7deb7d27a40", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", "shasum": "" }, "require": { @@ -322,7 +329,7 @@ "keywords": [ "html" ], - "time": "2015-08-05 01:03:42" + "time": "2016-07-16 12:58:58" }, { "name": "kartik-v/bootstrap-fileinput", @@ -330,12 +337,12 @@ "source": { "type": "git", "url": "https://github.com/kartik-v/bootstrap-fileinput.git", - "reference": "8dd9021a6678d176bdbcd1e7cbb8c8b4169e50e8" + "reference": "18b3f68ac20f0db91cf4f4aee852d98f4f4ca9b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kartik-v/bootstrap-fileinput/zipball/8dd9021a6678d176bdbcd1e7cbb8c8b4169e50e8", - "reference": "8dd9021a6678d176bdbcd1e7cbb8c8b4169e50e8", + "url": "https://api.github.com/repos/kartik-v/bootstrap-fileinput/zipball/18b3f68ac20f0db91cf4f4aee852d98f4f4ca9b0", + "reference": "18b3f68ac20f0db91cf4f4aee852d98f4f4ca9b0", "shasum": "" }, "type": "library", @@ -375,7 +382,7 @@ "progress", "upload" ], - "time": "2016-07-11 09:07:59" + "time": "2016-12-28 01:34:20" }, { "name": "kartik-v/yii2-krajee-base", @@ -383,12 +390,12 @@ "source": { "type": "git", "url": "https://github.com/kartik-v/yii2-krajee-base.git", - "reference": "473fb568ff1144dc49bdb74f40a5d7f025fc72e4" + "reference": "52e623e54d06b853fda01a6529ccca93ed2a7f66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kartik-v/yii2-krajee-base/zipball/473fb568ff1144dc49bdb74f40a5d7f025fc72e4", - "reference": "473fb568ff1144dc49bdb74f40a5d7f025fc72e4", + "url": "https://api.github.com/repos/kartik-v/yii2-krajee-base/zipball/52e623e54d06b853fda01a6529ccca93ed2a7f66", + "reference": "52e623e54d06b853fda01a6529ccca93ed2a7f66", "shasum": "" }, "require": { @@ -426,7 +433,7 @@ "widget", "yii2" ], - "time": "2016-06-02 16:20:24" + "time": "2016-11-26 09:53:44" }, { "name": "kartik-v/yii2-widget-fileinput", @@ -434,12 +441,12 @@ "source": { "type": "git", "url": "https://github.com/kartik-v/yii2-widget-fileinput.git", - "reference": "b0fb41e4290fc4aa35a49a977bf4484cb30f8ff9" + "reference": "744e12c1f5be45357ec50eea6f678ecc9ba67dc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kartik-v/yii2-widget-fileinput/zipball/b0fb41e4290fc4aa35a49a977bf4484cb30f8ff9", - "reference": "b0fb41e4290fc4aa35a49a977bf4484cb30f8ff9", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-fileinput/zipball/744e12c1f5be45357ec50eea6f678ecc9ba67dc2", + "reference": "744e12c1f5be45357ec50eea6f678ecc9ba67dc2", "shasum": "" }, "require": { @@ -481,20 +488,20 @@ "widget", "yii2" ], - "time": "2016-07-06 19:27:12" + "time": "2016-10-18 06:35:15" }, { "name": "phpmailer/phpmailer", - "version": "v5.2.16", + "version": "v5.2.19", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a" + "reference": "9e4b8fb3deb7d9cfa515c04cec41f71bc37ce9a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a", - "reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9e4b8fb3deb7d9cfa515c04cec41f71bc37ce9a9", + "reference": "9e4b8fb3deb7d9cfa515c04cec41f71bc37ce9a9", "shasum": "" }, "require": { @@ -541,7 +548,7 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "time": "2016-06-06 09:09:37" + "time": "2016-12-26 10:09:10" }, { "name": "swiftmailer/swiftmailer", @@ -549,12 +556,12 @@ "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "17ba8f8fc03074f90771e52b226698e37bc2c115" + "reference": "3547577659c1a035093b70fce5ae393b3c94f44e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/17ba8f8fc03074f90771e52b226698e37bc2c115", - "reference": "17ba8f8fc03074f90771e52b226698e37bc2c115", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/3547577659c1a035093b70fce5ae393b3c94f44e", + "reference": "3547577659c1a035093b70fce5ae393b3c94f44e", "shasum": "" }, "require": { @@ -594,7 +601,7 @@ "mail", "mailer" ], - "time": "2016-07-09 18:06:48" + "time": "2016-12-20 05:27:43" }, { "name": "yiisoft/yii2", @@ -602,17 +609,17 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-framework.git", - "reference": "8c276b391701c3b5edfebc126da4e5361cfa0f01" + "reference": "c637e494ebb0cfa404a2475f95135bdaac826a78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/8c276b391701c3b5edfebc126da4e5361cfa0f01", - "reference": "8c276b391701c3b5edfebc126da4e5361cfa0f01", + "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/c637e494ebb0cfa404a2475f95135bdaac826a78", + "reference": "c637e494ebb0cfa404a2475f95135bdaac826a78", "shasum": "" }, "require": { "bower-asset/jquery": "2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", - "bower-asset/jquery.inputmask": "~3.2.2", + "bower-asset/jquery.inputmask": "~3.2.2 | ~3.3.3", "bower-asset/punycode": "1.3.*", "bower-asset/yii2-pjax": "~2.0.1", "cebe/markdown": "~1.0.0 | ~1.1.0", @@ -688,7 +695,7 @@ "framework", "yii2" ], - "time": "2016-07-14 09:38:26" + "time": "2016-12-27 20:35:45" }, { "name": "yiisoft/yii2-bootstrap", @@ -696,17 +703,17 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-bootstrap.git", - "reference": "a7a9282477c9e5f0d63c16b94652fd0fe039e79e" + "reference": "bd2427e162226297891670c77be286385ca4805c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/a7a9282477c9e5f0d63c16b94652fd0fe039e79e", - "reference": "a7a9282477c9e5f0d63c16b94652fd0fe039e79e", + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/bd2427e162226297891670c77be286385ca4805c", + "reference": "bd2427e162226297891670c77be286385ca4805c", "shasum": "" }, "require": { "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", - "yiisoft/yii2": ">=2.0.6" + "yiisoft/yii2": "~2.0.6" }, "type": "yii2-extension", "extra": { @@ -738,7 +745,7 @@ "bootstrap", "yii2" ], - "time": "2016-07-12 10:21:49" + "time": "2016-12-19 12:53:18" }, { "name": "yiisoft/yii2-composer", @@ -746,17 +753,20 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-composer.git", - "reference": "e882cc327a6935a41f2e8665b9ef0317f6852d4d" + "reference": "b2590a802a6f747a034893f8bfbeac57fc9ffa77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/e882cc327a6935a41f2e8665b9ef0317f6852d4d", - "reference": "e882cc327a6935a41f2e8665b9ef0317f6852d4d", + "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/b2590a802a6f747a034893f8bfbeac57fc9ffa77", + "reference": "b2590a802a6f747a034893f8bfbeac57fc9ffa77", "shasum": "" }, "require": { "composer-plugin-api": "^1.0" }, + "require-dev": { + "composer/composer": "^1.0" + }, "type": "composer-plugin", "extra": { "class": "yii\\composer\\Plugin", @@ -785,7 +795,7 @@ "extension installer", "yii2" ], - "time": "2016-06-05 20:34:32" + "time": "2016-12-20 13:33:37" }, { "name": "yiisoft/yii2-jui", @@ -793,17 +803,17 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-jui.git", - "reference": "1612593ac710975c235e75708b69fa9ee375ab46" + "reference": "8c239b90f7f74d2c1d2d4b493c494287ea435ec7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-jui/zipball/1612593ac710975c235e75708b69fa9ee375ab46", - "reference": "1612593ac710975c235e75708b69fa9ee375ab46", + "url": "https://api.github.com/repos/yiisoft/yii2-jui/zipball/8c239b90f7f74d2c1d2d4b493c494287ea435ec7", + "reference": "8c239b90f7f74d2c1d2d4b493c494287ea435ec7", "shasum": "" }, "require": { "bower-asset/jquery-ui": "1.11.*@stable", - "yiisoft/yii2": ">=2.0.4" + "yiisoft/yii2": "~2.0.4" }, "type": "yii2-extension", "extra": { @@ -835,7 +845,7 @@ "jQuery UI", "yii2" ], - "time": "2016-06-11 22:54:20" + "time": "2016-12-27 11:19:15" }, { "name": "yiisoft/yii2-swiftmailer", @@ -843,17 +853,17 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-swiftmailer.git", - "reference": "163b9c6273e133c43a596aef46a9f5b1537731f9" + "reference": "c86c5ee2464ebf8c9f9adc2978193a9a2771b9c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/163b9c6273e133c43a596aef46a9f5b1537731f9", - "reference": "163b9c6273e133c43a596aef46a9f5b1537731f9", + "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/c86c5ee2464ebf8c9f9adc2978193a9a2771b9c9", + "reference": "c86c5ee2464ebf8c9f9adc2978193a9a2771b9c9", "shasum": "" }, "require": { "swiftmailer/swiftmailer": "~5.0", - "yiisoft/yii2": ">=2.0.4" + "yiisoft/yii2": "~2.0.4" }, "type": "yii2-extension", "extra": { @@ -885,7 +895,7 @@ "swiftmailer", "yii2" ], - "time": "2016-04-14 08:50:13" + "time": "2016-11-30 11:55:45" } ], "packages-dev": [ @@ -922,12 +932,12 @@ "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "039eeba8a61788df89c7800eccb2c56723a0db34" + "reference": "56ff6fa72a0678ff48df610e5637ca6b15c5444f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/039eeba8a61788df89c7800eccb2c56723a0db34", - "reference": "039eeba8a61788df89c7800eccb2c56723a0db34", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/56ff6fa72a0678ff48df610e5637ca6b15c5444f", + "reference": "56ff6fa72a0678ff48df610e5637ca6b15c5444f", "shasum": "" }, "require": { @@ -964,7 +974,7 @@ "faker", "fixtures" ], - "time": "2016-07-11 08:36:05" + "time": "2016-12-21 09:03:27" }, { "name": "phpspec/php-diff", @@ -1010,12 +1020,12 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-codeception.git", - "reference": "572a6d46d942cc5733c45931fdbd1d60228f3c89" + "reference": "76fdd689b7ec49c3c57db6137ae5ea536fa8f16d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-codeception/zipball/572a6d46d942cc5733c45931fdbd1d60228f3c89", - "reference": "572a6d46d942cc5733c45931fdbd1d60228f3c89", + "url": "https://api.github.com/repos/yiisoft/yii2-codeception/zipball/76fdd689b7ec49c3c57db6137ae5ea536fa8f16d", + "reference": "76fdd689b7ec49c3c57db6137ae5ea536fa8f16d", "shasum": "" }, "require": { @@ -1047,7 +1057,8 @@ "codeception", "yii2" ], - "time": "2016-04-14 08:46:27" + "abandoned": "codeception/codeception", + "time": "2016-10-20 13:07:49" }, { "name": "yiisoft/yii2-debug", @@ -1055,17 +1066,17 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-debug.git", - "reference": "07ad6f410eb60c57345e4c687e53b097c40b4a6c" + "reference": "fa4156df93910f59662a2c1ca0d138803807ade6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/07ad6f410eb60c57345e4c687e53b097c40b4a6c", - "reference": "07ad6f410eb60c57345e4c687e53b097c40b4a6c", + "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/fa4156df93910f59662a2c1ca0d138803807ade6", + "reference": "fa4156df93910f59662a2c1ca0d138803807ade6", "shasum": "" }, "require": { - "yiisoft/yii2": ">=2.0.4", - "yiisoft/yii2-bootstrap": "*" + "yiisoft/yii2": "~2.0.4", + "yiisoft/yii2-bootstrap": "~2.0.0" }, "type": "yii2-extension", "extra": { @@ -1094,7 +1105,7 @@ "debugger", "yii2" ], - "time": "2016-06-06 19:17:49" + "time": "2016-12-15 14:50:58" }, { "name": "yiisoft/yii2-faker", @@ -1102,17 +1113,17 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-faker.git", - "reference": "6e6eb430809e3f9c05e367303909a05a4912d4c0" + "reference": "8a406289c3af4da5e0092a96b37734dc1a16a43b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-faker/zipball/6e6eb430809e3f9c05e367303909a05a4912d4c0", - "reference": "6e6eb430809e3f9c05e367303909a05a4912d4c0", + "url": "https://api.github.com/repos/yiisoft/yii2-faker/zipball/8a406289c3af4da5e0092a96b37734dc1a16a43b", + "reference": "8a406289c3af4da5e0092a96b37734dc1a16a43b", "shasum": "" }, "require": { "fzaninotto/faker": "~1.4", - "yiisoft/yii2": "*" + "yiisoft/yii2": "~2.0.0" }, "type": "yii2-extension", "extra": { @@ -1141,7 +1152,7 @@ "faker", "yii2" ], - "time": "2016-04-14 08:47:34" + "time": "2016-12-02 21:11:03" }, { "name": "yiisoft/yii2-gii", @@ -1149,18 +1160,18 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-gii.git", - "reference": "4f7bece043b6e60571ad855cd937bf0e07e1891d" + "reference": "e28ccc70fe052187c2d060f67241d05e95ff5eae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/4f7bece043b6e60571ad855cd937bf0e07e1891d", - "reference": "4f7bece043b6e60571ad855cd937bf0e07e1891d", + "url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/e28ccc70fe052187c2d060f67241d05e95ff5eae", + "reference": "e28ccc70fe052187c2d060f67241d05e95ff5eae", "shasum": "" }, "require": { "bower-asset/typeahead.js": "0.10.* | ~0.11.0", "phpspec/php-diff": ">=1.0.2", - "yiisoft/yii2": ">=2.0.4", + "yiisoft/yii2": "~2.0.4", "yiisoft/yii2-bootstrap": "~2.0" }, "type": "yii2-extension", @@ -1194,7 +1205,7 @@ "gii", "yii2" ], - "time": "2016-07-07 16:09:06" + "time": "2016-12-21 16:50:20" } ], "aliases": [], diff --git a/console/migrations/m160714_124817_create_car.php b/console/migrations/m160714_124817_create_car.php deleted file mode 100755 index a3b6cee..0000000 --- a/console/migrations/m160714_124817_create_car.php +++ /dev/null @@ -1,29 +0,0 @@ -createTable('car', [ - 'car_id' => $this->primaryKey(), - 'model' => $this->string() - ->notNull(), - 'year' => $this->integer() - ->notNull(), - 'image' => $this->string(), - 'color' => $this->string(), - 'mileage' => $this->float(), - 'build' => $this->integer(), - 'option' => $this->text(), - 'price' => $this->float(), - ]); - } - - public function down() - { - $this->dropTable('car'); - } - } diff --git a/console/migrations/m160714_132243_change_build_format.php b/console/migrations/m160714_132243_change_build_format.php deleted file mode 100755 index 842ecc8..0000000 --- a/console/migrations/m160714_132243_change_build_format.php +++ /dev/null @@ -1,16 +0,0 @@ -alterColumn('car', 'build', $this->string()); - } - - public function down() - { - $this->alterColumn('car', 'build', $this->integer()); - } -} diff --git a/console/migrations/m161228_142205_buys.php b/console/migrations/m161228_142205_buys.php new file mode 100644 index 0000000..2b5eaa1 --- /dev/null +++ b/console/migrations/m161228_142205_buys.php @@ -0,0 +1,24 @@ +createTable('buys', [ + 'id' => $this->primaryKey(), + 'username' => $this->string(), + 'email' => $this->string(), + 'phone' => $this->string(), + 'model_name' => $this->string(), + 'model_year' => $this->string(), + 'model_color' => $this->string(), + ]); + } + + public function down() + { + $this->dropTable('buys'); + } +} diff --git a/console/migrations/m161228_142558_car.php b/console/migrations/m161228_142558_car.php new file mode 100644 index 0000000..09ccd3d --- /dev/null +++ b/console/migrations/m161228_142558_car.php @@ -0,0 +1,26 @@ +createTable('car', [ + 'car_id' => $this->primaryKey(), + 'model' => $this->string(), + 'year' => $this->integer(), + 'image' => $this->string(), + 'color' => $this->string(), + 'mileage' => $this->double(), + 'build' => $this->string(), + 'option' => $this->text(), + 'price' => $this->double(), + ]); + } + + public function down() + { + $this->dropTable('car'); + } +} diff --git a/console/migrations/m161228_143104_emails.php b/console/migrations/m161228_143104_emails.php new file mode 100644 index 0000000..5f33756 --- /dev/null +++ b/console/migrations/m161228_143104_emails.php @@ -0,0 +1,25 @@ +createTable('emails', [ + 'id' => $this->primaryKey(), + 'username' => $this->string(), + 'email' => $this->string(), + 'phone' => $this->string(), + 'message' => $this->text(), + 'date_from' => $this->integer(), + 'date_to' => $this->integer(), + 'date_count' => $this->integer(), + ]); + } + + public function down() + { + $this->dropTable('emails'); + } +} diff --git a/console/migrations/m161228_143500_language.php b/console/migrations/m161228_143500_language.php new file mode 100644 index 0000000..cbdc786 --- /dev/null +++ b/console/migrations/m161228_143500_language.php @@ -0,0 +1,24 @@ +createTable('language', [ + 'language_id' => $this->primaryKey(), + 'url' => $this->string(), + 'local' => $this->string(), + 'name' => $this->string(), + 'default' => $this->boolean(), + 'date_create' => $this->integer(), + 'date_update' => $this->integer(), + ]); + } + + public function down() + { + $this->dropTable('language'); + } +} diff --git a/frontend/assets/AppAsset.php b/frontend/assets/AppAsset.php index 5aa5098..51e520d 100755 --- a/frontend/assets/AppAsset.php +++ b/frontend/assets/AppAsset.php @@ -23,7 +23,6 @@ 'js/firstSlider.js', 'js/pushy.js', 'js/owl.carousel.min.js', - 'js/script2.js', 'http://code.jquery.com/ui/1.11.4/jquery-ui.js' ]; public $depends = [ diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 16c1dcc..9c35a94 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -19,7 +19,9 @@ use frontend\models\SignupForm; use frontend\models\ContactForm; use common\widgets\Mailer; - + use yii\web\Response; + use yii\web\ResponseFormatterInterface; + /** * Site controller */ @@ -245,16 +247,19 @@ public function actionTestdrive() { - echo Mailer::widget([ 'type' => 'test', + \Yii::$app->response->format = Response::FORMAT_JSON; + Mailer::widget([ 'type' => 'test', 'subject' => 'Запись на тест-драйв', 'params' => Yii::$app->request->post('TestdriveForm'), ]); $model = new Emails(); $model->load(Yii::$app->request->post(), 'TestdriveForm'); - $model->save(); - - die(); + if ($model->save()) { + return [ + 'success' => true, + ]; + } } /** @@ -262,19 +267,28 @@ */ public function actionBuy() { + \Yii::$app->response->format = Response::FORMAT_JSON; Mailer::widget([ 'type' => 'buy', 'subject' => 'Покупка автомобиля', 'params' => Yii::$app->request->post('OrderForm'), ]); $model = new Buys(); + $car = Car::findOne(Yii::$app->request->post('OrderForm')['model']); - $model->load(Yii::$app->request->post(), 'OrderForm'); - $model->save(); + $model->model_name = $car->model; + $model->model_year = $car->year; + $model->model_color = $car->color; - die(); + $model->load(Yii::$app->request->post(), 'OrderForm'); + if ($model->save()) { + return [ + 'success' => true, + ]; + } } public function actionQuestion() { + \Yii::$app->response->format = Response::FORMAT_JSON; Mailer::widget([ 'type' => 'question', 'subject' => 'Вопросы', 'params' => Yii::$app->request->post('QuestionForm'), @@ -284,12 +298,15 @@ ]); $model->load(Yii::$app->request->post(), 'QuestionForm'); - $model->save(); - - die(); + if ($model->save()) { + return [ + 'success' => true, + ]; + } } public function actionBooking() { + \Yii::$app->response->format = Response::FORMAT_JSON; Mailer::widget([ 'type' => 'booking', 'subject' => 'Бронирование авто', 'params' => Yii::$app->request->post('BookingForm'), @@ -299,11 +316,15 @@ ]); $model->load(Yii::$app->request->post(), 'BookingForm'); - $model->save(); - die(); + if ($model->save()) { + return [ + 'success' => true, + ]; + } } public function actionKeytokey() { + \Yii::$app->response->format = Response::FORMAT_JSON; Mailer::widget([ 'type' => 'keytokey', 'subject' => 'Акция Ключ-на-ключ', 'params' => Yii::$app->request->post('KeytokeyForm'), @@ -313,8 +334,10 @@ ]); $model->load(Yii::$app->request->post(), 'KeytokeyForm'); - $model->save(); - - die(); + if ($model->save()) { + return [ + 'success' => true, + ]; + } } } diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php index fae789c..d451062 100755 --- a/frontend/views/site/index.php +++ b/frontend/views/site/index.php @@ -48,182 +48,6 @@
- - - - - - - - - - - - - - -
@@ -699,14 +523,6 @@
- -
- -
Ваша заявка принята.
Мы свяжемся с вами в ближайшее время.
-
- -
-
- \ No newline at end of file + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/frontend/web/js/script.js b/frontend/web/js/script.js index f754fee..b741dca 100755 --- a/frontend/web/js/script.js +++ b/frontend/web/js/script.js @@ -1,4 +1,21 @@ $(document).ready(function(){ + + $(document).on('beforeSubmit', 'form', function(e) { + + $.post($(this).attr('action'), $(this).serialize(), function(data) { + if (data.success) { + console.log('ok'); + $('.modal').each(function() { + $(this).modal('hide'); + }); + $('#success_modal') + .modal('show'); + } + }); + + return false; + }); + function initScroll(event) { event.preventDefault(); var id = $(this).attr('href'), @@ -11,7 +28,8 @@ $(document).ready(function(){ // vGovnokod here function addNameYear(){ - $(".loadcars .btn").click(function(e){ + $(document).on('click', '.loadcars .btn' ,function(e){ + $('#orderform-model').val($(this).parent().parent().attr('data-key')); e.preventDefault(); var carmodel = $(".models_select .nav-tabs-main").find(".active").text(); var caryear = $(".models_select .nav-tabs-year").find(".active .year-picker").text(); -- libgit2 0.21.4