after 6 years update. hell yeah

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2025-05-15 19:04:24 +07:00
parent 7e1993730a
commit bb3a611b7d
57 changed files with 1221 additions and 1125 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
codeception.yml Normal file → Executable file
View File

10
composer.json Normal file → Executable file
View File

@ -1,19 +1,19 @@
{ {
"name": "mirzaev/beejee", "name": "mirzaev/beejee",
"description": "Test BeeJee", "description": "Task manager. MVC + CRUD. Developed in 2 days (2019)",
"type": "project", "type": "project",
"license": "AGPL-3.0-or-later", "license": "WTFPL",
"homepage": "https://git.hood.su/mirzaev/beejee", "homepage": "https://git.hood.su/mirzaev/beejee",
"authors": [ "authors": [
{ {
"name": "Arsen Mirzaev Tatyano-Muradovich", "name": "Arsen Mirzaev Tatyano-Muradovich",
"email": "red@hood.su", "email": "arsen@mirzaev.sexy",
"role": "Developer" "role": "Developer"
} }
], ],
"require": { "require": {
"php": ">=7.4.0", "php": ">=8.4.0",
"ext-PDO": "^7.4", "ext-PDO": "^8.4",
"twbs/bootstrap": "^4.5", "twbs/bootstrap": "^4.5",
"twig/twig": "^3.1" "twig/twig": "^3.1"
}, },

1751
composer.lock generated Normal file → Executable file

File diff suppressed because it is too large Load Diff

0
mirzaev/beejee/system/controllers/authController.php Normal file → Executable file
View File

4
mirzaev/beejee/system/controllers/controller.php Normal file → Executable file
View File

@ -39,6 +39,7 @@ class controller
{ {
// Установка значения по умолчанию для модели (если будет найдена) // Установка значения по умолчанию для модели (если будет найдена)
$this->__get('model'); $this->__get('model');
// Установка значения по умолчанию для шаблонизатора представлений // Установка значения по умолчанию для шаблонизатора представлений
$this->__get('view'); $this->__get('view');
} }
@ -102,7 +103,8 @@ class controller
return $this->model; return $this->model;
} else { } else {
// Инициализация класса модели // Инициализация класса модели
$model = preg_replace('/' . core::controllerPostfix() . '$/i', '', basename(get_class($this))) . core::modelPostfix(); $model = preg_replace('/' . core::controllerPostfix() . '$/i', '', substr($this::class, strrpos($this::class, '\\') + 1)) . core::modelPostfix();
// Иначе // Иначе
if (class_exists($model_class = core::namespace() . '\\models\\' . $model)) { if (class_exists($model_class = core::namespace() . '\\models\\' . $model)) {
// Если найдена одноимённая с контроллером модель (без постфикса) // Если найдена одноимённая с контроллером модель (без постфикса)

0
mirzaev/beejee/system/controllers/errorsController.php Normal file → Executable file
View File

2
mirzaev/beejee/system/controllers/mainController.php Normal file → Executable file
View File

@ -21,6 +21,8 @@ final class mainController extends controller
{ {
$tasks = new tasksController; $tasks = new tasksController;
$params['page'] ??= '/';
// Нормализация // Нормализация
$page['current'] = filter_var($params['page'], FILTER_SANITIZE_NUMBER_INT); $page['current'] = filter_var($params['page'], FILTER_SANITIZE_NUMBER_INT);
$page['sort'] = filter_var($params['page'], FILTER_SANITIZE_STRING); $page['sort'] = filter_var($params['page'], FILTER_SANITIZE_STRING);

4
mirzaev/beejee/system/controllers/tasksController.php Normal file → Executable file
View File

@ -55,7 +55,7 @@ final class tasksController extends controller
{ {
// Нормализация // Нормализация
$page['current'] = filter_var(filter_var($params['page'], FILTER_SANITIZE_NUMBER_INT), FILTER_VALIDATE_INT, ['options' => ['default' => 1]]); $page['current'] = filter_var(filter_var($params['page'], FILTER_SANITIZE_NUMBER_INT), FILTER_VALIDATE_INT, ['options' => ['default' => 1]]);
$page['sort'] = filter_var($params['sort'], FILTER_SANITIZE_STRING); $page['sort'] = filter_var($params['sort'] ?? '', FILTER_SANITIZE_STRING);
// Инициализация параметров // Инициализация параметров
$limit = 3; $limit = 3;
@ -142,6 +142,6 @@ final class tasksController extends controller
*/ */
public function count(): int public function count(): int
{ {
return $this->model->count(); return $this->__get('model')->count();
} }
} }

0
mirzaev/beejee/system/core.php Normal file → Executable file
View File

0
mirzaev/beejee/system/models/authModel.php Normal file → Executable file
View File

View File

@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace mirzaev\beejee\models;
use mirzaev\beejee\models\model;
use PDO;
/**
* Бебра
*
* @package mirzaev\beejee\models
* @author Arsen Mirzaev Tatyano-Muradovich <red@hood.su>
*/
final class mainModel extends model {}

0
mirzaev/beejee/system/models/model.php Normal file → Executable file
View File

0
mirzaev/beejee/system/models/tasksModel.php Normal file → Executable file
View File

0
mirzaev/beejee/system/public/Nginx_1.17_vhost.conf Normal file → Executable file
View File

0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-grid.css vendored Normal file → Executable file
View File

View File

0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-grid.min.css vendored Normal file → Executable file
View File

View File

0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-reboot.css vendored Normal file → Executable file
View File

View File

0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-reboot.min.css vendored Normal file → Executable file
View File

0
mirzaev/beejee/system/public/css/bootstrap/bootstrap.css vendored Normal file → Executable file
View File

View File

0
mirzaev/beejee/system/public/css/bootstrap/bootstrap.min.css vendored Normal file → Executable file
View File

View File

0
mirzaev/beejee/system/public/css/main.css Normal file → Executable file
View File

0
mirzaev/beejee/system/public/img/avatar.webp Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

2
mirzaev/beejee/system/public/index.php Normal file → Executable file
View File

@ -25,4 +25,4 @@ router::create('deauth', 'auth', 'deauth', 'POST');
router::create('auth', 'auth', 'genSidebarPanel', 'GET'); router::create('auth', 'auth', 'genSidebarPanel', 'GET');
router::create('reg', 'auth', 'reg', 'POST'); router::create('reg', 'auth', 'reg', 'POST');
new Core('mysql:dbname=beejee;host=127.0.0.1', 'root', 'root'); new Core('mysql:dbname=task_manager;unix_socket=/run/mysqld/mysqld.sock', login: 'magomed', password: 'varyeniki_besplatno_1988');

0
mirzaev/beejee/system/public/js/auth.js Normal file → Executable file
View File

0
mirzaev/beejee/system/public/js/bootstrap/bootstrap.bundle.js vendored Normal file → Executable file
View File

View File

0
mirzaev/beejee/system/public/js/bootstrap/bootstrap.bundle.min.js vendored Normal file → Executable file
View File

View File

0
mirzaev/beejee/system/public/js/bootstrap/bootstrap.js vendored Normal file → Executable file
View File

View File

0
mirzaev/beejee/system/public/js/bootstrap/bootstrap.min.js vendored Normal file → Executable file
View File

View File

View File

0
mirzaev/beejee/system/public/js/tasks.js Normal file → Executable file
View File

0
mirzaev/beejee/system/router.php Normal file → Executable file
View File

0
mirzaev/beejee/system/views/auth/auth_sidebar.html Normal file → Executable file
View File

0
mirzaev/beejee/system/views/main/index.html Normal file → Executable file
View File

0
mirzaev/beejee/system/views/tasks/list.html Normal file → Executable file
View File

0
mirzaev/beejee/tests/.gitignore vendored Normal file → Executable file
View File

0
mirzaev/beejee/tests/MainCest.php Normal file → Executable file
View File

0
mirzaev/beejee/tests/_data/.gitkeep Normal file → Executable file
View File

0
mirzaev/beejee/tests/_output/.gitkeep Normal file → Executable file
View File

View File

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

0
mirzaev/beejee/tests/_output/failed Normal file → Executable file
View File

0
mirzaev/beejee/tests/_support/AcceptanceTester.php Normal file → Executable file
View File

0
mirzaev/beejee/tests/_support/Helper/Acceptance.php Normal file → Executable file
View File

View File