7 Commits
0.0.0 ... 0.3.0

49 changed files with 1447 additions and 598 deletions

View File

@@ -13,29 +13,36 @@
],
"require": {
"php": ">=7.4.0",
"twbs/bootstrap": "^4.5",
"fxp/composer-asset-plugin": "^1.4",
"yiisoft/yii2": "~2.0.14",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0 || ~2.1.0"
"twbs/bootstrap": ">=4.5",
"yiisoft/yii2": ">=2.0.14",
"yiisoft/yii2-bootstrap": ">=2.0.0",
"yiisoft/yii2-swiftmailer": ">=2.0.0",
"bower-asset/bootstrap": "*",
"npm-asset/jquery": "^3.5",
"bower-asset/jquery": "^3.5",
"explosivebit/arangodb": "^2.0",
"triagens/arangodb": "^3.6"
},
"require-dev": {
"codeception/codeception": "^4.1",
"codeception/module-webdriver": "^1.0.0",
"yiisoft/yii2-debug": "~2.1.0",
"yiisoft/yii2-gii": "~2.1.0",
"yiisoft/yii2-faker": "~2.0.0",
"codeception/codeception": ">=4.1",
"codeception/module-webdriver": ">=1.0.0",
"yiisoft/yii2-debug": ">=2.1.0",
"yiisoft/yii2-gii": ">=2.1.0",
"yiisoft/yii2-faker": ">=2.0.0",
"codeception/verify": ">=1.1.0",
"codeception/specify": "~0.4.6",
"symfony/browser-kit": ">=2.7 <=4.2.4",
"codeception/module-filesystem": "^1.0.0",
"codeception/module-yii2": "^1.0.0",
"codeception/module-asserts": "^1.0.0"
"codeception/specify": ">=0.4.6",
"symfony/browser-kit": ">=2.7",
"codeception/module-filesystem": ">=1.0.0",
"codeception/module-yii2": ">=1.0.0",
"codeception/module-asserts": ">=1.0.0"
},
"autoload": {
"psr-4": {
"mirzaev\\skillparts\\": "mirzaev/skillparts/system"
}
},
"classmap": [
"vendor/explosivebit"
]
},
"autoload-dev": {
"psr-4": {
@@ -43,31 +50,19 @@
}
},
"config": {
"process-timeout": 1800,
"fxp-asset": {
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
},
"repositories": {
"bower-asset/eve": {
"type": "bower-vcs",
"url": "https://github.com/adobe-webplatform/eve.git"
}
}
}
"process-timeout": 1800
},
"scripts": {
"post-update-cmd": [
"mirzaev\\skillparts\\system\\yii\\composer\\Installer::postInstall",
"mkdir -p .\\mirzaev\\skillparts\\system\\web\\css\\bootstrap > /dev/null 2>&1 || true",
"mkdir -p .\\mirzaev\\skillparts\\system\\web\\js\\bootstrap > /dev/null 2>&1 || true",
"cp -R .\\vendor\\twbs\\bootstrap\\dist\\css\\* .\\mirzaev\\skillparts\\system\\web\\css\\bootstrap",
"cp -R .\\vendor\\twbs\\bootstrap\\dist\\js\\* .\\\\mirzaev\\skillparts\\system\\web\\js\\bootstrap"
"mirzaev/skillparts/system/yii/composer/Installer::postInstall",
"mkdir -p ./mirzaev/skillparts/system/web/css/bootstrap > /dev/null 2>&1 || true",
"mkdir -p ./mirzaev/skillparts/system/web/js/bootstrap > /dev/null 2>&1 || true",
"cp -R ./vendor/twbs/bootstrap/dist/css/* ./mirzaev/skillparts/system/web/css/bootstrap",
"cp -R ./vendor/twbs/bootstrap/dist/js/* ./mirzaev/skillparts/system/web/js/bootstrap"
],
"post-create-project-cmd": [
"mirzaev\\skillparts\\system\\yii\\composer\\Installer::postCreateProject",
"mirzaev\\skillparts\\system\\yii\\composer\\Installer::postInstall"
"mirzaev/skillparts/system/yii/composer/Installer::postCreateProject",
"mirzaev/skillparts/system/yii/composer/Installer::postInstall"
]
},
"extra": {
@@ -85,5 +80,23 @@
"mirzaev/skillparts/system/config/web.php"
]
}
}
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
},
{
"type": "package",
"package": {
"name": "explosivebit/arangodb",
"version": "2.0",
"source": {
"type": "git",
"url": "https://github.com/pBazsi/yii2-arangodb.git",
"reference": "master"
}
}
}
]
}

550
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "8d075b49b77f5f11ae1d76ef971bb9d3",
"content-hash": "d83ed7a25bd848237d6ae45b945471f6",
"packages": [
{
"name": "bower-asset/bootstrap",
@@ -17,104 +17,36 @@
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/68b0d231a13201eb14acd3dc84e51543d16e5f7e",
"reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e",
"shasum": ""
"reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e"
},
"require": {
"bower-asset/jquery": ">=1.9.1,<4.0"
},
"type": "bower-asset-library",
"extra": {
"bower-asset-main": [
"less/bootstrap.less",
"dist/js/bootstrap.js"
],
"bower-asset-ignore": [
"/.*",
"_config.yml",
"CNAME",
"composer.json",
"CONTRIBUTING.md",
"docs",
"js/tests",
"test-infra"
]
},
"type": "bower-asset",
"license": [
"MIT"
],
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"keywords": [
"css",
"framework",
"front-end",
"js",
"less",
"mobile-first",
"responsive",
"web"
],
"time": "2019-02-13T15:55:38+00:00"
]
},
{
"name": "bower-asset/inputmask",
"version": "3.3.11",
"source": {
"type": "git",
"url": "https://github.com/RobinHerbots/Inputmask.git",
"url": "git@github.com:RobinHerbots/Inputmask.git",
"reference": "5e670ad62f50c738388d4dcec78d2888505ad77b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/5e670ad62f50c738388d4dcec78d2888505ad77b",
"reference": "5e670ad62f50c738388d4dcec78d2888505ad77b",
"shasum": ""
"reference": "5e670ad62f50c738388d4dcec78d2888505ad77b"
},
"require": {
"bower-asset/jquery": ">=1.7"
},
"type": "bower-asset-library",
"extra": {
"bower-asset-main": [
"./dist/inputmask/inputmask.js",
"./dist/inputmask/inputmask.extensions.js",
"./dist/inputmask/inputmask.date.extensions.js",
"./dist/inputmask/inputmask.numeric.extensions.js",
"./dist/inputmask/inputmask.phone.extensions.js",
"./dist/inputmask/jquery.inputmask.js",
"./dist/inputmask/global/document.js",
"./dist/inputmask/global/window.js",
"./dist/inputmask/phone-codes/phone.js",
"./dist/inputmask/phone-codes/phone-be.js",
"./dist/inputmask/phone-codes/phone-nl.js",
"./dist/inputmask/phone-codes/phone-ru.js",
"./dist/inputmask/phone-codes/phone-uk.js",
"./dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js",
"./dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js",
"./dist/inputmask/dependencyLibs/inputmask.dependencyLib.js",
"./dist/inputmask/bindings/inputmask.binding.js"
],
"bower-asset-ignore": [
"**/*",
"!dist/*",
"!dist/inputmask/*",
"!dist/min/*",
"!dist/min/inputmask/*"
]
},
"type": "bower-asset",
"license": [
"http://opensource.org/licenses/mit-license.php"
],
"description": "Inputmask is a javascript library which creates an input mask. Inputmask can run against vanilla javascript, jQuery and jqlite.",
"keywords": [
"form",
"input",
"inputmask",
"jquery",
"mask",
"plugins"
],
"time": "2017-11-21T11:46:23+00:00"
]
},
{
"name": "bower-asset/jquery",
@@ -127,55 +59,27 @@
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jquery/jquery-dist/zipball/4c0e4becb8263bb5b3e6dadc448d8e7305ef8215",
"reference": "4c0e4becb8263bb5b3e6dadc448d8e7305ef8215",
"shasum": ""
},
"type": "bower-asset-library",
"extra": {
"bower-asset-main": "dist/jquery.js",
"bower-asset-ignore": [
"package.json"
]
"reference": "4c0e4becb8263bb5b3e6dadc448d8e7305ef8215"
},
"type": "bower-asset",
"license": [
"MIT"
],
"keywords": [
"browser",
"javascript",
"jquery",
"library"
],
"time": "2020-05-04T22:50:46+00:00"
]
},
{
"name": "bower-asset/punycode",
"version": "v1.3.2",
"source": {
"type": "git",
"url": "https://github.com/bestiejs/punycode.js.git",
"url": "git@github.com:bestiejs/punycode.js.git",
"reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bestiejs/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3",
"reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3",
"shasum": ""
"reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3"
},
"type": "bower-asset-library",
"extra": {
"bower-asset-main": "punycode.js",
"bower-asset-ignore": [
"coverage",
"tests",
".*",
"component.json",
"Gruntfile.js",
"node_modules",
"package.json"
]
},
"time": "2014-10-22T12:02:42+00:00"
"type": "bower-asset"
},
{
"name": "bower-asset/yii2-pjax",
@@ -188,29 +92,15 @@
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/aef7b953107264f00234902a3880eb50dafc48be",
"reference": "aef7b953107264f00234902a3880eb50dafc48be",
"shasum": ""
"reference": "aef7b953107264f00234902a3880eb50dafc48be"
},
"require": {
"bower-asset/jquery": ">=1.8"
},
"type": "bower-asset-library",
"extra": {
"bower-asset-main": "./jquery.pjax.js",
"bower-asset-ignore": [
".travis.yml",
"Gemfile",
"Gemfile.lock",
"CONTRIBUTING.md",
"vendor/",
"script/",
"test/"
]
},
"type": "bower-asset",
"license": [
"MIT"
],
"time": "2017-10-12T10:11:14+00:00"
]
},
{
"name": "cebe/markdown",
@@ -412,6 +302,16 @@
],
"time": "2020-11-14T15:56:27+00:00"
},
{
"name": "explosivebit/arangodb",
"version": "2.0",
"source": {
"type": "git",
"url": "https://github.com/pBazsi/yii2-arangodb.git",
"reference": "master"
},
"type": "library"
},
{
"name": "ezyang/htmlpurifier",
"version": "v4.13.0",
@@ -463,92 +363,44 @@
"time": "2020-06-29T00:56:53+00:00"
},
{
"name": "fxp/composer-asset-plugin",
"version": "v1.4.6",
"source": {
"type": "git",
"url": "https://github.com/fxpio/composer-asset-plugin.git",
"reference": "886ece037849d3935c5a34cdcd984e46f2de5fae"
},
"name": "npm-asset/jquery",
"version": "3.5.1",
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fxpio/composer-asset-plugin/zipball/886ece037849d3935c5a34cdcd984e46f2de5fae",
"reference": "886ece037849d3935c5a34cdcd984e46f2de5fae",
"shasum": ""
"type": "tar",
"url": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz"
},
"require": {
"composer-plugin-api": "^1.0",
"php": ">=5.3.3"
},
"require-dev": {
"composer/composer": "^1.6.0"
},
"type": "composer-plugin",
"extra": {
"class": "Fxp\\Composer\\AssetPlugin\\FxpAssetPlugin",
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"psr-4": {
"Fxp\\Composer\\AssetPlugin\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"type": "npm-asset",
"license": [
"MIT"
],
"authors": [
{
"name": "François Pluchino",
"email": "francois.pluchino@gmail.com"
}
],
"description": "NPM/Bower Dependency Manager for Composer",
"homepage": "https://github.com/fxpio/composer-asset-plugin",
"keywords": [
"asset",
"bower",
"composer",
"dependency manager",
"nodejs",
"npm",
"package"
],
"time": "2019-08-08T18:36:07+00:00"
]
},
{
"name": "swiftmailer/swiftmailer",
"version": "v6.2.3",
"version": "v6.2.4",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9"
"reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9",
"reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e",
"reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e",
"shasum": ""
},
"require": {
"egulias/email-validator": "~2.0",
"egulias/email-validator": "^2.0",
"php": ">=7.0.0",
"symfony/polyfill-iconv": "^1.0",
"symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-mbstring": "^1.0"
},
"require-dev": {
"mockery/mockery": "~0.9.1",
"symfony/phpunit-bridge": "^3.4.19|^4.1.8"
"mockery/mockery": "^1.0",
"symfony/phpunit-bridge": "^4.4|^5.0"
},
"suggest": {
"ext-intl": "Needed to support internationalized email addresses",
"true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed"
"ext-intl": "Needed to support internationalized email addresses"
},
"type": "library",
"extra": {
@@ -581,7 +433,21 @@
"mail",
"mailer"
],
"time": "2019-11-12T09:31:26+00:00"
"support": {
"issues": "https://github.com/swiftmailer/swiftmailer/issues",
"source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.4"
},
"funding": [
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer",
"type": "tidelift"
}
],
"time": "2020-12-08T18:02:06+00:00"
},
{
"name": "symfony/polyfill-iconv",
@@ -975,6 +841,63 @@
],
"time": "2020-10-23T14:02:19+00:00"
},
{
"name": "triagens/arangodb",
"version": "v3.6.0",
"source": {
"type": "git",
"url": "https://github.com/arangodb/arangodb-php.git",
"reference": "d331f1a493772960c4d0e3d1fb753900eb181ce2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/arangodb/arangodb-php/zipball/d331f1a493772960c4d0e3d1fb753900eb181ce2",
"reference": "d331f1a493772960c4d0e3d1fb753900eb181ce2",
"shasum": ""
},
"require": {
"php": ">=5.6.0"
},
"type": "library",
"autoload": {
"psr-0": {
"ArangoDBClient": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Jan Steemann",
"homepage": "https://github.com/arangodb/arangodb-php",
"role": "Developer"
},
{
"name": "Frank Mayer",
"homepage": "https://github.com/arangodb/arangodb-php",
"role": "Developer"
},
{
"name": "Contributors",
"homepage": "https://github.com/arangodb/arangodb-php/graphs/contributors"
}
],
"description": "ArangoDB PHP client",
"homepage": "https://github.com/arangodb/arangodb-php",
"keywords": [
"Arango",
"ArangoDb",
"database",
"distributed",
"document store",
"graph database",
"multi-model",
"nosql"
],
"time": "2019-12-02T13:11:34+00:00"
},
{
"name": "twbs/bootstrap",
"version": "v4.5.3",
@@ -1836,24 +1759,22 @@
},
{
"name": "codeception/specify",
"version": "0.4.6",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Specify.git",
"reference": "21b586f503ca444aa519dd9cafb32f113a05f286"
"reference": "17ae6d4d6cb201ef5461f6587ecfcff8c177f854"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/Specify/zipball/21b586f503ca444aa519dd9cafb32f113a05f286",
"reference": "21b586f503ca444aa519dd9cafb32f113a05f286",
"url": "https://api.github.com/repos/Codeception/Specify/zipball/17ae6d4d6cb201ef5461f6587ecfcff8c177f854",
"reference": "17ae6d4d6cb201ef5461f6587ecfcff8c177f854",
"shasum": ""
},
"require": {
"myclabs/deep-copy": "~1.1",
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
"php": ">=7.1.0",
"phpunit/phpunit": ">=7.0 <10.0"
},
"type": "library",
"autoload": {
@@ -1868,11 +1789,19 @@
"authors": [
{
"name": "Michael Bodnarchuk",
"email": "davert.php@mailican.com"
"email": "davert@codeception.com"
},
{
"name": "Gustavo Nieves",
"homepage": "https://medium.com/@ganieves"
}
],
"description": "BDD code blocks for PHPUnit and Codeception",
"time": "2016-10-21T09:42:00+00:00"
"support": {
"issues": "https://github.com/Codeception/Specify/issues",
"source": "https://github.com/Codeception/Specify/tree/1.4.0"
},
"time": "2020-08-27T20:17:29+00:00"
},
{
"name": "codeception/stub",
@@ -1906,21 +1835,21 @@
},
{
"name": "codeception/verify",
"version": "2.1.0",
"version": "2.1.1",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Verify.git",
"reference": "11fa56c223ae7188174c4ba50c68454d83b254e9"
"reference": "1cdac1867c33801ae8e4833015153766ef403c92"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/Verify/zipball/11fa56c223ae7188174c4ba50c68454d83b254e9",
"reference": "11fa56c223ae7188174c4ba50c68454d83b254e9",
"url": "https://api.github.com/repos/Codeception/Verify/zipball/1cdac1867c33801ae8e4833015153766ef403c92",
"reference": "1cdac1867c33801ae8e4833015153766ef403c92",
"shasum": ""
},
"require": {
"ext-dom": "*",
"php": "^7.3",
"php": "^7.3 || ^8.0",
"phpunit/phpunit": "^9.3"
},
"type": "library",
@@ -1947,7 +1876,7 @@
}
],
"description": "BDD assertion library for PHPUnit",
"time": "2020-09-03T04:43:01+00:00"
"time": "2020-12-18T16:18:31+00:00"
},
{
"name": "doctrine/instantiator",
@@ -2016,16 +1945,16 @@
},
{
"name": "fakerphp/faker",
"version": "v1.12.0",
"version": "v1.13.0",
"source": {
"type": "git",
"url": "https://github.com/FakerPHP/Faker.git",
"reference": "9aa6c9e289860951e6b4d010c7a841802d015cd8"
"reference": "ab3f5364d01f2c2c16113442fb987d26e4004913"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FakerPHP/Faker/zipball/9aa6c9e289860951e6b4d010c7a841802d015cd8",
"reference": "9aa6c9e289860951e6b4d010c7a841802d015cd8",
"url": "https://api.github.com/repos/FakerPHP/Faker/zipball/ab3f5364d01f2c2c16113442fb987d26e4004913",
"reference": "ab3f5364d01f2c2c16113442fb987d26e4004913",
"shasum": ""
},
"require": {
@@ -2060,7 +1989,7 @@
"faker",
"fixtures"
],
"time": "2020-11-23T09:33:08+00:00"
"time": "2020-12-18T16:50:48+00:00"
},
{
"name": "guzzlehttp/psr7",
@@ -2189,16 +2118,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.10.2",
"version": "v4.10.3",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "658f1be311a230e0907f5dfe0213742aff0596de"
"reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/658f1be311a230e0907f5dfe0213742aff0596de",
"reference": "658f1be311a230e0907f5dfe0213742aff0596de",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984",
"reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984",
"shasum": ""
},
"require": {
@@ -2237,7 +2166,11 @@
"parser",
"php"
],
"time": "2020-09-26T10:30:38+00:00"
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.10.3"
},
"time": "2020-12-03T17:45:45+00:00"
},
{
"name": "opis/closure",
@@ -2358,16 +2291,16 @@
},
{
"name": "phar-io/version",
"version": "3.0.3",
"version": "3.0.4",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
"reference": "726c026815142e4f8677b7cb7f2249c9ffb7ecae"
"reference": "e4782611070e50613683d2b9a57730e9a3ba5451"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/version/zipball/726c026815142e4f8677b7cb7f2249c9ffb7ecae",
"reference": "726c026815142e4f8677b7cb7f2249c9ffb7ecae",
"url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451",
"reference": "e4782611070e50613683d2b9a57730e9a3ba5451",
"shasum": ""
},
"require": {
@@ -2401,7 +2334,7 @@
}
],
"description": "Library for handling version information and constraints",
"time": "2020-11-30T09:21:21+00:00"
"time": "2020-12-13T23:18:30+00:00"
},
{
"name": "php-webdriver/webdriver",
@@ -3017,16 +2950,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.4.4",
"version": "9.5.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "6535e637961f0829832621dc1b7308c2d24a799e"
"reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6535e637961f0829832621dc1b7308c2d24a799e",
"reference": "6535e637961f0829832621dc1b7308c2d24a799e",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e16c225d57c3d6808014df6b1dd7598d0a5bbbe",
"reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe",
"shasum": ""
},
"require": {
@@ -3042,7 +2975,7 @@
"phar-io/version": "^3.0.2",
"php": ">=7.3",
"phpspec/prophecy": "^1.12.1",
"phpunit/php-code-coverage": "^9.2",
"phpunit/php-code-coverage": "^9.2.3",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
@@ -3073,7 +3006,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "9.4-dev"
"dev-master": "9.5-dev"
}
},
"autoload": {
@@ -3102,6 +3035,10 @@
"testing",
"xunit"
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.0"
},
"funding": [
{
"url": "https://phpunit.de/donate.html",
@@ -3112,7 +3049,7 @@
"type": "github"
}
],
"time": "2020-12-01T04:58:47+00:00"
"time": "2020-12-04T05:05:53+00:00"
},
{
"name": "psr/container",
@@ -4201,35 +4138,32 @@
},
{
"name": "symfony/browser-kit",
"version": "v4.2.4",
"version": "v5.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
"reference": "61d85c5af2fc058014c7c89504c3944e73a086f0"
"reference": "87d6f0a7436b03a57d4cf9a6a9cd0c83a355c49a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/61d85c5af2fc058014c7c89504c3944e73a086f0",
"reference": "61d85c5af2fc058014c7c89504c3944e73a086f0",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/87d6f0a7436b03a57d4cf9a6a9cd0c83a355c49a",
"reference": "87d6f0a7436b03a57d4cf9a6a9cd0c83a355c49a",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"symfony/dom-crawler": "~3.4|~4.0"
"php": ">=7.2.5",
"symfony/dom-crawler": "^4.4|^5.0"
},
"require-dev": {
"symfony/css-selector": "~3.4|~4.0",
"symfony/process": "~3.4|~4.0"
"symfony/css-selector": "^4.4|^5.0",
"symfony/http-client": "^4.4|^5.0",
"symfony/mime": "^4.4|^5.0",
"symfony/process": "^4.4|^5.0"
},
"suggest": {
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\BrowserKit\\": ""
@@ -4254,20 +4188,34 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"time": "2019-02-23T15:17:42+00:00"
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-12-18T08:03:05+00:00"
},
{
"name": "symfony/console",
"version": "v5.2.0",
"version": "v5.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "3e0564fb08d44a98bd5f1960204c958e57bd586b"
"reference": "47c02526c532fb381374dab26df05e7313978976"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/3e0564fb08d44a98bd5f1960204c958e57bd586b",
"reference": "3e0564fb08d44a98bd5f1960204c958e57bd586b",
"url": "https://api.github.com/repos/symfony/console/zipball/47c02526c532fb381374dab26df05e7313978976",
"reference": "47c02526c532fb381374dab26df05e7313978976",
"shasum": ""
},
"require": {
@@ -4348,20 +4296,20 @@
"type": "tidelift"
}
],
"time": "2020-11-28T11:24:18+00:00"
"time": "2020-12-18T08:03:05+00:00"
},
{
"name": "symfony/css-selector",
"version": "v5.2.0",
"version": "v5.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256"
"reference": "f789e7ead4c79e04ca9a6d6162fc629c89bd8054"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256",
"reference": "b8d8eb06b0942e84a69e7acebc3e9c1e6e6e7256",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/f789e7ead4c79e04ca9a6d6162fc629c89bd8054",
"reference": "f789e7ead4c79e04ca9a6d6162fc629c89bd8054",
"shasum": ""
},
"require": {
@@ -4410,7 +4358,7 @@
"type": "tidelift"
}
],
"time": "2020-10-28T21:31:18+00:00"
"time": "2020-12-08T17:02:38+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -4478,29 +4426,30 @@
},
{
"name": "symfony/dom-crawler",
"version": "v4.4.17",
"version": "v5.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "30ad9ac96a01913195bf0328d48e29d54fa53e6e"
"reference": "ee7cf316fb0de786cfe5ae32ee79502b290c81ea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/30ad9ac96a01913195bf0328d48e29d54fa53e6e",
"reference": "30ad9ac96a01913195bf0328d48e29d54fa53e6e",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/ee7cf316fb0de786cfe5ae32ee79502b290c81ea",
"reference": "ee7cf316fb0de786cfe5ae32ee79502b290c81ea",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"php": ">=7.2.5",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.0"
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.15"
},
"conflict": {
"masterminds/html5": "<2.6"
},
"require-dev": {
"masterminds/html5": "^2.6",
"symfony/css-selector": "^3.4|^4.0|^5.0"
"symfony/css-selector": "^4.4|^5.0"
},
"suggest": {
"symfony/css-selector": ""
@@ -4544,20 +4493,20 @@
"type": "tidelift"
}
],
"time": "2020-10-24T11:50:19+00:00"
"time": "2020-12-18T08:02:46+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v5.2.0",
"version": "v5.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "aa13a09811e6d2ad43f8fb336bebdb7691d85d3c"
"reference": "1c93f7a1dff592c252574c79a8635a8a80856042"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/aa13a09811e6d2ad43f8fb336bebdb7691d85d3c",
"reference": "aa13a09811e6d2ad43f8fb336bebdb7691d85d3c",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1c93f7a1dff592c252574c79a8635a8a80856042",
"reference": "1c93f7a1dff592c252574c79a8635a8a80856042",
"shasum": ""
},
"require": {
@@ -4626,7 +4575,7 @@
"type": "tidelift"
}
],
"time": "2020-11-01T16:14:45+00:00"
"time": "2020-12-18T08:03:05+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@@ -4706,16 +4655,16 @@
},
{
"name": "symfony/finder",
"version": "v5.2.0",
"version": "v5.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "fd8305521692f27eae3263895d1ef1571c71a78d"
"reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/fd8305521692f27eae3263895d1ef1571c71a78d",
"reference": "fd8305521692f27eae3263895d1ef1571c71a78d",
"url": "https://api.github.com/repos/symfony/finder/zipball/0b9231a5922fd7287ba5b411893c0ecd2733e5ba",
"reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba",
"shasum": ""
},
"require": {
@@ -4760,7 +4709,7 @@
"type": "tidelift"
}
],
"time": "2020-11-18T09:42:36+00:00"
"time": "2020-12-08T17:02:38+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -5074,16 +5023,16 @@
},
{
"name": "symfony/process",
"version": "v5.2.0",
"version": "v5.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "240e74140d4d956265048f3025c0aecbbc302d54"
"reference": "bd8815b8b6705298beaa384f04fabd459c10bedd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/240e74140d4d956265048f3025c0aecbbc302d54",
"reference": "240e74140d4d956265048f3025c0aecbbc302d54",
"url": "https://api.github.com/repos/symfony/process/zipball/bd8815b8b6705298beaa384f04fabd459c10bedd",
"reference": "bd8815b8b6705298beaa384f04fabd459c10bedd",
"shasum": ""
},
"require": {
@@ -5129,7 +5078,7 @@
"type": "tidelift"
}
],
"time": "2020-11-02T15:47:15+00:00"
"time": "2020-12-08T17:03:37+00:00"
},
{
"name": "symfony/service-contracts",
@@ -5209,16 +5158,16 @@
},
{
"name": "symfony/string",
"version": "v5.2.0",
"version": "v5.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "40e975edadd4e32cd16f3753b3bad65d9ac48242"
"reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/40e975edadd4e32cd16f3753b3bad65d9ac48242",
"reference": "40e975edadd4e32cd16f3753b3bad65d9ac48242",
"url": "https://api.github.com/repos/symfony/string/zipball/5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed",
"reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed",
"shasum": ""
},
"require": {
@@ -5285,20 +5234,20 @@
"type": "tidelift"
}
],
"time": "2020-10-24T12:08:07+00:00"
"time": "2020-12-05T07:33:16+00:00"
},
{
"name": "symfony/yaml",
"version": "v5.2.0",
"version": "v5.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "bb73619b2ae5121bbbcd9f191dfd53ded17ae598"
"reference": "290ea5e03b8cf9b42c783163123f54441fb06939"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/bb73619b2ae5121bbbcd9f191dfd53ded17ae598",
"reference": "bb73619b2ae5121bbbcd9f191dfd53ded17ae598",
"url": "https://api.github.com/repos/symfony/yaml/zipball/290ea5e03b8cf9b42c783163123f54441fb06939",
"reference": "290ea5e03b8cf9b42c783163123f54441fb06939",
"shasum": ""
},
"require": {
@@ -5357,7 +5306,7 @@
"type": "tidelift"
}
],
"time": "2020-11-28T10:57:20+00:00"
"time": "2020-12-08T17:02:38+00:00"
},
{
"name": "theseer/tokenizer",
@@ -5614,16 +5563,16 @@
},
{
"name": "yiisoft/yii2-gii",
"version": "2.1.4",
"version": "2.2.1",
"source": {
"type": "git",
"url": "https://github.com/yiisoft/yii2-gii.git",
"reference": "d879cb186361fbc6f71a2d994d580b5a071a5642"
"reference": "f3bb400b578b0a0ee737d267ebaffdaad7b32dee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/d879cb186361fbc6f71a2d994d580b5a071a5642",
"reference": "d879cb186361fbc6f71a2d994d580b5a071a5642",
"url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/f3bb400b578b0a0ee737d267ebaffdaad7b32dee",
"reference": "f3bb400b578b0a0ee737d267ebaffdaad7b32dee",
"shasum": ""
},
"require": {
@@ -5661,7 +5610,28 @@
"gii",
"yii2"
],
"time": "2020-01-17T13:33:30+00:00"
"support": {
"forum": "http://www.yiiframework.com/forum/",
"irc": "irc://irc.freenode.net/yii",
"issues": "https://github.com/yiisoft/yii2-gii/issues",
"source": "https://github.com/yiisoft/yii2-gii",
"wiki": "http://www.yiiframework.com/wiki/"
},
"funding": [
{
"url": "https://github.com/yiisoft",
"type": "github"
},
{
"url": "https://opencollective.com/yiisoft",
"type": "open_collective"
},
{
"url": "https://tidelift.com/funding/github/packagist/yiisoft/yii2-gii",
"type": "tidelift"
}
],
"time": "2020-05-02T11:59:43+00:00"
}
],
"aliases": [],

View File

@@ -27,13 +27,18 @@ class AppAsset extends AssetBundle
'css/header.css',
'css/info_panel.css',
'css/categories_blocks_panel.css',
'css/ticker.css',
'css/footer.css'
];
public $js = [
'https://kit.fontawesome.com/d7e922c226.js',
'https://code.jquery.com/jquery-3.5.1.min.js',
'js/bootstrap/popper.min.js',
'js/bootstrap/bootstrap.min.js',
'https://kit.fontawesome.com/d7e922c226.js'
'https://cdn.jsdelivr.net/bxslider/4.1.1/jquery.bxslider.min.js',
'js/account.js',
'js/ticker.js',
'js/reinitialization.js'
];
public $depends = [
'yii\web\YiiAsset',

View File

@@ -0,0 +1 @@
*.php

View File

@@ -0,0 +1,46 @@
<?php
$config = [
'id' => 'basic-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'app\commands',
'aliases' => [
'@vendor' => dirname(__DIR__) . '../../../../vendor',
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
'@explosivebit' => '@vendor/explosivebit',
'@tests' => '@app/tests',
],
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'arangodb' => require __DIR__ . '/db.php'
],
'params' => require __DIR__ . '/params.php',
'controllerMap' => [
'arangodb-migrate' => 'explosivebit\arangodb\console\controllers\MigrateController',
'fixture' => [
'class' => 'yii\faker\FixtureController',
],
]
];
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
];
}
return $config;

View File

@@ -0,0 +1,14 @@
<?php
use ArangoDBClient\ConnectionOptions;
return [
'class' => '\explosivebit\arangodb\Connection',
'connectionOptions' => [
ConnectionOptions::OPTION_DATABASE => '',
ConnectionOptions::OPTION_ENDPOINT => 'tcp://127.0.0.1:8529',
ConnectionOptions::OPTION_AUTH_TYPE => 'Basic',
ConnectionOptions::OPTION_AUTH_USER => '',
ConnectionOptions::OPTION_AUTH_PASSWD => '',
],
];

View File

@@ -0,0 +1,7 @@
<?php
return [
'adminEmail' => 'admin@example.com',
'senderEmail' => 'noreply@example.com',
'senderName' => 'Example.com mailer',
];

View File

@@ -0,0 +1,40 @@
<?php
/**
* Application configuration shared by all test types
*/
return [
'id' => 'basic-tests',
'basePath' => dirname(__DIR__),
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'language' => 'en-US',
'components' => [
'db' => require __DIR__ . '/test_db.php',
'mailer' => [
'useFileTransport' => true,
],
'assetManager' => [
'basePath' => __DIR__ . '/../web/assets',
],
'urlManager' => [
'showScriptName' => true,
],
'user' => [
'identityClass' => 'app\models\Account',
],
'request' => [
'cookieValidationKey' => 'test',
'enableCsrfValidation' => false,
// but if you absolutely need it set cookie domain to localhost
/*
'csrfCookie' => [
'domain' => 'localhost',
],
*/
],
],
'params' => require __DIR__ . '/params.php',
];

View File

@@ -0,0 +1,6 @@
<?php
$db = require __DIR__ . '/db.php';
// test database! Important not to run tests on production or development databases
$db['dsn'] = 'mysql:host=localhost;dbname=yii2basic_test';
return $db;

View File

@@ -0,0 +1,86 @@
<?php
$config = [
'id' => 'basic',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'aliases' => [
'@vendor' => dirname(__DIR__) . '/../../../vendor',
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
'@explosivebit' => '@vendor/explosivebit',
],
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '',
'baseUrl' => ''
],
'cache' => [
'class' => 'yii\caching\FileCache',
],
'user' => [
'identityClass' => 'app\models\Account',
'enableAutoLogin' => true,
],
// 'session' => [
// 'class' => 'yii\web\Session',
// 'cookieParams' => ['lifetime' => 3600 * 24 * 30 * 12],
// 'timeout' => 3600 * 24 * 30 * 12,
// 'useCookies' => true,
// ],
'errorHandler' => [
'errorAction' => 'site/error',
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
// 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,
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'arangodb' => require __DIR__ . '/db.php',
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
['class' => 'yii\rest\UrlRule', 'controller' => 'site'],
'<action>' => 'site/<action>'
],
],
],
'params' => require __DIR__ . '/params.php',
];
if (YII_ENV_DEV) {
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
'panels' => [
'ArangoDB' => [
'class' => 'explosivebit\arangodb\panels\arangodb\ArangoDbPanel'
]
],
// uncomment the following to add your IP if you are not connecting from localhost.
//'allowedIPs' => ['127.0.0.1', '::1'],
];
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
// uncomment the following to add your IP if you are not connecting from localhost.
//'allowedIPs' => ['127.0.0.1', '::1'],
];
}
return $config;

View File

@@ -7,11 +7,12 @@ use yii\filters\AccessControl;
use yii\web\Controller;
use yii\web\Response;
use yii\filters\VerbFilter;
use app\models\LoginForm;
use app\models\AccountForm;
use app\models\ContactForm;
class SiteController extends Controller
{
/**
* {@inheritdoc}
*/
@@ -19,7 +20,7 @@ class SiteController extends Controller
{
return [
'access' => [
'class' => AccessControl::className(),
'class' => AccessControl::class,
'only' => ['logout'],
'rules' => [
[
@@ -30,7 +31,7 @@ class SiteController extends Controller
],
],
'verbs' => [
'class' => VerbFilter::className(),
'class' => VerbFilter::class,
'actions' => [
'logout' => ['post'],
],
@@ -64,26 +65,97 @@ class SiteController extends Controller
return $this->render('index');
}
/**
* Identification action.
*
* @return Response
*/
public function actionIdentification()
{
if (Yii::$app->request->isAjax) {
Yii::$app->response->format = Response::FORMAT_JSON;
if (Yii::$app->user->isGuest) {
return [
'menu' => '<a onclick="authentication()">Вход</a>',
'_csrf' => Yii::$app->request->getCsrfToken()
];
} else {
$mail = Yii::$app->user->identity->mail;
return [
'menu' => <<<HTML
<p class="m-0">
<a class="text-dark" href="/cart"><i class="fas fa-shopping-cart mr-4"></i></a>
<a class="text-dark" href="/orders"><i class="fas fa-list mr-4"></i></a>
<a class="text-dark" onclick="deauthentication()">Выход ($mail)</a>
</p>
HTML,
'_csrf' => Yii::$app->request->getCsrfToken()
];
}
}
}
/**
* Login action.
*
* @return Response|string
*/
public function actionLogin()
public function actionAuthentication()
{
if (!Yii::$app->user->isGuest) {
return $this->goHome();
$model = new AccountForm(Yii::$app->request->post()['AccountForm'] ?? Yii::$app->request->get()['AccountForm'] ?? null);
if (Yii::$app->request->isAjax) {
// AJAX-POST-запрос
Yii::$app->response->format = Response::FORMAT_JSON;
if (!Yii::$app->user->isGuest) {
// Аккаунт уже аутентифицирован
Yii::$app->response->statusCode = 403;
return [
'form' => $this->renderPartial('index'),
'_csrf' => Yii::$app->request->getCsrfToken()
];
}
if ($model->authentication()) {
// Данные прошли проверку
return [
'menu' => <<<HTML
<p class="m-0">
<a class="text-dark" href="/cart"><i class="fas fa-shopping-cart mr-4"></i></a>
<a class="text-dark" href="/orders"><i class="fas fa-list mr-4"></i></a>
<a class="text-dark" onclick="deauthentication()">Выход ($model->mail)</a>
</p>
HTML,
'form' => $this->renderPartial('index'),
'_csrf' => Yii::$app->request->getCsrfToken()
];
} else {
// Данные не прошли проверку
Yii::$app->response->statusCode = 400;
return [
'form' => $this->renderPartial('account', compact('model')),
'_csrf' => Yii::$app->request->getCsrfToken()
];
}
} else if (Yii::$app->request->isPost) {
// POST-запрос
} else {
// GET-запрос и прочие
if (!Yii::$app->user->isGuest) {
// Аккаунт уже аутентифицирован
Yii::$app->response->redirect('/');
}
}
$model = new LoginForm();
if ($model->load(Yii::$app->request->post()) && $model->login()) {
return $this->goBack();
}
$model->password = '';
return $this->render('login', [
'model' => $model,
]);
return $this->render('authentication', compact('model'));
}
/**
@@ -91,11 +163,96 @@ class SiteController extends Controller
*
* @return Response
*/
public function actionLogout()
public function actionDeauthentication()
{
Yii::$app->user->logout();
if (Yii::$app->request->isAjax) {
// AJAX-POST-запрос
return $this->goHome();
Yii::$app->response->format = Response::FORMAT_JSON;
Yii::$app->user->logout();
return [
'menu' => '<a onclick="authentication()">Вход</a>',
'_csrf' => Yii::$app->request->getCsrfToken()
];
}
Yii::$app->response->redirect('/');
}
/**
* Login action.
*
* @return Response|string
*/
public function actionRegistration()
{
$model = new AccountForm(Yii::$app->request->post()['AccountForm'] ?? Yii::$app->request->get()['AccountForm'] ?? null);
$model->type = 0;
if (Yii::$app->request->isAjax) {
// AJAX-POST-запрос
Yii::$app->response->format = Response::FORMAT_JSON;
if (!Yii::$app->user->isGuest) {
// Аккаунт уже аутентифицирован
Yii::$app->response->statusCode = 302;
return [
'form' => $this->renderPartial('index'),
'_csrf' => Yii::$app->request->getCsrfToken()
];
}
if ($model->registration()) {
// Данные прошли проверку и аккаунт был создан
return [
'menu' => <<<HTML
<p class="m-0">
<a class="text-dark" href="/cart"><i class="fas fa-shopping-cart mr-4"></i></a>
<a class="text-dark" href="/orders"><i class="fas fa-list mr-4"></i></a>
<a class="text-dark" onclick="deauthentication()">Выход ($model->mail)</a>
</p>
HTML,
'form' => $this->renderPartial('index'),
'_csrf' => Yii::$app->request->getCsrfToken()
];
} else {
// Данные не прошли проверку
Yii::$app->response->statusCode = 400;
return [
'form' => $this->renderPartial('account', compact('model')),
'_csrf' => Yii::$app->request->getCsrfToken()
];
}
} else if (Yii::$app->request->isPost) {
// POST-запрос
return;
} else {
// GET-запрос и прочие
if (!Yii::$app->user->isGuest) {
// Аккаунт уже аутентифицирован
Yii::$app->response->redirect('/');
}
}
return $this->render('registration', compact('model'));
}
/**
* Displays профиль
*
* @return Response|string
*/
public function actionProfile()
{
$model = new Account();
return $this->render('profile', compact('model'));
}
/**

View File

@@ -0,0 +1,20 @@
<?php
use explosivebit\arangodb\Migration;
class m201219_074926_create_account_collection extends Migration
{
public function up()
{
$this->createCollection('account');
}
public function down()
{
// $this->delete('accounts', 'mail');
// $this->delete('accounts', 'name');
// $this->delete('accounts', 'pswd');
$this->dropCollection('account');
}
}

View File

@@ -0,0 +1,132 @@
<?php
namespace app\models;
use Yii;
use yii\web\IdentityInterface;
use explosivebit\arangodb\ActiveRecord;
class Account extends ActiveRecord implements IdentityInterface
{
public $_mail;
public $_pswd;
public $_name;
public $_simc;
public $_sity;
public $_comp;
public $_taxn;
public $_auth;
/**
* @return string the name of the index associated with this ActiveRecord class.
*/
public static function collectionName()
{
return 'account';
}
/**
* @return array list of attribute names.
*/
public function attributes()
{
return ['mail', 'pswd', 'auth', 'name' => 'sex', 'simc', 'sity', 'comp', 'taxn', 'auth'];
}
/**
* @return int|string current user ID
*/
public function getId()
{
return $this->mail;
}
/**
* @return string current user auth key
*/
public function getAuthKey()
{
return $this->auth;
}
/**
* Finds an identity by the given ID.
*
* @param string|int $id the ID to be looked for
* @return IdentityInterface|null the identity object that matches the given ID.
*/
public static function findIdentity($mail)
{
return static::findByMail($mail);
}
/**
* Finds an identity by the given token.
*
* @param string $token the token to be looked for
* @return IdentityInterface|null the identity object that matches the given token.
*/
public static function findIdentityByAccessToken($pass, $type = null)
{
return static::findOne(['pass' => $pass]);
}
/**
* Finds user by mail
*
* @param string $mail
* @return static|null
*/
public static function findByMail($mail)
{
return static::findOne(['mail' => $mail]);
}
/**
* Validates mail
*
* @param string $pswd password to validate
* @return bool if password provided is valid for current user
*/
public function validateMail($mail)
{
if (static::findByMail($mail)) {
// Почта найдена в базе данных
return false;
}
return true;
}
/**
* Validates password
*
* @param string $pswd password to validate
* @return bool if password provided is valid for current user
*/
public function validatePassword($pswd)
{
return Yii::$app->security->validatePassword($pswd, $this->pswd);
}
/**
* @param string $auth
* @return bool if auth key is valid for current user
*/
public function validateAuthKey($auth)
{
return $this->getAuthKey() === $auth;
}
public function beforeSave($insert)
{
if (parent::beforeSave($insert)) {
if ($this->isNewRecord) {
$this->auth = Yii::$app->security->generateRandomString();
}
return true;
}
return false;
}
}

View File

@@ -0,0 +1,151 @@
<?php
namespace app\models;
use Yii;
use yii\base\Model;
use app\models\Account;
/**
* AccountForm is the model behind the login form.
*
* @property-read Account|null $account This property is read-only.
*
*/
class AccountForm extends Model
{
public $mail;
public $pswd;
public $auto = true;
/**
* Тип обработки
*
* Регистрация: 0
* Аутентификация: 1
*
* @var integer
*/
public $type = 1;
private $account = false;
/**
* @return array the validation rules.
*/
public function rules()
{
return [
// Обязательные поля
[['mail', 'pswd'], 'required', 'message' => 'Заполните поле'],
// Функция "Запомнить меня"
['auto', 'boolean'],
// Проверка почты
['mail', 'validateMail', 'message'=>'Неправильная почта'],
// Проверка пароля
['pswd', 'validatePassword', 'message'=>'Неправильный пароль'],
];
}
public function attributeLabels()
{
return [
'mail' => 'Почта',
'pswd' => 'Пароль',
'auto' => 'Запомнить'
];
}
/**
* @param string $attribute the attribute currently being validated
* @param array $params the additional name-value pairs given in the rule
*/
public function validateMail($attribute, $params)
{
if (!$this->hasErrors() && $this->type === 0) {
// Проблем нет, обрабатывается событие регистрации
$account = $this->getAccount();
if (!$account || !$account->validateMail($this->mail)) {
// Проверка не пройдена
$this->addError($attribute, 'Почта уже привязана к другому аккаунту');
}
}
}
/**
* 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() && $this->type === 1) {
// Проблем нет, обрабатывается событие аутентификации
$account = $this->getAccount();
if (!$account || !$account->validatePassword($this->pswd)) {
// Проверка не пройдена
$this->addError($attribute, 'Проверьте входные данные');
}
}
}
/**
* Logs in a account using the provided accountname and password.
* @return bool whether the account is logged in successfully
*/
public function authentication()
{
if (isset($this->mail, $this->pswd) && $this->validate()) {
// Проверка пройдена
// Аутентификация
return Yii::$app->user->login($this->getAccount(), $this->auto ? 3600*24*30 : 0);
}
return false;
}
/**
* @return bool
*/
public function registration()
{
// Инициализация нового аккаунта
$this->account = new Account();
if (isset($this->mail, $this->pswd) && $this->validate()) {
// Проверка пройдена
// Запись параметров
$this->account->mail = $this->mail;
$this->account->pswd = Yii::$app->security->generatePasswordHash($this->pswd);
// Регистрация
return $this->account->save();
}
return false;
}
/**
* Finds account by [[accountname]]
*
* @return Account|null
*/
public function getAccount()
{
if ($this->account === false) {
$this->account = Account::findByMail($this->mail);
}
return $this->account;
}
}

View File

@@ -1,81 +0,0 @@
<?php
namespace app\models;
use Yii;
use yii\base\Model;
/**
* LoginForm is the model behind the login form.
*
* @property-read User|null $user This property is read-only.
*
*/
class LoginForm extends Model
{
public $username;
public $password;
public $rememberMe = true;
private $_user = false;
/**
* @return array the validation rules.
*/
public function rules()
{
return [
// username and password are both required
[['username', 'password'], 'required'],
// rememberMe must be a boolean value
['rememberMe', 'boolean'],
// password is validated by validatePassword()
['password', 'validatePassword'],
];
}
/**
* 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 bool 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);
}
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;
}
}

View File

@@ -17,26 +17,22 @@ AppAsset::register($this);
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php $this->registerCsrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<title><?= Html::encode($this->title ?? 'SkillParts') ?></title>
<?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>
<div class="wrap">
<header class="container">
<div class="row mt-3 mt-sm-0">
<header>
<div class="container">
<div class="row mt-3 mt-sm-0 pt-3">
<div class="col-3 col-sm-4 col-md-2 d-flex flex-column justify-content-end logotype">
<img class="img-fluid" src="/img/logo.jpg" alt="Аватар">
<small class="pt-0 d-block text-center tagline">Место под слоган</small>
<a href="/"><img class="img-fluid" src="/img/logos/skillparts.png" alt="SkillParts"></a>
</div>
<div class="col ml-auto text-right d-flex flex-column justify-content-end">
<div class="row">
<div class="col">
<p class="m-0"><i class="fas fa-shopping-cart mr-4"></i><i class="fas fa-list mr-4"></i><a>Личный кабинет</a></p>
</div>
<nav id="nav" class="col"></nav>
</div>
</div>
</div>
@@ -54,9 +50,9 @@ AppAsset::register($this);
</div>
<div class="row mb-4">
<div class="col-lg-3 pr-0 pr-lg-3 py-2 d-flex flex-column align-center justify-content-end dropdownMenuButton_column">
<button id="dropdownMenuButton" class="btn text-white form-control d-flex button_clean catalog_button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-bars col-2 p-0 d-flex flex-column justify-content-center"></i>
<div class="col-lg-3 pr-0 pr-lg-3 d-flex flex-column align-center justify-content-end dropdownMenuButton_column">
<button id="dropdownMenuButton" class="btn form-control d-flex align-items-center button_clean catalog_button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-bars col-auto text-left p-0 mr-auto h-100 d-flex flex-column justify-content-center"></i>
<p class="col-10 m-0 p-0">Каталог товаров</p>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
@@ -67,20 +63,20 @@ AppAsset::register($this);
</div>
<div id="searchPanel" class="col">
<input id="catalog_search_panel_button_1" class="btn btn-sm button_clean" type="radio" name="catalog_search_panel_buttons" value="catalog_search_panel_button_1" checked>
<label class="mb-0 px-3 px-md-4 px-lg-5 py-1" for="catalog_search_panel_button_1">Номер детали</label>
<!-- <input id="catalog_search_panel_button_1" class="btn btn-sm button_clean" type="radio" name="catalog_search_panel_buttons" value="catalog_search_panel_button_1" checked>
<label class="mb-0 px-3 px-md-4 py-1" for="catalog_search_panel_button_1">Номер детали</label>
<input id="catalog_search_panel_button_2" class="btn btn-sm text-white button_clean" type="radio" name="catalog_search_panel_buttons" value="catalog_search_panel_button_2">
<label class="mb-0 px-3 px-md-4 px-lg-5 py-1" for="catalog_search_panel_button_2">Вторая кнопка</label>
<label class="mb-0 px-3 px-md-4 py-1" for="catalog_search_panel_button_2">Вторая кнопка</label>
<input id="catalog_search_panel_button_3" class="btn btn-sm5 text-white button_clean" type="radio" name="catalog_search_panel_buttons" value="catalog_search_panel_button_3">
<label class="mb-0 px-3 px-md-4 px-lg-5 py-1" for="catalog_search_panel_button_3">Третья кнопка</label>
<form class="d-flex p-2 catalog_search">
<input type="text" class="form-control catalog_search_line col-8 col-lg-10 mr-2" id="productNumber" placeholder="Номер запчасти, например: 45223503481">
<button type="submit" class="col text-white btn button_clean catalog_search_button">ПОИСК</button>
<label class="mb-0 px-3 px-md-4 py-1" for="catalog_search_panel_button_3">Третья кнопка</label> -->
<form class="d-flex catalog_search">
<input type="text" class="form-control col-8 col-lg-10 catalog_search_line" id="productNumber" placeholder="Введите номер запчасти, например: 45223503481">
<button type="submit" class="col btn button_clean catalog_search_button">ПОИСК</button>
</form>
</div>
</div>
</header>
</div>
</div>
</header>
<main>
<?= $content ?>
@@ -88,17 +84,20 @@ AppAsset::register($this);
<footer class="py-4">
<div class="container">
<div class="row">
<div class="col-12 col-md-4 px-5 px-md-3">
<h5 class="mb-1"><b>Контакты</b></h5>
<small>Адрес: г. Хабаровск, ул. Промышленная 3, офис 105</small><br>
<small>Время работы: пн-пт 09:00-18:00</small><br>
<small>Телефон: +7 (4212) 35-85-34</small><br>
<small>Почта: info@skullparts.ru</smal>
<div class="row px-3">
<div class="col-12 col-md-auto mr-md-5">
<h5 class="row mb-2"><b>Контакты</b></h5>
<small class="row mb-1"><b>Адрес:&nbsp;</b>Хабаровск, Промышленная 3, 105</small>
<small class="row mb-1"><b>Время работы:&nbsp;</b>пн-пт 09:00-18:00</small>
<small class="row mb-1"><b>Телефон:&nbsp;</b>+7 (4212) 35-85-34</small>
<small class="row mb-1"><b>Почта:&nbsp;</b>info@skillparts.ru</small>
</div>
<div class="col-md-auto mr-md-5 partnership">
<h5 class="row mb-2"><b>Партнёрство</b></h5>
<small class="row mb-1"><a>Оптовым покупателям</a></small>
<small class="row mb-1"><a>Поставщикам</a></small>
<small class="row mb-1"><a>Партнерская сеть</a></small>
</div>
<!-- <p class="pull-left">&copy; My Company <?= date('Y') ?></p>
<p class="pull-right"><?= Yii::powered() ?></p> -->
</div>
</div>
</footer>

View File

@@ -0,0 +1,34 @@
<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use app\models\RegistrationForm;
?>
<div class="container d-flex flex-column">
<div class="row my-auto">
<div class="col-lg-4 mx-auto">
<?php $form = ActiveForm::begin([
'id' => 'form_account',
'action' => false,
'fieldConfig' => [
'template' => "{label}\n<div>{input}</div>\n<div>{error}</div>"
],
'options' => [
'onsubmit' => 'return false;'
]
]); ?>
<?= $form->field($model, 'mail')->textInput(['autofocus' => true]) ?>
<?= $form->field($model, 'pswd')->passwordInput() ?>
<?= $form->field($model, 'auto')->checkbox() ?>
<div class="d-flex">
<?= Html::submitButton('Войти', ['name' => 'submit', 'onclick' => 'authentication(this.parentElement.parentElement);', 'class' => 'btn btn-primary col-4']) ?>
<?= Html::submitButton('Регистрация', ['name' => 'submit', 'onclick' => 'registration(this.parentElement.parentElement);', 'class' => 'btn btn-success col-7 ml-auto']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>

View File

@@ -5,22 +5,40 @@
$this->title = 'SkillParts';
?>
<div class="row info_panel mb-4">
<div class="info_panel mb-4">
<div class="container h-100 d-flex flex-column justify-content-center">
<p class="col-lg-8 mb-4 gilroy">Проблема с подбором запчастей?</p>
<button class="text-white btn button_clean button_call">Связаться с менеджером</button>
<a class="text-white btn button_clean button_call" href="/call">Связаться с менеджером</a>
</div>
<div class="h-100 d-flex flex-column justify-content-end">
<img class="img-fluid" src="/img/photos/963K.webp" alt="Связаться с менеджером">
<img class="img-fluid" src="/img/photos/963K_cutted.webp" alt="Связаться с менеджером">
</div>
</div>
<div class="container pt-2">
<div class="row mb-3">
<div class="h-100 d-flex ticker">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/cummins.png" alt="Cummins">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/iveco.png" alt="Iveco">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/komatsu.png" alt="Komatsu">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/case.png" alt="Case">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/isuzu.png" alt="Isuzu">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/new_holland.png" alt="New Holland">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/perkins.png" alt="Perkins">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/john_deere.png" alt="John Deere">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/caterpillar.png" alt="Caterpillar">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/shantui.png" alt="Shantui">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/xcmg.png" alt="XCMG">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/kobelco.png" alt="Kobelco">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/shehwa.png" alt="SHEHWA">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/bomag.png" alt="BOMAG">
<img class="w-auto h-75 mr-3 my-auto" src="/img/logos/hitachi.png" alt="Hitachi">
</div>
<div class="container mb-4">
<!-- <div class="row mb-3">
<h4 class="col gilroy categories_blocks_panel_title">Сопутствующие товары</h4>
</div>
<div class="row mb-5 px-3 px-md-0">
<div class="col-12 col-md-6 col-lg-4 mb-3 mb-md-0 p-0 p-md-3 pl-md-0 d-flex flex-column">
</div> -->
<div class="row mb-5 mb-md-0 px-3 px-md-0">
<div class="col-12 col-md-6 col-lg-4 mb-4 mb-lg-0 py-0 d-flex flex-column">
<div class="px-3 px-xl-4 pt-3 d-inline-block category_block_title">
<h4 class="m-0">Масла, смазки</h4>
</div>
@@ -33,7 +51,7 @@ $this->title = 'SkillParts';
</dl>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4 mb-3 mb-md-0 p-0 p-md-3 pl-md-0 d-flex flex-column">
<div class="col-12 col-md-6 col-lg-4 mb-4 mb-lg-0 py-0 d-flex flex-column">
<div class="px-3 px-xl-4 pt-3 d-inline-block category_block_title">
<h4 class="m-0">Электрооборудование</h4>
</div>
@@ -43,7 +61,7 @@ $this->title = 'SkillParts';
</dl>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4 mb-3 mb-md-0 p-0 p-md-3 pl-md-0 d-flex flex-column">
<div class="col-12 col-md-6 col-lg-4 mb-4 mb-lg-0 py-0 d-flex flex-column">
<div class="px-3 px-xl-4 pt-3 d-inline-block category_block_title">
<h4 class="m-0">Инструмент</h4>
</div>

View File

@@ -1,47 +0,0 @@
<?php
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model app\models\LoginForm */
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-login">
<h1><?= Html::encode($this->title) ?></h1>
<p>Please fill out the following fields to login:</p>
<?php $form = ActiveForm::begin([
'id' => 'login-form',
'layout' => 'horizontal',
'fieldConfig' => [
'template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-8\">{error}</div>",
'labelOptions' => ['class' => 'col-lg-1 control-label'],
],
]); ?>
<?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?>
<?= $form->field($model, 'password')->passwordInput() ?>
<?= $form->field($model, 'rememberMe')->checkbox([
'template' => "<div class=\"col-lg-offset-1 col-lg-3\">{input} {label}</div>\n<div class=\"col-lg-8\">{error}</div>",
]) ?>
<div class="form-group">
<div class="col-lg-offset-1 col-lg-11">
<?= Html::submitButton('Login', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
<div class="col-lg-offset-1" style="color:#999;">
You may login with <strong>admin/admin</strong> or <strong>demo/demo</strong>.<br>
To modify the username/password, please check out the code <code>app\models\User::$users</code>.
</div>
</div>

View File

@@ -0,0 +1,63 @@
<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\captcha\Captcha;
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-contact">
<h1><?= Html::encode($this->title) ?></h1>
<?php if (Yii::$app->session->hasFlash('contactFormSubmitted')): ?>
<div class="alert alert-success">
Thank you for contacting us. We will respond to you as soon as possible.
</div>
<p>
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.
<?php if (Yii::$app->mailer->useFileTransport): ?>
Because the application is in development mode, the email is not sent but saved as
a file under <code><?= Yii::getAlias(Yii::$app->mailer->fileTransportPath) ?></code>.
Please configure the <code>useFileTransport</code> property of the <code>mail</code>
application component to be false to enable email sending.
<?php endif; ?>
</p>
<?php else: ?>
<p>
If you have business inquiries or other questions, please fill out the following form to contact us.
Thank you.
</p>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
<?= $form->field($model, 'name')->textInput(['autofocus' => true]) ?>
<?= $form->field($model, 'email') ?>
<?= $form->field($model, 'subject') ?>
<?= $form->field($model, 'body')->textarea(['rows' => 6]) ?>
<?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [
'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
]) ?>
<div class="form-group">
<?= Html::submitButton('Submit', ['class' => 'btn btn-primary', 'name' => 'contact-button']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
<?php endif; ?>
</div>

View File

@@ -18,15 +18,15 @@ ssl_certificate_key '%sprogdir%/userdata/config/cert_files/server.key'
# ssl_trusted_certificate '';
# Force HTTPS
# add_header Strict-Transport-Security 'max-age=2592000' always;
# if ($scheme ~* ^(?!https).*$) {
# return 301 https://$host$request_uri;
# }
add_header Strict-Transport-Security 'max-age=2592000' always;
if ($scheme ~* ^(?!https).*$) {
return 301 https://$host$request_uri;
}
# Force www.site.com => site.com
# if ($host ~* ^www\.(.+)$) {
# return 301 $scheme://$1$request_uri;
# }
if ($host ~* ^www\.(.+)$) {
return 301 $scheme://$1$request_uri;
}
# Disable access to backup/config/command/log files
# if ($uri ~* ^.+\.(?:bak|co?nf|in[ci]|log|orig|sh|sql|tar|sql|t?gz|cmd|bat)$) {
@@ -70,38 +70,6 @@ location / {
include '%sprogdir%/userdata/config/nginx_fastcgi_params.txt';
}
}
# Service configuration (do not edit!)
# ----------------------------
location /openserver/ {
root '%sprogdir%/modules/system/html';
autoindex off;
index index.php index.html index.htm;
%allow%allow all;
allow 127.0.0.0/8;
allow ::1/128;
allow %ips%;
deny all;
location ~* ^/openserver/.+\.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv|svgz?|ttf|ttc|otf|eot|woff2?)$ {
expires 1d;
access_log off;
}
location /openserver/server-status {
stub_status on;
}
location ~ ^/openserver/.*\.php$ {
try_files $fastcgi_script_name =404;
fastcgi_index index.php;
fastcgi_pass backend;
include '%sprogdir%/userdata/config/nginx_fastcgi_params.txt';
}
}
# End service configuration
# ----------------------------
}
# ----------------------------

View File

@@ -19,6 +19,7 @@
.category_block_title h4 {
font-weight: 700;
word-wrap: anywhere;
}
/* @media (max-width: 400px) {} */
@@ -33,8 +34,7 @@
.category_block_title {
width: 100%;
}
.category_block,
.category_block dl {
.category_block, .category_block dl {
margin: 0 !important;
padding: .5rem !important;
}

View File

@@ -2,5 +2,28 @@ footer {
width: 100%;
max-height: 15rem;
flex-shrink: 0;
background-color: #d9d7e1;
}
background-color: #fff;
}
/* @media (max-width: 400px) {} */
/* Малые девайсы («ландшафтные телефоны», >= 576px) */
/* @media (max-width: 576px) {} */
/* Средние девайсы («таблетки», >= 768px) */
@media (max-width: 768px) {
.partnership {
display: none;
}
}
/* Большие девайсы (десктопы, >= 992px) */
/* @media (max-width: 992px) {} */
/* Экстрабольшие девайсы (большие десктопы, >= 1200px) */
/* @media (max-width: 1200px) {} */

View File

@@ -1,3 +1,7 @@
header {
background-color: #fff;
}
.h-divider {
margin-top: -20px;
position: relative;
@@ -27,51 +31,68 @@
.catalog_button {
width: 100%;
height: 2rem;
border-radius: 3px;
transition: 0.3s;
background-color: #123EAB !important;
background-clip: unset;
border: 1px solid #a39bb1;
/* background-color: #123EAB; */
background-color: #e4e2ea;
}
.catalog_button:hover {
transition: 0.3s;
background-color: #6940ff !important;
border: 1px solid #c0b7d0;
/* background-color: #1b4bc4; */
background-color: #ebe9f2;
}
.catalog_button:active {
transition: 0.3s;
background-color: #402d82 !important;
.catalog_button:active, .catalog_button:focus {
border: 1px solid #7b7587;
/* background-color: #402d82; */
background-color: #d7d4dd;
}
.catalog_button p {
font-size: 85%;
line-height: 100%;
}
.dropdownMenuButton_column {
padding-bottom: 0.8rem;
}
.catalog_search {
border-radius: 0px 5px 5px 5px;
padding: 0.8rem;
/* border-radius: 0px 5px 5px 5px; */
border-radius: 5px;
background-color: #123EAB;
}
#searchPanel label {
display: inline-block;
cursor: pointer;
user-select: none;
font-size: smaller;
border-radius: 5px 5px 0px 0px;
color: #ececec;
background-color: #86f;
color: #000;
border-bottom: none;
background-color: #e4e2ea;
}
#searchPanel label:hover {
border-bottom: none;
background-color: #ebe9f2;
}
#searchPanel input[type=radio] {
display: none;
}
#searchPanel label {
cursor: pointer;
user-select: none;
}
#searchPanel label:hover {
color: #ffffff;
}
#searchPanel input[type=radio]+label:active, #searchPanel input[type=radio]:checked+label:active {
background-color: #402d82;
border-bottom: none;
background-color: #d7d4dd;
}
#searchPanel input[type=radio]:checked+label {
#searchPanel input[type=radio]:checked+label, #searchPanel input[type=radio]:checked:hover+label, #searchPanel input[type=radio]:checked:active+label {
color: #ffffff;
background-color: #123EAB;
}
@@ -82,21 +103,32 @@
}
.catalog_search_line {
height: 2rem;
margin: 0 .8rem 0 0;
font-size: 85%;
line-height: 100%;
border-radius: 3px;
border: 1px solid #a39bb1;
background-color: #fbf9ff !important;
}
.catalog_search_button {
height: 2rem;
font-size: 85%;
line-height: 100%;
border-radius: 3px;
background-color: #d53737;
border: 1px solid #a39bb1;
background-color: #e4e2ea;
}
.catalog_search_button:hover {
background-color: #ee4c4c;
border: 1px solid #c0b7d0;
background-color: #ebe9f2;
}
.catalog_search_button:active {
background-color: #c13131;
border: 1px solid #7b7587;
background-color: #d7d4dd;
}
@media (max-width: 400px) {
@@ -116,6 +148,7 @@
}
/* Малые девайсы («ландшафтные телефоны», >= 576px) */
@media (max-width: 576px) {
.tagline {
display: none !important;
@@ -133,10 +166,11 @@
}
/* Средние девайсы («таблетки», >= 768px) */
@media (max-width: 768px) {
}
@media (max-width: 768px) {}
/* Большие девайсы (десктопы, >= 992px) */
@media (max-width: 992px) {
.h-divider {
margin-top: 15px;
@@ -153,4 +187,5 @@
}
/* Экстрабольшие девайсы (большие десктопы, >= 1200px) */
@media (max-width: 1200px) {}

View File

@@ -4,12 +4,12 @@
}
.info_panel img {
left: 10vw;
scale: 1.2;
min-width: 100%;
min-height: 200%;
position: relative;
transform: scale(1.2);
object-fit: cover;
object-position: center bottom;
z-index: 0;
}
@@ -29,19 +29,15 @@
.info_panel .button_call {
width: 350px;
margin-left: 2vw;
background-color: #57a946;
background-color: #123EAB;
}
.info_panel .button_call:hover {
background-color: #5fb94c;
background-color: #1b4bc4;
}
.info_panel .button_call:active {
background-color: #468e37;
}
.catalog_search_button:active {
background-color: #c13131;
background-color: #402d82;
}
@media (max-width: 400px) {}
@@ -60,8 +56,7 @@
/* Средние девайсы («таблетки», >= 768px) */
@media (max-width: 768px) {
}
@media (max-width: 768px) {}
/* Большие девайсы (десктопы, >= 992px) */

View File

@@ -8,8 +8,12 @@
font-family: 'Open Sans';
}
a {
cursor: pointer;
}
button {
transition: 0.1s !important;
transition: 0s !important;
}
body {
@@ -17,11 +21,12 @@ body {
display: flex;
flex-direction: column;
overflow-x: hidden;
background-color: #f4f3ff;
}
main {
flex-grow: 1;
display: grid;
background-color: #f0eefb;
}
.button_clean, .button_clean:hover, .button_clean:focus, .button_clean:active {

View File

@@ -0,0 +1,12 @@
.bx-wrapper {
margin-bottom: 1.5rem !important;
width: 100vw;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.bx-wrapper .bx-viewport {
width: 100vw !important;
height: 2rem !important;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@@ -0,0 +1,157 @@
function identification() {
$.ajax({
url: '/identification',
type: 'post',
dataType: 'json',
data: {
'_csrf': yii.getCsrfToken()
},
success: function (data) {
// Обновление документа
if (data.menu != undefined) {
document.getElementById('nav').innerHTML = data.menu;
}
if (data._csrf != undefined) {
$('meta[name=csrf-token]').prop("content", data._csrf);
}
}
});
};
function authentication(form) {
if (form == undefined) {
form = {
'_csrf': yii.getCsrfToken()
};
} else {
form = $(form).serialize();
}
$.ajax({
url: '/authentication',
type: 'post',
dataType: 'json',
data: form,
success: function (data, status) {
// Обновление документа
if (data.menu != undefined) {
document.getElementById('nav').innerHTML = data.menu;
}
if (data.form != undefined) {
document.getElementsByTagName('main')[0].innerHTML = data.form;
}
if (data._csrf != undefined) {
$('meta[name=csrf-token]').prop("content", data._csrf);
}
// Перенаправление
history.pushState({}, document.title, '/');
// Реинициализация
reinitialization();
},
error: function (data, status) {
if (data.responseJSON.form != undefined) {
// Обновление документа
document.getElementsByTagName('main')[0].innerHTML = data.responseJSON.form;
// Реинициализация
reinitialization();
}
if (data.responseJSON._csrf != undefined) {
// Обновление документа
$('meta[name=csrf-token]').prop("content", data.responseJSON._csrf);
}
if (status === 403) {
// Перенаправление
history.pushState({}, document.title, '/');
}
// Реинициализация
reinitialization();
}
});
};
function deauthentication() {
$.ajax({
url: '/deauthentication',
type: 'post',
dataType: 'json',
data: { '_csrf': yii.getCsrfToken() },
success: function (data) {
if (data.menu != undefined) {
// Обновление документа
document.getElementById('nav').innerHTML = data.menu;
}
if (data.form != undefined) {
// Обновление документа
document.getElementsByTagName('main')[0].innerHTML = data.form;
// Реинициализация
reinitialization();
}
if (data._csrf != undefined) {
// Обновление документа
$('meta[name=csrf-token]').prop("content", data._csrf);
}
// Перенаправление
history.pushState({}, document.title, '/');
}
});
};
function registration(form) {
if (form == undefined) {
form = {
'_csrf': yii.getCsrfToken()
};
} else {
form = $(form).serialize();
}
$.ajax({
url: '/registration',
type: 'post',
dataType: 'json',
data: form,
success: function (data) {
if (data.menu != undefined) {
// Обновление документа
document.getElementById('nav').innerHTML = data.menu;
}
if (data.form != undefined) {
// Обновление документа
document.getElementsByTagName('main')[0].innerHTML = data.form;
// Реинициализация
reinitialization();
}
if (data._csrf != undefined) {
// Обновление документа
$('meta[name=csrf-token]').prop("content", data._csrf);
}
// Перенаправление
history.pushState({}, document.title, '/');
},
error: function (data) {
if (data.responseJSON.form != undefined) {
// Обновление документа
document.getElementsByTagName('main')[0].innerHTML = data.responseJSON.form;
// Реинициализация
reinitialization();
}
if (data.responseJSON._csrf != undefined) {
// Обновление документа
$('meta[name=csrf-token]').prop("content", data.responseJSON._csrf);
}
if (statis === 403) {
// Перенаправление
history.pushState({}, document.title, '/');
}
}
});
};
document.addEventListener('DOMContentLoaded', identification(), true);

View File

@@ -0,0 +1,5 @@
function reinitialization() {
// Функции которые должны быть запущены при инициализации документа
tickerInit('all');
}

View File

@@ -0,0 +1,15 @@
function tickerInit(ticker) {
ticker = $('.ticker').bxSlider({
minSlides: 1,
maxSlides: 100,
slideMargin: 0,
ticker: true,
speed: 80000
});
}
function tickerReinit(ticker) {
ticker.reloadSlider();
}
document.addEventListener('DOMContentLoaded', tickerInit(), true);