mirror of
https://github.com/janickiy/yii2-nomer
synced 2025-03-09 15:39:59 +00:00
add files to project
This commit is contained in:
commit
5cac498444
3729 changed files with 836998 additions and 0 deletions
18
config/assets.php
Normal file
18
config/assets.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
return [
|
||||
'app' => [
|
||||
'basePath' => '@webroot',
|
||||
'baseUrl' => '@web',
|
||||
'css' => [
|
||||
'css/source/fonts.css',
|
||||
'css/source/reset.css',
|
||||
'css/source/style.sass',
|
||||
],
|
||||
'js' => [
|
||||
|
||||
],
|
||||
'depends' => [
|
||||
'yii',
|
||||
],
|
||||
],
|
||||
];
|
52
config/console.php
Normal file
52
config/console.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
$params = require(__DIR__ . '/params.php');
|
||||
$db = require(__DIR__ . '/db.php');
|
||||
|
||||
$config = [
|
||||
'id' => 'basic-console',
|
||||
'basePath' => dirname(__DIR__),
|
||||
'bootstrap' => ['log', 'queue'],
|
||||
'controllerNamespace' => 'app\commands',
|
||||
'components' => [
|
||||
'queue' => [
|
||||
'class' => \zhuravljov\yii\queue\file\Queue::class,
|
||||
'path' => '@runtime/queue',
|
||||
],
|
||||
'cache' => [
|
||||
'class' => 'yii\caching\MemCache',
|
||||
'useMemcached' => true
|
||||
],
|
||||
'log' => [
|
||||
'targets' => [
|
||||
[
|
||||
'class' => 'yii\log\FileTarget',
|
||||
'levels' => ['error', 'warning'],
|
||||
],
|
||||
],
|
||||
],
|
||||
'db' => $db,
|
||||
'urlManager' => [
|
||||
'scriptUrl' => '',
|
||||
'hostInfo' => ''
|
||||
]
|
||||
],
|
||||
'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;
|
13
config/params.php
Normal file
13
config/params.php
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'adminEmail' => 'firedemonru@gmail.com',
|
||||
'user.remembermeduration' => 3600 * 24 * 30,
|
||||
'files' => '/home/nomer.io/files',
|
||||
'cost' => 98,
|
||||
'user.passwordResetTokenExpire' => 3600,
|
||||
'payModel' => true,
|
||||
'storage' => 'http://storage.apinomer.com',
|
||||
'storageUpload' => 'https://u158288:N46HNp0xUrzVCgSW@u158288.your-storagebox.de/apinomer/'
|
||||
//'yandexMoney' => \app\components\ConfigHelper::getInstance()->getYandexMoney()
|
||||
];
|
220
config/web.php
Normal file
220
config/web.php
Normal file
|
@ -0,0 +1,220 @@
|
|||
<?php
|
||||
|
||||
use app\components\AuthClientCollection;
|
||||
|
||||
$params = require(__DIR__ . '/params.php');
|
||||
|
||||
$config = [
|
||||
'id' => $_SERVER["HTTP_HOST"],
|
||||
'name' => preg_replace("/dev\-alexander\./", "", $_SERVER["HTTP_HOST"]),
|
||||
'basePath' => dirname(__DIR__),
|
||||
'charset' => 'utf-8',
|
||||
'bootstrap' => ['log', 'queue'],
|
||||
'language' => 'ru',
|
||||
'sourceLanguage' => 'ru',
|
||||
'timezone' => 'Europe/Moscow',
|
||||
'modules' => [
|
||||
'admin' => [
|
||||
'class' => 'app\modules\admin\AdminModule',
|
||||
],
|
||||
'api' => [
|
||||
'class' => 'app\modules\api\ApiModule',
|
||||
],
|
||||
],
|
||||
'components' => [
|
||||
'queue' => [
|
||||
'class' => \zhuravljov\yii\queue\file\Queue::class,
|
||||
'as log' => \zhuravljov\yii\queue\LogBehavior::class,
|
||||
'path' => '@runtime/queue'
|
||||
// Other driver options
|
||||
],
|
||||
'reCaptcha' => [
|
||||
'name' => 'reCaptcha',
|
||||
'class' => 'himiklab\yii2\recaptcha\ReCaptcha',
|
||||
'siteKey' => '6LdpNCMUAAAAAIcP8mBuH3JhDl8zP2QADGoFtVYw',
|
||||
'secret' => '6LdpNCMUAAAAABTYWw_Eaca7iGlbXaCWWe0fqqp7',
|
||||
],
|
||||
'formatter' => [
|
||||
'class' => 'app\components\Formatter',
|
||||
'numberFormatterOptions' => [
|
||||
NumberFormatter::MIN_FRACTION_DIGITS => 0,
|
||||
NumberFormatter::MAX_FRACTION_DIGITS => 2,
|
||||
],
|
||||
'defaultTimeZone' => 'Europe/Moscow',
|
||||
'nullDisplay' => ''
|
||||
],
|
||||
'devicedetect' => [
|
||||
'class' => 'alexandernst\devicedetect\DeviceDetect'
|
||||
],
|
||||
'authClientCollection' => [
|
||||
'class' => AuthClientCollection::class,
|
||||
],
|
||||
'assetManager' => [
|
||||
'appendTimestamp' => true,
|
||||
],
|
||||
'request' => [
|
||||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
|
||||
'cookieValidationKey' => 'HZ5DgjL?LqV~VcVq?EtdmrIWBsz{%WHl*ceiTJvV?*{PlEha|7b~6kv1bF~acxWG',
|
||||
],
|
||||
'cache' => [
|
||||
'class' => 'yii\caching\MemCache',
|
||||
'useMemcached' => true
|
||||
],
|
||||
'mailer' => [
|
||||
'class' => 'yii\swiftmailer\Mailer',
|
||||
'transport' => [
|
||||
'class' => 'Swift_SmtpTransport',
|
||||
'host' => 'smtp.gmail.com',
|
||||
'username' => 'no-reply@nomer.io',
|
||||
'password' => 'cJqLmVysMr2C',
|
||||
'port' => 465,
|
||||
'encryption' => 'ssl',
|
||||
],
|
||||
],
|
||||
'session' => [
|
||||
'cookieParams' => [
|
||||
'domain' => $_SERVER["HTTP_HOST"],
|
||||
'httpOnly' => true,
|
||||
],
|
||||
],
|
||||
'user' => [
|
||||
'identityClass' => 'app\models\User',
|
||||
'enableAutoLogin' => true,
|
||||
],
|
||||
'errorHandler' => [
|
||||
'errorAction' => 'site/error',
|
||||
],
|
||||
'log' => [
|
||||
'traceLevel' => YII_DEBUG ? 3 : 0,
|
||||
'targets' => [
|
||||
[
|
||||
'class' => 'yii\log\FileTarget',
|
||||
'levels' => ['error', 'warning'],
|
||||
'except' => ['yii\web\HttpException:404', 'yii\web\HttpException:400', 'yii\web\HttpException:403']
|
||||
],
|
||||
[
|
||||
'enabled' => (YII_ENV != 'dev'?true:false),
|
||||
'class' => 'airani\log\TelegramTarget',
|
||||
'levels' => ['error'],
|
||||
'botToken' => '377062288:AAEs1S7OPwRym49su6624iITRzmPddr_A4E', // bot token secret key
|
||||
'chatId' => '-1001076571212', // chat id or channel username with @ like 12345 or @channel
|
||||
'except' => ['yii\web\HttpException:404', 'yii\web\HttpException:400', 'yii\web\HttpException:403']
|
||||
],
|
||||
],
|
||||
],
|
||||
'db' => require(__DIR__ . '/db.php'),
|
||||
'urlManager' => [
|
||||
'enablePrettyUrl' => true,
|
||||
'showScriptName' => false,
|
||||
//'cache' => false,
|
||||
'rules' => [
|
||||
'https://apinomer.com/contact' => 'api/contact/index',
|
||||
'https://apinomer.com/status' => 'api/buy/status',
|
||||
'https://apinomer.com/buy' => 'api/buy/index',
|
||||
'https://apinomer.com/free' => 'api/free/index',
|
||||
|
||||
'https://apinomer.com/ponomeru' => 'api/ponomeru/index',
|
||||
|
||||
'https://apinomer.com/check/<phone:\d+>' => 'api/check/index',
|
||||
|
||||
|
||||
'https://apinomer.com/results/<id:\d+>' => 'api/result/index',
|
||||
'https://apinomer.com/search/' => 'api/search/index',
|
||||
'https://apinomer.com/telegram/<phone:\d+>' => 'api/telegram/index',
|
||||
'https://apinomer.com/plans/' => 'api/plans/index',
|
||||
'https://apinomer.com/info/' => 'api/info/index',
|
||||
'https://apinomer.com/search' => 'api/search/index',
|
||||
'https://apinomer.com/plans' => 'api/plans/index',
|
||||
'https://apinomer.com/info' => 'api/info/index',
|
||||
'https://apinomer.com/call' => 'api/call/index',
|
||||
'https://apinomer.com/notify/<token:>' => 'api/notify/index',
|
||||
'https://apinomer.com/history' => 'api/history/index',
|
||||
|
||||
'https://apinomer.com/exit' => 'api/signin/exit',
|
||||
'https://apinomer.com/signin/gg' => 'api/signin/google',
|
||||
'https://apinomer.com/signin/fb' => 'api/signin/facebook',
|
||||
'https://apinomer.com/signin/vk' => 'api/signin/vk',
|
||||
'https://apinomer.com/signin' => 'api/signin/index',
|
||||
'https://apinomer.com/signup' => 'api/signin/reg',
|
||||
|
||||
'https://apinomer.com/' => 'site/api',
|
||||
|
||||
'https://tels.gg/c/<code:\w+>' => 'site/code',
|
||||
'https://tels.io/c/<code:\w+>' => 'site/code',
|
||||
|
||||
'https://wcaller.com' => 'wcaller/index',
|
||||
'https://wcaller.ru' => 'wcaller/index',
|
||||
|
||||
|
||||
'ios_coming_soon' => 'site/ios',
|
||||
'find-phone' => 'site/find-phone',
|
||||
'signup' => 'site/signup',
|
||||
'signin' => 'site/signin',
|
||||
'remind' => 'site/remind',
|
||||
'logout' => 'site/logout',
|
||||
'auth' => 'site/auth',
|
||||
'confirm' => 'site/confirm',
|
||||
'contact' => 'site/contacts',
|
||||
'remind/<token:>' => 'site/remind',
|
||||
|
||||
'ref<id:\d+>' => 'referrals/new',
|
||||
|
||||
'fp/<hash>.gif' => 'site/fingerprint',
|
||||
'ec/<hash>.gif' => 'site/evercookie',
|
||||
|
||||
'images/<uuid>.jpg' => 'site/image',
|
||||
|
||||
'retargeting/<uuid>.gif' => 'retargeting/pic',
|
||||
'get/<uuid>' => 'retargeting/redirect',
|
||||
|
||||
'http://z.fcheck.ru/<phone:8[\d]{10}>' => 'frame/index',
|
||||
'http://z.fcheck.ru/<phone:8[\d]{10}>/<action>/<id:\d+>' => 'frame/<action>',
|
||||
'http://z.fcheck.ru/<phone:8[\d]{10}>/<action>' => 'frame/<action>',
|
||||
|
||||
|
||||
'<phone:8[\d]{10}>' => 'result/index',
|
||||
'<phone:8[\d]{10}>/<action>/<id:\d+>' => 'result/<action>',
|
||||
'<phone:8[\d]{10}>/<action>' => 'result/<action>',
|
||||
|
||||
'<module:(admin)>' => 'admin/dashboard/index',
|
||||
'<module:(admin)>/<controller:\w+>' => 'admin/<controller>/index',
|
||||
'<module:(admin)>/<controller:\w+>/<action>/<id:\d+>' => 'admin/<controller>/<action>',
|
||||
'<module:(admin)>/<controller:\w+>/<action>' => 'admin/<controller>/<action>',
|
||||
|
||||
'<controller:[A-Za-z]+>' => '<controller>/index',
|
||||
'<controller:[A-Za-z]+>/<action>/<id:\d+>' => '<controller>/<action>',
|
||||
'<controller:[A-Za-z]+>/<action>' => '<controller>/<action>',
|
||||
|
||||
|
||||
|
||||
|
||||
[
|
||||
'pattern' => '<phone>',
|
||||
'route' => 'site/redirect',
|
||||
'mode' => \yii\web\UrlRule::PARSING_ONLY
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => $params,
|
||||
];
|
||||
|
||||
if (YII_ENV_DEV && in_array($_SERVER["REMOTE_ADDR"], ['81.88.218.82', '82.204.203.174', '127.0.0.1'])) {
|
||||
// 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' => ['81.88.218.82', '82.204.203.174', '127.0.0.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;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue