Initial commit: apps.supersamsev.ru

This commit is contained in:
root committed 2026-10-21 23:46:31 +03:00
commit 54475e7d3d
17284 files changed
+98268

No files matched your search

+220
View File
@@ -0,0 +1,220 @@
<?php
return [
'debug' => false,
'Release' => "2.6.08",
'App' => [
'namespace' => 'App',
'encoding' => env('APP_ENCODING', 'UTF-8'),
'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'UTC'),
'base' => false,
'dir' => 'src',
'webroot' => 'webroot',
'wwwRoot' => WWW_ROOT,
'imageBaseUrl' => 'img/',
'cssBaseUrl' => 'css/',
'jsBaseUrl' => 'js/',
'paths' => [
'plugins' => [ROOT . DS . 'plugins' . DS],
'templates' => [APP . 'Template' . DS],
'locales' => [APP . 'Locale' . DS],
],
],
'Security' => [
'salt' => env('SECURITY_SALT', '2ae8d3f453c9f6a290a2fcdb173be1cf4acc871c6e656411c82aa331bbfefc18'),
],
'Asset' => [
// 'timestamp' => true,
],
'Cache' => [
'default' => [
'className' => 'File',
'path' => CACHE,
'url' => env('CACHE_DEFAULT_URL', null),
],
'_cake_core_' => [
'className' => 'File',
'prefix' => 'myapp_cake_core_',
'path' => CACHE . 'persistent/',
'serialize' => true,
'duration' => '+1 years',
'url' => env('CACHE_CAKECORE_URL', null),
],
'_cake_model_' => [
'className' => 'File',
'prefix' => 'myapp_cake_model_',
'path' => CACHE . 'models/',
'serialize' => true,
'duration' => '+1 years',
'url' => env('CACHE_CAKEMODEL_URL', null),
],
],
'Error' => [
'errorLevel' => E_ALL,
'exceptionRenderer' => 'Cake\Error\ExceptionRenderer',
'skipLog' => [],
'log' => true,
'trace' => true,
],
'Datasources' => [
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
'username' => 'supersam_apps',
'password' => 'Ft8wV%e3Fre#ZaH-nJ',
'database' => 'supersam_apps',
'encoding' => 'utf8',
'timezone' => 'UTC',
'flags' => [],
'cacheMetadata' => true,
'log' => false,
'quoteIdentifiers' => true,
'url' => env('DATABASE_URL', null),
],
],
'Log' => [
'debug' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'debug',
'url' => env('LOG_DEBUG_URL', null),
'scopes' => false,
'levels' => ['notice', 'info', 'debug'],
],
'error' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'error',
'url' => env('LOG_ERROR_URL', null),
'scopes' => false,
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
],
'queries' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'queries',
'url' => env('LOG_QUERIES_URL', null),
'scopes' => ['queriesLog'],
],
],
'Session' => [
'defaults' => 'php',
'ini' => [
'session.cookie_lifetime' => 18*60*60, //18h
'session.cookie_httponly' => true
],
'timeout' => 12 * 60 //12h
],
'mpdfPageParams' => [
'mode' => 'utf-8',
'format' => 'A4',
'default_font_size' => 0,
'default_font' => 'arial',
'margin_left' => 15,
'margin_right' => 15,
'margin_top' => 17,
'margin_bottom' => 30
],
'smsMinimalBalance' => 50,
"encrypt" => [
"key" => 'fsjlksf$#%WEtfvV34v59fHgi3rs0gBB<T58903--.we8934W$w3',
"cipher" => "AES-128-CBC",
"options" => OPENSSL_RAW_DATA,
"as_binary" => true
],
'ftpParams' => [
'ip' => '188.191.27.165',
'port' => 53530,
'username' => 'soronorus',
'password' => '5#NqtYB;XOC;!wAtp',
'importAppsDataFolder' => '/cut',
'importFasadDataFolder' => '/fasad',
'importAppsOrdersInfo' => '/out',
'sendManagerEmails' => '/to_send',
'acquiringOut' => '/supersamsev.ru/acquiring-in',
'acquiringIn' => '/supersamsev.ru/acquiring-out',
'acquiringRefund' => '/supersamsev.ru/refund',
'acquiring24Out' => '/supersam24.ru/acquiring-in',
'acquiring24In' => '/supersam24.ru/acquiring-out',
'acquiring24Refund' => '/supersam24.ru/refund',
'acquiringPrometeyOut' => '/prometeysev.ru/acquiring-in',
'acquiringPrometeyIn' => '/prometeysev.ru/acquiring-out',
'acquiringPrometeyRefund' => '/prometeysev.ru/refund',
],
'sberCheckParams' => [
'username' => 'data@mail.supersamsev.ru',
'password' => 'tigrissoro1',
'fromaddress' => 'sbbol@sberbank.ru',
'ftpOutFolder' => 'bank_sber'
],
'alfaCheckParams' => [
'username' => 'data@mail.supersamsev.ru',
'password' => 'tigrissoro1',
'fromaddress' => 'Messages@alfabank.ru',
'ftpOutFolder' => 'bank_alfa'
],
'elplat' => [
"apps.prometeysev.ru" => [
'login' => '1149204013925_1874',
"passwd" => '0d641c1ab1612f5283e1a8f890a37914',
"orgId" => '1874',
'apiUrl' => 'https://sbpekv2.el-plat.ru',
'elplatPhone' => '0079788382260',
],
"apps.supersam24.ru" => [
'login' => '317920400020202_2358',
"passwd" => 'c495cb4e306409c3d2f5388044bf7896',
"orgId" => '2358',
'apiUrl' => 'https://sbpekv2.el-plat.ru',
'elplatPhone' => '0079788382260',
],
"apps.supersamsev.ru" => [
'login' => '314920432100701_2401',
"passwd" => '936cdeccb6b181eb81b7799d7f081b9a',
"orgId" => '2401',
'apiUrl' => 'https://sbpekv2.el-plat.ru',
'elplatPhone' => '0079788382260',
]
],
'cloudPayments' => [
"apps.supersamsev.ru" => [
'paymentPublicId' => 'pk_d333b26f1184612a3f86c2dfe39db',
'apiKey' => 'e4c85e5d0e6990384bab39bce4c3f702',
'apiUrl' => 'https://api.cloudpayments.ru/'
],
"apps.supersam24.ru" => [
'paymentPublicId' => 'pk_9728ede44d3bde6a744acc4f0b682',
'apiKey' => '3a55f78c7058ca9fa3fe679772c83d16',
'apiUrl' => 'https://api.cloudpayments.ru/'
],
]
];
+254
View File
@@ -0,0 +1,254 @@
<?php
require __DIR__ . '/paths.php';
require CORE_PATH . 'config' . DS . 'bootstrap.php';
use Cake\Cache\Cache;
use Cake\Console\ConsoleErrorHandler;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Configure\Engine\PhpConfig;
use Cake\Core\Plugin;
use Cake\Database\Type;
use Cake\Datasource\ConnectionManager;
use Cake\Error\ErrorHandler;
use Cake\Http\ServerRequest;
use Cake\Log\Log;
use Cake\Mailer\Email;
use Cake\ORM\TableRegistry;
use Cake\Utility\Inflector;
use Cake\Utility\Security;
try {
Configure::config('default', new PhpConfig());
Configure::load('app', 'default', false);
} catch (\Exception $e) {
exit($e->getMessage() . "\n");
}
if (Configure::read('debug')) {
Configure::write('Cache._cake_model_.duration', '+2 minutes');
Configure::write('Cache._cake_core_.duration', '+2 minutes');
// disable router cache during development
Configure::write('Cache._cake_routes_.duration', '+2 seconds');
}
date_default_timezone_set('Europe/Moscow');
mb_internal_encoding(Configure::read('App.encoding'));
ini_set('intl.default_locale', Configure::read('App.defaultLocale'));
$isCli = PHP_SAPI === 'cli';
if ($isCli) {
(new ConsoleErrorHandler(Configure::read('Error')))->register();
} else {
(new ErrorHandler(Configure::read('Error')))->register();
}
if ($isCli) {
require __DIR__ . '/bootstrap_cli.php';
}
if (!Configure::read('App.fullBaseUrl')) {
$s = null;
if (env('HTTPS')) {
$s = 's';
}
$httpHost = env('HTTP_HOST');
if (isset($httpHost)) {
Configure::write('App.fullBaseUrl', 'http' . $s . '://' . $httpHost);
}
unset($httpHost, $s);
}
Cache::setConfig(Configure::consume('Cache'));
ConnectionManager::setConfig(Configure::consume('Datasources'));
//Email::setConfigTransport(Configure::consume('EmailTransport'));
//Email::setConfig(Configure::consume('Email'));
Log::setConfig(Configure::consume('Log'));
Security::setSalt(Configure::consume('Security.salt'));
ServerRequest::addDetector('mobile', function ($request) {
$detector = new \Detection\MobileDetect();
return $detector->isMobile();
});
ServerRequest::addDetector('tablet', function ($request) {
$detector = new \Detection\MobileDetect();
return $detector->isTablet();
});
Type::build('time')
->useImmutable();
Type::build('date')
->useImmutable();
Type::build('datetime')
->useImmutable();
Type::build('timestamp')
->useImmutable();
require_once(ROOT . DS . 'vendor' . DS . 'dbf' . DS . 'DBF.class.php');
require_once(ROOT . DS . 'vendor' . DS . 'sms' . DS . 'sms.ru.php');
require_once(ROOT . DS . 'vendor' . DS . 'browser_detection' . DS . 'BrowserDetection.php');
//require_once(ROOT . DS . 'vendor' . DS . 'mpdf' . DS . 'mpdf.php');
function cmpDetailsByBothSides($a, $b) {
if (max($a->width, $a->height) != max($b->width, $b->height)) {
return (max($a->width, $a->height) > max($b->width, $b->height)) ? -1 : 1;
} else {
if (min($a->width, $a->height) != min($b->width, $b->height)) {
return (min($a->width, $a->height) > min($b->width, $b->height)) ? -1 : 1;
} else {
if ($a->height != $b->height) {
return ($a->height > $b->height ) ? -1 : 1;
} else {
if ($a->width == $b->width ) {
return 0;
}
return ($a->width > $b->width ) ? -1 : 1;
}
}
}
}
function cmpDetailsByBothSidesReversed($a, $b) {
if (max($a->width, $a->height) != max($b->width, $b->height)) {
return (max($a->width, $a->height) > max($b->width, $b->height)) ? 1 : -1;
} else {
if (min($a->width, $a->height) != min($b->width, $b->height)) {
return (min($a->width, $a->height) > min($b->width, $b->height)) ? 1 : -1;
} else {
if ($a->height != $b->height) {
return ($a->height > $b->height ) ? 1 : -1;
} else {
if ($a->width == $b->width ) {
return 0;
}
return ($a->width > $b->width ) ? 1 : -1;
}
}
}
}
function cmpDetailsByWidth($a, $b) {
if ($a->width != $b->width) {
return ($a->width > $b->width ) ? -1 : 1;
} else {
return 0;
}
}
function cmpDetailsByWidthReversed($a, $b) {
if ($a->width != $b->width) {
return ($a->width > $b->width ) ? 1 : -1;
} else {
return 0;
}
}
function cmpDetailsByHeight($a, $b) {
if ($a->height != $b->height) {
return ($a->height > $b->height ) ? -1 : 1;
} else {
return 0;
}
}
function cmpDetailsByHeightReversed($a, $b) {
if ($a->height != $b->height) {
return ($a->height > $b->height ) ? 1 : -1;
} else {
return 0;
}
}
function cmpDetailsByBothSidesForToTop($a, $b) {
if ($a->height != $b->height) {
return ($a->height > $b->height ) ? -1 : 1;
} else {
if ($a->width != $b->width) {
return ($a->width > $b->width ) ? -1 : 1;
} else {
return 0;
}
}
}
if (!function_exists('mb_ucfirst') && function_exists('mb_substr')) {
function mb_ucfirst($string) {
$string = mb_strtoupper(mb_substr($string, 0, 1)) . mb_substr($string, 1);
return $string;
}
}
function toFixed2($num) {
return str_replace(".00", "", number_format(ceil($num * 10000) / 10000, 2, ".", ""));
}
function toFixed2Price($num) {
return number_format(str_replace(" ", "", $num), 2, ".", " ");
}
function cleanupPhone($phone) {
return str_replace(["+", "-", " ", "(", ")"], "", $phone);
}
function formatPhone($phone) {
return "+7 (" . substr($phone, 1, 3) . ") " . substr($phone, 4, 3) . "-" . substr($phone, 7, 2) . "-" . substr($phone, 9, 2);
}
function cleanupEmail($email) {
return str_replace([" "], "", $email);
}
function br2nl($str) {
return preg_replace('/\<br(\s*)?\/?\>/ui', "\r\n", $str);
}
function cleanupDetailLabel($label) {
return preg_replace("/_{2,}/", "_", preg_replace("/[^\w\d\\*]/ui", "_" , $label));
}
function cleanupDetailLabel2($label) {
return preg_replace("/_{2,}/", "_", preg_replace("/[^\w\d\\*\-]/ui", "_" , $label));
}
function counterPluralForm($number, $before, $after, $echoResults = false ) {
$cases = array(2,0,1,1,1,2);
$result = $before[($number % 100 > 4 && $number % 100 < 20) ? 2 : $cases[min($number % 10, 5)]] . ' ' . $number . ' ' . $after[($number % 100 > 4 && $number % 100 < 20) ? 2 : $cases[min($number % 10, 5)]];
if ($echoResults) {
echo $result;
} else {
return $result;
}
}
function readSberHeader($ch, $header) {
preg_match('/filename=\x22(.+?)\x22/', $header, $matches);
if (!empty($matches) && !empty($matches[1])) {
global $sberFilename;
$sberFilename = $matches[1];
}
return strlen($header);
}
+41
View File
@@ -0,0 +1,41 @@
<?php
use App\Application;
use Cake\Core\Configure;
use Cake\Core\Exception\MissingPluginException;
use Cake\Core\Plugin;
Configure::write('Log.error.file', 'cli-error');
try {
Application::addPlugin('Bake');
} catch (MissingPluginException $e) {
}
Application::addPlugin('Migrations');
function isLocked($lock_file) {
# If lock file exists, check if stale. If exists and is not stale, return TRUE
# Else, create lock file and return FALSE.
if( file_exists( $lock_file ) ) {
# check if it's stale
$lockingPID = trim( file_get_contents( $lock_file ) );
# Get all active PIDs.
$pids = explode( "\n", trim( `ps -e | awk '{print $1}'` ) );
# If PID is still active, return true
if( in_array( $lockingPID, $pids ) ) return true;
# Lock-file is stale, so kill it. Then move on to re-creating it.
//echo "Removing stale lock file.\n";
unlink( $lock_file );
}
file_put_contents( $lock_file, getmypid() . "\n" );
return false;
}
+86
View File
@@ -0,0 +1,86 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 3.0.0
* @license MIT License (https://opensource.org/licenses/mit-license.php)
*/
/**
* Use the DS to separate the directories in other defines
*/
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
/**
* These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed.
* When using custom settings be sure to use the DS and do not add a trailing DS.
*/
/**
* The full path to the directory which holds "src", WITHOUT a trailing DS.
*/
define('ROOT', dirname(__DIR__));
/**
* The actual directory name for the application directory. Normally
* named 'src'.
*/
define('APP_DIR', 'src');
/**
* Path to the application's directory.
*/
define('APP', ROOT . DS . APP_DIR . DS);
/**
* Path to the config directory.
*/
define('CONFIG', ROOT . DS . 'config' . DS);
/**
* File path to the webroot directory.
*/
define('WWW_ROOT', ROOT . DS . 'webroot' . DS);
/**
* Path to the tests directory.
*/
define('TESTS', ROOT . DS . 'tests' . DS);
/**
* Path to the temporary files directory.
*/
define('TMP', ROOT . DS . 'tmp' . DS);
/**
* Path to the logs directory.
*/
define('LOGS', ROOT . DS . 'logs' . DS);
/**
* Path to the cache files directory. It can be shared between hosts in a multi-server setup.
*/
define('CACHE', TMP . 'cache' . DS);
/**
* The absolute path to the "cake" directory, WITHOUT a trailing DS.
*
* CakePHP should always be installed with composer, so look there.
*/
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'vendor' . DS . 'cakephp' . DS . 'cakephp');
/**
* Path to the cake directory.
*/
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
define('CAKE', CORE_PATH . 'src' . DS);
+163
View File
@@ -0,0 +1,163 @@
<?php
use Cake\Core\Plugin;
use Cake\Routing\RouteBuilder;
use Cake\Routing\Router;
use Cake\Routing\Route\DashedRoute;
Router::defaultRouteClass(DashedRoute::class);
Router::scope('/', function (RouteBuilder $routes) {
$routes->connect('/cut', ['controller' => 'Cut', 'action' => 'display']);
$routes->connect('/', ['controller' => 'Cut', 'action' => 'display']);
$routes->connect('/cut_process', ['controller' => 'Cut', 'action' => 'cut']);
$routes->connect('/cut-print/:printType', ['controller' => 'Cut', 'action' => 'cut_print'], ['printType' => '\w+', 'pass' => ['printType']]);
$routes->connect('/calc-doors', ['controller' => 'CalcDoors', 'action' => 'display']);
$routes->connect('/calc-doors-process', ['controller' => 'CalcDoors', 'action' => 'calc_doors']);
$routes->connect('/calc-doors-print', ['controller' => 'CalcDoors', 'action' => 'calc_doors_print']);
$routes->connect('/fasad', ['controller' => 'Fasad', 'action' => 'display']);
$routes->connect('/fasad_process', ['controller' => 'Fasad', 'action' => 'fasad']);
$routes->connect('/fasad-print/:printType', ['controller' => 'Fasad', 'action' => 'fasad_print'], ['printType' => '\w+', 'pass' => ['printType']]);
$routes->connect('/orders-info', ['controller' => 'OrdersInfo', 'action' => 'display']);
$routes->connect('/orders-info-auth', ['controller' => 'OrdersInfo', 'action' => 'authorize']);
$routes->connect('/delivery', ['controller' => 'Delivery', 'action' => 'display']);
$routes->connect('/delivery/:city', ['controller' => 'Delivery', 'action' => 'display'], ['city' => '\w+', 'pass' => ['city']]);
$routes->connect('/order-payment/:encOrderId', ['controller' => 'OrderPayment', 'action' => 'display'], ['pass' => ['encOrderId']]);
$routes->connect('/callbacks/order-payment-pay', ['controller' => 'OrderPayment', 'action' => 'callback_pay']);
$routes->connect('/callbacks/order-payment-refund', ['controller' => 'OrderPayment', 'action' => 'callback_refund']);
$routes->connect('/get-order-payment-status', ['controller' => 'OrderPayment', 'action' => 'get_payment_status']);
$routes->connect('/create-elplat-payment-qr', ['controller' => 'OrderPayment', 'action' => 'create_elplat_payment_qr']);
$routes->connect('/get-elplat-payment-status', ['controller' => 'OrderPayment', 'action' => 'get_elpat_payment_status']);
$routes->connect('/callbacks/elplat-callback', ['controller' => 'OrderPayment', 'action' => 'callback_elplat']);
$routes->connect('/services', ['controller' => 'Pages', 'action' => 'services']);
Router::prefix('manager', function ($routes) {
$routes->connect('/', ['controller' => 'Managers', 'action' => 'index']);
$routes->connect('/settings', ['controller' => 'Settings', 'action' => 'index']);
$routes->connect('/save-settings', ['controller' => 'Settings', 'action' => 'save_settings']);
$routes->connect('/add-update-branch', ['controller' => 'Settings', 'action' => 'add_update_branch']);
$routes->connect('/delete-branch', ['controller' => 'Settings', 'action' => 'delete_branch']);
$routes->connect('/add-update-delivery', ['controller' => 'Settings', 'action' => 'add_update_delivery']);
$routes->connect('/delete-delivery', ['controller' => 'Settings', 'action' => 'delete_delivery']);
$routes->connect('/users', ['controller' => 'Users', 'action' => 'index']);
$routes->connect('/users-list', ['controller' => 'Users', 'action' => 'users_list']);
$routes->connect('/login', ['controller' => 'Users', 'action' => 'login']);
$routes->connect('/logout', ['controller' => 'Users', 'action' => 'logout']);
$routes->connect('/delete-user', ['controller' => 'Users', 'action' => 'delete']);
$routes->connect('/add-update-user', ['controller' => 'Users', 'action' => 'add_update_user']);
$routes->connect('/cut-settings', ['controller' => 'CutSettings', 'action' => 'index']);
$routes->connect('/cut-save-settings', ['controller' => 'CutSettings', 'action' => 'save_settings']);
$routes->connect('/cut-add-update-border-dimension', ['controller' => 'CutSettings', 'action' => 'add_update_border_dimension']);
$routes->connect('/cut-delete-border-dimension', ['controller' => 'CutSettings', 'action' => 'delete_border_dimension']);
$routes->connect('/cut-add-update-sheet-dimension', ['controller' => 'CutSettings', 'action' => 'add_update_sheet_dimension']);
$routes->connect('/cut-delete-sheet-dimension', ['controller' => 'CutSettings', 'action' => 'delete_sheet_dimension']);
$routes->connect('/cut-add-update-sheet', ['controller' => 'CutSettings', 'action' => 'add_update_sheet']);
$routes->connect('/cut-delete-sheet', ['controller' => 'CutSettings', 'action' => 'delete_sheet']);
$routes->connect('/cut-add-update-border', ['controller' => 'CutSettings', 'action' => 'add_update_border']);
$routes->connect('/cut-delete-border', ['controller' => 'CutSettings', 'action' => 'delete_border']);
$routes->connect('/cut-upload-image', ['controller' => 'CutSettings', 'action' => 'upload_image']);
$routes->connect('/cut-orders/client-:clientId', ['controller' => 'CutOrders', 'action' => 'index'], ['clientId' => '\d+', 'pass' => ['clientId']]);
$routes->connect('/cut-orders', ['controller' => 'CutOrders', 'action' => 'index']);
$routes->connect('/cut-get-orders-list', ['controller' => 'CutOrders', 'action' => 'get_orders']);
$routes->connect('/cut-take-order', ['controller' => 'CutOrders', 'action' => 'take_order']);
$routes->connect('/cut-admin-take-order', ['controller' => 'CutOrders', 'action' => 'admin_take_order']);
$routes->connect('/cut-admin-delete-order', ['controller' => 'CutOrders', 'action' => 'admin_delete_order']);
$routes->connect('/cut-download-order-files/:id', ['controller' => 'CutOrders', 'action' => 'download_order_files'], ['id' => '\d+', 'pass' => ['id']]);
$routes->connect('/convert-astra-to-bazis', ['controller' => 'CutOrders', 'action' => 'convert_astra_to_bazis']);
$routes->connect('/get-converted-astra-to-bazis-file/:filename/:name', ['controller' => 'CutOrders', 'action' => 'get_converted_astra_to_bazis_file'], ['pass' => ['filename', 'name']]);
$routes->connect('/cut-statistics', ['controller' => 'CutStatistics', 'action' => 'index']);
$routes->connect('/cut-get-statistics', ['controller' => 'CutStatistics', 'action' => 'get_statistics']);
$routes->connect('/cut-export-clients/:year', ['controller' => 'CutStatistics', 'action' => 'export_clients'], ['year' => '\w+', 'pass' => ['year']]);
$routes->connect('/calc-doors-settings', ['controller' => 'CalcDoorsSettings', 'action' => 'index']);
$routes->connect('/calc-doors-save-settings', ['controller' => 'CalcDoorsSettings', 'action' => 'save_settings']);
$routes->connect('/calc-doors-add-update-door', ['controller' => 'CalcDoorsSettings', 'action' => 'add_update_door']);
$routes->connect('/calc-doors-delete-door', ['controller' => 'CalcDoorsSettings', 'action' => 'delete_door']);
$routes->connect('/calc-doors-upload-image', ['controller' => 'CalcDoorsSettings', 'action' => 'upload_image']);
$routes->connect('/calc-doors-orders/client-:clientId', ['controller' => 'CalcDoorsOrders', 'action' => 'index'], ['clientId' => '\d+', 'pass' => ['clientId']]);
$routes->connect('/calc-doors-orders', ['controller' => 'CalcDoorsOrders', 'action' => 'index']);
$routes->connect('/calc-doors-get-orders-list', ['controller' => 'CalcDoorsOrders', 'action' => 'get_orders']);
$routes->connect('/calc-doors-take-order', ['controller' => 'CalcDoorsOrders', 'action' => 'take_order']);
$routes->connect('/calc-doors-admin-take-order', ['controller' => 'CalcDoorsOrders', 'action' => 'admin_take_order']);
$routes->connect('/calc-doors-admin-delete-order', ['controller' => 'CalcDoorsOrders', 'action' => 'admin_delete_order']);
$routes->connect('/calc-doors-download-order-files/:id', ['controller' => 'CalcDoorsOrders', 'action' => 'download_order_files'], ['id' => '\d+', 'pass' => ['id']]);
$routes->connect('/calc-doors-statistics', ['controller' => 'CalcDoorsStatistics', 'action' => 'index']);
$routes->connect('/calc-doors-get-statistics', ['controller' => 'CalcDoorsStatistics', 'action' => 'get_statistics']);
$routes->connect('/calc-doors-export-clients/:year', ['controller' => 'CalcDoorsStatistics', 'action' => 'export_clients'], ['year' => '\w+', 'pass' => ['year']]);
$routes->connect('/fasad-settings', ['controller' => 'FasadSettings', 'action' => 'index']);
$routes->connect('/fasad-save-settings', ['controller' => 'FasadSettings', 'action' => 'save_settings']);
$routes->connect('/fasad-add-update-border-dimension', ['controller' => 'FasadSettings', 'action' => 'add_update_border_dimension']);
$routes->connect('/fasad-delete-border-dimension', ['controller' => 'FasadSettings', 'action' => 'delete_border_dimension']);
$routes->connect('/fasad-add-update-sheet-dimension', ['controller' => 'FasadSettings', 'action' => 'add_update_sheet_dimension']);
$routes->connect('/fasad-delete-sheet-dimension', ['controller' => 'FasadSettings', 'action' => 'delete_sheet_dimension']);
$routes->connect('/fasad-add-update-sheet', ['controller' => 'FasadSettings', 'action' => 'add_update_sheet']);
$routes->connect('/fasad-delete-sheet', ['controller' => 'FasadSettings', 'action' => 'delete_sheet']);
$routes->connect('/fasad-add-update-border', ['controller' => 'FasadSettings', 'action' => 'add_update_border']);
$routes->connect('/fasad-delete-border', ['controller' => 'FasadSettings', 'action' => 'delete_border']);
$routes->connect('/fasad-upload-image', ['controller' => 'FasadSettings', 'action' => 'upload_image']);
$routes->connect('/fasad-orders/client-:clientId', ['controller' => 'FasadOrders', 'action' => 'index'], ['clientId' => '\d+', 'pass' => ['clientId']]);
$routes->connect('/fasad-orders', ['controller' => 'FasadOrders', 'action' => 'index']);
$routes->connect('/fasad-get-orders-list', ['controller' => 'FasadOrders', 'action' => 'get_orders']);
$routes->connect('/fasad-take-order', ['controller' => 'FasadOrders', 'action' => 'take_order']);
$routes->connect('/fasad-admin-take-order', ['controller' => 'FasadOrders', 'action' => 'admin_take_order']);
$routes->connect('/fasad-admin-delete-order', ['controller' => 'FasadOrders', 'action' => 'admin_delete_order']);
$routes->connect('/fasad-download-order-files/:id', ['controller' => 'FasadOrders', 'action' => 'download_order_files'], ['id' => '\d+', 'pass' => ['id']]);
$routes->connect('/fasad-statistics', ['controller' => 'FasadStatistics', 'action' => 'index']);
$routes->connect('/fasad-get-statistics', ['controller' => 'FasadStatistics', 'action' => 'get_statistics']);
$routes->connect('/fasad-export-clients/:year', ['controller' => 'FasadStatistics', 'action' => 'export_clients'], ['year' => '\w+', 'pass' => ['year']]);
$routes->connect('/sms-subscribes', ['controller' => 'SmsSubscribes', 'action' => 'index']);
$routes->connect('/sms-orders-ready', ['controller' => 'SmsOrdersReady', 'action' => 'index']);
$routes->connect('/order-payment', ['controller' => 'OrderPayment', 'action' => 'index']);
$routes->connect('/order-payment-admin-delete-order', ['controller' => 'OrderPayment', 'action' => 'admin_delete_order']);
$routes->connect('/get-elplat-payment-history', ['controller' => 'OrderPayment', 'action' => 'get_elplat_payment_history']);
$routes->connect('/make-elplat-refund', ['controller' => 'OrderPayment', 'action' => 'make_elplat_refund']);
$routes->connect('/get-cloud-payments-payment-history', ['controller' => 'OrderPayment', 'action' => 'get_cloud_payments_payment_history']);
$routes->connect('/make-cloud-payments-refund', ['controller' => 'OrderPayment', 'action' => 'make_cloud_payments_refund']);
$routes->connect('/email-subscribes', ['controller' => 'EmailSubscribes', 'action' => 'index']);
$routes->connect('/get-email-subscribe-attachment/:filename/:name', ['controller' => 'EmailSubscribes', 'action' => 'get_subscribe_attachment'], ['pass' => ['filename', 'name']]);
$routes->connect('/get-email-subscribe-attachment-image/:filename', ['controller' => 'EmailSubscribes', 'action' => 'get_subscribe_attachment_image'], ['pass' => ['filename']]);
$routes->connect('/delivery-journal', ['controller' => 'DeliveryJournal', 'action' => 'index']);
$routes->connect('/orders-info-settings', ['controller' => 'OrdersInfoSettings', 'action' => 'index']);
$routes->connect('/orders-info-save-settings', ['controller' => 'OrdersInfoSettings', 'action' => 'save_settings']);
$routes->connect('/orders-info', ['controller' => 'OrdersInfo', 'action' => 'index']);
$routes->connect('/orders-info-admin-delete-order', ['controller' => 'OrdersInfo', 'action' => 'admin_delete_order']);
});
$routes->fallbacks(DashedRoute::class);
});
+18
View File
@@ -0,0 +1,18 @@
# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
#
# Licensed under The MIT License
# For full copyright and license information, please see the LICENSE.txt
# Redistributions of files must retain the above copyright notice.
# MIT License (https://opensource.org/licenses/mit-license.php)
CREATE TABLE i18n (
id int NOT NULL auto_increment,
locale varchar(6) NOT NULL,
model varchar(255) NOT NULL,
foreign_key int(10) NOT NULL,
field varchar(255) NOT NULL,
content text,
PRIMARY KEY (id),
UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field),
INDEX I18N_FIELD(model, foreign_key, field)
);
+15
View File
@@ -0,0 +1,15 @@
# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
#
# Licensed under The MIT License
# For full copyright and license information, please see the LICENSE.txt
# Redistributions of files must retain the above copyright notice.
# MIT License (https://opensource.org/licenses/mit-license.php)
CREATE TABLE `sessions` (
`id` char(40) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`created` datetime DEFAULT CURRENT_TIMESTAMP, -- optional, requires MySQL 5.6.5+
`modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- optional, requires MySQL 5.6.5+
`data` blob DEFAULT NULL, -- for PostgreSQL use bytea instead of blob
`expires` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;