Initial import

This commit is contained in:
Admin Nasledstvo
2026-05-01 20:52:04 +03:00
commit ac168868ee
10028 changed files with 2337954 additions and 0 deletions
@@ -0,0 +1,47 @@
<?php
$params = require __DIR__ . '/params.php';
$db = require __DIR__ . '/db.php';
$config = [
'id' => 'basic-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'app\commands',
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'db' => $db,
],
'params' => $params,
/*
'controllerMap' => [
'fixture' => [ // Fixture generation command line.
'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;
@@ -0,0 +1,17 @@
<?php
$host = '127.0.0.1';
$user = 'root';
$password = '';
$database = 'phplist';
return [
'class' => 'yii\db\Connection',
'dsn' => "mysql:host=$host;dbname=".$database,
'username' => $user,
'password' => $password,
'charset' => 'utf8',
'attributes' => [PDO::ATTR_CASE => PDO::CASE_LOWER],
// Schema cache options (for production environment)
//'enableSchemaCache' => true,
//'schemaCacheDuration' => 60,
//'schemaCache' => 'cache',
];
+154
View File
@@ -0,0 +1,154 @@
<?php
$params = require __DIR__ . '/params.php';
$db = require __DIR__ . '/db.php';
$db_settlements = require __DIR__ . '/db_settlements.php';
$db_register = require __DIR__ . '/db_register.php';
$db_phplist = require __DIR__ . '/db_phplist.php';
$config = [
'language' => $params['default_language'],
'id' => 'basic',
'basePath' => dirname(__DIR__),
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => 'cWnCnH7Uw0YFwXuqQNBcSDRZ1LuCYlcR',
'enableCsrfValidation' => false,
],
'cache' => [
'class' => 'yii\caching\FileCache',
],
'user' => [
'identityClass' => 'app\models\User',
'enableAutoLogin' => true,
],
'errorHandler' => [
'errorAction' => 'site/error',
'maxSourceLines' => 20,
],
'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'],
],
],
],
'db' => $db,
'db_settlements' => $db_settlements,
'db_register' => $db_register,
'db_phplist' => $db_phplist,
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'suffix' => '/',
'rules' => [
/* Web site */
//region [IMAGES]
'/get-img/<hash>' => '/file/get-img',
'/remove-img' => '/file/remove-img',
'/upload-crop' => '/file/upload-crop',
'/delete-crop' => '/file/delete-crop',
'/upload-file-cms' => '/file/upload-file-cms',
'/delete-file-cms' => '/file/delete-file-cms',
'/update-file-indexes' => '/file/update-file-indexes',
'/clear-file-temporary' => '/file/clear-temporary',
//endregion
//region [API]
'/api/<action>' => '/api/<action>',
'/api/<action>/<id>' => '/api/<action>',
'/api-sync/<action>/<actionType>' => '/api-sync/<action>',
'/settlements/<action>' => '/settlements/<action>',
'/media/<action>' => '/media/<action>',
'/media/<action>/<id>' => '/media/<action>',
//endregion
//region [REMOTE]
'/new-article-position' => '/remote/new-article-position',
'/get-article-positions' => '/remote/get-article-positions',
'/update-article-position' => '/remote/update-article-position',
'/update-positions-indexes/' => '/remote/update-positions-indexes/',
'/update-list-indexes' => '/remote/update-list-indexes',
'/new-sub-category' => '/remote/new-sub-category',
'/update-category-indexes' => '/remote/update-category-indexes',
'/new-common-field-option' => '/remote/new-common-field-option',
'/update-common-field-indexes' => '/remote/update-common-field-indexes',
'/remote/help-keys-remote/<page>' => '/remote/help-keys-remote',
'/remote/change-locale/' => '/remote/change-locale',
'/new-dynamic-field' => '/remote/new-dynamic-field',
'/update-dynamic-fields-indexes' => '/remote/update-dynamic-fields-indexes',
'/update-dynamic-type-values' => '/remote/update-dynamic-type-values',
'/get-object-types' => '/remote/get-object-types',
'/get-history' => '/remote/get-history',
//endregion
'/' => '/public/index',
//region [ADMIN GLOBAL]
'/cms-admin' => '/public/admin-global-login',
'/admin-global' => '/public/admin-register-login',
'/admin-global/logout' => '/admin-global/logout',
'/admin-global/<action>/<page>' => '/admin-global/<action>',
//endregion
//region [ADMIN CMS]
'/admin-cms' => '/public/admin-cms-login',
'/admin-cms/logout' => '/admin-cms/logout',
'/admin-cms/<action>/<page>' => '/admin-cms/<action>',
//endregion
//region [PARTNER]
//'/partner' => '/public/partner-login',
'/partner' => '/public/partner-register-login',
'/partner-register-login' => '/public/partner-register-login',
'/admin-register-login' => '/public/admin-register-login',
'partner/logout' => 'partner/logout',
'/partner/<action>/<page>' => '/partner/<action>',
//endregion
'/cms-logout' => '/public/cms-logout'
]
],
'i18n' => [
'translations' => [
'*' => [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@app/translations',
],
],
]
],
'params' => $params,
];
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
// 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;